You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
252 lines
8.6 KiB
252 lines
8.6 KiB
<?php |
|
$actual_view = Minz_Request::param('output', 'normal'); |
|
?> |
|
<div class="nav_menu"> |
|
<?php if ($actual_view === 'normal') { ?> |
|
<a class="btn toggle_aside" href="#aside_flux"><?php echo FreshRSS_Themes::icon('category'); ?></a> |
|
<?php } ?> |
|
|
|
<?php if ($this->loginOk) { ?> |
|
<?php $url_state = $this->url; |
|
if ($this->state & FreshRSS_Entry::STATE_READ) { |
|
$url_state['params']['state'] = $this->state & ~FreshRSS_Entry::STATE_READ; |
|
$checked = 'true'; |
|
$class = 'active'; |
|
} else { |
|
$url_state['params']['state'] = $this->state | FreshRSS_Entry::STATE_READ; |
|
$checked = 'false'; |
|
$class = ''; |
|
} |
|
?> |
|
<div class="stick"> |
|
<a id="toggle-read" |
|
class="btn <?php echo $class; ?>" |
|
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_Entry::STATE_NOT_READ) { |
|
$url_state['params']['state'] = $this->state & ~FreshRSS_Entry::STATE_NOT_READ; |
|
$checked = 'true'; |
|
$class = 'active'; |
|
} else { |
|
$url_state['params']['state'] = $this->state | FreshRSS_Entry::STATE_NOT_READ; |
|
$checked = 'false'; |
|
$class = ''; |
|
} |
|
?> |
|
<a id="toggle-unread" |
|
class="btn <?php echo $class; ?>" |
|
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_Entry::STATE_FAVORITE) { |
|
$url_state['params']['state'] = $this->state & ~FreshRSS_Entry::STATE_FAVORITE; |
|
$checked = 'true'; |
|
$class = 'active'; |
|
} else { |
|
$url_state['params']['state'] = $this->state | FreshRSS_Entry::STATE_FAVORITE; |
|
$checked = 'false'; |
|
$class = ''; |
|
} |
|
?> |
|
<a id="toggle-favorite" |
|
class="btn <?php echo $class; ?>" |
|
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_Entry::STATE_NOT_FAVORITE) { |
|
$url_state['params']['state'] = $this->state & ~FreshRSS_Entry::STATE_NOT_FAVORITE; |
|
$checked = 'true'; |
|
$class = 'active'; |
|
} else { |
|
$url_state['params']['state'] = $this->state | FreshRSS_Entry::STATE_NOT_FAVORITE; |
|
$checked = 'false'; |
|
$class = ''; |
|
} |
|
?> |
|
<a id="toggle-not-favorite" |
|
class="btn <?php echo $class; ?>" |
|
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> |
|
</div> |
|
<?php |
|
$get = false; |
|
$string_mark = Minz_Translate::t ('mark_all_read'); |
|
if ($this->get_f) { |
|
$get = 'f_' . $this->get_f; |
|
$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 && (strlen ($get) > 2)) { |
|
$anotherUnreadId = ''; |
|
$foundCurrent = false; |
|
switch ($get[0]) { |
|
case 'c': |
|
foreach ($this->cat_aside as $cat) { |
|
if ($cat->id () == $this->get_c) { |
|
$foundCurrent = true; |
|
continue; |
|
} |
|
if ($cat->nbNotRead () <= 0) continue; |
|
$anotherUnreadId = $cat->id (); |
|
if ($foundCurrent) break; |
|
} |
|
$nextGet = empty ($anotherUnreadId) ? 'a' : 'c_' . $anotherUnreadId; |
|
break; |
|
case 'f': |
|
foreach ($this->cat_aside as $cat) { |
|
if ($cat->id () == $this->get_c) { |
|
foreach ($cat->feeds () as $feed) { |
|
if ($feed->id () == $this->get_f) { |
|
$foundCurrent = true; |
|
continue; |
|
} |
|
if ($feed->nbNotRead () <= 0) continue; |
|
$anotherUnreadId = $feed->id (); |
|
if ($foundCurrent) break; |
|
} |
|
break; |
|
} |
|
} |
|
$nextGet = empty ($anotherUnreadId) ? 'c_' . $this->get_c : 'f_' . $anotherUnreadId; |
|
break; |
|
} |
|
} |
|
if ($this->order === 'ASC') { |
|
$idMax = 0; |
|
} else { |
|
$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 $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"><?php echo FreshRSS_Themes::icon('down'); ?></a> |
|
<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="separator"></li> |
|
<?php |
|
$today = $this->today; |
|
$one_week = $today - 604800; |
|
?> |
|
<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 } ?> |
|
|
|
<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 Minz_Translate::t ('display'); ?> <?php echo FreshRSS_Themes::icon('down'); ?></a> |
|
<ul class="dropdown-menu"> |
|
<li class="dropdown-close"><a href="#close">❌</a></li> |
|
|
|
<?php |
|
$url_output = $this->url; |
|
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') { ?> |
|
<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') { ?> |
|
<li class="item"> |
|
<?php $url_output['params']['output'] = 'global'; ?> |
|
<a class="view_normal" href="<?php echo Minz_Url::display ($url_output); ?>"> |
|
<?php echo Minz_Translate::t ('global_view'); ?> |
|
</a> |
|
</li> |
|
<?php } ?> |
|
</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> |
|
|
|
<?php |
|
if ($this->order === 'DESC') { |
|
$order = 'ASC'; |
|
$icon = 'up'; |
|
$title = 'older_first'; |
|
} else { |
|
$order = 'DESC'; |
|
$icon = 'down'; |
|
$title = 'newer_first'; |
|
} |
|
$url_order = $this->url; |
|
$url_order['params']['order'] = $order; |
|
?> |
|
<a class="btn" href="<?php echo Minz_Url::display ($url_order); ?>" title="<?php echo Minz_Translate::t ($title); ?>"> |
|
<?php echo FreshRSS_Themes::icon($icon); ?> |
|
</a> |
|
|
|
<?php $url_output['params']['output'] = 'rss'; ?> |
|
<a class="btn view_rss" target="_blank" href="<?php echo Minz_Url::display ($url_output); ?>" title="<?php echo Minz_Translate::t ('rss_view'); ?>"> |
|
<?php echo FreshRSS_Themes::icon('rss'); ?> |
|
</a> |
|
|
|
<?php if ($this->loginOk || Minz_Configuration::allowAnonymousRefresh()) { ?> |
|
<a id="actualize" class="btn" href="<?php echo _url ('feed', 'actualize'); ?>"><?php echo FreshRSS_Themes::icon('refresh'); ?></a> |
|
<?php } ?> |
|
</div>
|
|
|