aboutsummaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2025-09-11 21:19:31 +0200
committerGravatar GitHub <noreply@github.com> 2025-09-11 21:19:31 +0200
commit8bd9bd95d8cc0fd5fe24386db7182329612579da (patch)
tree6e1278feccbc8725f218cc86e84b8961360b63f2 /app/views
parentc8da217e875c2371a8d1d13a678e2a811d906922 (diff)
Minor update syntax echo (#7941)
* Minor update syntax echo Follow-up of https://github.com/FreshRSS/FreshRSS/pull/7939 * Fix layout Whitespace optimisation needed to avoid style glitch
Diffstat (limited to 'app/views')
-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
7 files changed, 28 insertions, 31 deletions
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(); ?>" />