diff options
Diffstat (limited to 'app/layout/aside_feed.phtml')
| -rw-r--r-- | app/layout/aside_feed.phtml | 69 |
1 files changed, 35 insertions, 34 deletions
diff --git a/app/layout/aside_feed.phtml b/app/layout/aside_feed.phtml index 637acf4a4..e0c90282f 100644 --- a/app/layout/aside_feed.phtml +++ b/app/layout/aside_feed.phtml @@ -8,30 +8,30 @@ } ?> -<div class="aside aside_feed<?php echo $class; ?>" id="aside_feed"> - <a class="toggle_aside" href="#close"><?php echo _i('close'); ?></a> +<div class="aside aside_feed<?= $class ?>" id="aside_feed"> + <a class="toggle_aside" href="#close"><?= _i('close') ?></a> <?php if (FreshRSS_Auth::hasAccess()) { ?> <div class="stick configure-feeds no-mobile"> - <a id="btn-subscription" class="btn btn-important" href="<?php echo _url('subscription', 'index'); ?>"><?php echo _t('index.menu.subscription'); ?></a> - <a id="btn-importExport" class="btn btn-important" href="<?php echo _url('importExport', 'index'); ?>"><?php echo _i('import'); ?></a> + <a id="btn-subscription" class="btn btn-important" href="<?= _url('subscription', 'index') ?>"><?= _t('index.menu.subscription') ?></a> + <a id="btn-importExport" class="btn btn-important" href="<?= _url('importExport', 'index') ?>"><?= _i('import') ?></a> </div> <?php } elseif (FreshRSS_Auth::accessNeedsLogin()) { ?> - <a href="<?php echo _url('index', 'about'); ?>"><?php echo _t('index.menu.about'); ?></a> + <a href="<?= _url('index', 'about') ?>"><?= _t('index.menu.about') ?></a> <?php } ?> <form id="mark-read-aside" method="post"> - <input type="hidden" name="_csrf" value="<?php echo FreshRSS_Auth::csrfToken(); ?>" /> + <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" /> <ul id="sidebar" class="tree"> - <li class="tree-folder category all<?php echo FreshRSS_Context::isCurrentGet('a') ? ' active' : ''; ?>"> + <li class="tree-folder category all<?= FreshRSS_Context::isCurrentGet('a') ? ' active' : '' ?>"> <div class="tree-folder-title"> - <?php echo _i('all'); ?> <a class="title" data-unread="<?php echo format_number(FreshRSS_Context::$total_unread); ?>" href="<?php echo _url('index', $actual_view); ?>"><?php echo _t('index.menu.main_stream'); ?></a> + <?= _i('all') ?> <a class="title" data-unread="<?= format_number(FreshRSS_Context::$total_unread) ?>" href="<?= _url('index', $actual_view) ?>"><?= _t('index.menu.main_stream') ?></a> </div> </li> - <li class="tree-folder category favorites<?php echo FreshRSS_Context::isCurrentGet('s') ? ' active' : ''; ?>"> + <li class="tree-folder category favorites<?= FreshRSS_Context::isCurrentGet('s') ? ' active' : '' ?>"> <div class="tree-folder-title"> - <?php echo _i('bookmark'); ?> <a class="title" data-unread="<?php echo format_number(FreshRSS_Context::$total_starred['unread']); ?>" href="<?php echo _url('index', $actual_view, 'get', 's'); ?>"><?php echo _t('index.menu.favorites', format_number(FreshRSS_Context::$total_starred['all'])); ?></a> + <?= _i('bookmark') ?> <a class="title" data-unread="<?= format_number(FreshRSS_Context::$total_starred['unread']) ?>" href="<?= _url('index', $actual_view, 'get', 's') ?>"><?= _t('index.menu.favorites', format_number(FreshRSS_Context::$total_starred['all'])) ?></a> </div> </li> @@ -39,22 +39,22 @@ $t_active = FreshRSS_Context::isCurrentGet('T'); $t_show = $t_active || FreshRSS_Context::$user_conf->display_categories; ?> - <li class="tree-folder category tags<?php echo $t_active ? ' active' : ''; ?>"> + <li class="tree-folder category tags<?= $t_active ? ' active' : '' ?>"> <div class="tree-folder-title"> - <a class="dropdown-toggle" href="#"><?php echo _i($t_active ? 'up' : 'down'); ?></a> - <a class="title" data-unread="<?php echo format_number($this->nbUnreadTags); ?>" href="<?php echo _url('index', $actual_view, 'get', 'T'); ?>"><?php echo _t('index.menu.tags'); ?></a> + <a class="dropdown-toggle" href="#"><?= _i($t_active ? 'up' : 'down') ?></a> + <a class="title" data-unread="<?= format_number($this->nbUnreadTags) ?>" href="<?= _url('index', $actual_view, 'get', 'T') ?>"><?= _t('index.menu.tags') ?></a> </div> - <ul class="tree-folder-items<?php echo $t_show ? ' active' : ''; ?>"> + <ul class="tree-folder-items<?= $t_show ? ' active' : '' ?>"> <?php foreach ($this->tags as $tag): ?> - <li id="t_<?php echo $tag->id(); ?>" class="item feed<?php echo FreshRSS_Context::isCurrentGet('t_' . $tag->id()) ? ' active' : ''; ?>" data-unread="<?php echo $tag->nbUnread(); ?>"> + <li id="t_<?= $tag->id() ?>" class="item feed<?= FreshRSS_Context::isCurrentGet('t_' . $tag->id()) ? ' active' : '' ?>" data-unread="<?= $tag->nbUnread() ?>"> <div class="dropdown no-mobile"> <div class="dropdown-target"></div> - <a class="dropdown-toggle"><?php echo _i('configure'); ?></a> + <a class="dropdown-toggle"><?= _i('configure') ?></a> <?php /* tag_config_template */ ?> </div> - <?php echo FreshRSS_Themes::alt('label'); ?> <a class="item-title" data-unread="<?php echo format_number($tag->nbUnread()); ?>" href="<?php echo _url('index', $actual_view, 'get', 't_' . $tag->id()); ?>"><?php echo $tag->name(); ?></a> + <?= FreshRSS_Themes::alt('label') ?> <a class="item-title" data-unread="<?= format_number($tag->nbUnread()) ?>" href="<?= _url('index', $actual_view, 'get', 't_' . $tag->id()) ?>"><?= $tag->name() ?></a> </li> <?php endforeach; ?> </ul> @@ -63,28 +63,29 @@ <?php foreach ($this->categories as $cat) { $feeds = $cat->feeds(); + $position = $cat->attributes('position'); if (!empty($feeds)) { $c_active = FreshRSS_Context::isCurrentGet('c_' . $cat->id()); $c_show = $c_active || FreshRSS_Context::$user_conf->display_categories; ?> - <li class="tree-folder category<?php echo $c_active ? ' active' : ''; ?>" data-unread="<?php echo $cat->nbNotRead(); ?>"> + <li class="tree-folder category<?= $c_active ? ' active' : '' ?>"<?= null === $position ? '' : "data-position='$position'" ?> data-unread="<?= $cat->nbNotRead() ?>"> <div class="tree-folder-title"> - <a class="dropdown-toggle" href="#"><?php echo _i($c_show ? 'up' : 'down'); ?></a> - <a class="title<?php echo $cat->hasFeedsWithError() ? ' error' : ''; ?>" data-unread="<?php echo format_number($cat->nbNotRead()); ?>" href="<?php echo _url('index', $actual_view, 'get', 'c_' . $cat->id()); ?>"><?php echo $cat->name(); ?></a> + <a class="dropdown-toggle" href="#"><?= _i($c_show ? 'up' : 'down') ?></a> + <a class="title<?= $cat->hasFeedsWithError() ? ' error' : '' ?>" data-unread="<?= format_number($cat->nbNotRead()) ?>" href="<?= _url('index', $actual_view, 'get', 'c_' . $cat->id()) ?>"><?= $cat->name() ?></a> </div> - <ul class="tree-folder-items<?php echo $c_show ? ' active' : ''; ?>"> + <ul class="tree-folder-items<?= $c_show ? ' active' : '' ?>"> <?php foreach ($feeds as $feed) { $f_active = FreshRSS_Context::isCurrentGet('f_' . $feed->id()); ?> - <li id="f_<?php echo $feed->id(); ?>" class="item feed<?php echo $f_active ? ' active' : '', $feed->mute() ? ' mute' : ''; ?><?php echo $feed->inError() ? ' error' : ''; ?><?php echo $feed->nbEntries() <= 0 ? ' empty' : ''; ?>" data-unread="<?php echo $feed->nbNotRead(); ?>" data-priority="<?php echo $feed->priority(); ?>"> + <li id="f_<?= $feed->id() ?>" class="item feed<?= $f_active ? ' active' : '', $feed->mute() ? ' mute' : '' ?><?= $feed->inError() ? ' error' : '' ?><?= $feed->nbEntries() <= 0 ? ' empty' : '' ?>" data-unread="<?= $feed->nbNotRead() ?>" data-priority="<?= $feed->priority() ?>"> <div class="dropdown no-mobile"> <div class="dropdown-target"></div> - <a class="dropdown-toggle" data-fweb="<?php echo $feed->website(); ?>"><?php echo _i('configure'); ?></a> + <a class="dropdown-toggle" data-fweb="<?= $feed->website() ?>"><?= _i('configure') ?></a> <?php /* feed_config_template */ ?> </div> - <img class="favicon" src="<?php echo $feed->favicon(); ?>" alt="✇" /> <a class="item-title" data-unread="<?php echo format_number($feed->nbNotRead()); ?>" href="<?php echo _url('index', $actual_view, 'get', 'f_' . $feed->id()); ?>"><?php echo $feed->name(); ?></a> + <img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" /> <a class="item-title" data-unread="<?= format_number($feed->nbNotRead()) ?>" href="<?= _url('index', $actual_view, 'get', 'f_' . $feed->id()) ?>"><?= $feed->name() ?></a> </li> <?php } ?> </ul> @@ -103,8 +104,8 @@ <li class="dropdown-close"><a href="#close">❌</a></li> <li class="item"> <button class="as-link confirm" disabled="disabled" - form="mark-read-aside" formaction="<?php echo _url('tag', 'delete', 'id_tag', '------'); ?>" - type="submit"><?php echo _t('gen.action.remove'); ?></button> + form="mark-read-aside" formaction="<?= _url('tag', 'delete', 'id_tag', '------') ?>" + type="submit"><?= _t('gen.action.remove') ?></button> </li> </ul> </script> @@ -112,21 +113,21 @@ <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', $actual_view, 'get', 'f_------'); ?>"><?php echo _t('gen.action.filter'); ?></a></li> + <li class="item"><a href="<?= _url('index', $actual_view, 'get', 'f_------') ?>"><?= _t('gen.action.filter') ?></a></li> <?php if (FreshRSS_Auth::hasAccess()) { ?> - <li class="item"><a href="<?php echo _url('stats', 'repartition', 'id', '------'); ?>"><?php echo _t('index.menu.stats'); ?></a></li> + <li class="item"><a href="<?= _url('stats', 'repartition', 'id', '------') ?>"><?= _t('index.menu.stats') ?></a></li> <?php } ?> - <li class="item"><a target="_blank" rel="noreferrer" href="http://example.net/"><?php echo _t('gen.action.see_website'); ?></a></li> + <li class="item"><a target="_blank" rel="noreferrer" href="http://example.net/"><?= _t('gen.action.see_website') ?></a></li> <?php if (FreshRSS_Auth::hasAccess()) { ?> <li class="separator"></li> - <li class="item"><a href="<?php echo _url('subscription', 'index', 'id', '------'); ?>"><?php echo _t('gen.action.manage'); ?></a></li> - <li class="item"><a href="<?php echo _url('feed', 'actualize', 'id', '------'); ?>"><?php echo _t('gen.action.actualize'); ?></a></li> + <li class="item"><a href="<?= _url('subscription', 'index', 'id', '------') ?>"><?= _t('gen.action.manage') ?></a></li> + <li class="item"><a href="<?= _url('feed', 'actualize', 'id', '------') ?>"><?= _t('gen.action.actualize') ?></a></li> <li class="item"> <?php $confirm = FreshRSS_Context::$user_conf->reading_confirm ? 'confirm" disabled="disabled' : ''; ?> - <button class="read_all as-link <?php echo $confirm; ?>" + <button class="read_all as-link <?= $confirm ?>" form="mark-read-aside" - formaction="<?php echo _url('entry', 'read', 'get', 'f_------'); ?>" - type="submit"><?php echo _t('gen.action.mark_read'); ?></button> + formaction="<?= _url('entry', 'read', 'get', 'f_------') ?>" + type="submit"><?= _t('gen.action.mark_read') ?></button> </li> <?php } ?> </ul> |
