diff options
| author | 2018-09-09 13:03:51 +0200 | |
|---|---|---|
| committer | 2018-09-09 13:03:51 +0200 | |
| commit | 44bd07e506ade204151c276fdc05994d51efdd7a (patch) | |
| tree | 2efe48133d2c874c65a99ae3a6cd92bb0dff4fe8 /app/layout/nav_menu.phtml | |
| parent | 3306a1679c2570c30d4b662c887b4a71ce147398 (diff) | |
| parent | 1802c1e9ae7d3d55a0e37e1cc2e7c0acc25f70ba (diff) | |
Merge pull request #2001 from FreshRSS/dev1.11.2
FreshRSS 1.11.2
Diffstat (limited to 'app/layout/nav_menu.phtml')
| -rw-r--r-- | app/layout/nav_menu.phtml | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml index ab82c723f..88f882db9 100644 --- a/app/layout/nav_menu.phtml +++ b/app/layout/nav_menu.phtml @@ -62,9 +62,10 @@ <?php $get = FreshRSS_Context::currentGet(); $string_mark = _t('index.menu.mark_all_read'); - if ($get[0] == 'f') { + $string_unmark = _t('index.menu.mark_selection_unread'); + if ($get[0] === 'f') { $string_mark = _t('index.menu.mark_feed_read'); - } elseif ($get[0] == 'c') { + } elseif ($get[0] === 'c') { $string_mark = _t('index.menu.mark_cat_read'); } @@ -75,10 +76,14 @@ 'get' => $get, 'nextGet' => FreshRSS_Context::$next_get, 'idMax' => FreshRSS_Context::$id_max, - 'search' => FreshRSS_Context::$search, + 'search' => htmlspecialchars_decode(FreshRSS_Context::$search, ENT_QUOTES), 'state' => FreshRSS_Context::$state, - ) + ), ); + + $mark_unread_url = $mark_read_url; + $mark_unread_url['params']['is_read'] = false; + $mark_unread_url['params']['nextGet'] = $get; ?> <div class="stick" id="nav_menu_read_all"> @@ -110,6 +115,7 @@ $mark_before_today['params']['idMax'] = $today . '000000'; $mark_before_one_week = $mark_read_url; $mark_before_one_week['params']['idMax'] = ($today - 604800) . '000000'; + $mark_unread_enabled = FreshRSS_Context::isStateEnabled(FreshRSS_Entry::STATE_READ) or !FreshRSS_Context::isStateEnabled(FreshRSS_Entry::STATE_NOT_READ); ?> <li class="item"> <button class="as-link <?php echo $confirm; ?>" @@ -123,6 +129,13 @@ formaction="<?php echo Minz_Url::display($mark_before_one_week); ?>" type="submit"><?php echo _t('index.menu.before_one_week'); ?></button> </li> + <li class="separator"></li> + <li class="item"> + <button class="as-link <?php echo $mark_unread_enabled ? $confirm : '" disabled="disabled'; ?>" + form="mark-read-menu" + formaction="<?php echo Minz_Url::display($mark_unread_url); ?>" + type="submit"><?php echo $string_unmark; ?></button> + </li> </ul> </div> </form> @@ -162,7 +175,8 @@ <div class="item search"> <form action="<?php echo _url('index', 'index'); ?>" method="get"> - <input type="search" name="search" class="extend" value="<?php echo FreshRSS_Context::$search; ?>" placeholder="<?php echo _t('index.menu.search_short'); ?>" /> + <input type="search" name="search" class="extend" value="<?php + echo htmlspecialchars(htmlspecialchars_decode(FreshRSS_Context::$search, ENT_QUOTES), ENT_COMPAT, 'UTF-8'); ?>" placeholder="<?php echo _t('index.menu.search_short'); ?>" /> <?php $get = Minz_Request::param('get', ''); ?> <?php if($get != '') { ?> |
