aboutsummaryrefslogtreecommitdiff
path: root/app/views/helpers/index/normal/entry_bottom.phtml
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2015-01-08 14:18:32 +0100
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2015-01-08 14:18:32 +0100
commit73023bc12b81a27045703e1f733faeb2b4e02cec (patch)
tree14aca1a1953d0a813c06794e48a63738abccdcea /app/views/helpers/index/normal/entry_bottom.phtml
parent26da4aa448906f857a252507b34d369a386043c6 (diff)
parent0e4e16ac55097aa173c7c439367294ebd7645562 (diff)
Merge branch 'dev' into 252-extensions
Conflicts: app/FreshRSS.php app/Models/Configuration.php app/views/index/index.phtml app/views/index/normal.phtml lib/Minz/Configuration.php lib/Minz/Translate.php lib/lib_rss.php
Diffstat (limited to 'app/views/helpers/index/normal/entry_bottom.phtml')
-rw-r--r--app/views/helpers/index/normal/entry_bottom.phtml46
1 files changed, 22 insertions, 24 deletions
diff --git a/app/views/helpers/index/normal/entry_bottom.phtml b/app/views/helpers/index/normal/entry_bottom.phtml
index a9f5389df..32317d027 100644
--- a/app/views/helpers/index/normal/entry_bottom.phtml
+++ b/app/views/helpers/index/normal/entry_bottom.phtml
@@ -1,15 +1,15 @@
<?php
$sharing = array();
if (FreshRSS_Auth::hasAccess()) {
- $sharing = FreshRSS_Context::$conf->sharing;
+ $sharing = FreshRSS_Context::$user_conf->sharing;
}
- $bottomline_read = FreshRSS_Context::$conf->bottomline_read;
- $bottomline_favorite = FreshRSS_Context::$conf->bottomline_favorite;
- $bottomline_sharing = FreshRSS_Context::$conf->bottomline_sharing && (count($sharing) > 0);
- $bottomline_tags = FreshRSS_Context::$conf->bottomline_tags;
- $bottomline_date = FreshRSS_Context::$conf->bottomline_date;
- $bottomline_link = FreshRSS_Context::$conf->bottomline_link;
+ $bottomline_read = FreshRSS_Context::$user_conf->bottomline_read;
+ $bottomline_favorite = FreshRSS_Context::$user_conf->bottomline_favorite;
+ $bottomline_sharing = FreshRSS_Context::$user_conf->bottomline_sharing && (count($sharing) > 0);
+ $bottomline_tags = FreshRSS_Context::$user_conf->bottomline_tags;
+ $bottomline_date = FreshRSS_Context::$user_conf->bottomline_date;
+ $bottomline_link = FreshRSS_Context::$user_conf->bottomline_link;
?><ul class="horizontal-list bottom"><?php
if (FreshRSS_Auth::hasAccess()) {
if ($bottomline_read) {
@@ -35,29 +35,27 @@
} ?>
<li class="item"><?php
if ($bottomline_sharing) {
- $link = urlencode($this->entry->link());
- $title = urlencode($this->entry->title() . ' · ' . $this->feed->name());
?><div class="dropdown">
- <div id="dropdown-share-<?php echo $this->entry->id();?>" class="dropdown-target"></div>
- <a class="dropdown-toggle" href="#dropdown-share-<?php echo $this->entry->id();?>">
+ <div id="dropdown-share-<?php echo $item->id();?>" class="dropdown-target"></div>
+ <a class="dropdown-toggle" href="#dropdown-share-<?php echo $item->id();?>">
<?php echo _i('share'); ?>
<?php echo _t('index.share'); ?>
</a>
<ul class="dropdown-menu">
- <li class="dropdown-close"><a href="#close">❌</a></li>
- <?php
- foreach ($sharing as $share) {
- $type_share = FreshRSS_Context::$conf->shares[$share['type']];
- $has_specific_title = ($type_share['form'] === 'advanced');
- ?>
- <li class="item share">
- <a target="_blank" href="<?php echo FreshRSS_Share::generateUrl(FreshRSS_Context::$conf->shares, $share, $this->entry->link(), $this->entry->title() . ' . ' . $this->feed->name())?>">
- <?php echo $has_specific_title ? $share['name'] : _t('index.share.' . $share['name']); ?>
- </a>
- </li>
- <?php } ?>
- </ul>
+ <li class="dropdown-close"><a href="#close">❌</a></li><?php
+ $link = $item->link();
+ $title = $item->title() . ' · ' . $feed->name();
+ foreach (FreshRSS_Context::$user_conf->sharing as $share_options) {
+ $share = FreshRSS_Share::get($share_options['type']);
+ $share_options['link'] = $link;
+ $share_options['title'] = $title;
+ $share->update($share_options);
+ ?><li class="item share">
+ <a target="_blank" href="<?php echo $share->url(); ?>"><?php echo $share->name(); ?></a>
+ </li><?php
+ }
+ ?></ul>
</div>
<?php } ?>
</li><?php