aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/layout/aside_feed.phtml11
-rw-r--r--app/layout/nav_menu.phtml2
-rw-r--r--app/views/helpers/category/update.phtml2
-rw-r--r--app/views/helpers/feed/update.phtml16
-rw-r--r--app/views/helpers/index/normal/entry_bottom.phtml8
-rw-r--r--app/views/helpers/index/normal/entry_header.phtml8
-rw-r--r--app/views/stats/repartition.phtml21
-rw-r--r--app/views/subscription/index.phtml2
-rw-r--r--app/views/user/details.phtml2
9 files changed, 34 insertions, 38 deletions
diff --git a/app/layout/aside_feed.phtml b/app/layout/aside_feed.phtml
index 33c415c6f..c9980f172 100644
--- a/app/layout/aside_feed.phtml
+++ b/app/layout/aside_feed.phtml
@@ -92,13 +92,12 @@
$c_show = ($c_active && in_array(FreshRSS_Context::userConf()->display_categories, ['active', 'remember'], true))
|| FreshRSS_Context::userConf()->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() ?>">
<a href="<?= _url('index', $actual_view, 'get', 'c_' . $cat->id()) . $state_filter_manual ?>" class="tree-folder-title">
- <button class="dropdown-toggle" title="<?= _t('sub.category.expand') ?>"><?= _i($c_show ? 'up' : 'down') ?></button><span title="<?= _t('sub.category.open') ?>" class="title<?= $cat->hasFeedsWithError() ? ' error' : '' ?>" data-unread="<?=
- format_number($cat->nbNotRead()) ?>" ><?=
- $cat->name()
- ?><?php if ($cat->kind() == FreshRSS_Category::KIND_DYNAMIC_OPML) { echo _i('opml-dyn'); } ?></span>
+ <button class="dropdown-toggle" title="<?= _t('sub.category.expand') ?>"><?= _i($c_show ? 'up' : 'down') ?></button><?php
+ ?><span title="<?= _t('sub.category.open') ?>" class="title<?= $cat->hasFeedsWithError() ? ' error' : '' ?>" data-unread="<?= format_number($cat->nbNotRead()) ?>" ><?=
+ $cat->name() ?><?= $cat->kind() === FreshRSS_Category::KIND_DYNAMIC_OPML ? _i('opml-dyn') : ''
+ ?></span>
</a>
<ul class="tree-folder-items<?= $c_show ? ' active' : '' ?>">
diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml
index f5804310d..0128360b8 100644
--- a/app/layout/nav_menu.phtml
+++ b/app/layout/nav_menu.phtml
@@ -196,7 +196,7 @@
/** @var FreshRSS_ReadingMode $mode */
foreach ($readingModes as $mode) {
?>
- <a class="<?= $mode->getId() ?> btn <?php if ($mode->isActive()) { echo 'active'; } ?>" title="<?=
+ <a class="<?= $mode->getId() ?> btn <?= $mode->isActive() ? 'active' : '' ?>" title="<?=
$mode->getTitle() ?>" href="<?= Minz_Url::display($mode->getUrlParams()) ?>">
<?= $mode->getName() ?>
</a>
diff --git a/app/views/helpers/category/update.phtml b/app/views/helpers/category/update.phtml
index 069e5bcf9..5e5fb4f10 100644
--- a/app/views/helpers/category/update.phtml
+++ b/app/views/helpers/category/update.phtml
@@ -8,7 +8,7 @@
<div class="post">
<h2>
<?= $this->category->name() ?>
- <?php if ($this->category->kind() == FreshRSS_Category::KIND_DYNAMIC_OPML) { echo _i('opml-dyn'); } ?>
+ <?= $this->category->kind() === FreshRSS_Category::KIND_DYNAMIC_OPML ? _i('opml-dyn') : '' ?>
</h2>
<div>
diff --git a/app/views/helpers/feed/update.phtml b/app/views/helpers/feed/update.phtml
index 4eec688e7..c363532f5 100644
--- a/app/views/helpers/feed/update.phtml
+++ b/app/views/helpers/feed/update.phtml
@@ -115,14 +115,14 @@
<label class="group-name" for="priority"><?= _t('sub.feed.priority') ?></label>
<div class="group-controls">
<select name="priority" id="priority" class="w50">
- <option value='<?= FreshRSS_Feed::PRIORITY_IMPORTANT ?>' <?php
- if (FreshRSS_Feed::PRIORITY_IMPORTANT === $this->feed->priority()) {echo 'selected="selected"';}?>><?= _t('sub.feed.priority.important') ?></option>
- <option value='<?= FreshRSS_Feed::PRIORITY_MAIN_STREAM ?>' <?php
- if (FreshRSS_Feed::PRIORITY_MAIN_STREAM === $this->feed->priority()) {echo 'selected="selected"';}?>><?= _t('sub.feed.priority.main_stream') ?></option>
- <option value='<?= FreshRSS_Feed::PRIORITY_CATEGORY ?>' <?php
- if (FreshRSS_Feed::PRIORITY_CATEGORY === $this->feed->priority()) {echo 'selected="selected"';}?>><?= _t('sub.feed.priority.category') ?></option>
- <option value='<?= FreshRSS_Feed::PRIORITY_ARCHIVED ?>' <?php
- if (FreshRSS_Feed::PRIORITY_ARCHIVED === $this->feed->priority()) {echo 'selected="selected"';}?>><?= _t('sub.feed.priority.archived') ?></option>
+ <option value="<?= FreshRSS_Feed::PRIORITY_IMPORTANT ?>" <?=
+ FreshRSS_Feed::PRIORITY_IMPORTANT === $this->feed->priority() ? 'selected="selected"' : '' ?>><?= _t('sub.feed.priority.important') ?></option>
+ <option value="<?= FreshRSS_Feed::PRIORITY_MAIN_STREAM ?>" <?=
+ FreshRSS_Feed::PRIORITY_MAIN_STREAM === $this->feed->priority() ? 'selected="selected"' : '' ?>><?= _t('sub.feed.priority.main_stream') ?></option>
+ <option value="<?= FreshRSS_Feed::PRIORITY_CATEGORY ?>" <?=
+ FreshRSS_Feed::PRIORITY_CATEGORY === $this->feed->priority() ? 'selected="selected"' : '' ?>><?= _t('sub.feed.priority.category') ?></option>
+ <option value="<?= FreshRSS_Feed::PRIORITY_ARCHIVED ?>" <?=
+ FreshRSS_Feed::PRIORITY_ARCHIVED === $this->feed->priority() ? 'selected="selected"' : '' ?>><?= _t('sub.feed.priority.archived') ?></option>
</select>
<?= _i('important') ?>
</div>
diff --git a/app/views/helpers/index/normal/entry_bottom.phtml b/app/views/helpers/index/normal/entry_bottom.phtml
index 380d00318..ad0f5b8cf 100644
--- a/app/views/helpers/index/normal/entry_bottom.phtml
+++ b/app/views/helpers/index/normal/entry_bottom.phtml
@@ -19,8 +19,8 @@
if ($this->entry->isRead()) {
$arUrl['params']['is_read'] = '0';
}
- ?><a class="item-element read" href="<?= Minz_Url::display($arUrl) ?>" title="<?= _t('conf.shortcut.mark_read') ?>"><?php
- echo _i($this->entry->isRead() ? 'read' : 'unread'); ?></a><?php
+ ?><a class="item-element read" href="<?= Minz_Url::display($arUrl) ?>" title="<?= _t('conf.shortcut.mark_read') ?>"><?=
+ _i($this->entry->isRead() ? 'read' : 'unread') ?></a><?php
?></li><?php
}
if ($bottomline_favorite) {
@@ -29,8 +29,8 @@
if ($this->entry->isFavorite()) {
$arUrl['params']['is_favorite'] = '0';
}
- ?><a class="item-element bookmark" href="<?= Minz_Url::display($arUrl) ?>" title="<?= _t('conf.shortcut.mark_favorite') ?>"><?php
- echo _i($this->entry->isFavorite() ? 'starred' : 'non-starred'); ?></a><?php
+ ?><a class="item-element bookmark" href="<?= Minz_Url::display($arUrl) ?>" title="<?= _t('conf.shortcut.mark_favorite') ?>"><?=
+ _i($this->entry->isFavorite() ? 'starred' : 'non-starred') ?></a><?php
?></li><?php
}
}
diff --git a/app/views/helpers/index/normal/entry_header.phtml b/app/views/helpers/index/normal/entry_header.phtml
index 0f90d8949..7c65d6bbf 100644
--- a/app/views/helpers/index/normal/entry_header.phtml
+++ b/app/views/helpers/index/normal/entry_header.phtml
@@ -23,8 +23,8 @@
if ($this->entry->isRead()) {
$arUrl['params']['is_read'] = '0';
}
- ?><a class="item-element read" href="<?= Minz_Url::display($arUrl) ?>" title="<?= _t('conf.shortcut.mark_read') ?>"><?php
- echo _i($this->entry->isRead() ? 'read' : 'unread'); ?></a><?php
+ ?><a class="item-element read" href="<?= Minz_Url::display($arUrl) ?>" title="<?= _t('conf.shortcut.mark_read') ?>"><?=
+ _i($this->entry->isRead() ? 'read' : 'unread'); ?></a><?php
?></li><?php
}
if ($topline_favorite) {
@@ -33,8 +33,8 @@
if ($this->entry->isFavorite()) {
$arUrl['params']['is_favorite'] = '0';
}
- ?><a class="item-element bookmark" href="<?= Minz_Url::display($arUrl) ?>" title="<?= _t('conf.shortcut.mark_favorite') ?>"><?php
- echo _i($this->entry->isFavorite() ? 'starred' : 'non-starred'); ?></a><?php
+ ?><a class="item-element bookmark" href="<?= Minz_Url::display($arUrl) ?>" title="<?= _t('conf.shortcut.mark_favorite') ?>"><?=
+ _i($this->entry->isFavorite() ? 'starred' : 'non-starred'); ?></a><?php
?></li><?php
}
}
diff --git a/app/views/stats/repartition.phtml b/app/views/stats/repartition.phtml
index 59cae9e1a..d7515a789 100644
--- a/app/views/stats/repartition.phtml
+++ b/app/views/stats/repartition.phtml
@@ -74,15 +74,14 @@
<div class="box-title"><h2><?= _t('admin.stats.entry_per_hour', $this->averageHour) ?></h2></div>
<div class="box-content scrollbar-thin">
<canvas id="statsEntriesPerHour"></canvas>
- <script class="jsonData-stats" type="application/json">
- <?php
- echo json_encode([
+ <script class="jsonData-stats" type="application/json"><?=
+ json_encode([
'canvasID' => 'statsEntriesPerHour',
'charttype' => 'bar',
'data' => $this->repartitionHour,
'label' => _t('admin.stats.entry_count'),
'xAxisLabels' => $this->hours24Labels
- ], JSON_UNESCAPED_UNICODE);
+ ], JSON_UNESCAPED_UNICODE)
?></script>
</div>
</div>
@@ -92,15 +91,14 @@
<div class="box-title"><h2><?= _t('admin.stats.entry_per_day_of_week', $this->averageDayOfWeek) ?></h2></div>
<div class="box-content scrollbar-thin">
<canvas id="statsEntriesPerDayOfWeek"></canvas>
- <script class="jsonData-stats" type="application/json">
- <?php
- echo json_encode([
+ <script class="jsonData-stats" type="application/json"><?=
+ json_encode([
'canvasID' => 'statsEntriesPerDayOfWeek',
'charttype' => 'bar',
'data' => $this->repartitionDayOfWeek,
'label' => _t('admin.stats.entry_count'),
'xAxisLabels' => $this->days,
- ], JSON_UNESCAPED_UNICODE);
+ ], JSON_UNESCAPED_UNICODE)
?></script>
</div>
</div>
@@ -109,15 +107,14 @@
<div class="box-title"><h2><?= _t('admin.stats.entry_per_month', $this->averageMonth) ?></h2></div>
<div class="box-content scrollbar-thin">
<canvas id="statsEntriesPerMonth"></canvas>
- <script class="jsonData-stats" type="application/json">
- <?php
- echo json_encode([
+ <script class="jsonData-stats" type="application/json"><?=
+ json_encode([
'canvasID' => 'statsEntriesPerMonth',
'charttype' => 'bar',
'data' => $this->repartitionMonth,
'label' => _t('admin.stats.entry_count'),
'xAxisLabels' => $this->months,
- ], JSON_UNESCAPED_UNICODE);
+ ], JSON_UNESCAPED_UNICODE)
?></script>
</div>
</div>
diff --git a/app/views/subscription/index.phtml b/app/views/subscription/index.phtml
index e1ec221f0..b2cff7ac7 100644
--- a/app/views/subscription/index.phtml
+++ b/app/views/subscription/index.phtml
@@ -31,7 +31,7 @@
<div class="box">
<div class="box-title">
<a class="configure open-slider" href="<?= _url('category', 'update', 'id', $cat->id()) ?>" title="<?= _t('gen.action.manage') ?>" data-cat-position="<?= $cat->attributeString('position') ?>"><?= _i('configure') ?></a>
- <h2><?= $cat->name() ?><?php if ($cat->kind() === FreshRSS_Category::KIND_DYNAMIC_OPML) { echo " " . _i('opml-dyn'); } ?></h2>
+ <h2><?= $cat->name() ?><?= $cat->kind() === FreshRSS_Category::KIND_DYNAMIC_OPML ? ' ' . _i('opml-dyn') : '' ?></h2>
</div>
<ul class="box-content drop-zone scrollbar-thin" dropzone="move" data-cat-id="<?= $cat->id() ?>">
<?php
diff --git a/app/views/user/details.phtml b/app/views/user/details.phtml
index 2840586bf..20ab4d804 100644
--- a/app/views/user/details.phtml
+++ b/app/views/user/details.phtml
@@ -9,7 +9,7 @@
$enabled = $this->details['enabled'];
?>
<div class="post">
- <h2><?= $this->username ?><?php if ($isAdmin) echo ' ― ', _t('admin.user.admin'); ?></h2>
+ <h2><?= $this->username ?><?= $isAdmin ? ' ― ' . _t('admin.user.admin') : '' ?></h2>
<form method="post" action="<?= _url('user', 'manage', 'username', $this->username); ?>" data-auto-leave-validation="1">
<input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken(); ?>" />