diff options
| author | 2014-01-29 21:26:19 +0100 | |
|---|---|---|
| committer | 2014-01-29 21:26:19 +0100 | |
| commit | 165eb57459a152b3cc6aa3fd15ca990c3d908829 (patch) | |
| tree | 640ddacbc6eabc985646dd65b0578f369ea92321 /app/layout | |
| parent | 75096e6a39fe5d34d3951991f296f616e62a9fd8 (diff) | |
| parent | c053825ff8f9792e692c101585481129b006937b (diff) | |
Sortie de la version 0.70.7.0
Diffstat (limited to 'app/layout')
| -rw-r--r-- | app/layout/aside_configure.phtml | 25 | ||||
| -rw-r--r-- | app/layout/aside_feed.phtml | 34 | ||||
| -rw-r--r-- | app/layout/aside_flux.phtml | 107 | ||||
| -rw-r--r-- | app/layout/header.phtml | 106 | ||||
| -rw-r--r-- | app/layout/layout.phtml | 27 | ||||
| -rw-r--r-- | app/layout/nav_entries.phtml | 6 | ||||
| -rw-r--r-- | app/layout/nav_menu.phtml | 178 |
7 files changed, 292 insertions, 191 deletions
diff --git a/app/layout/aside_configure.phtml b/app/layout/aside_configure.phtml index 0ca2ed099..27f11ab6d 100644 --- a/app/layout/aside_configure.phtml +++ b/app/layout/aside_configure.phtml @@ -1,10 +1,19 @@ -<div class="nav nav-list aside"> - <li class="nav-header"><?php echo Translate::t ('configuration'); ?></li> - - <li class="item<?php echo Request::actionName () == 'display' ? ' active' : ''; ?>"> - <a href="<?php echo Url::display (array ('c' => 'configure', 'a' => 'display')); ?>"><?php echo Translate::t ('general_and_reading'); ?></a> +<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 ('reading_configuration'); ?></a> </li> - <li class="item<?php echo Request::actionName () == 'shortcut' ? ' active' : ''; ?>"> - <a href="<?php echo Url::display (array ('c' => 'configure', 'a' => 'shortcut')); ?>"><?php echo Translate::t ('shortcuts'); ?></a> + <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> -</div> + <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> + <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> + <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> +</ul> diff --git a/app/layout/aside_feed.phtml b/app/layout/aside_feed.phtml index 1f60e3ada..e324b15bd 100644 --- a/app/layout/aside_feed.phtml +++ b/app/layout/aside_feed.phtml @@ -1,22 +1,22 @@ <ul class="nav nav-list aside aside_feed"> - <li class="nav-header"><?php echo Translate::t ('your_rss_feeds'); ?></li> + <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 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 Translate::t ('add_rss_feed'); ?>" /> + <input type="url" name="url_rss" placeholder="<?php echo Minz_Translate::t ('add_rss_feed'); ?>" /> <div class="dropdown"> <div id="dropdown-cat" class="dropdown-target"></div> - <a class="dropdown-toggle btn" href="#dropdown-cat"><i class="icon i_down"></i></a> + <a class="dropdown-toggle btn" href="#dropdown-cat"><?php echo FreshRSS_Themes::icon('down'); ?></a> <ul class="dropdown-menu"> - <li class="dropdown-close"><a href="#close"> </a></li> + <li class="dropdown-close"><a href="#close">❌</a></li> - <li class="dropdown-header"><?php echo Translate::t ('category'); ?></li> + <li class="dropdown-header"><?php echo Minz_Translate::t ('category'); ?></li> <li class="input"> <select name="category" id="category"> <?php foreach ($this->categories as $cat) { ?> - <option value="<?php echo $cat->id (); ?>"<?php echo $cat->id () == '000000' ? ' selected="selected"' : ''; ?>> + <option value="<?php echo $cat->id (); ?>"<?php echo $cat->id () == 1 ? ' selected="selected"' : ''; ?>> <?php echo $cat->name (); ?> </option> <?php } ?> @@ -25,25 +25,25 @@ <li class="separator"></li> - <li class="dropdown-header"><?php echo Translate::t ('http_authentication'); ?></li> + <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 Translate::t ('username'); ?>" /> + <input type="text" name="http_user" id="http_user_add" autocomplete="off" placeholder="<?php echo Minz_Translate::t ('username'); ?>" /> </li> <li class="input"> - <input type="password" name="password" id="password" placeholder="<?php echo Translate::t ('password'); ?>" /> + <input type="password" name="http_pass" id="http_pass_add" autocomplete="off" placeholder="<?php echo Minz_Translate::t ('password'); ?>" /> </li> </ul> </div> - <button class="btn" type="submit"><i class="icon i_add"></i></button> + <button class="btn" type="submit"><?php echo FreshRSS_Themes::icon('add'); ?></button> </div> </form></li> - <li class="item<?php echo Request::actionName () == 'importExport' ? ' active' : ''; ?>"> - <a href="<?php echo _url ('configure', 'importExport'); ?>"><?php echo Translate::t ('import_export_opml'); ?></a> + <li class="item<?php echo Minz_Request::actionName () == 'importExport' ? ' active' : ''; ?>"> + <a href="<?php echo _url ('configure', 'importExport'); ?>"><?php echo Minz_Translate::t ('import_export_opml'); ?></a> </li> - <li class="item<?php echo Request::actionName () == 'categorize' ? ' active' : ''; ?>"> - <a href="<?php echo _url ('configure', 'categorize'); ?>"><?php echo Translate::t ('categories_management'); ?></a> + <li class="item<?php echo Minz_Request::actionName () == 'categorize' ? ' active' : ''; ?>"> + <a href="<?php echo _url ('configure', 'categorize'); ?>"><?php echo Minz_Translate::t ('categories_management'); ?></a> </li> <li class="separator"></li> @@ -54,11 +54,11 @@ <li class="item<?php echo ($this->flux && $this->flux->id () == $feed->id ()) ? ' active' : ''; ?><?php echo $feed->inError () ? ' error' : ''; ?><?php echo $nbEntries == 0 ? ' empty' : ''; ?>"> <a href="<?php echo _url ('configure', 'feed', 'id', $feed->id ()); ?>"> <img class="favicon" src="<?php echo $feed->favicon (); ?>" alt="✇" /> - <?php echo htmlspecialchars($feed->name (), ENT_NOQUOTES, 'UTF-8'); ?> + <?php echo $feed->name (); ?> </a> </li> <?php } ?> <?php } else { ?> - <li class="item disable"><?php echo Translate::t ('no_rss_feed'); ?></li> + <li class="item disable"><?php echo Minz_Translate::t ('no_rss_feed'); ?></li> <?php } ?> </ul> diff --git a/app/layout/aside_flux.phtml b/app/layout/aside_flux.phtml index ea2ea04ec..8454b4459 100644 --- a/app/layout/aside_flux.phtml +++ b/app/layout/aside_flux.phtml @@ -1,81 +1,88 @@ <div class="aside aside_flux" id="aside_flux"> - <a class="toggle_aside" href="#close"><i class="icon i_close"></i></a> + <a class="toggle_aside" href="#close"><?php echo FreshRSS_Themes::icon('close'); ?></a> <ul class="categories"> - <?php if (!login_is_conf ($this->conf) || is_logged ()) { ?> + <?php if ($this->loginOk) { ?> <li> <div class="stick"> - <a class="btn btn-important" href="<?php echo _url ('configure', 'feed'); ?>"><?php echo Translate::t ('subscription_management'); ?></a> - <a class="btn btn-important" href="<?php echo _url ('configure', 'categorize'); ?>"><i class="icon i_category"></i></a> + <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> </li> - <?php } elseif (login_is_conf ($this->conf)) { ?> - <li><a href="<?php echo _url ('index', 'about'); ?>"><?php echo Translate::t ('about_freshrss'); ?></a></li> + <?php } elseif (Minz_Configuration::needsLogin()) { ?> + <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 == 'all' ? ' active' : ''; ?>" href="<?php echo _url ('index', 'index'); ?>"> - <i class="icon i_all"></i> - <?php echo Translate::t ('all_feeds', $this->nb_total); ?> + <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'); ?> </a> </div> </li> <li> <div class="category favorites"> - <a data-unread="<?php echo $this->nb_favorites['unread']; ?>" class="btn<?php echo $this->get_c == 'favoris' ? ' active' : ''; ?>" href="<?php echo _url ('index', 'index', 'get', 'favoris'); ?>"> - <i class="icon i_bookmark"></i> - <?php echo Translate::t ('favorite_feeds', $this->nb_favorites['read'] + $this->nb_favorites['unread']); ?> + <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) { ?> - <?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 htmlspecialchars($cat->name (), ENT_NOQUOTES, 'UTF-8'); ?> - </a> - <a class="btn dropdown-toggle" href="#"><i class="icon <?php echo $c_active ? 'i_up' : 'i_down'; ?>"></i></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 (); ?>"><i class="icon i_configure"></i></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 htmlspecialchars($feed->name(), ENT_NOQUOTES, 'UTF-8'); ?></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 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 + ?></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 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 + ?></li><?php + } + } ?> </ul> - <span class="aside_flux_ender"><!-- For fixed menu --></span> </div> <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 Translate::t ('filter'); ?></a></li> - <li class="item"><a target="_blank" href="http://example.net/"><?php echo Translate::t ('see_website'); ?></a></li> - <?php if (!login_is_conf ($this->conf) || is_logged ()) { ?> + <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 target="_blank" href="http://example.net/"><?php echo Minz_Translate::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 Translate::t ('administration'); ?></a></li> - <li class="item"><a href="<?php echo _url ('feed', 'actualize', 'id', '!!!!!!'); ?>"><?php echo Translate::t ('actualize'); ?></a></li> - <li class="item"><a href="<?php echo _url ('entry', 'read', 'is_read', 1, 'get', 'f_!!!!!!'); ?>"><?php echo Translate::t ('mark_read'); ?></a></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> <?php } ?> </ul> </script> diff --git a/app/layout/header.phtml b/app/layout/header.phtml index e67f92141..eef53a3fd 100644 --- a/app/layout/header.phtml +++ b/app/layout/header.phtml @@ -1,79 +1,107 @@ -<?php if (login_is_conf ($this->conf)) { ?> -<ul class="nav nav-head nav-login"> - <?php if (!is_logged ()) { ?> - <li class="item"><i class="icon i_login"></i> <a class="signin" href="#"><?php echo Translate::t ('login'); ?></a></li> - <?php } else { ?> - <li class="item"><i class="icon i_logout"></i> <a class="signout" href="#"><?php echo Translate::t ('logout'); ?></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"> <h1> <a href="<?php echo _url ('index', 'index'); ?>"> - <img class="logo" width="32" height="32" src="<?php echo Url::display ('/themes/icons/icon-32.png'); ?>" alt="[logo]" /> - <?php echo Configuration::title (); ?> + <img class="logo" src="<?php echo Minz_Url::display ('/themes/icons/icon.svg'); ?>" alt="⊚" /> + <?php echo Minz_Configuration::title (); ?> </a> </h1> </div> <div class="item search"> - <?php if(!login_is_conf ($this->conf) || - is_logged() || - $this->conf->anonAccess() == 'yes') { ?> + <?php if ($this->loginOk || Minz_Configuration::allowAnonymous()) { ?> <form action="<?php echo _url ('index', 'index'); ?>" method="get"> <div class="stick"> - <?php $search = Request::param ('search', ''); ?> - <input type="text" name="search" id="search" value="<?php echo $search; ?>" placeholder="<?php echo Translate::t ('search'); ?>" /> + <?php $search = Minz_Request::param ('search', ''); ?> + <input type="search" name="search" id="search" class="extend" value="<?php echo $search; ?>" placeholder="<?php echo Minz_Translate::t ('search'); ?>" /> - <?php $get = Request::param ('get', ''); ?> + <?php $get = Minz_Request::param ('get', ''); ?> <?php if($get != '') { ?> <input type="hidden" name="get" value="<?php echo $get; ?>" /> <?php } ?> - <?php $order = Request::param ('order', ''); ?> + <?php $order = Minz_Request::param ('order', ''); ?> <?php if($order != '') { ?> <input type="hidden" name="order" value="<?php echo $order; ?>" /> <?php } ?> - <?php $state = Request::param ('state', ''); ?> + <?php $state = Minz_Request::param ('state', ''); ?> <?php if($state != '') { ?> <input type="hidden" name="state" value="<?php echo $state; ?>" /> <?php } ?> - <button class="btn" type="submit"><i class="icon i_search"></i></button> + <button class="btn" type="submit"><?php echo FreshRSS_Themes::icon('search'); ?></button> </div> </form> <?php } ?> </div> - <?php if (!login_is_conf ($this->conf) || is_logged ()) { ?> + <?php if ($this->loginOk) { ?> <div class="item configure"> <div class="dropdown"> <div id="dropdown-configure" class="dropdown-target"></div> - - <a class="btn dropdown-toggle" href="#dropdown-configure"><i class="icon i_configure"></i></a> + <a class="btn dropdown-toggle" href="#dropdown-configure"><?php echo FreshRSS_Themes::icon('configure'); ?></a> <ul class="dropdown-menu"> - <li class="dropdown-close"><a href="#close"> </a></li> - <li class="dropdown-header"><?php echo Translate::t ('configuration'); ?></li> - <li class="item"><a href="<?php echo _url ('configure', 'display'); ?>"><?php echo Translate::t ('general_and_reading'); ?></a></li> - <li class="item"><a href="<?php echo _url ('configure', 'shortcut'); ?>"><?php echo Translate::t ('shortcuts'); ?></a></li> + <li class="dropdown-close"><a href="#close">❌</a></li> + <li class="dropdown-header"><?php echo Minz_Translate::t ('configuration'); ?></li> + <li class="item"><a href="<?php echo _url ('configure', 'display'); ?>"><?php echo Minz_Translate::t ('reading_configuration'); ?></a></li> + <li class="item"><a href="<?php echo _url ('configure', 'archiving'); ?>"><?php echo Minz_Translate::t ('archiving_configuration'); ?></a></li> + <li class="item"><a href="<?php echo _url ('configure', 'sharing'); ?>"><?php echo Minz_Translate::t ('sharing'); ?></a></li> + <li class="item"><a href="<?php echo _url ('configure', 'shortcut'); ?>"><?php echo Minz_Translate::t ('shortcuts'); ?></a></li> <li class="separator"></li> - <li class="item"><a href="<?php echo _url ('index', 'about'); ?>"><?php echo Translate::t ('about'); ?></a></li> - <li class="item"><a href="<?php echo _url ('index', 'logs'); ?>"><?php echo Translate::t ('logs'); ?></a></li> - <?php if (login_is_conf ($this->conf) && is_logged ()) { ?> + <li class="item"><a href="<?php echo _url ('configure', 'users'); ?>"><?php echo Minz_Translate::t ('users'); ?></a></li> <li class="separator"></li> - <li class="item"><a class="signout" href="#"><i class="icon i_logout"></i> <?php echo Translate::t ('logout'); ?></a></li> - <?php } ?> + <li class="item"><a href="<?php echo _url ('index', 'stats'); ?>"><?php echo Minz_Translate::t ('stats'); ?></a></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><?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 } - - if (login_is_conf ($this->conf) && !is_logged ()) { ?> - <div class="item configure"> - <i class="icon i_login"></i> <a class="signin" href="#"><?php echo 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/layout.phtml b/app/layout/layout.phtml index bb4a1f7eb..d6a1737ee 100644 --- a/app/layout/layout.phtml +++ b/app/layout/layout.phtml @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html lang="<?php echo $this->conf->language (); ?>" xml:lang="<?php echo $this->conf->language (); ?>"> +<html lang="<?php echo $this->conf->language; ?>" xml:lang="<?php echo $this->conf->language; ?>"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="initial-scale=1.0" /> @@ -10,20 +10,25 @@ <?php $this->renderHelper ('javascript_vars'); ?> //]]></script> <?php - $next = isset($this->entryPaginator) ? $this->entryPaginator->next() : ''; - if (!empty($next)) { - $params = Request::params (); - $params['next'] = $next; + if (!empty($this->nextId)) { + $params = Minz_Request::params (); + $params['next'] = $this->nextId; ?> - <link id="prefetch" rel="next prefetch" href="<?php echo Url::display (array ('c' => Request::controllerName (), 'a' => Request::actionName (), 'params' => $params)); ?>" /> + <link id="prefetch" rel="next prefetch" href="<?php echo Minz_Url::display (array ('c' => Minz_Request::controllerName (), 'a' => Minz_Request::actionName (), 'params' => $params)); ?>" /> <?php } ?> - <link rel="icon" href="<?php echo Url::display ('/favicon.ico'); ?>" /> + <link rel="shortcut icon" type="image/x-icon" sizes="16x16 64x64" href="<?php echo Minz_Url::display('/favicon.ico'); ?>" /> + <link rel="icon msapplication-TileImage apple-touch-icon" type="image/png" sizes="256x256" href="<?php echo Minz_Url::display('/themes/icons/favicon-256.png'); ?>" /> <?php if (isset ($this->rss_url)) { ?> - <link rel="alternate" type="application/rss+xml" title="<?php echo htmlspecialchars($this->rss_title, ENT_COMPAT, 'UTF-8'); ?>" href="<?php echo Url::display ($this->rss_url); ?>" /> + <link rel="alternate" type="application/rss+xml" title="<?php echo $this->rss_title; ?>" href="<?php echo Minz_Url::display ($this->rss_url); ?>" /> <?php } ?> + <link rel="prefetch" href="<?php echo FreshRSS_Themes::icon('starred', true); ?>"> + <link rel="prefetch" href="<?php echo FreshRSS_Themes::icon('non-starred', true); ?>"> + <link rel="prefetch" href="<?php echo FreshRSS_Themes::icon('read', true); ?>"> + <link rel="prefetch" href="<?php echo FreshRSS_Themes::icon('unread', true); ?>"> + <meta name="msapplication-TileColor" content="#FFF" /> <meta name="robots" content="noindex,nofollow" /> </head> - <body> + <body class="<?php echo Minz_Request::param('output', 'normal'); ?>"> <?php $this->partial ('header'); ?> <div id="global"> @@ -32,11 +37,11 @@ <?php if (isset ($this->notification)) { - touch(PUBLIC_PATH . '/data/touch.txt', time() + 1); + invalidateHttpCache(); ?> <div class="notification <?php echo $this->notification['type']; ?>"> <?php echo $this->notification['content']; ?> - <a class="close" href=""><i class="icon i_close"></i></a> + <a class="close" href=""><?php echo FreshRSS_Themes::icon('close'); ?></a> </div> <?php } ?> </body> diff --git a/app/layout/nav_entries.phtml b/app/layout/nav_entries.phtml index 3c3c3ae5e..3141e92a0 100644 --- a/app/layout/nav_entries.phtml +++ b/app/layout/nav_entries.phtml @@ -1,5 +1,5 @@ <ul id="nav_entries"> - <li class="item"><a class="previous_entry" href="#"><i class="icon i_prev"></i></a></li> - <li class="item"><a class="up" href="#"><i class="icon i_up"></i></a></li> - <li class="item"><a class="next_entry" href="#"><i class="icon i_next"></i></a></li> + <li class="item"><a class="previous_entry" href="#"><?php echo FreshRSS_Themes::icon('prev'); ?></a></li> + <li class="item"><a class="up" href="#"><?php echo FreshRSS_Themes::icon('up'); ?></a></li> + <li class="item"><a class="next_entry" href="#"><?php echo FreshRSS_Themes::icon('next'); ?></a></li> </ul>
\ No newline at end of file diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml index 3565b21b5..c807e6dd5 100644 --- a/app/layout/nav_menu.phtml +++ b/app/layout/nav_menu.phtml @@ -1,30 +1,36 @@ +<?php + $actual_view = Minz_Request::param('output', 'normal'); +?> <div class="nav_menu"> - <a class="btn toggle_aside" href="#aside_flux"><i class="icon i_category"></i></a> + <?php if ($actual_view === 'normal') { ?> + <a class="btn toggle_aside" href="#aside_flux"><?php echo FreshRSS_Themes::icon('category'); ?></a> + <?php } ?> - <?php if (!login_is_conf ($this->conf) || is_logged ()) { ?> - <a id="actualize" class="btn" href="<?php echo _url ('feed', 'actualize'); ?>"><i class="icon i_refresh"></i></a> + <?php if ($this->loginOk) { ?> + <a id="actualize" class="btn" href="<?php echo _url ('feed', 'actualize'); ?>"><?php echo FreshRSS_Themes::icon('refresh'); ?></a> <?php $get = false; - $string_mark = Translate::t ('mark_all_read'); + $string_mark = Minz_Translate::t ('mark_all_read'); if ($this->get_f) { $get = 'f_' . $this->get_f; - $string_mark = Translate::t ('mark_feed_read'); - } elseif ($this->get_c && - $this->get_c != 'all' && - $this->get_c != 'favoris' && - $this->get_c != 'public') { - $get = 'c_' . $this->get_c; - $string_mark = Translate::t ('mark_cat_read'); + $string_mark = Minz_Translate::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'); } $nextGet = $get; - if (($this->conf->onread_jump_next () === 'yes') && (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) { + if ($cat->id () == $this->get_c) { $foundCurrent = true; continue; } @@ -32,13 +38,13 @@ $anotherUnreadId = $cat->id (); if ($foundCurrent) break; } - $nextGet = strlen ($anotherUnreadId) > 1 ? 'c_' . $anotherUnreadId : 'all'; + $nextGet = empty ($anotherUnreadId) ? 'a' : 'c_' . $anotherUnreadId; break; case 'f': foreach ($this->cat_aside as $cat) { - if ($cat->id () === $this->get_c) { + if ($cat->id () == $this->get_c) { foreach ($cat->feeds () as $feed) { - if ($feed->id () === $this->get_f) { + if ($feed->id () == $this->get_f) { $foundCurrent = true; continue; } @@ -49,37 +55,46 @@ break; } } - $nextGet = strlen ($anotherUnreadId) > 1 ? 'f_' . $anotherUnreadId : 'c_' . $this->get_c; + $nextGet = empty ($anotherUnreadId) ? 'c_' . $this->get_c : 'f_' . $anotherUnreadId; break; } } + $p = isset($this->entries[0]) ? $this->entries[0] : null; + $idMax = $p === null ? '0' : $p->id(); + + $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); ?> <div class="stick" id="nav_menu_read_all"> - <a class="read_all btn" href="<?php echo _url ('entry', 'read', 'is_read', 1, 'get', $get, 'nextGet', $nextGet); ?>"><?php echo Translate::t ('mark_read'); ?></a> + <a class="read_all btn" href="<?php echo $markReadUrl; ?>"><?php echo Minz_Translate::t ('mark_read'); ?></a> <div class="dropdown"> <div id="dropdown-read" class="dropdown-target"></div> - <a class="dropdown-toggle btn" href="#dropdown-read"><i class="icon i_down"></i></a> + <a class="dropdown-toggle btn" href="#dropdown-read"><?php echo FreshRSS_Themes::icon('down'); ?></a> <ul class="dropdown-menu"> - <li class="dropdown-close"><a href="#close"> </a></li> + <li class="dropdown-close"><a href="#close">❌</a></li> - <li class="item"><a href="<?php echo _url ('entry', 'read', 'is_read', 1, 'get', $get, 'nextGet', $nextGet); ?>"><?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 - $date = getdate (); - $today = mktime (0, 0, 0, $date['mon'], $date['mday'], $date['year']); + $today = $this->today; $one_week = $today - 604800; ?> - <li class="item"><a href="<?php echo _url ('entry', 'read', 'is_read', 1, 'get', $get, 'dateMax', $today); ?>"><?php echo Translate::t ('before_one_day'); ?></a></li> - <li class="item"><a href="<?php echo _url ('entry', 'read', 'is_read', 1, 'get', $get, 'dateMax', $one_week); ?>"><?php echo Translate::t ('before_one_week'); ?></a></li> + <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> </ul> </div> </div> <?php } ?> <?php - $params = Request::params (); + $params = Minz_Request::params (); if (isset ($params['search'])) { $params['search'] = urlencode ($params['search']); } @@ -91,73 +106,88 @@ ?> <div class="dropdown" id="nav_menu_views"> <div id="dropdown-views" class="dropdown-target"></div> - <a class="dropdown-toggle btn" href="#dropdown-views"><?php echo Translate::t ('display'); ?> <i class="icon i_down"></i></a> + <a class="dropdown-toggle btn" href="#dropdown-views"><?php echo Minz_Translate::t ('display'); ?> <?php echo FreshRSS_Themes::icon('down'); ?></a> <ul class="dropdown-menu"> - <li class="dropdown-close"><a href="#close"> </a></li> + <li class="dropdown-close"><a href="#close">❌</a></li> <?php $url_output = $url; - $actual_view = Request::param('output', 'normal'); - ?> - <?php if($actual_view != 'normal') { ?> + if ($actual_view !== 'normal') { ?> <li class="item"> <?php $url_output['params']['output'] = 'normal'; ?> - <a class="view_normal" href="<?php echo Url::display ($url_output); ?>"> - <?php echo Translate::t ('normal_view'); ?> + <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 Url::display ($url_output); ?>"> - <?php echo Translate::t ('reader_view'); ?> + <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 Url::display ($url_output); ?>"> - <?php echo Translate::t ('global_view'); ?> + <a class="view_normal" href="<?php echo Minz_Url::display ($url_output); ?>"> + <?php echo Minz_Translate::t ('global_view'); ?> </a> </li> <?php } ?> <li class="separator"></li> - <li class="item"> - <?php - $url_state = $url; - if ($this->state == 'not_read') { - $url_state['params']['state'] = 'all'; - ?> - <a class="print_all" href="<?php echo Url::display ($url_state); ?>"> - <?php echo Translate::t ('show_all_articles'); ?> + <?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'; - ?> - <a class="print_non_read" href="<?php echo Url::display ($url_state); ?>"> - <?php echo Translate::t ('show_not_reads'); ?> + </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 $url_order = $url; - if ($this->order == 'low_to_high') { - $url_order['params']['order'] = 'high_to_low'; + if ($this->order === 'DESC') { + $url_order['params']['order'] = 'ASC'; ?> - <a href="<?php echo Url::display ($url_order); ?>"> - <?php echo Translate::t ('older_first'); ?> + <a href="<?php echo Minz_Url::display ($url_order); ?>"> + <?php echo Minz_Translate::t ('older_first'); ?> </a> <?php } else { - $url_order['params']['order'] = 'low_to_high'; + $url_order['params']['order'] = 'DESC'; ?> - <a href="<?php echo Url::display ($url_order); ?>"> - <?php echo Translate::t ('newer_first'); ?> + <a href="<?php echo Minz_Url::display ($url_order); ?>"> + <?php echo Minz_Translate::t ('newer_first'); ?> </a> <?php } ?> </li> @@ -165,10 +195,32 @@ <li class="separator"></li> <li class="item"> - <a class="view_rss" target="_blank" href="<?php echo Url::display ($this->rss_url); ?>"> - <?php echo Translate::t ('rss_view'); ?> + <a class="view_rss" target="_blank" href="<?php echo Minz_Url::display ($this->rss_url); ?>"> + <?php echo Minz_Translate::t ('rss_view'); ?> </a> </li> </ul> </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'); ?>" /> + + <?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 if($order != '') { ?> + <input type="hidden" name="order" value="<?php echo $order; ?>" /> + <?php } ?> + + <?php $state = Minz_Request::param ('state', ''); ?> + <?php if($state != '') { ?> + <input type="hidden" name="state" value="<?php echo $state; ?>" /> + <?php } ?> + </form> + </div> </div> |
