aboutsummaryrefslogtreecommitdiff
path: root/app/views/helpers/index/normal
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/helpers/index/normal')
-rw-r--r--app/views/helpers/index/normal/entry_bottom.phtml38
-rw-r--r--app/views/helpers/index/normal/entry_header.phtml26
2 files changed, 39 insertions, 25 deletions
diff --git a/app/views/helpers/index/normal/entry_bottom.phtml b/app/views/helpers/index/normal/entry_bottom.phtml
index c0edbdf7d..dd84ca346 100644
--- a/app/views/helpers/index/normal/entry_bottom.phtml
+++ b/app/views/helpers/index/normal/entry_bottom.phtml
@@ -19,7 +19,7 @@
if ($this->entry->isRead()) {
$arUrl['params']['is_read'] = 0;
}
- ?><a class="read" href="<?php echo Minz_Url::display($arUrl); ?>"><?php
+ ?><a class="read" href="<?= Minz_Url::display($arUrl) ?>"><?php
echo _i($this->entry->isRead() ? 'read' : 'unread'); ?></a><?php
?></li><?php
}
@@ -29,7 +29,7 @@
if ($this->entry->isFavorite()) {
$arUrl['params']['is_favorite'] = 0;
}
- ?><a class="bookmark" href="<?php echo Minz_Url::display($arUrl); ?>"><?php
+ ?><a class="bookmark" href="<?= Minz_Url::display($arUrl) ?>"><?php
echo _i($this->entry->isFavorite() ? 'starred' : 'non-starred'); ?></a><?php
?></li><?php
}
@@ -37,9 +37,9 @@
if ($bottomline_labels) {
?><li class="item">
<div class="dropdown dynamictags">
- <div id="dropdown-labels-<?php echo $this->entry->id();?>" class="dropdown-target"></div>
- <?php echo FreshRSS_Themes::alt('label'); ?>
- <a class="dropdown-toggle" href="#dropdown-labels-<?php echo $this->entry->id();?>"><?php
+ <div id="dropdown-labels-<?= $this->entry->id() ?>" class="dropdown-target"></div>
+ <?= FreshRSS_Themes::alt('label') ?>
+ <a class="dropdown-toggle" href="#dropdown-labels-<?= $this->entry->id() ?>"><?php
echo _t('index.menu.tags');
?></a>
<ul class="dropdown-menu dropdown-menu-scrollable">
@@ -53,15 +53,15 @@
if (!empty($tags)) {
?><li class="item">
<div class="dropdown">
- <div id="dropdown-tags-<?php echo $this->entry->id();?>" class="dropdown-target"></div>
- <?php echo _i('tag'); ?>
- <a class="dropdown-toggle" href="#dropdown-tags-<?php echo $this->entry->id();?>"><?php
+ <div id="dropdown-tags-<?= $this->entry->id() ?>" class="dropdown-target"></div>
+ <?= _i('tag') ?>
+ <a class="dropdown-toggle" href="#dropdown-tags-<?= $this->entry->id() ?>"><?php
echo _t('index.tag.related');
?></a>
<ul class="dropdown-menu">
<li class="dropdown-close"><a href="#close">❌</a></li><?php
foreach ($tags as $tag) {
- ?><li class="item"><a href="<?php echo _url('index', 'index', 'search', '#' . str_replace(' ', '+', htmlspecialchars_decode($tag, ENT_QUOTES))); ?>"><?php echo $tag; ?></a></li><?php
+ ?><li class="item"><a href="<?= _url('index', 'index', 'search', '#' . str_replace(' ', '+', htmlspecialchars_decode($tag, ENT_QUOTES))) ?>"><?= $tag ?></a></li><?php
} ?>
</ul>
</div>
@@ -70,10 +70,10 @@
?><li class="item"><?php
if ($bottomline_sharing) {
?><div class="dropdown">
- <div id="dropdown-share-<?php echo $this->entry->id();?>" class="dropdown-target"></div>
- <a class="dropdown-toggle" href="#dropdown-share-<?php echo $this->entry->id();?>">
- <?php echo _i('share'); ?>
- <?php echo _t('index.share'); ?>
+ <div id="dropdown-share-<?= $this->entry->id() ?>" class="dropdown-target"></div>
+ <a class="dropdown-toggle" href="#dropdown-share-<?= $this->entry->id() ?>">
+ <?= _i('share') ?>
+ <?= _t('index.share') ?>
</a>
<ul class="dropdown-menu">
@@ -90,11 +90,11 @@
$share->update($share_options);
?><li class="item share">
<?php if ('GET' === $share->method()) {?>
- <a target="_blank" rel="noreferrer" href="<?php echo $share->url(); ?>"><?php echo $share->name(); ?></a>
+ <a target="_blank" rel="noreferrer" href="<?= $share->url() ?>"><?= $share->name() ?></a>
<?php } else {?>
- <a href="POST"><?php echo $share->name(); ?></a>
- <form method="POST" action="<?php echo $share->url(); ?>" disabled="disabled">
- <input type="hidden" value="<?php echo $link; ?>" name="<?php echo $share->field(); ?>"/>
+ <a href="POST"><?= $share->name() ?></a>
+ <form method="POST" action="<?= $share->url() ?>" disabled="disabled">
+ <input type="hidden" value="<?= $link ?>" name="<?= $share->field() ?>"/>
</form>
<?php } ?>
</li><?php
@@ -104,9 +104,9 @@
<?php } ?>
</li><?php
if ($bottomline_date) {
- ?><li class="item date"><?php echo $this->entry->date(); ?></li><?php
+ ?><li class="item date"><?= $this->entry->date() ?></li><?php
}
if ($bottomline_link) {
- ?><li class="item link"><a target="_blank" rel="noreferrer" href="<?php echo $this->entry->link(); ?>"><?php echo _i('link'); ?></a></li><?php
+ ?><li class="item link"><a target="_blank" rel="noreferrer" href="<?= $this->entry->link() ?>"><?= _i('link') ?></a></li><?php
} ?>
</ul>
diff --git a/app/views/helpers/index/normal/entry_header.phtml b/app/views/helpers/index/normal/entry_header.phtml
index 86298e59f..d22cf5036 100644
--- a/app/views/helpers/index/normal/entry_header.phtml
+++ b/app/views/helpers/index/normal/entry_header.phtml
@@ -1,6 +1,7 @@
<?php
$topline_read = FreshRSS_Context::$user_conf->topline_read;
$topline_favorite = FreshRSS_Context::$user_conf->topline_favorite;
+ $topline_display_authors = FreshRSS_Context::$user_conf->topline_display_authors;
$topline_date = FreshRSS_Context::$user_conf->topline_date;
$topline_link = FreshRSS_Context::$user_conf->topline_link;
?><ul class="horizontal-list flux_header"><?php
@@ -11,7 +12,7 @@
if ($this->entry->isRead()) {
$arUrl['params']['is_read'] = 0;
}
- ?><a class="read" href="<?php echo Minz_Url::display($arUrl); ?>"><?php
+ ?><a class="read" href="<?= Minz_Url::display($arUrl) ?>"><?php
echo _i($this->entry->isRead() ? 'read' : 'unread'); ?></a><?php
?></li><?php
}
@@ -21,13 +22,26 @@
if ($this->entry->isFavorite()) {
$arUrl['params']['is_favorite'] = 0;
}
- ?><a class="bookmark" href="<?php echo Minz_Url::display($arUrl); ?>"><?php
+ ?><a class="bookmark" href="<?= Minz_Url::display($arUrl) ?>"><?php
echo _i($this->entry->isFavorite() ? 'starred' : 'non-starred'); ?></a><?php
?></li><?php
}
}
- ?><li class="item website"><a href="<?php echo _url('index', 'index', 'get', 'f_' . $this->feed->id()); ?>"><img class="favicon" src="<?php echo $this->feed->favicon(); ?>" alt="✇" /> <span><?php echo $this->feed->name(); ?></span></a></li>
- <li class="item title"><a target="_blank" rel="noreferrer" href="<?php echo $this->entry->link(); ?>"><?php echo $this->entry->title(); ?></a></li>
- <?php if ($topline_date) { ?><li class="item date"><?php echo $this->entry->date(); ?> </li><?php } ?>
- <?php if ($topline_link) { ?><li class="item link"><a target="_blank" rel="noreferrer" href="<?php echo $this->entry->link(); ?>"><?php echo _i('link'); ?></a></li><?php } ?>
+ ?><li class="item website"><a href="<?= _url('index', 'index', 'get', 'f_' . $this->feed->id()) ?>"><img class="favicon" src="<?= $this->feed->favicon() ?>" alt="✇" /> <span><?= $this->feed->name() ?></span></a></li>
+ <li class="item title"><a target="_blank" rel="noreferrer" href="<?= $this->entry->link() ?>"><?= $this->entry->title() ?></a><?php
+ if ($topline_display_authors):
+ ?><div class="item author"><?php
+ $authors = $this->entry->authors();
+ if (is_array($authors)) {
+ $first = true;
+ foreach ($authors as $author) {
+ echo $first ? $author : ', ' . $author;
+ $first = false;
+ }
+ }
+ ?></div><?php
+ endif;
+ ?></li>
+ <?php if ($topline_date) { ?><li class="item date"><?= $this->entry->date() ?> </li><?php } ?>
+ <?php if ($topline_link) { ?><li class="item link"><a target="_blank" rel="noreferrer" href="<?= $this->entry->link() ?>"><?= _i('link') ?></a></li><?php } ?>
</ul>