summaryrefslogtreecommitdiff
path: root/app/layout
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-08-24 15:29:09 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-08-24 15:29:09 +0200
commit07444280d1a03daa7880c1539bde3a6e80945dab (patch)
treec328a11f59e07d12e624576ed86b11ada1b9d198 /app/layout
parent1d2527b8bc2a125cc8b8508402417f60d314e330 (diff)
parentd1f79fee69a3667913f419cd9726ffb11f410bd0 (diff)
Merge branch 'dev' into beta
Conflicts: README.md
Diffstat (limited to 'app/layout')
-rw-r--r--app/layout/aside_flux.phtml17
-rw-r--r--app/layout/aside_stats.phtml3
-rw-r--r--app/layout/layout.phtml2
-rw-r--r--app/layout/nav_menu.phtml18
4 files changed, 28 insertions, 12 deletions
diff --git a/app/layout/aside_flux.phtml b/app/layout/aside_flux.phtml
index 817dae676..432d6fdb7 100644
--- a/app/layout/aside_flux.phtml
+++ b/app/layout/aside_flux.phtml
@@ -1,4 +1,4 @@
-<div class="aside aside_flux" id="aside_flux">
+<div class="aside aside_flux<?php if ($this->conf->hide_read_feeds && ($this->state & FreshRSS_Entry::STATE_NOT_READ) && !($this->state & FreshRSS_Entry::STATE_READ)) echo ' state_unread'; ?>" id="aside_flux">
<a class="toggle_aside" href="#close"><?php echo FreshRSS_Themes::icon('close'); ?></a>
<ul class="categories">
@@ -41,11 +41,17 @@
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;
+ if ($this->conf->display_categories) {
+ if ($this->get_c == $cat->id () && $this->get_f) {
+ $c_active = true;
+ }
+ } else {
+ if ($this->get_c == $cat->id ()) {
+ $c_active = true;
+ }
}
+ ?><li data-unread="<?php echo $cat->nbNotRead(); ?>"<?php if ($c_active) echo ' class="active"'; ?>><?php
?><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
@@ -55,7 +61,7 @@
$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
+ ?><li id="f_<?php echo $feed_id; ?>" class="item<?php echo $f_active ? ' active' : ''; ?><?php echo $feed->inError () ? ' error' : ''; ?><?php echo $nbEntries == 0 ? ' empty' : ''; ?>" data-unread="<?php echo $feed->nbNotRead(); ?>"><?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
@@ -77,6 +83,7 @@
<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 Minz_Translate::t ('filter'); ?></a></li>
+ <li class="item"><a href="<?php echo _url ('stats', 'repartition', 'id', '!!!!!!'); ?>"><?php echo Minz_Translate::t ('stats'); ?></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>
diff --git a/app/layout/aside_stats.phtml b/app/layout/aside_stats.phtml
index 32a3f5dee..fbfb9d84d 100644
--- a/app/layout/aside_stats.phtml
+++ b/app/layout/aside_stats.phtml
@@ -6,4 +6,7 @@
<li class="item<?php echo Minz_Request::actionName () == 'idle' ? ' active' : ''; ?>">
<a href="<?php echo _url ('stats', 'idle'); ?>"><?php echo Minz_Translate::t ('stats_idle'); ?></a>
</li>
+ <li class="item<?php echo Minz_Request::actionName () == 'repartition' ? ' active' : ''; ?>">
+ <a href="<?php echo _url ('stats', 'repartition'); ?>"><?php echo Minz_Translate::t ('stats_repartition'); ?></a>
+ </li>
</ul>
diff --git a/app/layout/layout.phtml b/app/layout/layout.phtml
index d2e1e4b3b..96a88d245 100644
--- a/app/layout/layout.phtml
+++ b/app/layout/layout.phtml
@@ -16,7 +16,7 @@
?>
<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="shortcut icon" type="image/x-icon" sizes="16x16 64x64" href="<?php echo Minz_Url::display('/favicon.ico'); ?>" />
+ <link rel="shortcut icon" id="favicon" 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->url)) {
diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml
index 29ea9032c..25833c16d 100644
--- a/app/layout/nav_menu.phtml
+++ b/app/layout/nav_menu.phtml
@@ -164,11 +164,15 @@
break;
}
}
- if ($this->order === 'ASC') {
- $idMax = 0;
- } else {
- $p = isset($this->entries[0]) ? $this->entries[0] : null;
- $idMax = $p === null ? '0' : $p->id();
+
+ $p = isset($this->entries[0]) ? $this->entries[0] : null;
+ $idMax = $p === null ? (time() - 1) . '000000' : $p->id();
+
+ if ($this->order === 'ASC') { //In this case we do not know but we guess idMax
+ $idMax2 = (time() - 1) . '000000';
+ if (strcmp($idMax2, $idMax) > 0) {
+ $idMax = $idMax2;
+ }
}
$arUrl = array('c' => 'entry', 'a' => 'read', 'params' => array('get' => $get, 'nextGet' => $nextGet, 'idMax' => $idMax));
@@ -221,7 +225,9 @@
<?php
$url_output['params']['output'] = 'rss';
- $url_output['params']['token'] = $this->conf->token;
+ if ($this->conf->token) {
+ $url_output['params']['token'] = $this->conf->token;
+ }
?>
<a class="view_rss btn" target="_blank" title="<?php echo Minz_Translate::t ('rss_view'); ?>" href="<?php echo Minz_Url::display($url_output); ?>">
<?php echo FreshRSS_Themes::icon('rss'); ?>