diff options
Diffstat (limited to 'app/views/helpers')
| -rw-r--r-- | app/views/helpers/export/opml.phtml | 2 | ||||
| -rw-r--r-- | app/views/helpers/index/normal/entry_bottom.phtml | 46 | ||||
| -rw-r--r-- | app/views/helpers/index/normal/entry_header.phtml | 8 | ||||
| -rw-r--r-- | app/views/helpers/javascript_vars.phtml | 16 | ||||
| -rwxr-xr-x | app/views/helpers/pagination.phtml | 2 |
5 files changed, 36 insertions, 38 deletions
diff --git a/app/views/helpers/export/opml.phtml b/app/views/helpers/export/opml.phtml index 8622d9144..236cca303 100644 --- a/app/views/helpers/export/opml.phtml +++ b/app/views/helpers/export/opml.phtml @@ -2,7 +2,7 @@ $opml_array = array( 'head' => array( - 'title' => Minz_Configuration::title(), + 'title' => FreshRSS_Context::$system_conf->title, 'dateCreated' => date('D, d M Y H:i:s') ), 'body' => array() 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 diff --git a/app/views/helpers/index/normal/entry_header.phtml b/app/views/helpers/index/normal/entry_header.phtml index 3d8b089b9..dc544298f 100644 --- a/app/views/helpers/index/normal/entry_header.phtml +++ b/app/views/helpers/index/normal/entry_header.phtml @@ -1,8 +1,8 @@ <?php - $topline_read = FreshRSS_Context::$conf->topline_read; - $topline_favorite = FreshRSS_Context::$conf->topline_favorite; - $topline_date = FreshRSS_Context::$conf->topline_date; - $topline_link = FreshRSS_Context::$conf->topline_link; + $topline_read = FreshRSS_Context::$user_conf->topline_read; + $topline_favorite = FreshRSS_Context::$user_conf->topline_favorite; + $topline_date = FreshRSS_Context::$user_conf->topline_date; + $topline_link = FreshRSS_Context::$user_conf->topline_link; ?><ul class="horizontal-list flux_header"><?php if (FreshRSS_Auth::hasAccess()) { if ($topline_read) { diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml index 6577e0109..fec3a6f7c 100644 --- a/app/views/helpers/javascript_vars.phtml +++ b/app/views/helpers/javascript_vars.phtml @@ -1,12 +1,12 @@ "use strict"; <?php -$mark = FreshRSS_Context::$conf->mark_when; +$mark = FreshRSS_Context::$user_conf->mark_when; $mail = Minz_Session::param('mail', false); $auto_actualize = Minz_Session::param('actualize_feeds', false); -$hide_posts = (FreshRSS_Context::$conf->display_posts || +$hide_posts = (FreshRSS_Context::$user_conf->display_posts || Minz_Request::param('output') === 'reader'); -$s = FreshRSS_Context::$conf->shortcuts; +$s = FreshRSS_Context::$user_conf->shortcuts; $url_login = Minz_Url::display(array( 'c' => 'auth', @@ -20,16 +20,16 @@ $url_logout = Minz_Url::display(array( echo 'var context={', 'auto_remove_article:', FreshRSS_Context::isAutoRemoveAvailable() ? 'true' : 'false', ',', 'hide_posts:', $hide_posts ? 'false' : 'true', ',', - 'display_order:"', Minz_Request::param('order', FreshRSS_Context::$conf->sort_order), '",', + 'display_order:"', Minz_Request::param('order', FreshRSS_Context::$user_conf->sort_order), '",', 'auto_mark_article:', $mark['article'] ? 'true' : 'false', ',', 'auto_mark_site:', $mark['site'] ? 'true' : 'false', ',', 'auto_mark_scroll:', $mark['scroll'] ? 'true' : 'false', ',', - 'auto_load_more:', FreshRSS_Context::$conf->auto_load_more ? 'true' : 'false', ',', + 'auto_load_more:', FreshRSS_Context::$user_conf->auto_load_more ? 'true' : 'false', ',', 'auto_actualize_feeds:', $auto_actualize ? 'true' : 'false', ',', - 'does_lazyload:', FreshRSS_Context::$conf->lazyload ? 'true' : 'false', ',', + 'does_lazyload:', FreshRSS_Context::$user_conf->lazyload ? 'true' : 'false', ',', 'sticky_post:', FreshRSS_Context::isStickyPostEnabled() ? 'true' : 'false', ',', - 'html5_notif_timeout:', FreshRSS_Context::$conf->html5_notif_timeout, ',', - 'auth_type:"', Minz_Configuration::authType(), '",', + 'html5_notif_timeout:', FreshRSS_Context::$user_conf->html5_notif_timeout, ',', + 'auth_type:"', FreshRSS_Context::$system_conf->auth_type, '",', 'current_user_mail:', $mail ? ('"' . $mail . '"') : 'null', ',', 'current_view:"', Minz_Request::param('output', 'normal'), '"', "},\n"; diff --git a/app/views/helpers/pagination.phtml b/app/views/helpers/pagination.phtml index 8b40e4336..b20201c4b 100755 --- a/app/views/helpers/pagination.phtml +++ b/app/views/helpers/pagination.phtml @@ -24,7 +24,7 @@ </a> <?php } elseif ($url_mark_read) { ?> <button id="bigMarkAsRead" - class="as-link <?php echo FreshRSS_Context::$conf->reading_confirm ? 'confirm' : ''; ?>" + class="as-link <?php echo FreshRSS_Context::$user_conf->reading_confirm ? 'confirm' : ''; ?>" form="mark-read-pagination" formaction="<?php echo Minz_Url::display($url_mark_read); ?>" type="submit"> |
