diff options
| author | 2014-09-26 14:50:33 +0200 | |
|---|---|---|
| committer | 2014-09-26 14:50:33 +0200 | |
| commit | f0fb1fbb07347d3a2fd7b853bff1f91807cd2d89 (patch) | |
| tree | 4566beb83704d5b2bbcb128749da042cdaa4e619 /app/layout | |
| parent | 94ad9cf073962d9ff8076ef8e0db35e513d565a7 (diff) | |
| parent | c14162221365077bcaeecde7127806190490dd58 (diff) | |
Merge branch 'dev' into beta
Diffstat (limited to 'app/layout')
| -rw-r--r-- | app/layout/aside_configure.phtml | 38 | ||||
| -rw-r--r-- | app/layout/aside_flux.phtml | 74 | ||||
| -rw-r--r-- | app/layout/header.phtml | 6 | ||||
| -rw-r--r-- | app/layout/layout.phtml | 1 | ||||
| -rw-r--r-- | app/layout/nav_menu.phtml | 175 |
5 files changed, 172 insertions, 122 deletions
diff --git a/app/layout/aside_configure.phtml b/app/layout/aside_configure.phtml index e66f2f64c..d5c9bf4c9 100644 --- a/app/layout/aside_configure.phtml +++ b/app/layout/aside_configure.phtml @@ -1,25 +1,33 @@ <ul class="nav nav-list aside"> - <li class="nav-header"><?php echo Minz_Translate::t ('configuration'); ?></li> - <li class="item<?php echo Minz_Request::actionName () == 'display' ? ' active' : ''; ?>"> - <a href="<?php echo _url ('configure', 'display'); ?>"><?php echo Minz_Translate::t ('display_configuration'); ?></a> + <li class="nav-header"><?php echo _t('configuration'); ?></li> + <li class="item<?php echo Minz_Request::actionName() === 'display' ? ' active' : ''; ?>"> + <a href="<?php echo _url('configure', 'display'); ?>"><?php echo _t('display_configuration'); ?></a> </li> - <li class="item<?php echo Minz_Request::actionName () == 'reading' ? ' active' : ''; ?>"> - <a href="<?php echo _url ('configure', 'reading'); ?>"><?php echo Minz_Translate::t ('reading_configuration'); ?></a> + <li class="item<?php echo Minz_Request::actionName() === 'reading' ? ' active' : ''; ?>"> + <a href="<?php echo _url('configure', 'reading'); ?>"><?php echo _t('reading_configuration'); ?></a> </li> - <li class="item<?php echo Minz_Request::actionName () == 'archiving' ? ' active' : ''; ?>"> - <a href="<?php echo _url ('configure', 'archiving'); ?>"><?php echo Minz_Translate::t ('archiving_configuration'); ?></a> + <li class="item<?php echo Minz_Request::actionName() === 'archiving' ? ' active' : ''; ?>"> + <a href="<?php echo _url('configure', 'archiving'); ?>"><?php echo _t('archiving_configuration'); ?></a> </li> - <li class="item<?php echo Minz_Request::actionName () == 'sharing' ? ' active' : ''; ?>"> - <a href="<?php echo _url ('configure', 'sharing'); ?>"><?php echo Minz_Translate::t ('sharing'); ?></a> + <li class="item<?php echo Minz_Request::actionName() === 'sharing' ? ' active' : ''; ?>"> + <a href="<?php echo _url('configure', 'sharing'); ?>"><?php echo _t('sharing'); ?></a> </li> - <li class="item<?php echo Minz_Request::actionName () == 'shortcut' ? ' active' : ''; ?>"> - <a href="<?php echo _url ('configure', 'shortcut'); ?>"><?php echo Minz_Translate::t ('shortcuts'); ?></a> + <li class="item<?php echo Minz_Request::actionName() === 'shortcut' ? ' active' : ''; ?>"> + <a href="<?php echo _url('configure', 'shortcut'); ?>"><?php echo _t('shortcuts'); ?></a> </li> - <li class="item<?php echo Minz_Request::actionName () == 'queries' ? ' active' : ''; ?>"> - <a href="<?php echo _url ('configure', 'queries'); ?>"><?php echo Minz_Translate::t ('queries'); ?></a> + <li class="item<?php echo Minz_Request::actionName() === 'queries' ? ' active' : ''; ?>"> + <a href="<?php echo _url('configure', 'queries'); ?>"><?php echo _t('queries'); ?></a> </li> <li class="separator"></li> - <li class="item<?php echo Minz_Request::actionName () == 'users' ? ' active' : ''; ?>"> - <a href="<?php echo _url ('configure', 'users'); ?>"><?php echo Minz_Translate::t ('users'); ?></a> + <li class="item<?php echo Minz_Request::actionName() === 'users' ? ' active' : ''; ?>"> + <a href="<?php echo _url('configure', 'users'); ?>"><?php echo _t('users'); ?></a> </li> + <?php + $current_user = Minz_Session::param('currentUser', ''); + if (Minz_Configuration::isAdmin($current_user)) { + ?> + <li class="item<?php echo Minz_Request::controllerName() === 'update' ? ' active' : ''; ?>"> + <a href="<?php echo _url('update', 'index'); ?>"><?php echo _t('update'); ?></a> + </li> + <?php } ?> </ul> diff --git a/app/layout/aside_flux.phtml b/app/layout/aside_flux.phtml index 432d6fdb7..aac3c0896 100644 --- a/app/layout/aside_flux.phtml +++ b/app/layout/aside_flux.phtml @@ -1,16 +1,18 @@ <div class="aside aside_flux<?php if ($this->conf->hide_read_feeds && ($this->state & FreshRSS_Entry::STATE_NOT_READ) && !($this->state & FreshRSS_Entry::STATE_READ)) echo ' state_unread'; ?>" id="aside_flux"> - <a class="toggle_aside" href="#close"><?php echo FreshRSS_Themes::icon('close'); ?></a> + <a class="toggle_aside" href="#close"><?php echo _i('close'); ?></a> <ul class="categories"> <?php if ($this->loginOk) { ?> + <form id="mark-read-aside" method="post" style="display: none"></form> + <li> - <div class="stick"> - <a class="btn btn-important" href="<?php echo _url ('configure', 'feed'); ?>"><?php echo Minz_Translate::t ('subscription_management'); ?></a> - <a class="btn btn-important" href="<?php echo _url ('configure', 'categorize'); ?>" title="<?php echo Minz_Translate::t ('categories_management'); ?>"><?php echo FreshRSS_Themes::icon('category-white'); ?></a> + <div class="stick configure-feeds"> + <a class="btn btn-important" href="<?php echo _url('configure', 'feed'); ?>"><?php echo _t('subscription_management'); ?></a> + <a class="btn btn-important" href="<?php echo _url('configure', 'categorize'); ?>" title="<?php echo _t('categories_management'); ?>"><?php echo _i('category-white'); ?></a> </div> </li> <?php } elseif (Minz_Configuration::needsLogin()) { ?> - <li><a href="<?php echo _url ('index', 'about'); ?>"><?php echo Minz_Translate::t ('about_freshrss'); ?></a></li> + <li><a href="<?php echo _url('index', 'about'); ?>"><?php echo _t('about_freshrss'); ?></a></li> <?php } ?> <?php @@ -22,8 +24,8 @@ <li> <div class="category all<?php echo $this->get_c == 'a' ? ' active' : ''; ?>"> <a data-unread="<?php echo formatNumber($this->nb_not_read); ?>" class="btn<?php echo $this->get_c == 'a' ? ' active' : ''; ?>" href="<?php echo Minz_Url::display($arUrl); ?>"> - <?php echo FreshRSS_Themes::icon('all'); ?> - <?php echo Minz_Translate::t ('main_stream'); ?> + <?php echo _i('all'); ?> + <?php echo _t('main_stream'); ?> </a> </div> </li> @@ -31,44 +33,42 @@ <li> <div class="category favorites<?php echo $this->get_c == 's' ? ' active' : ''; ?>"> <a data-unread="<?php echo formatNumber($this->nb_favorites['unread']); ?>" class="btn<?php echo $this->get_c == 's' ? ' active' : ''; ?>" href="<?php $arUrl['params']['get'] = 's'; echo Minz_Url::display($arUrl); ?>"> - <?php echo FreshRSS_Themes::icon('bookmark'); ?> - <?php echo Minz_Translate::t('favorite_feeds', formatNumber($this->nb_favorites['all'])); ?> + <?php echo _i('bookmark'); ?> + <?php echo _t('favorite_feeds', formatNumber($this->nb_favorites['all'])); ?> </a> </div> </li> <?php foreach ($this->cat_aside as $cat) { - $feeds = $cat->feeds (); - if (!empty ($feeds)) { + $feeds = $cat->feeds(); + if (!empty($feeds)) { $c_active = false; - if ($this->conf->display_categories) { - if ($this->get_c == $cat->id () && $this->get_f) { - $c_active = true; - } - } else { - if ($this->get_c == $cat->id ()) { - $c_active = true; + $c_show = false; + if ($this->get_c == $cat->id()) { + $c_active = true; + if (!$this->conf->display_categories || $this->get_f) { + $c_show = true; } } ?><li data-unread="<?php echo $cat->nbNotRead(); ?>"<?php if ($c_active) echo ' class="active"'; ?>><?php ?><div class="category stick<?php echo $c_active ? ' active' : ''; ?>"><?php - ?><a data-unread="<?php echo formatNumber($cat->nbNotRead()); ?>" class="btn<?php echo $c_active ? ' active' : ''; ?>" href="<?php $arUrl['params']['get'] = 'c_' . $cat->id(); echo Minz_Url::display($arUrl); ?>"><?php echo $cat->name (); ?></a><?php - ?><a class="btn dropdown-toggle" href="#"><?php echo FreshRSS_Themes::icon($c_active ? 'up' : 'down'); ?></a><?php + ?><a data-unread="<?php echo formatNumber($cat->nbNotRead()); ?>" class="btn<?php echo $c_active ? ' active' : ''; ?>" href="<?php $arUrl['params']['get'] = 'c_' . $cat->id(); echo Minz_Url::display($arUrl); ?>"><?php echo $cat->name(); ?></a><?php + ?><a class="btn dropdown-toggle" href="#"><?php echo _i($c_show ? 'up' : 'down'); ?></a><?php ?></div><?php - ?><ul class="feeds<?php echo $c_active ? ' active' : ''; ?>"><?php + ?><ul class="feeds<?php echo $c_show ? ' active' : ''; ?>"><?php foreach ($feeds as $feed) { - $feed_id = $feed->id (); - $nbEntries = $feed->nbEntries (); + $feed_id = $feed->id(); + $nbEntries = $feed->nbEntries(); $f_active = ($this->get_f == $feed_id); - ?><li id="f_<?php echo $feed_id; ?>" class="item<?php echo $f_active ? ' active' : ''; ?><?php echo $feed->inError () ? ' error' : ''; ?><?php echo $nbEntries == 0 ? ' empty' : ''; ?>" data-unread="<?php echo $feed->nbNotRead(); ?>"><?php + ?><li id="f_<?php echo $feed_id; ?>" class="item<?php echo $f_active ? ' active' : ''; ?><?php echo $feed->inError() ? ' error' : ''; ?><?php echo $nbEntries == 0 ? ' empty' : ''; ?>" data-unread="<?php echo $feed->nbNotRead(); ?>"><?php ?><div class="dropdown"><?php ?><div class="dropdown-target"></div><?php - ?><a class="dropdown-toggle" data-fweb="<?php echo $feed->website (); ?>"><?php echo FreshRSS_Themes::icon('configure'); ?></a><?php + ?><a class="dropdown-toggle" data-fweb="<?php echo $feed->website(); ?>"><?php echo _i('configure'); ?></a><?php /* feed_config_template */ ?></div><?php - ?> <img class="favicon" src="<?php echo $feed->favicon (); ?>" alt="✇" /> <?php - ?><a class="feed" data-unread="<?php echo formatNumber($feed->nbNotRead()); ?>" data-priority="<?php echo $feed->priority (); ?>" href="<?php $arUrl['params']['get'] = 'f_' . $feed_id; echo Minz_Url::display($arUrl); ?>"><?php echo $feed->name(); ?></a><?php + ?> <img class="favicon" src="<?php echo $feed->favicon(); ?>" alt="✇" /> <?php + ?><a class="feed" data-unread="<?php echo formatNumber($feed->nbNotRead()); ?>" data-priority="<?php echo $feed->priority(); ?>" href="<?php $arUrl['params']['get'] = 'f_' . $feed_id; echo Minz_Url::display($arUrl); ?>"><?php echo $feed->name(); ?></a><?php ?></li><?php } ?></ul><?php @@ -82,14 +82,22 @@ <script id="feed_config_template" type="text/html"> <ul class="dropdown-menu"> <li class="dropdown-close"><a href="#close">❌</a></li> - <li class="item"><a href="<?php echo _url ('index', 'index', 'get', 'f_!!!!!!'); ?>"><?php echo Minz_Translate::t ('filter'); ?></a></li> - <li class="item"><a href="<?php echo _url ('stats', 'repartition', 'id', '!!!!!!'); ?>"><?php echo Minz_Translate::t ('stats'); ?></a></li> - <li class="item"><a target="_blank" href="http://example.net/"><?php echo Minz_Translate::t ('see_website'); ?></a></li> + <li class="item"><a href="<?php echo _url('index', 'index', 'get', 'f_!!!!!!'); ?>"><?php echo _t('filter'); ?></a></li> + <?php if ($this->loginOk) { ?> + <li class="item"><a href="<?php echo _url('stats', 'repartition', 'id', '!!!!!!'); ?>"><?php echo _t('stats'); ?></a></li> + <?php } ?> + <li class="item"><a target="_blank" href="http://example.net/"><?php echo _t('see_website'); ?></a></li> <?php if ($this->loginOk) { ?> <li class="separator"></li> - <li class="item"><a href="<?php echo _url ('configure', 'feed', 'id', '!!!!!!'); ?>"><?php echo Minz_Translate::t ('administration'); ?></a></li> - <li class="item"><a href="<?php echo _url ('feed', 'actualize', 'id', '!!!!!!'); ?>"><?php echo Minz_Translate::t ('actualize'); ?></a></li> - <li class="item"><a href="<?php echo _url ('entry', 'read', 'get', 'f_!!!!!!'); ?>"><?php echo Minz_Translate::t ('mark_read'); ?></a></li> + <li class="item"><a href="<?php echo _url('configure', 'feed', 'id', '!!!!!!'); ?>"><?php echo _t('administration'); ?></a></li> + <li class="item"><a href="<?php echo _url('feed', 'actualize', 'id', '!!!!!!'); ?>"><?php echo _t('actualize'); ?></a></li> + <li class="item"> + <?php $confirm = $this->conf->reading_confirm ? 'confirm' : ''; ?> + <button class="read_all as-link <?php echo $confirm; ?>" + form="mark-read-aside" + formaction="<?php echo _url('entry', 'read', 'get', 'f_!!!!!!'); ?>" + type="submit"><?php echo _t('mark_read'); ?></button> + </li> <?php } ?> </ul> </script> diff --git a/app/layout/header.phtml b/app/layout/header.phtml index 2e42bfdea..028e63d8a 100644 --- a/app/layout/header.phtml +++ b/app/layout/header.phtml @@ -75,6 +75,12 @@ if (Minz_Configuration::canLogIn()) { <li class="item"><a href="<?php echo _url('configure', 'queries'); ?>"><?php echo _t('queries'); ?></a></li> <li class="separator"></li> <li class="item"><a href="<?php echo _url('configure', 'users'); ?>"><?php echo _t('users'); ?></a></li> + <?php + $current_user = Minz_Session::param('currentUser', ''); + if (Minz_Configuration::isAdmin($current_user)) { + ?> + <li class="item"><a href="<?php echo _url('update', 'index'); ?>"><?php echo _t('update'); ?></a></li> + <?php } ?> <li class="separator"></li> <li class="item"><a href="<?php echo _url('stats', 'index'); ?>"><?php echo _t('stats'); ?></a></li> <li class="item"><a href="<?php echo _url('index', 'logs'); ?>"><?php echo _t('logs'); ?></a></li> diff --git a/app/layout/layout.phtml b/app/layout/layout.phtml index 96a88d245..f95f45b5e 100644 --- a/app/layout/layout.phtml +++ b/app/layout/layout.phtml @@ -13,6 +13,7 @@ if (!empty($this->nextId)) { $params = Minz_Request::params(); $params['next'] = $this->nextId; + $params['ajax'] = 1; ?> <link id="prefetch" rel="next prefetch" href="<?php echo Minz_Url::display(array('c' => Minz_Request::controllerName(), 'a' => Minz_Request::actionName(), 'params' => $params)); ?>" /> <?php } ?> diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml index 25833c16d..a9e6614e7 100644 --- a/app/layout/nav_menu.phtml +++ b/app/layout/nav_menu.phtml @@ -3,11 +3,11 @@ ?> <div class="nav_menu"> <?php if ($actual_view === 'normal') { ?> - <a class="btn toggle_aside" href="#aside_flux"><?php echo FreshRSS_Themes::icon('category'); ?></a> + <a class="btn toggle_aside" href="#aside_flux"><?php echo _i('category'); ?></a> <?php } ?> <?php if ($this->loginOk) { ?> - <div class="stick"> + <div id="nav_menu_actions" class="stick"> <?php $url_state = $this->url; @@ -24,9 +24,9 @@ <a id="toggle-read" class="btn <?php echo $class; ?>" aria-checked="<?php echo $checked; ?>" - href="<?php echo Minz_Url::display ($url_state); ?>" - title="<?php echo Minz_Translate::t ('show_read'); ?>"> - <?php echo FreshRSS_Themes::icon('read'); ?> + href="<?php echo Minz_Url::display($url_state); ?>" + title="<?php echo _t('show_read'); ?>"> + <?php echo _i('read'); ?> </a> <?php @@ -43,13 +43,13 @@ <a id="toggle-unread" class="btn <?php echo $class; ?>" aria-checked="<?php echo $checked; ?>" - href="<?php echo Minz_Url::display ($url_state); ?>" - title="<?php echo Minz_Translate::t ('show_not_reads'); ?>"> - <?php echo FreshRSS_Themes::icon('unread'); ?> + href="<?php echo Minz_Url::display($url_state); ?>" + title="<?php echo _t('show_not_reads'); ?>"> + <?php echo _i('unread'); ?> </a> <?php - if ($this->state & FreshRSS_Entry::STATE_FAVORITE) { + if ($this->state & FreshRSS_Entry::STATE_FAVORITE || $this->get_c == 's') { $url_state['params']['state'] = $this->state & ~FreshRSS_Entry::STATE_FAVORITE; $checked = 'true'; $class = 'active'; @@ -62,9 +62,9 @@ <a id="toggle-favorite" class="btn <?php echo $class; ?>" aria-checked="<?php echo $checked; ?>" - href="<?php echo Minz_Url::display ($url_state); ?>" - title="<?php echo Minz_Translate::t ('show_favorite'); ?>"> - <?php echo FreshRSS_Themes::icon('starred'); ?> + href="<?php echo Minz_Url::display($url_state); ?>" + title="<?php echo _t('show_favorite'); ?>"> + <?php echo _i('starred'); ?> </a> <?php @@ -81,22 +81,25 @@ <a id="toggle-not-favorite" class="btn <?php echo $class; ?>" aria-checked="<?php echo $checked; ?>" - href="<?php echo Minz_Url::display ($url_state); ?>" - title="<?php echo Minz_Translate::t ('show_not_favorite'); ?>"> - <?php echo FreshRSS_Themes::icon('non-starred'); ?> + href="<?php echo Minz_Url::display($url_state); ?>" + title="<?php echo _t('show_not_favorite'); ?>"> + <?php echo _i('non-starred'); ?> </a> <div class="dropdown"> <div id="dropdown-query" class="dropdown-target"></div> - <a class="dropdown-toggle btn" href="#dropdown-query"><?php echo FreshRSS_Themes::icon('down'); ?></a> + <a class="dropdown-toggle btn" href="#dropdown-query"><?php echo _i('down'); ?></a> <ul class="dropdown-menu"> <li class="dropdown-close"><a href="#close">❌</a></li> - <li class="dropdown-header"><?php echo Minz_Translate::t('queries'); ?> <a class="no-mobile" href="<?php echo _url('configure', 'queries'); ?>"><?php echo FreshRSS_Themes::icon('configure'); ?></a></li> + <li class="dropdown-header"> + <?php echo _t('queries'); ?> + <a class="no-mobile" href="<?php echo _url('configure', 'queries'); ?>"><?php echo _i('configure'); ?></a> + </li> <?php foreach ($this->conf->queries as $query) { ?> - <li class="item"> + <li class="item query"> <a href="<?php echo $query['url']; ?>"><?php echo $query['name']; ?></a> </li> <?php } ?> @@ -110,58 +113,58 @@ $url_query['c'] = 'configure'; $url_query['a'] = 'addQuery'; ?> - <li class="item no-mobile"><a href="<?php echo Minz_Url::display($url_query); ?>"><?php echo FreshRSS_Themes::icon('bookmark-add'); ?> <?php echo Minz_Translate::t('add_query'); ?></a></li> + <li class="item no-mobile"><a href="<?php echo Minz_Url::display($url_query); ?>"><?php echo _i('bookmark-add'); ?> <?php echo _t('add_query'); ?></a></li> </ul> </div> </div> <?php $get = false; - $string_mark = Minz_Translate::t ('mark_all_read'); + $string_mark = _t('mark_all_read'); if ($this->get_f) { $get = 'f_' . $this->get_f; - $string_mark = Minz_Translate::t ('mark_feed_read'); + $string_mark = _t('mark_feed_read'); } elseif ($this->get_c && $this->get_c != 'a') { if ($this->get_c === 's') { $get = 's'; } else { $get = 'c_' . $this->get_c; } - $string_mark = Minz_Translate::t ('mark_cat_read'); + $string_mark = _t('mark_cat_read'); } $nextGet = $get; - if ($this->conf->onread_jump_next && (strlen ($get) > 2)) { + if ($this->conf->onread_jump_next && strlen($get) > 2) { $anotherUnreadId = ''; $foundCurrent = false; switch ($get[0]) { - case 'c': - foreach ($this->cat_aside as $cat) { - if ($cat->id () == $this->get_c) { - $foundCurrent = true; - continue; - } - if ($cat->nbNotRead () <= 0) continue; - $anotherUnreadId = $cat->id (); - if ($foundCurrent) break; + case 'c': + foreach ($this->cat_aside as $cat) { + if ($cat->id() == $this->get_c) { + $foundCurrent = true; + continue; } - $nextGet = empty ($anotherUnreadId) ? 'a' : 'c_' . $anotherUnreadId; - break; - case 'f': - foreach ($this->cat_aside as $cat) { - if ($cat->id () == $this->get_c) { - foreach ($cat->feeds () as $feed) { - if ($feed->id () == $this->get_f) { - $foundCurrent = true; - continue; - } - if ($feed->nbNotRead () <= 0) continue; - $anotherUnreadId = $feed->id (); - if ($foundCurrent) break; + if ($cat->nbNotRead() <= 0) continue; + $anotherUnreadId = $cat->id(); + if ($foundCurrent) break; + } + $nextGet = empty($anotherUnreadId) ? 'a' : 'c_' . $anotherUnreadId; + break; + case 'f': + foreach ($this->cat_aside as $cat) { + if ($cat->id() == $this->get_c) { + foreach ($cat->feeds() as $feed) { + if ($feed->id() == $this->get_f) { + $foundCurrent = true; + continue; } - break; + if ($feed->nbNotRead() <= 0) continue; + $anotherUnreadId = $feed->id(); + if ($foundCurrent) break; } + break; } - $nextGet = empty ($anotherUnreadId) ? 'c_' . $this->get_c : 'f_' . $anotherUnreadId; - break; + } + $nextGet = empty($anotherUnreadId) ? 'c_' . $this->get_c : 'f_' . $anotherUnreadId; + break; } } @@ -177,30 +180,54 @@ $arUrl = array('c' => 'entry', 'a' => 'read', 'params' => array('get' => $get, 'nextGet' => $nextGet, 'idMax' => $idMax)); $output = Minz_Request::param('output', ''); - if (($output != '') && ($this->conf->view_mode !== $output)) { + if ($output != '' && $this->conf->view_mode !== $output) { $arUrl['params']['output'] = $output; } $markReadUrl = Minz_Url::display($arUrl); - Minz_Session::_param ('markReadUrl', $markReadUrl); + Minz_Session::_param('markReadUrl', $markReadUrl); ?> + <form id="mark-read-menu" method="post" style="display: none"></form> + <div class="stick" id="nav_menu_read_all"> - <a class="read_all btn<?php if ($this->conf->reading_confirm) {echo ' confirm';} ?>" href="<?php echo $markReadUrl; ?>"><?php echo Minz_Translate::t ('mark_read'); ?></a> + <?php $confirm = $this->conf->reading_confirm ? 'confirm' : ''; ?> + <button class="read_all btn <?php echo $confirm; ?>" + form="mark-read-menu" + formaction="<?php echo $markReadUrl; ?>" + type="submit"><?php echo _t('mark_read'); ?></button> + <div class="dropdown"> <div id="dropdown-read" class="dropdown-target"></div> - <a class="dropdown-toggle btn" href="#dropdown-read"><?php echo FreshRSS_Themes::icon('down'); ?></a> + <a class="dropdown-toggle btn" href="#dropdown-read"><?php echo _i('down'); ?></a> <ul class="dropdown-menu"> <li class="dropdown-close"><a href="#close">❌</a></li> - <li class="item"><a href="<?php echo $markReadUrl; ?>"><?php echo $string_mark; ?></a></li> + <li class="item"> + <button class="as-link <?php echo $confirm; ?>" + form="mark-read-menu" + formaction="<?php echo $markReadUrl; ?>" + type="submit"><?php echo $string_mark; ?></button> + </li> <li class="separator"></li> <?php - $today = $this->today; - $one_week = $today - 604800; + $mark_before_today = $arUrl; + $mark_before_today['params']['idMax'] = $this->today . '000000'; + $mark_before_one_week = $arUrl; + $mark_before_one_week['params']['idMax'] = ($this->today - 604800) . '000000'; ?> - <li class="item"><a href="<?php echo _url ('entry', 'read', 'is_read', 1, 'get', $get, 'idMax', $today . '000000'); ?>"><?php echo Minz_Translate::t ('before_one_day'); ?></a></li> - <li class="item"><a href="<?php echo _url ('entry', 'read', 'is_read', 1, 'get', $get, 'idMax', $one_week . '000000'); ?>"><?php echo Minz_Translate::t ('before_one_week'); ?></a></li> + <li class="item"> + <button class="as-link <?php echo $confirm; ?>" + form="mark-read-menu" + formaction="<?php echo Minz_Url::display($mark_before_today); ?>" + type="submit"><?php echo _t('before_one_day'); ?></button> + </li> + <li class="item"> + <button class="as-link <?php echo $confirm; ?>" + form="mark-read-menu" + formaction="<?php echo Minz_Url::display($mark_before_one_week); ?>" + type="submit"><?php echo _t('before_one_week'); ?></button> + </li> </ul> </div> </div> @@ -209,18 +236,18 @@ <?php $url_output = $this->url; ?> <div class="stick" id="nav_menu_views"> <?php $url_output['params']['output'] = 'normal'; ?> - <a class="view_normal btn <?php echo $actual_view == 'normal'? 'active' : ''; ?>" title="<?php echo Minz_Translate::t('normal_view'); ?>" href="<?php echo Minz_Url::display($url_output); ?>"> - <?php echo FreshRSS_Themes::icon("view-normal"); ?> + <a class="view_normal btn <?php echo $actual_view == 'normal'? 'active' : ''; ?>" title="<?php echo _t('normal_view'); ?>" href="<?php echo Minz_Url::display($url_output); ?>"> + <?php echo _i("view-normal"); ?> </a> <?php $url_output['params']['output'] = 'global'; ?> - <a class="view_global btn <?php echo $actual_view == 'global'? 'active' : ''; ?>" title="<?php echo Minz_Translate::t('global_view'); ?>" href="<?php echo Minz_Url::display($url_output); ?>"> - <?php echo FreshRSS_Themes::icon("view-global"); ?> + <a class="view_global btn <?php echo $actual_view == 'global'? 'active' : ''; ?>" title="<?php echo _t('global_view'); ?>" href="<?php echo Minz_Url::display($url_output); ?>"> + <?php echo _i("view-global"); ?> </a> <?php $url_output['params']['output'] = 'reader'; ?> - <a class="view_reader btn <?php echo $actual_view == 'reader'? 'active' : ''; ?>" title="<?php echo Minz_Translate::t('reader_view'); ?>" href="<?php echo Minz_Url::display($url_output); ?>"> - <?php echo FreshRSS_Themes::icon("view-reader"); ?> + <a class="view_reader btn <?php echo $actual_view == 'reader'? 'active' : ''; ?>" title="<?php echo _t('reader_view'); ?>" href="<?php echo Minz_Url::display($url_output); ?>"> + <?php echo _i("view-reader"); ?> </a> <?php @@ -229,27 +256,27 @@ $url_output['params']['token'] = $this->conf->token; } ?> - <a class="view_rss btn" target="_blank" title="<?php echo Minz_Translate::t ('rss_view'); ?>" href="<?php echo Minz_Url::display($url_output); ?>"> - <?php echo FreshRSS_Themes::icon('rss'); ?> + <a class="view_rss btn" target="_blank" title="<?php echo _t('rss_view'); ?>" href="<?php echo Minz_Url::display($url_output); ?>"> + <?php echo _i('rss'); ?> </a> </div> <div class="item search"> - <form action="<?php echo _url ('index', 'index'); ?>" method="get"> - <?php $search = Minz_Request::param ('search', ''); ?> - <input type="search" name="search" class="extend" value="<?php echo $search; ?>" placeholder="<?php echo Minz_Translate::t ('search_short'); ?>" /> + <form action="<?php echo _url('index', 'index'); ?>" method="get"> + <?php $search = Minz_Request::param('search', ''); ?> + <input type="search" name="search" class="extend" value="<?php echo $search; ?>" placeholder="<?php echo _t('search_short'); ?>" /> - <?php $get = Minz_Request::param ('get', ''); ?> + <?php $get = Minz_Request::param('get', ''); ?> <?php if($get != '') { ?> <input type="hidden" name="get" value="<?php echo $get; ?>" /> <?php } ?> - <?php $order = Minz_Request::param ('order', ''); ?> + <?php $order = Minz_Request::param('order', ''); ?> <?php if($order != '') { ?> <input type="hidden" name="order" value="<?php echo $order; ?>" /> <?php } ?> - <?php $state = Minz_Request::param ('state', ''); ?> + <?php $state = Minz_Request::param('state', ''); ?> <?php if($state != '') { ?> <input type="hidden" name="state" value="<?php echo $state; ?>" /> <?php } ?> @@ -269,11 +296,11 @@ $url_order = $this->url; $url_order['params']['order'] = $order; ?> - <a class="btn" href="<?php echo Minz_Url::display ($url_order); ?>" title="<?php echo Minz_Translate::t ($title); ?>"> - <?php echo FreshRSS_Themes::icon($icon); ?> + <a id="toggle-order" class="btn" href="<?php echo Minz_Url::display($url_order); ?>" title="<?php echo _t($title); ?>"> + <?php echo _i($icon); ?> </a> <?php if ($this->loginOk || Minz_Configuration::allowAnonymousRefresh()) { ?> - <a id="actualize" class="btn" href="<?php echo _url ('feed', 'actualize'); ?>"><?php echo FreshRSS_Themes::icon('refresh'); ?></a> + <a id="actualize" class="btn" href="<?php echo _url('feed', 'actualize'); ?>"><?php echo _i('refresh'); ?></a> <?php } ?> </div> |
