diff options
| author | 2014-01-19 22:25:49 +0100 | |
|---|---|---|
| committer | 2014-01-19 22:25:49 +0100 | |
| commit | 4e4b0f717fe0a8378e2b751393a8c19d1ada6eb2 (patch) | |
| tree | 6b268cfe46eb3eee8ebaddcd1e17067eaca0214f /app/layout | |
| parent | 12e0b6b094041fc22937520b3218e4f61915fd50 (diff) | |
| parent | 79d4893fc792119c390d2f744246df210b74f637 (diff) | |
Merge remote-tracking branch 'origin/dev' into beta
Diffstat (limited to 'app/layout')
| -rw-r--r-- | app/layout/aside_feed.phtml | 6 | ||||
| -rw-r--r-- | app/layout/aside_flux.phtml | 73 | ||||
| -rw-r--r-- | app/layout/header.phtml | 64 | ||||
| -rw-r--r-- | app/layout/nav_menu.phtml | 53 |
4 files changed, 128 insertions, 68 deletions
diff --git a/app/layout/aside_feed.phtml b/app/layout/aside_feed.phtml index 7fbccce1e..2446e72cb 100644 --- a/app/layout/aside_feed.phtml +++ b/app/layout/aside_feed.phtml @@ -1,7 +1,7 @@ <ul class="nav nav-list aside aside_feed"> <li class="nav-header"><?php echo Minz_Translate::t ('your_rss_feeds'); ?></li> - <li class="nav-form"><form id="add_rss" method="post" action="<?php echo Minz_Url::display (array ('c' => 'feed', 'a' => 'add')); ?>"> + <li class="nav-form"><form id="add_rss" method="post" action="<?php echo Minz_Url::display (array ('c' => 'feed', 'a' => 'add')); ?>" autocomplete="off"> <div class="stick"> <input type="url" name="url_rss" placeholder="<?php echo Minz_Translate::t ('add_rss_feed'); ?>" /> <div class="dropdown"> @@ -27,10 +27,10 @@ <li class="dropdown-header"><?php echo Minz_Translate::t ('http_authentication'); ?></li> <li class="input"> - <input type="text" name="username" id="username" placeholder="<?php echo Minz_Translate::t ('username'); ?>" /> + <input type="text" name="http_user" id="http_user" autocomplete="off" placeholder="<?php echo Minz_Translate::t ('username'); ?>" /> </li> <li class="input"> - <input type="password" name="password" id="password" placeholder="<?php echo Minz_Translate::t ('password'); ?>" /> + <input type="password" name="http_pass" id="http_pass" autocomplete="off" placeholder="<?php echo Minz_Translate::t ('password'); ?>" /> </li> </ul> </div> diff --git a/app/layout/aside_flux.phtml b/app/layout/aside_flux.phtml index 8730baf0e..f7d8b12b9 100644 --- a/app/layout/aside_flux.phtml +++ b/app/layout/aside_flux.phtml @@ -13,9 +13,15 @@ <li><a href="<?php echo _url ('index', 'about'); ?>"><?php echo Minz_Translate::t ('about_freshrss'); ?></a></li> <?php } ?> + <?php + $arUrl = array('c' => 'index', 'a' => 'index', 'params' => array()); + if ($this->conf->view_mode !== Minz_Request::param('output', 'normal')) { + $arUrl['params']['output'] = 'normal'; + } + ?> <li> <div class="category all"> - <a data-unread="<?php echo $this->nb_not_read; ?>" class="btn<?php echo $this->get_c == 'a' ? ' active' : ''; ?>" href="<?php echo _url ('index', 'index'); ?>"> + <a data-unread="<?php echo $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 ('all_feeds'); ?> </a> @@ -24,43 +30,46 @@ <li> <div class="category favorites"> - <a data-unread="<?php echo $this->nb_favorites['unread']; ?>" class="btn<?php echo $this->get_c == 's' ? ' active' : ''; ?>" href="<?php echo _url ('index', 'index', 'get', 's'); ?>"> + <a data-unread="<?php echo $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', $this->nb_favorites['all']); ?> </a> </div> </li> - <?php foreach ($this->cat_aside as $cat) { ?> - <?php $feeds = $cat->feeds (); ?> - <?php if (!empty ($feeds)) { ?> - <li> - <?php $c_active = false; if ($this->get_c == $cat->id ()) { $c_active = true; } ?> - <div class="category stick<?php echo $c_active ? ' active' : ''; ?>"> - <a data-unread="<?php echo $cat->nbNotRead (); ?>" class="btn<?php echo $c_active ? ' active' : ''; ?>" href="<?php echo _url ('index', 'index', 'get', 'c_' . $cat->id ()); ?>"><?php echo $cat->name (); ?></a> - <a class="btn dropdown-toggle" href="#"><?php echo FreshRSS_Themes::icon($c_active ? 'up' : 'down'); ?></a> - </div> - - <ul class="feeds<?php echo $c_active ? ' active' : ''; ?>"> - <?php foreach ($feeds as $feed) { - $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' : ''; ?>"> - <div class="dropdown"> - <div class="dropdown-target"></div> - <a class="dropdown-toggle" data-fweb="<?php echo $feed->website (); ?>"><?php echo FreshRSS_Themes::icon('configure'); ?></a> -<?php /* feed_config_template */ ?> - </div> - <img class="favicon" src="<?php echo $feed->favicon (); ?>" alt="✇" /> - <a class="feed" data-unread="<?php echo $feed->nbNotRead (); ?>" data-priority="<?php echo $feed->priority (); ?>" href="<?php echo _url ('index', 'index', 'get', 'f_' . $feed_id); ?>"><?php echo $feed->name(); ?></a> - </li> - <?php } ?> - </ul> - </li> - <?php } } ?> + <?php + foreach ($this->cat_aside as $cat) { + $feeds = $cat->feeds (); + if (!empty ($feeds)) { + ?><li><?php + $c_active = false; + if ($this->get_c == $cat->id ()) { + $c_active = true; + } + ?><div class="category stick<?php echo $c_active ? ' active' : ''; ?>"><?php + ?><a data-unread="<?php echo $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 + ?></div><?php + ?><ul class="feeds<?php echo $c_active ? ' active' : ''; ?>"><?php + foreach ($feeds as $feed) { + $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' : ''; ?>"><?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 + /* feed_config_template */ + ?></div><?php + ?> <img class="favicon" src="<?php echo $feed->favicon (); ?>" alt="✇" /> <?php + ?><a class="feed" data-unread="<?php echo $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 + ?></li><?php + } + } ?> </ul> - <span class="aside_flux_ender"><!-- For fixed menu --></span> </div> @@ -73,7 +82,7 @@ <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', 'is_read', 1, 'get', 'f_!!!!!!'); ?>"><?php echo Minz_Translate::t ('mark_read'); ?></a></li> + <li class="item"><a href="<?php echo _url ('entry', 'read', 'get', 'f_!!!!!!'); ?>"><?php echo Minz_Translate::t ('mark_read'); ?></a></li> <?php } ?> </ul> </script> diff --git a/app/layout/header.phtml b/app/layout/header.phtml index 0f2c524c4..d43f682b0 100644 --- a/app/layout/header.phtml +++ b/app/layout/header.phtml @@ -1,12 +1,25 @@ -<?php if (Minz_Configuration::canLogIn()) { ?> -<ul class="nav nav-head nav-login"> - <?php if ($this->loginOk) { ?> - <li class="item"><?php echo FreshRSS_Themes::icon('logout'); ?> <a class="signout" href="#"><?php echo Minz_Translate::t ('logout'); ?></a></li> - <?php } else { ?> - <li class="item"><?php echo FreshRSS_Themes::icon('login'); ?> <a class="signin" href="#"><?php echo Minz_Translate::t ('login'); ?></a></li> - <?php } ?> -</ul> -<?php } ?> +<?php +if (Minz_Configuration::canLogIn()) { + ?><ul class="nav nav-head nav-login"><?php + switch (Minz_Configuration::authType()) { + case 'form': + if ($this->loginOk) { + ?><li class="item"><?php echo FreshRSS_Themes::icon('logout'); ?> <a class="signout" href="<?php echo _url ('index', 'formLogout'); ?>"><?php echo Minz_Translate::t ('logout'); ?></a></li><?php + } else { + ?><li class="item"><?php echo FreshRSS_Themes::icon('login'); ?> <a class="signin" href="<?php echo _url ('index', 'formLogin'); ?>"><?php echo Minz_Translate::t ('login'); ?></a></li><?php + } + break; + case 'persona': + if ($this->loginOk) { + ?><li class="item"><?php echo FreshRSS_Themes::icon('logout'); ?> <a class="signout" href="#"><?php echo Minz_Translate::t ('logout'); ?></a></li><?php + } else { + ?><li class="item"><?php echo FreshRSS_Themes::icon('login'); ?> <a class="signin" href="#"><?php echo Minz_Translate::t ('login'); ?></a></li><?php + } + break; + } + ?></ul><?php +} +?> <div class="header"> <div class="item title"> @@ -62,16 +75,31 @@ <li class="separator"></li> <li class="item"><a href="<?php echo _url ('index', 'about'); ?>"><?php echo Minz_Translate::t ('about'); ?></a></li> <li class="item"><a href="<?php echo _url ('index', 'logs'); ?>"><?php echo Minz_Translate::t ('logs'); ?></a></li> - <?php if (Minz_Configuration::canLogIn()) { ?> - <li class="separator"></li> - <li class="item"><a class="signout" href="#"><?php echo FreshRSS_Themes::icon('logout'); ?> <?php echo Minz_Translate::t ('logout'); ?></a></li> - <?php } ?> + <?php + if (Minz_Configuration::canLogIn()) { + ?><li class="separator"></li><?php + switch (Minz_Configuration::authType()) { + case 'form': + ?><li class="item"><a class="signout" href="<?php echo _url ('index', 'formLogout'); ?>"><?php echo FreshRSS_Themes::icon('logout'), ' ', Minz_Translate::t ('logout'); ?></a></li><?php + break; + case 'persona': + ?><li class="item"><a class="signout" href="#"><?php echo FreshRSS_Themes::icon('logout'), ' ', Minz_Translate::t ('logout'); ?></a></li><?php + break; + } + } ?> </ul> </div> </div> - <?php } elseif (Minz_Configuration::canLogIn()) { ?> - <div class="item configure"> - <?php echo FreshRSS_Themes::icon('login'); ?> <a class="signin" href="#"><?php echo Minz_Translate::t ('login'); ?></a> - </div> - <?php } ?> + <?php } elseif (Minz_Configuration::canLogIn()) { + ?><div class="item configure"><?php + switch (Minz_Configuration::authType()) { + case 'form': + echo FreshRSS_Themes::icon('login'); ?><a class="signin" href="<?php echo _url ('index', 'formLogin'); ?>"><?php echo Minz_Translate::t ('login'); ?></a></li><?php + break; + case 'persona': + echo FreshRSS_Themes::icon('login'); ?><a class="signin" href="#"><?php echo Minz_Translate::t ('login'); ?></a></li><?php + break; + } + ?></div><?php + } ?> </div> diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml index 44b49b10c..b9ce33295 100644 --- a/app/layout/nav_menu.phtml +++ b/app/layout/nav_menu.phtml @@ -56,7 +56,13 @@ } $p = isset($this->entries[0]) ? $this->entries[0] : null; $idMax = $p === null ? '0' : $p->id(); - $markReadUrl = _url ('entry', 'read', 'is_read', 1, 'get', $get, 'nextGet', $nextGet, 'idMax', $idMax); + + $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)) { + $arUrl['params']['output'] = $output; + } + $markReadUrl = Minz_Url::display($arUrl); Minz_Session::_param ('markReadUrl', $markReadUrl); ?> @@ -103,21 +109,21 @@ $url_output = $url; $actual_view = Minz_Request::param('output', 'normal'); ?> - <?php if($actual_view != 'normal') { ?> + <?php if($actual_view !== 'normal') { ?> <li class="item"> <?php $url_output['params']['output'] = 'normal'; ?> <a class="view_normal" href="<?php echo Minz_Url::display ($url_output); ?>"> <?php echo Minz_Translate::t ('normal_view'); ?> </a> </li> - <?php } if($actual_view != 'reader') { ?> + <?php } if($actual_view !== 'reader') { ?> <li class="item"> <?php $url_output['params']['output'] = 'reader'; ?> <a class="view_normal" href="<?php echo Minz_Url::display ($url_output); ?>"> <?php echo Minz_Translate::t ('reader_view'); ?> </a> </li> - <?php } if($actual_view != 'global') { ?> + <?php } if($actual_view !== 'global') { ?> <li class="item"> <?php $url_output['params']['output'] = 'global'; ?> <a class="view_normal" href="<?php echo Minz_Url::display ($url_output); ?>"> @@ -128,24 +134,41 @@ <li class="separator"></li> - <li class="item"> - <?php - $url_state = $url; - if ($this->state == 'not_read') { - $url_state['params']['state'] = 'all'; - ?> + <?php + $url_state = $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> - <?php - } else { - $url_state['params']['state'] = 'not_read'; - ?> + </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> - <?php } ?> </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 |
