|
@@ -1,29 +1,26 @@
|
|
|
<?php
|
|
<?php
|
|
|
declare(strict_types=1);
|
|
declare(strict_types=1);
|
|
|
/** @var FreshRSS_View $this */
|
|
/** @var FreshRSS_View $this */
|
|
|
- //TODO: To reduce output size, replace by an on-demand JavaScript menu, potentially using HTML template element
|
|
|
|
|
?>
|
|
?>
|
|
|
<ul class="dropdown-menu">
|
|
<ul class="dropdown-menu">
|
|
|
<li class="dropdown-header"><?= _t('index.share') ?> <a href="<?= _url('configure', 'integration') ?>"><?= _i('configure') ?></a></li><?php
|
|
<li class="dropdown-header"><?= _t('index.share') ?> <a href="<?= _url('configure', 'integration') ?>"><?= _i('configure') ?></a></li><?php
|
|
|
- $id = $this->entry->id();
|
|
|
|
|
- $link = $this->entry->link();
|
|
|
|
|
- $title = $this->entry->title() . ' · ' . ($this->feed === null ? '' : $this->feed->name());
|
|
|
|
|
|
|
+ $link = '--link--';
|
|
|
|
|
+ $title = '--titleText----websiteName----articleAuthors--';
|
|
|
foreach (FreshRSS_Context::userConf()->sharing as $share_options) {
|
|
foreach (FreshRSS_Context::userConf()->sharing as $share_options) {
|
|
|
$share = FreshRSS_Share::get($share_options['type']);
|
|
$share = FreshRSS_Share::get($share_options['type']);
|
|
|
if ($share === null) {
|
|
if ($share === null) {
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
$cssClass = $share->isDeprecated() ? ' error' : '';
|
|
$cssClass = $share->isDeprecated() ? ' error' : '';
|
|
|
- $share_options['id'] = $id;
|
|
|
|
|
$share_options['link'] = $link;
|
|
$share_options['link'] = $link;
|
|
|
$share_options['title'] = $title;
|
|
$share_options['title'] = $title;
|
|
|
$share->update($share_options);
|
|
$share->update($share_options);
|
|
|
?><li class="item share<?= $cssClass ?>">
|
|
?><li class="item share<?= $cssClass ?>">
|
|
|
<?php if ('GET' === $share->method()) {
|
|
<?php if ('GET' === $share->method()) {
|
|
|
if ($share->HTMLtag() !== 'button') {?>
|
|
if ($share->HTMLtag() !== 'button') {?>
|
|
|
- <a target="_blank" rel="noreferrer" href="<?= $share->url() ?>" data-type="<?= $share->type() ?>"><?= $share->name() ?></a>
|
|
|
|
|
|
|
+ <a target="_blank" rel="noreferrer" href="<?= $share->url() ?>" data-type="<?= $share->type() ?>"><?= $share->name() ?></a>
|
|
|
<?php } else { ?>
|
|
<?php } else { ?>
|
|
|
- <button type="button" class="as-link" data-url="<?= $share->url() ?>" data-type="<?= $share->type() ?>" data-title="<?= htmlspecialchars($title) ?>"><?= $share->name() ?></button>
|
|
|
|
|
|
|
+ <button type="button" class="as-link" data-url="<?= $share->url() ?>" data-type="<?= $share->type() ?>" data-title="<?= htmlspecialchars($title) ?>"><?= $share->name() ?></button>
|
|
|
<?php
|
|
<?php
|
|
|
}
|
|
}
|
|
|
} else {?>
|
|
} else {?>
|