aboutsummaryrefslogtreecommitdiff
path: root/app/layout/nav_menu.phtml
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2018-02-24 12:02:16 +0100
committerGravatar GitHub <noreply@github.com> 2018-02-24 12:02:16 +0100
commit5ebeb9e3e5d46195a83211140c1d28d58be19b2a (patch)
tree6b93ae52a1206b6045087f893dde67a04b4e1bda /app/layout/nav_menu.phtml
parent889888f20eb6f3dd476b78c0f59672f7c7962354 (diff)
parent294f9336ad0f315574c74d6b527b1bb8a280f3c6 (diff)
Merge pull request #1786 from FreshRSS/dev1.10.0
FreshRSS 1.10.0
Diffstat (limited to 'app/layout/nav_menu.phtml')
-rw-r--r--app/layout/nav_menu.phtml29
1 files changed, 14 insertions, 15 deletions
diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml
index 2bc693e5d..ab82c723f 100644
--- a/app/layout/nav_menu.phtml
+++ b/app/layout/nav_menu.phtml
@@ -131,20 +131,19 @@
<?php $url_output = Minz_Request::currentRequest(); ?>
<div class="stick" id="nav_menu_views">
- <?php $url_output['a'] = 'normal'; ?>
- <a class="view_normal btn <?php echo $actual_view == 'normal'? 'active' : ''; ?>" title="<?php echo _t('index.menu.normal_view'); ?>" href="<?php echo Minz_Url::display($url_output); ?>">
- <?php echo _i("view-normal"); ?>
- </a>
-
- <?php $url_output['a'] = 'global'; ?>
- <a class="view_global btn <?php echo $actual_view == 'global'? 'active' : ''; ?>" title="<?php echo _t('index.menu.global_view'); ?>" href="<?php echo Minz_Url::display($url_output); ?>">
- <?php echo _i("view-global"); ?>
- </a>
-
- <?php $url_output['a'] = 'reader'; ?>
- <a class="view_reader btn <?php echo $actual_view == 'reader'? 'active' : ''; ?>" title="<?php echo _t('index.menu.reader_view'); ?>" href="<?php echo Minz_Url::display($url_output); ?>">
- <?php echo _i("view-reader"); ?>
- </a>
+ <?php
+ $readingModes = FreshRSS_ReadingMode::getReadingModes();
+ $readingModes = Minz_ExtensionManager::callHook('nav_reading_modes', $readingModes);
+
+ /** @var FreshRSS_ReadingMode $mode */
+ foreach ($readingModes as $mode) {
+ ?>
+ <a class="<?php echo $mode->getId(); ?> btn <?php if ($mode->isActive()) { echo 'active'; } ?>" title="<?php echo $mode->getTitle(); ?>" href="<?php echo Minz_Url::display($mode->getUrlParams()); ?>">
+ <?php echo $mode->getName(); ?>
+ </a>
+ <?php
+ }
+ ?>
<?php
$url_output['a'] = 'rss';
@@ -156,7 +155,7 @@
$url_output['params']['hours'] = FreshRSS_Context::$user_conf->since_hours_posts_per_rss;
}
?>
- <a class="view_rss btn" target="_blank" rel="noreferrer" title="<?php echo _t('index.menu.rss_view'); ?>" href="<?php echo Minz_Url::display($url_output); ?>">
+ <a class="view-rss btn" target="_blank" rel="noreferrer" title="<?php echo _t('index.menu.rss_view'); ?>" href="<?php echo Minz_Url::display($url_output); ?>">
<?php echo _i('rss'); ?>
</a>
</div>