aboutsummaryrefslogtreecommitdiff
path: root/app/layout
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2021-02-28 12:26:24 +0100
committerGravatar GitHub <noreply@github.com> 2021-02-28 12:26:24 +0100
commit947e918f05d70d5dce4efa4ef403e593581c3fa9 (patch)
treee66ef1ffe8a6cc0ffbea1bff1791588f72879637 /app/layout
parentbf2718cada964fba66d8497592abcb73cb9520ba (diff)
Travis: Enforce phpcs line length + whitespace (#3488)
* Update Travis line length * Also check whitespace in CSS files * Fix line length ext.php * More syntax, string templates * Fix exclude-pattern * Test JS files as well
Diffstat (limited to 'app/layout')
-rw-r--r--app/layout/aside_configure.phtml12
-rw-r--r--app/layout/aside_feed.phtml28
-rw-r--r--app/layout/nav_menu.phtml45
3 files changed, 45 insertions, 40 deletions
diff --git a/app/layout/aside_configure.phtml b/app/layout/aside_configure.phtml
index e74630b5a..5738cbb0f 100644
--- a/app/layout/aside_configure.phtml
+++ b/app/layout/aside_configure.phtml
@@ -18,8 +18,7 @@
<li class="item<?= Minz_Request::actionName() === 'queries' ? ' active' : '' ?>">
<a href="<?= _url('configure', 'queries') ?>"><?= _t('gen.menu.queries') ?></a>
</li>
- <li class="item<?php echo Minz_Request::controllerName() === 'user' &&
- Minz_Request::actionName() === 'profile'? ' active' : ''; ?>">
+ <li class="item<?= Minz_Request::controllerName() === 'user' && Minz_Request::actionName() === 'profile' ? ' active' : '' ?>">
<a href="<?= _url('user', 'profile') ?>"><?= _t('gen.menu.user_profile') ?></a>
</li>
<li class="item<?= Minz_Request::controllerName() === 'extension' ? ' active' : '' ?>">
@@ -32,20 +31,17 @@
<li class="item<?= Minz_Request::actionName() === 'system' ? ' active' : '' ?>">
<a href="<?= _url('configure', 'system') ?>"><?= _t('gen.menu.system') ?></a>
</li>
- <li class="item<?php echo Minz_Request::controllerName() === 'user' &&
- Minz_Request::actionName() === 'manage' ? ' active' : ''; ?>">
+ <li class="item<?= Minz_Request::controllerName() === 'user' && Minz_Request::actionName() === 'manage' ? ' active' : '' ?>">
<a href="<?= _url('user', 'manage') ?>"><?= _t('gen.menu.user_management') ?></a>
</li>
<li class="item<?= Minz_Request::controllerName() === 'auth' ? ' active' : '' ?>">
<a href="<?= _url('auth', 'index') ?>"><?= _t('gen.menu.authentication') ?></a>
</li>
- <li class="item<?php echo Minz_Request::controllerName() === 'update' &&
- Minz_Request::actionName() === 'checkInstall' ? ' active' : ''; ?>">
+ <li class="item<?= Minz_Request::controllerName() === 'update' && Minz_Request::actionName() === 'checkInstall' ? ' active' : '' ?>">
<a href="<?= _url('update', 'checkInstall') ?>"><?= _t('gen.menu.check_install') ?></a>
</li>
<?php if (!Minz_Configuration::get('system')->disable_update) { ?>
- <li class="item<?php echo Minz_Request::controllerName() === 'update' &&
- Minz_Request::actionName() === 'index' ? ' active' : ''; ?>">
+ <li class="item<?= Minz_Request::controllerName() === 'update' && Minz_Request::actionName() === 'index' ? ' active' : '' ?>">
<a href="<?= _url('update', 'index') ?>"><?= _t('gen.menu.update') ?></a>
</li>
<?php } ?>
diff --git a/app/layout/aside_feed.phtml b/app/layout/aside_feed.phtml
index 98daf633c..c3f066601 100644
--- a/app/layout/aside_feed.phtml
+++ b/app/layout/aside_feed.phtml
@@ -27,7 +27,8 @@
<ul id="sidebar" class="tree">
<li class="tree-folder category all<?= FreshRSS_Context::isCurrentGet('a') ? ' active' : '' ?>">
<div class="tree-folder-title">
- <?= _i('all') ?> <a class="title" data-unread="<?= format_number(FreshRSS_Context::$total_unread) ?>" href="<?= _url('index', $actual_view) ?>"><?= _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>
@@ -59,7 +60,8 @@
<a class="dropdown-toggle"><?= _i('configure') ?></a>
<?php /* tag_config_template */ ?>
</div>
- <?= FreshRSS_Themes::alt('label') ?> <a class="item-title" data-unread="<?= format_number($tag->nbUnread()) ?>" href="<?= _url('index', $actual_view, 'get', 't_' . $tag->id()) . $state_filter ?>"><?= $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()) . $state_filter ?>"><?= $tag->name() ?></a>
</li>
<?php endforeach; ?>
</ul>
@@ -71,12 +73,15 @@
$position = $cat->attributes('position');
if (!empty($feeds)) {
$c_active = FreshRSS_Context::isCurrentGet('c_' . $cat->id());
- $c_show = ($c_active && in_array(FreshRSS_Context::$user_conf->display_categories, [ 'active', 'remember' ])) || FreshRSS_Context::$user_conf->display_categories === 'all';
+ $c_show = ($c_active && in_array(FreshRSS_Context::$user_conf->display_categories, [ 'active', 'remember' ]))
+ || FreshRSS_Context::$user_conf->display_categories === 'all';
?>
- <li id="c_<?= $cat->id() ?>" class="tree-folder category<?= $c_active ? ' active' : '' ?>"<?= null === $position ? '' : "data-position='$position'" ?> data-unread="<?= $cat->nbNotRead() ?>">
+ <li id="c_<?= $cat->id() ?>" 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="#"><?= _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>
+ <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<?= $c_show ? ' active' : '' ?>">
@@ -84,14 +89,17 @@
foreach ($feeds as $feed) {
$f_active = FreshRSS_Context::isCurrentGet('f_' . $feed->id());
?>
- <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() ?>">
+ <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="<?= $feed->website() ?>"><?= _i('configure') ?></a>
<?php /* feed_config_template */ ?>
</div>
<?php if (FreshRSS_Context::$user_conf->show_favicons): ?><img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" loading="lazy" /><?php endif; ?>
- <a class="item-title" data-unread="<?= format_number($feed->nbNotRead()) ?>" href="<?= _url('index', $actual_view, 'get', 'f_' . $feed->id()) ?>"><?= $feed->name() ?></a>
+ <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>
@@ -134,9 +142,9 @@
<li class="item">
<?php $confirm = FreshRSS_Context::$user_conf->reading_confirm ? 'confirm" disabled="disabled' : ''; ?>
<button class="read_all as-link <?= $confirm ?>"
- form="mark-read-aside"
- formaction="<?= _url('entry', 'read', 'get', 'f_------') ?>"
- type="submit"><?= _t('gen.action.mark_read') ?></button>
+ form="mark-read-aside"
+ formaction="<?= _url('entry', 'read', 'get', 'f_------') ?>"
+ type="submit"><?= _t('gen.action.mark_read') ?></button>
</li>
<?php } ?>
</ul>
diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml
index 5a385589f..0724abc16 100644
--- a/app/layout/nav_menu.phtml
+++ b/app/layout/nav_menu.phtml
@@ -3,7 +3,7 @@
?>
<div class="nav_menu">
- <?php if ($actual_view === 'normal' || $actual_view === 'reader' ) { ?>
+ <?php if ($actual_view === 'normal' || $actual_view === 'reader') { ?>
<a class="btn toggle_aside" href="#aside_feed"><?= _i('category') ?></a>
<?php } ?>
@@ -23,10 +23,10 @@
$url_state['params']['state'] = FreshRSS_Context::getRevertState($state);
?>
<a id="toggle-<?= $state_str ?>"
- class="btn <?= $state_enabled ? 'active' : '' ?>"
- role="checkbox" aria-checked="<?= $state_enabled ? 'true' : 'false' ?>"
- title="<?= _t('index.menu.' . $state_str) ?>"
- href="<?= Minz_Url::display($url_state) ?>"><?= _i($state_str) ?></a>
+ class="btn <?= $state_enabled ? 'active' : '' ?>"
+ role="checkbox" aria-checked="<?= $state_enabled ? 'true' : 'false' ?>"
+ title="<?= _t('index.menu.' . $state_str) ?>"
+ href="<?= Minz_Url::display($url_state) ?>"><?= _i($state_str) ?></a>
<?php } ?>
<div class="dropdown">
@@ -92,9 +92,9 @@
<form id="mark-read-menu" method="post">
<?php $confirm = FreshRSS_Context::$user_conf->reading_confirm ? 'confirm" disabled="disabled' : ''; ?>
<button class="read_all btn <?= $confirm ?>"
- form="mark-read-menu"
- formaction="<?= Minz_Url::display($mark_read_url) ?>"
- type="submit"><?= _t('gen.action.mark_read') ?></button>
+ form="mark-read-menu"
+ formaction="<?= Minz_Url::display($mark_read_url) ?>"
+ type="submit"><?= _t('gen.action.mark_read') ?></button>
<div class="dropdown">
<input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
@@ -106,9 +106,9 @@
<li class="item">
<button class="as-link <?= $confirm ?>"
- form="mark-read-menu"
- formaction="<?= Minz_Url::display($mark_read_url) ?>"
- type="submit"><?= $string_mark ?></button>
+ form="mark-read-menu"
+ formaction="<?= Minz_Url::display($mark_read_url) ?>"
+ type="submit"><?= $string_mark ?></button>
</li>
<li class="separator"></li>
<?php
@@ -121,22 +121,22 @@
?>
<li class="item">
<button class="as-link <?= $confirm ?>"
- form="mark-read-menu"
- formaction="<?= Minz_Url::display($mark_before_today) ?>"
- type="submit"><?= _t('index.menu.before_one_day') ?></button>
+ form="mark-read-menu"
+ formaction="<?= Minz_Url::display($mark_before_today) ?>"
+ type="submit"><?= _t('index.menu.before_one_day') ?></button>
</li>
<li class="item">
<button class="as-link <?= $confirm ?>"
- form="mark-read-menu"
- formaction="<?= Minz_Url::display($mark_before_one_week) ?>"
- type="submit"><?= _t('index.menu.before_one_week') ?></button>
+ form="mark-read-menu"
+ formaction="<?= Minz_Url::display($mark_before_one_week) ?>"
+ type="submit"><?= _t('index.menu.before_one_week') ?></button>
</li>
<li class="separator"></li>
<li class="item">
<button class="as-link <?= $mark_unread_enabled ? $confirm : '" disabled="disabled' ?>"
- form="mark-read-menu"
- formaction="<?= Minz_Url::display($mark_unread_url) ?>"
- type="submit"><?= $string_unmark ?></button>
+ form="mark-read-menu"
+ formaction="<?= Minz_Url::display($mark_unread_url) ?>"
+ type="submit"><?= $string_unmark ?></button>
</li>
</ul>
</div>
@@ -153,7 +153,8 @@
/** @var FreshRSS_ReadingMode $mode */
foreach ($readingModes as $mode) {
?>
- <a class="<?= $mode->getId() ?> btn <?php if ($mode->isActive()) { echo 'active'; } ?>" title="<?= $mode->getTitle() ?>" href="<?= Minz_Url::display($mode->getUrlParams()) ?>">
+ <a class="<?= $mode->getId() ?> btn <?php if ($mode->isActive()) { echo 'active'; } ?>" title="<?=
+ $mode->getTitle() ?>" href="<?= Minz_Url::display($mode->getUrlParams()) ?>">
<?= $mode->getName() ?>
</a>
<?php
@@ -178,7 +179,7 @@
<?php $nav_menu_hooks = Minz_ExtensionManager::callHook('nav_menu'); ?>
<?php if ($nav_menu_hooks != '') { ?>
<div class="stick" id="nav_menu_hooks">
- <?php echo $nav_menu_hooks; ?>
+ <?= $nav_menu_hooks ?>
</div>
<?php } ?>