diff options
| author | 2013-05-05 13:20:13 +0200 | |
|---|---|---|
| committer | 2013-05-05 13:20:13 +0200 | |
| commit | 2e7afb7d340eb367d65ac042ae24a10fa021c073 (patch) | |
| tree | 27208483aac8262cdc42ee492a0f222991a0b4fa /app/layout | |
| parent | ae7c9787cd8afd4313d356c6525e40d4ce79f99b (diff) | |
| parent | d4e6176a1ae210c011b14839023f91b4014f2881 (diff) | |
Merge branch 'releases'0.3.0
Diffstat (limited to 'app/layout')
| -rw-r--r-- | app/layout/aside_configure.phtml | 8 | ||||
| -rw-r--r-- | app/layout/aside_feed.phtml | 22 | ||||
| -rw-r--r-- | app/layout/aside_flux.phtml | 41 | ||||
| -rw-r--r-- | app/layout/header.phtml | 32 | ||||
| -rw-r--r-- | app/layout/layout.phtml | 3 | ||||
| -rw-r--r-- | app/layout/nav_menu.phtml | 72 |
6 files changed, 118 insertions, 60 deletions
diff --git a/app/layout/aside_configure.phtml b/app/layout/aside_configure.phtml index ee527d75e..d91aebbdd 100644 --- a/app/layout/aside_configure.phtml +++ b/app/layout/aside_configure.phtml @@ -1,13 +1,13 @@ <div class="nav nav-list aside"> - <li class="nav-header">Configuration</li> + <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')); ?>">Général et lecture</a> + <a href="<?php echo Url::display (array ('c' => 'configure', 'a' => 'display')); ?>"><?php echo Translate::t ('general_and_reading'); ?></a> </li> <li class="item<?php echo Request::actionName () == 'categorize' ? ' active' : ''; ?>"> - <a href="<?php echo Url::display (array ('c' => 'configure', 'a' => 'categorize')); ?>">Catégories</a> + <a href="<?php echo Url::display (array ('c' => 'configure', 'a' => 'categorize')); ?>"><?php echo Translate::t ('categories'); ?></a> </li> <li class="item<?php echo Request::actionName () == 'shortcut' ? ' active' : ''; ?>"> - <a href="<?php echo Url::display (array ('c' => 'configure', 'a' => 'shortcut')); ?>">Raccourcis</a> + <a href="<?php echo Url::display (array ('c' => 'configure', 'a' => 'shortcut')); ?>"><?php echo Translate::t ('shortcuts'); ?></a> </li> </div> diff --git a/app/layout/aside_feed.phtml b/app/layout/aside_feed.phtml index bd92b3393..158f012d0 100644 --- a/app/layout/aside_feed.phtml +++ b/app/layout/aside_feed.phtml @@ -1,9 +1,9 @@ <ul class="nav nav-list aside aside_feed"> - <li class="nav-header">Vos flux RSS</li> + <li class="nav-header"><?php echo 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')); ?>"> <div class="stick"> - <input type="url" name="url_rss" placeholder="Ajouter un flux RSS" /> + <input type="url" name="url_rss" placeholder="<?php echo Translate::t ('add_rss_feed'); ?>" /> <div class="dropdown"> <div id="dropdown-cat" class="dropdown-target"></div> @@ -11,7 +11,7 @@ <ul class="dropdown-menu"> <li class="dropdown-close"><a href="#close"><i class="icon i_close"></i></a></li> - <li class="dropdown-header">Catégorie</li> + <li class="dropdown-header"><?php echo Translate::t ('category'); ?></li> <?php foreach ($this->categories as $cat) { ?> <li class="item"> @@ -21,13 +21,23 @@ </label> </li> <?php } ?> + + <li class="separator"></li> + + <li class="dropdown-header"><?php echo Translate::t ('http_authentication'); ?></li> + <li class="input"> + <input type="text" name="username" id="username" placeholder="<?php echo Translate::t ('username'); ?>" /> + </li> + <li class="input"> + <input type="password" name="password" id="password" placeholder="<?php echo Translate::t ('password'); ?>" /> + </li> </ul> </div> <button class="btn" type="submit"><i class="icon i_add"></i></button> </div> </form></li> - <li class="item<?php echo Request::actionName () == 'importExport' ? ' active' : ''; ?>"><a href="<?php echo _url ('configure', 'importExport'); ?>">Import / Export OPML</a></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> <li class="separator"></li> @@ -35,12 +45,12 @@ <?php foreach ($this->feeds as $feed) { ?> <li class="item<?php echo ($this->flux && $this->flux->id () == $feed->id ()) ? ' active' : ''; ?>"> <a href="<?php echo _url ('configure', 'feed', 'id', $feed->id ()); ?>"> - <img class="favicon" src="http://g.etfv.co/<?php echo $feed->website (); ?>" alt="" /> + <img class="favicon" src="<?php echo $feed->favicon (); ?>" alt="" /> <?php echo $feed->name (); ?> </a> </li> <?php } ?> <?php } else { ?> - <li class="item disable">Aucun flux</li> + <li class="item disable"><?php echo Translate::t ('no_rss_feed'); ?></li> <?php } ?> </ul> diff --git a/app/layout/aside_flux.phtml b/app/layout/aside_flux.phtml index 3a6ecb304..d1fe6b759 100644 --- a/app/layout/aside_flux.phtml +++ b/app/layout/aside_flux.phtml @@ -3,26 +3,21 @@ <ul class="categories"> <?php - $get = Request::param ('get', ''); - $search = Request::param ('search', ''); + $params = Request::params (); + $params['output'] = 'rss'; + if (isset ($params['search'])) { + $params['search'] = urlencode ($params['search']); + } $url = array ( 'c' => 'index', 'a' => 'index', - 'params' => array ( - 'output' => 'rss' - ) + 'params' => $params ); - if ($get != '') { - $url['params']['get'] = $get; - } - if ($search != '') { - $url['params']['search'] = $search; - } ?> <?php if (!login_is_conf ($this->conf) || is_logged ()) { ?> <li> <div class="stick"> - <a class="btn btn-important" href="<?php echo _url ('configure', 'feed'); ?>">Gestion des abonnements</a> + <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::display ($url); ?>"><i class="icon i_rss"></i></a> </div> </li> @@ -30,11 +25,11 @@ <li> <div class="all"> - <a class="btn<?php echo !$this->get_c ? ' active' : ''; ?>" href="<?php echo _url ('index', 'index'); ?>"> + <a class="btn<?php echo $this->get_c == 'all' ? ' active' : ''; ?>" href="<?php echo _url ('index', 'index'); ?>"> <i class="icon i_all"></i> - Tous (<?php echo $this->nb_total; ?>) + <?php echo Translate::t ('all_feeds', $this->nb_total); ?> <?php if ($this->nb_not_read > 0) { ?> - <span class="notRead"><?php echo $this->nb_not_read; ?> non lu<?php echo $this->nb_not_read > 1 ? 's' : ''; ?></span> + <span class="notRead"><?php echo $this->nb_not_read > 1 ? Translate::t ('not_reads', $this->nb_not_read) : Translate::t ('not_read', $this->nb_not_read); ?></span> <?php } ?> </a> </div> @@ -44,7 +39,7 @@ <div class="favorites"> <a class="btn<?php echo $this->get_c == 'favoris' ? ' active' : ''; ?>" href="<?php echo _url ('index', 'index', 'get', 'favoris'); ?>"> <i class="icon i_bookmark"></i> - Favoris (<?php echo $this->nb_favorites; ?>) + <?php echo Translate::t ('favorite_feeds', $this->nb_favorites); ?> </a> </div> </li> @@ -58,7 +53,7 @@ <a class="btn<?php echo $c_active ? ' active' : ''; ?>" href="<?php echo _url ('index', 'index', 'get', 'c_' . $cat->id ()); ?>"> <?php echo $cat->name (); ?> <?php if ($catNotRead > 0) { ?> - <span class="notRead"><?php echo $catNotRead ?> non lu<?php echo $catNotRead > 1 ? 's' : ''; ?></span> + <span class="notRead"><?php echo $catNotRead > 1 ? Translate::t ('not_reads', $catNotRead) : Translate::t ('not_read', $catNotRead); ?></span> <?php } ?> </a> </div> @@ -73,21 +68,21 @@ <a class="dropdown-toggle" href="#dropdown-<?php echo $feed->id(); ?>"><i class="icon i_configure"></i></a> <ul class="dropdown-menu"> <li class="dropdown-close"><a href="#close"><i class="icon i_close"></i></a></li> - <li class="item"><a href="<?php echo _url ('index', 'index', 'get', 'f_' . $feed->id ()); ?>">Filtrer</a></li> - <li class="item"><a target="_blank" href="<?php echo $feed->website (); ?>">Voir le site</a></li> + <li class="item"><a href="<?php echo _url ('index', 'index', 'get', 'f_' . $feed->id ()); ?>"><?php echo Translate::t ('filter'); ?></a></li> + <li class="item"><a target="_blank" href="<?php echo $feed->website (); ?>"><?php echo Translate::t ('see_website'); ?></a></li> <?php if (!login_is_conf ($this->conf) || is_logged ()) { ?> <li class="separator"></li> - <li class="item"><a href="<?php echo _url ('configure', 'feed', 'id', $feed->id ()); ?>">Gestion</a></li> - <li class="item"><a href="<?php echo _url ('feed', 'actualize', 'id', $feed->id ()); ?>">Actualiser</a></li> - <li class="item"><a href="<?php echo _url ('entry', 'read', 'is_read', 1, 'get', 'f_' . $feed->id ()); ?>">Marquer comme lu</a></li> + <li class="item"><a href="<?php echo _url ('configure', 'feed', 'id', $feed->id ()); ?>"><?php echo Translate::t ('administration'); ?></a></li> + <li class="item"><a href="<?php echo _url ('feed', 'actualize', 'id', $feed->id ()); ?>"><?php echo Translate::t ('actualize'); ?></a></li> + <li class="item"><a href="<?php echo _url ('entry', 'read', 'is_read', 1, 'get', 'f_' . $feed->id ()); ?>"><?php echo Translate::t ('mark_read'); ?></a></li> <?php } ?> </ul> </div> <?php $not_read = $feed->nbNotRead (); ?> - <img class="favicon" src="http://g.etfv.co/<?php echo $feed->website (); ?>" alt="" /> + <img class="favicon" src="<?php echo $feed->favicon (); ?>" alt="" /> <?php echo $not_read > 0 ? '<b>' : ''; ?> <a class="feed" href="<?php echo _url ('index', 'index', 'get', 'f_' . $feed->id ()); ?>"> <?php echo $not_read > 0 ? '(' . $not_read . ') ' : ''; ?> diff --git a/app/layout/header.phtml b/app/layout/header.phtml index 77cd1b50a..628019c97 100644 --- a/app/layout/header.phtml +++ b/app/layout/header.phtml @@ -1,23 +1,35 @@ <?php if (login_is_conf ($this->conf)) { ?> <ul class="nav nav-head"> <?php if (!is_logged ()) { ?> - <li class="item"><i class="icon i_login"></i> <a id="signin" href="#">Connexion</a></li> + <li class="item"><i class="icon i_login"></i> <a id="signin" href="#"><?php echo Translate::t ('login'); ?></a></li> <?php } else { ?> - <li class="item"><i class="icon i_logout"></i> <a id="signout" href="#">Déconnexion</a></li> + <li class="item"><i class="icon i_logout"></i> <a id="signout" href="#"><?php echo Translate::t ('logout'); ?></a></li> <?php } ?> </ul> <?php } ?> <div class="header"> <div class="item title"> - <h1><a href="<?php echo _url ('index', 'index'); ?>">FreshRSS</a></h1> + <h1><a href="<?php echo _url ('index', 'index'); ?>"><?php echo Configuration::title (); ?></a></h1> + <img class="logo" src="<?php echo Url::display ('/logo.png'); ?>" alt="" /> </div> <div class="item search"> - <form action="<?php echo _url ('index', 'index'); ?>" method="get"> + <?php + $params = Request::params (); + if (isset ($params['search'])) { + unset ($params['search']); + } + $url = array ( + 'c' => 'index', + 'a' => 'index', + 'params' => $params + ); + ?> + <form action="<?php echo Url::display ($url); ?>" method="get"> <div class="stick"> <?php $s = Request::param ('search', ''); ?> - <input type="text" name="search" id="search" value="<?php echo $s; ?>" placeholder="Rechercher sur les titres" /> + <input type="text" name="search" id="search" value="<?php echo $s; ?>" placeholder="<?php echo Translate::t ('search'); ?>" /> <button class="btn" type="submit"><i class="icon i_search"></i></button> </div> </form> @@ -31,12 +43,12 @@ <a class="btn dropdown-toggle" href="#dropdown-configure"><i class="icon i_configure"></i></a> <ul class="dropdown-menu"> <li class="dropdown-close"><a href="#close"><i class="icon i_close"></i></a></li> - <li class="dropdown-header">Configuration</li> - <li class="item"><a href="<?php echo _url ('configure', 'display'); ?>">Général et lecture</a></li> - <li class="item"><a href="<?php echo _url ('configure', 'categorize'); ?>">Catégories</a></li> - <li class="item"><a href="<?php echo _url ('configure', 'shortcut'); ?>">Raccourcis</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', 'categorize'); ?>"><?php echo Translate::t ('categories'); ?></a></li> + <li class="item"><a href="<?php echo _url ('configure', 'shortcut'); ?>"><?php echo Translate::t ('shortcuts'); ?></a></li> <li class="separator"></li> - <li class="item"><a href="<?php echo _url ('index', 'about'); ?>">À propos</a></li> + <li class="item"><a href="<?php echo _url ('index', 'about'); ?>"><?php echo Translate::t ('about'); ?></a></li> </ul> </div> </div> diff --git a/app/layout/layout.phtml b/app/layout/layout.phtml index a515217d6..331570873 100644 --- a/app/layout/layout.phtml +++ b/app/layout/layout.phtml @@ -3,6 +3,9 @@ <head> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1.0"> + <link rel="icon" type="image/x-icon" href="<?php echo Url::display ('/favicon.ico'); ?>" /> + <link rel="icon" type="image/png" href="<?php echo Url::display ('/favicon.ico'); ?>" /> + <?php echo self::headTitle (); ?> <?php echo self::headStyle (); ?> <?php echo self::headScript (); ?> diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml index 5d7dd3091..3411f344b 100644 --- a/app/layout/nav_menu.phtml +++ b/app/layout/nav_menu.phtml @@ -1,23 +1,26 @@ <div class="nav_menu"> <a class="btn toggle_aside" href="#aside_flux"><i class="icon i_category"></i></a> + <?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 $get = false; - $string_mark = 'Tout marquer comme lu'; + $string_mark = Translate::t ('mark_all_read'); if ($this->get_f) { $get = 'f_' . $this->get_f; - $string_mark = 'Marquer le flux comme lu'; - } elseif ($this->get_c) { + $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 = 'Marquer la catégorie comme lue'; + $string_mark = Translate::t ('mark_cat_read'); } ?> - <?php if (!login_is_conf ($this->conf) || is_logged ()) { ?> <div class="stick"> - <a class="read_all btn" href="<?php echo _url ('entry', 'read', 'is_read', 1, 'get', $get); ?>">Marquer comme lu</a> + <a class="read_all btn" href="<?php echo _url ('entry', 'read', 'is_read', 1, 'get', $get); ?>"><?php echo Translate::t ('mark_read'); ?></a> <div class="dropdown"> <div id="dropdown-read" class="dropdown-target"></div> @@ -32,32 +35,67 @@ $today = mktime (0, 0, 0, $date['mon'], $date['mday'], $date['year']); $one_week = $today - 604800; ?> - <li class="item"><a href="<?php echo _url ('entry', 'read', 'is_read', 1, 'get', $get, 'dateMax', $today); ?>">Antérieurs à 1 jour</a></li> - <li class="item"><a href="<?php echo _url ('entry', 'read', 'is_read', 1, 'get', $get, 'dateMax', $one_week); ?>">Antérieurs à 1 semaine</a></li> + <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> </ul> </div> </div> <?php } ?> + <?php + $params = Request::params (); + if (isset ($params['search'])) { + $params['search'] = urlencode ($params['search']); + } + $url = array ( + 'c' => 'index', + 'a' => 'index', + 'params' => $params + ); + ?> <div class="dropdown"> <div id="dropdown-views" class="dropdown-target"></div> - <a class="dropdown-toggle btn" href="#dropdown-views">Affichage <i class="icon i_down"></i></a> + <a class="dropdown-toggle btn" href="#dropdown-views"><?php echo Translate::t ('display'); ?> <i class="icon i_down"></i></a> <ul class="dropdown-menu"> <li class="dropdown-close"><a href="#close"><i class="icon i_close"></i></a></li> <li class="item"> - <?php if ($this->mode == 'not_read') { ?> - <a class="print_all" href="<?php echo _url ('index', 'changeMode', 'mode', 'all'); ?>">Tout afficher</a> - <?php } else { ?> - <a class="print_non_read" href="<?php echo _url ('index', 'changeMode', 'mode', 'not_read'); ?>">Afficher les non lus</a> + <?php + if ($this->state == 'not_read') { + $url['params']['state'] = 'all'; + ?> + <a class="print_all" href="<?php echo Url::display ($url); ?>"><?php echo Translate::t ('show_all_articles'); ?></a> + <?php + } else { + $url['params']['state'] = 'not_read'; + ?> + <a class="print_non_read" href="<?php echo Url::display ($url); ?>"><?php echo Translate::t ('show_not_reads'); ?></a> <?php } ?> </li> <li class="separator"></li> + + <?php + $params = Request::params (); + if (isset ($params['search'])) { + $params['search'] = urlencode ($params['search']); + } + $url = array ( + 'c' => 'index', + 'a' => 'index', + 'params' => $params + ); + ?> <li class="item"> - <?php if ($this->order == 'low_to_high') { ?> - <a href="<?php echo _url ('index', 'changeOrder', 'order', 'high_to_low'); ?>">Plus anciens en premier</a> - <?php } else { ?> - <a href="<?php echo _url ('index', 'changeOrder', 'order', 'low_to_high'); ?>">Plus récents en premier</a> + <?php + if ($this->order == 'low_to_high') { + $url['params']['order'] = 'high_to_low'; + ?> + <a href="<?php echo Url::display ($url); ?>"><?php echo Translate::t ('older_first'); ?></a> + <?php + } else { + $url['params']['order'] = 'low_to_high'; + ?> + <a href="<?php echo Url::display ($url); ?>"><?php echo Translate::t ('newer_first'); ?></a> <?php } ?> </li> </ul> |
