1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/freshrss_ynh.git synced 2024-09-03 18:36:33 +02:00
freshrss_ynh/sources/app/layout/aside_flux.phtml

104 lines
5.2 KiB
PHTML
Raw Normal View History

2014-09-21 12:12:35 +02:00
<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">
2014-09-27 10:10:43 +02:00
<a class="toggle_aside" href="#close"><?php echo _i('close'); ?></a>
2014-07-23 15:52:50 +02:00
<ul class="categories">
<?php if ($this->loginOk) { ?>
2014-09-27 10:10:43 +02:00
<form id="mark-read-aside" method="post" style="display: none"></form>
2014-07-23 15:52:50 +02:00
<li>
2014-09-27 10:10:43 +02:00
<div class="stick configure-feeds">
<a class="btn btn-important" href="<?php echo _url('configure', 'feed'); ?>"><?php echo _t('subscription_management'); ?></a>
<a class="btn btn-important" href="<?php echo _url('configure', 'categorize'); ?>" title="<?php echo _t('categories_management'); ?>"><?php echo _i('category-white'); ?></a>
2014-07-23 15:52:50 +02:00
</div>
</li>
<?php } elseif (Minz_Configuration::needsLogin()) { ?>
2014-09-27 10:10:43 +02:00
<li><a href="<?php echo _url('index', 'about'); ?>"><?php echo _t('about_freshrss'); ?></a></li>
2014-07-23 15:52:50 +02:00
<?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<?php echo $this->get_c == 'a' ? ' active' : ''; ?>">
<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); ?>">
2014-09-27 10:10:43 +02:00
<?php echo _i('all'); ?>
<?php echo _t('main_stream'); ?>
2014-07-23 15:52:50 +02:00
</a>
</div>
</li>
<li>
<div class="category favorites<?php echo $this->get_c == 's' ? ' active' : ''; ?>">
<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); ?>">
2014-09-27 10:10:43 +02:00
<?php echo _i('bookmark'); ?>
<?php echo _t('favorite_feeds', formatNumber($this->nb_favorites['all'])); ?>
2014-07-23 15:52:50 +02:00
</a>
</div>
</li>
<?php
foreach ($this->cat_aside as $cat) {
2014-09-27 10:10:43 +02:00
$feeds = $cat->feeds();
if (!empty($feeds)) {
2014-07-23 15:52:50 +02:00
$c_active = false;
2014-09-27 10:10:43 +02:00
$c_show = false;
if ($this->get_c == $cat->id()) {
$c_active = true;
if (!$this->conf->display_categories || $this->get_f) {
$c_show = true;
2014-09-21 12:12:35 +02:00
}
2014-07-23 15:52:50 +02:00
}
2014-09-21 12:12:35 +02:00
?><li data-unread="<?php echo $cat->nbNotRead(); ?>"<?php if ($c_active) echo ' class="active"'; ?>><?php
2014-07-23 15:52:50 +02:00
?><div class="category stick<?php echo $c_active ? ' active' : ''; ?>"><?php
2014-09-27 10:10:43 +02:00
?><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 _i($c_show ? 'up' : 'down'); ?></a><?php
2014-07-23 15:52:50 +02:00
?></div><?php
2014-09-27 10:10:43 +02:00
?><ul class="feeds<?php echo $c_show ? ' active' : ''; ?>"><?php
2014-07-23 15:52:50 +02:00
foreach ($feeds as $feed) {
2014-09-27 10:10:43 +02:00
$feed_id = $feed->id();
$nbEntries = $feed->nbEntries();
2014-07-23 15:52:50 +02:00
$f_active = ($this->get_f == $feed_id);
2014-09-27 10:10:43 +02:00
?><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
2014-07-23 15:52:50 +02:00
?><div class="dropdown"><?php
?><div class="dropdown-target"></div><?php
2014-09-27 10:10:43 +02:00
?><a class="dropdown-toggle" data-fweb="<?php echo $feed->website(); ?>"><?php echo _i('configure'); ?></a><?php
2014-07-23 15:52:50 +02:00
/* feed_config_template */
?></div><?php
2014-09-27 10:10:43 +02:00
?> <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
2014-07-23 15:52:50 +02:00
?></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>
2014-09-27 10:10:43 +02:00
<li class="item"><a href="<?php echo _url('index', 'index', 'get', 'f_!!!!!!'); ?>"><?php echo _t('filter'); ?></a></li>
<?php if ($this->loginOk) { ?>
<li class="item"><a href="<?php echo _url('stats', 'repartition', 'id', '!!!!!!'); ?>"><?php echo _t('stats'); ?></a></li>
<?php } ?>
<li class="item"><a target="_blank" href="http://example.net/"><?php echo _t('see_website'); ?></a></li>
2014-07-23 15:52:50 +02:00
<?php if ($this->loginOk) { ?>
<li class="separator"></li>
2014-09-27 10:10:43 +02:00
<li class="item"><a href="<?php echo _url('configure', 'feed', 'id', '!!!!!!'); ?>"><?php echo _t('administration'); ?></a></li>
<li class="item"><a href="<?php echo _url('feed', 'actualize', 'id', '!!!!!!'); ?>"><?php echo _t('actualize'); ?></a></li>
<li class="item">
<?php $confirm = $this->conf->reading_confirm ? 'confirm' : ''; ?>
<button class="read_all as-link <?php echo $confirm; ?>"
form="mark-read-aside"
formaction="<?php echo _url('entry', 'read', 'get', 'f_!!!!!!'); ?>"
type="submit"><?php echo _t('mark_read'); ?></button>
</li>
2014-07-23 15:52:50 +02:00
<?php } ?>
</ul>
</script>