aboutsummaryrefslogtreecommitdiff
path: root/app/layout
diff options
context:
space:
mode:
authorGravatar Alexis Degrugillier <github@ainw.org> 2014-04-12 11:51:44 -0400
committerGravatar Alexis Degrugillier <github@ainw.org> 2014-04-12 11:51:44 -0400
commit3e665bcf9aefe40499b5d16e901d0c7427e367af (patch)
treefe1ab6cc6e192b80ac368dd962dac90dccb57738 /app/layout
parent6a04683171ecee8fdc5e601b88a1e5c16f8210c4 (diff)
Delete favorite button
I extract drop-down menu actions to make them as button action in the page header. I removed the favorite button on the category list because it is a duplicate from the button action. Now button action act as filters and you can combine them. It is a test to see if we can keep it like that. There is still work to do to extract other actions from the drop-down list. I did not want to change everything if we don't keep it. See #376 and #277
Diffstat (limited to 'app/layout')
-rw-r--r--app/layout/aside_flux.phtml9
-rw-r--r--app/layout/nav_menu.phtml102
2 files changed, 65 insertions, 46 deletions
diff --git a/app/layout/aside_flux.phtml b/app/layout/aside_flux.phtml
index 817dae676..0542e6b66 100644
--- a/app/layout/aside_flux.phtml
+++ b/app/layout/aside_flux.phtml
@@ -28,15 +28,6 @@
</div>
</li>
- <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'])); ?>
- </a>
- </div>
- </li>
-
<?php
foreach ($this->cat_aside as $cat) {
$feeds = $cat->feeds ();
diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml
index ffdc95b24..129647607 100644
--- a/app/layout/nav_menu.phtml
+++ b/app/layout/nav_menu.phtml
@@ -11,6 +11,70 @@
<?php } ?>
<?php if ($this->loginOk) { ?>
+ <?php $url_state = $this->url;
+ if ($this->state & FreshRSS_Configuration::STATE_READ) {
+ $url_state['params']['state'] = $this->state - FreshRSS_Configuration::STATE_READ;
+ $checked = 'true';
+ } else {
+ $url_state['params']['state'] = $this->state + FreshRSS_Configuration::STATE_READ;
+ $checked = 'false';
+ }
+ ?>
+ <a id="actualize"
+ class="btn"
+ 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'); ?>
+ </a>
+ <?php
+ if ($this->state & FreshRSS_Configuration::STATE_NOT_READ) {
+ $url_state['params']['state'] = $this->state - FreshRSS_Configuration::STATE_NOT_READ;
+ $checked = 'true';
+ } else {
+ $url_state['params']['state'] = $this->state + FreshRSS_Configuration::STATE_NOT_READ;
+ $checked = 'false';
+ }
+ ?>
+ <a id="actualize"
+ class="btn"
+ 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'); ?>
+ </a>
+ <?php
+ if ($this->state & FreshRSS_Configuration::STATE_FAVORITE) {
+ $url_state['params']['state'] = $this->state - FreshRSS_Configuration::STATE_FAVORITE;
+ $checked = 'true';
+ } else {
+ $url_state['params']['state'] = $this->state + FreshRSS_Configuration::STATE_FAVORITE;
+ $checked = 'false';
+ }
+ ?>
+ <a id="actualize"
+ class="btn"
+ 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'); ?>
+ </a>
+ <?php
+ if ($this->state & FreshRSS_Configuration::STATE_NOT_FAVORITE) {
+ $url_state['params']['state'] = $this->state - FreshRSS_Configuration::STATE_NOT_FAVORITE;
+ $checked = 'true';
+ } else {
+ $url_state['params']['state'] = $this->state + FreshRSS_Configuration::STATE_NOT_FAVORITE;
+ $checked = 'false';
+ }
+ ?>
+ <a id="actualize"
+ class="btn"
+ 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'); ?>
+ </a>
<?php
$get = false;
$string_mark = Minz_Translate::t ('mark_all_read');
@@ -86,7 +150,7 @@
<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"><a href="<?php echo $markReadUrl; ?>"><?php echo $string_mark; ?></a></li>
<li class="separator"></li>
<?php
$today = $this->today;
@@ -132,42 +196,6 @@
<li class="separator"></li>
- <?php
- $url_state = $this->url;
- $url_state['params']['state'] = 'all';
- ?>
- <li class="item" role="checkbox" aria-checked="<?php echo ($this->state === 'all') ? 'true' :'false'; ?>">
- <a class="print_all" href="<?php echo Minz_Url::display ($url_state); ?>">
- <?php echo Minz_Translate::t ('show_all_articles'); ?>
- </a>
- </li>
- <?php
- $url_state['params']['state'] = 'not_read';
- ?>
- <li class="item" role="checkbox" aria-checked="<?php echo ($this->state === 'not_read') ? 'true' :'false'; ?>">
- <a class="print_non_read" href="<?php echo Minz_Url::display ($url_state); ?>">
- <?php echo Minz_Translate::t ('show_not_reads'); ?>
- </a>
- </li>
- <?php
- $url_state['params']['state'] = 'read';
- ?>
- <li class="item" role="checkbox" aria-checked="<?php echo ($this->state === 'read') ? 'true' :'false'; ?>">
- <a class="print_read" href="<?php echo Minz_Url::display ($url_state); ?>">
- <?php echo Minz_Translate::t ('show_read'); ?>
- </a>
- </li>
- <?php
- $url_state['params']['state'] = 'favorite';
- ?>
- <li class="item" role="checkbox" aria-checked="<?php echo ($this->state === 'favorite') ? 'true' :'false'; ?>">
- <a class="print_favorite" href="<?php echo Minz_Url::display ($url_state); ?>">
- <?php echo Minz_Translate::t ('show_favorite'); ?>
- </a>
- </li>
-
- <li class="separator"></li>
-
<li class="item">
<?php
$url_order = $this->url;