diff options
Diffstat (limited to 'app/views/index')
| -rw-r--r-- | app/views/index/about.phtml | 26 | ||||
| -rw-r--r-- | app/views/index/global.phtml | 16 | ||||
| -rw-r--r-- | app/views/index/logs.phtml | 14 | ||||
| -rw-r--r-- | app/views/index/normal.phtml | 24 | ||||
| -rw-r--r-- | app/views/index/reader.phtml | 28 | ||||
| -rwxr-xr-x | app/views/index/rss.phtml | 24 | ||||
| -rw-r--r-- | app/views/index/tos.phtml | 13 |
7 files changed, 79 insertions, 66 deletions
diff --git a/app/views/index/about.phtml b/app/views/index/about.phtml index 649729952..320847886 100644 --- a/app/views/index/about.phtml +++ b/app/views/index/about.phtml @@ -1,26 +1,26 @@ <div class="post content"> - <a href="<?php echo _url('index', 'index'); ?>"><?php echo _t('gen.action.back_to_rss_feeds'); ?></a> + <a href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a> - <h1><?php echo _t('index.about'); ?></h1> + <h1><?= _t('index.about') ?></h1> <dl class="infos"> - <dt><?php echo _t('index.about.project_website'); ?></dt> - <dd><a href="<?php echo FRESHRSS_WEBSITE; ?>"><?php echo FRESHRSS_WEBSITE; ?></a></dd> + <dt><?= _t('index.about.project_website') ?></dt> + <dd><a href="<?= FRESHRSS_WEBSITE ?>"><?= FRESHRSS_WEBSITE ?></a></dd> - <dt><?php echo _t('index.about.bugs_reports'); ?></dt> - <dd><?php echo _t('index.about.github'); ?></dd> + <dt><?= _t('index.about.bugs_reports') ?></dt> + <dd><?= _t('index.about.github') ?></dd> - <dt><?php echo _t('index.about.license'); ?></dt> - <dd><?php echo _t('index.about.agpl3'); ?></dd> + <dt><?= _t('index.about.license') ?></dt> + <dd><?= _t('index.about.agpl3') ?></dd> <?php if (FreshRSS_Auth::hasAccess()): ?> - <dt><?php echo _t('index.about.version'); ?></dt> - <dd><?php echo FRESHRSS_VERSION; ?></dd> + <dt><?= _t('index.about.version') ?></dt> + <dd><?= FRESHRSS_VERSION ?></dd> <?php endif; ?> </dl> - <p><?php echo _t('index.about.freshrss_description'); ?></p> + <p><?= _t('index.about.freshrss_description') ?></p> - <h1><?php echo _t('index.about.credits'); ?></h1> - <p><?php echo _t('index.about.credits_content'); ?></p> + <h1><?= _t('index.about.credits') ?></h1> + <p><?= _t('index.about.credits_content') ?></p> </div> diff --git a/app/views/index/global.phtml b/app/views/index/global.phtml index 2f25b6dc2..a49e16525 100644 --- a/app/views/index/global.phtml +++ b/app/views/index/global.phtml @@ -9,7 +9,7 @@ } ?> -<div id="stream" class="global<?php echo $class; ?>"> +<div id="stream" class="global<?= $class ?>"> <?php $params = Minz_Request::fetchGET(); unset($params['c']); @@ -26,8 +26,8 @@ if (!empty($feeds)) { ?> - <div class="box category" data-unread="<?php echo $cat->nbNotRead(); ?>"> - <div class="box-title"><a class="title" data-unread="<?php echo format_number($cat->nbNotRead()); ?>" href="<?php echo Minz_Url::display($url_base); ?>"><?php echo $cat->name(); ?></a></div> + <div class="box category" data-unread="<?= $cat->nbNotRead() ?>"> + <div class="box-title"><a class="title" data-unread="<?= format_number($cat->nbNotRead()) ?>" href="<?= Minz_Url::display($url_base) ?>"><?= $cat->name() ?></a></div> <ul class="box-content"> <?php @@ -37,9 +37,9 @@ $empty = $feed->nbEntries() === 0 ? ' empty' : ''; $url_base['params']['get'] = 'f_' . $feed->id(); ?> - <li id="f_<?php echo $feed->id(); ?>" class="item feed<?php echo $error, $empty, $feed->mute() ? ' mute' : ''; ?>" data-unread="<?php echo $feed->nbNotRead(); ?>" data-priority="<?php echo $feed->priority(); ?>"> - <img class="favicon" src="<?php echo $feed->favicon(); ?>" alt="✇" /> - <a class="item-title" data-unread="<?php echo format_number($feed->nbNotRead()); ?>" href="<?php echo Minz_Url::display($url_base); ?>"><?php echo $feed->name(); ?></a> + <li id="f_<?= $feed->id() ?>" class="item feed<?= $error, $empty, $feed->mute() ? ' mute' : '' ?>" data-unread="<?= $feed->nbNotRead() ?>" data-priority="<?= $feed->priority() ?>"> + <img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" /> + <a class="item-title" data-unread="<?= format_number($feed->nbNotRead()) ?>" href="<?= Minz_Url::display($url_base) ?>"><?= $feed->name() ?></a> </li> <?php } ?> </ul> @@ -51,7 +51,7 @@ </div> <div id="overlay"> - <a class="close" href="#"><?php echo _i('close'); ?></a> + <a class="close" href="#"><?= _i('close') ?></a> </div> -<div id="panel"<?php echo FreshRSS_Context::$user_conf->display_posts ? '' : ' class="hide_posts"'; ?>> +<div id="panel"<?= FreshRSS_Context::$user_conf->display_posts ? '' : ' class="hide_posts"' ?>> </div> diff --git a/app/views/index/logs.phtml b/app/views/index/logs.phtml index a88f89278..2deb1c315 100644 --- a/app/views/index/logs.phtml +++ b/app/views/index/logs.phtml @@ -1,11 +1,11 @@ <div class="post content"> - <a href="<?php echo _url('index', 'index'); ?>"><?php echo _t('gen.action.back_to_rss_feeds'); ?></a> + <a href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a> - <h1><?php echo _t('index.log'); ?></h1> - <form method="post" action="<?php echo _url('index', 'logs'); ?>"><p> - <input type="hidden" name="_csrf" value="<?php echo FreshRSS_Auth::csrfToken(); ?>" /> + <h1><?= _t('index.log') ?></h1> + <form method="post" action="<?= _url('index', 'logs') ?>"><p> + <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" /> <input type="hidden" name="clearLogs" /> - <button type="submit" class="btn"><?php echo _t('index.log.clear'); ?></button> + <button type="submit" class="btn"><?= _t('index.log.clear') ?></button> </p></form> <?php $items = $this->logsPaginator->items(); ?> @@ -15,12 +15,12 @@ <?php $this->logsPaginator->render('logs_pagination.phtml', 'page'); ?> <?php foreach ($items as $log) { ?> - <div class="log <?php echo $log->level(); ?>"><span class="date"><?php echo @date('Y-m-d H:i:s', @strtotime($log->date())); ?></span><?php echo htmlspecialchars($log->info(), ENT_NOQUOTES, 'UTF-8'); ?></div> + <div class="log <?= $log->level() ?>"><span class="date"><?= @date('Y-m-d H:i:s', @strtotime($log->date())) ?></span><?= htmlspecialchars($log->info(), ENT_NOQUOTES, 'UTF-8') ?></div> <?php } ?> <?php $this->logsPaginator->render('logs_pagination.phtml','page'); ?> </div> <?php } else { ?> - <p class="alert alert-warn"><?php echo _t('index.log.empty'); ?></p> + <p class="alert alert-warn"><?= _t('index.log.empty') ?></p> <?php } ?> </div> diff --git a/app/views/index/normal.phtml b/app/views/index/normal.phtml index ac2ea812d..f556df201 100644 --- a/app/views/index/normal.phtml +++ b/app/views/index/normal.phtml @@ -14,9 +14,9 @@ if (!empty($this->entries)) { $today = @strtotime('today'); ?> -<div id="stream" class="normal<?php echo $hidePosts ? ' hide_posts' : ''; ?>"><?php +<div id="stream" class="normal<?= $hidePosts ? ' hide_posts' : '' ?>"><?php ?><div id="new-article"> - <a href="<?php echo Minz_Url::display(Minz_Request::currentRequest()); ?>"><?php echo _t('gen.js.new_article'); /* TODO: move string in JS*/ ?></a> + <a href="<?= Minz_Url::display(Minz_Request::currentRequest()) ?>"><?= _t('gen.js.new_article'); /* TODO: move string in JS*/ ?></a> </div><?php foreach ($this->entries as $item) { $this->entry = Minz_ExtensionManager::callHook('entry_before_display', $item); @@ -36,23 +36,23 @@ if (!empty($this->entries)) { if ($display_today && $this->entry->isDay(FreshRSS_Days::TODAY, $today)) { ?><div class="day" id="day_today"><?php echo _t('gen.date.today'); - ?><span class="date"> — <?php echo timestamptodate(time(), false); ?></span><?php - ?><span class="name"><?php echo FreshRSS_Context::$name; ?></span><?php + ?><span class="date"> — <?= timestamptodate(time(), false) ?></span><?php + ?><span class="name"><?= FreshRSS_Context::$name ?></span><?php ?></div><?php $display_today = false; } if ($display_yesterday && $this->entry->isDay(FreshRSS_Days::YESTERDAY, $today)) { ?><div class="day" id="day_yesterday"><?php echo _t('gen.date.yesterday'); - ?><span class="date"> — <?php echo timestamptodate(time() - 86400, false); ?></span><?php - ?><span class="name"><?php echo FreshRSS_Context::$name; ?></span><?php + ?><span class="date"> — <?= timestamptodate(time() - 86400, false) ?></span><?php + ?><span class="name"><?= FreshRSS_Context::$name ?></span><?php ?></div><?php $display_yesterday = false; } if ($display_others && $this->entry->isDay(FreshRSS_Days::BEFORE_YESTERDAY, $today)) { ?><div class="day" id="day_before_yesterday"><?php echo _t('gen.date.before_yesterday'); - ?><span class="name"><?php echo FreshRSS_Context::$name; ?></span><?php + ?><span class="name"><?= FreshRSS_Context::$name ?></span><?php ?></div><?php $display_others = false; } @@ -65,8 +65,8 @@ if (!empty($this->entries)) { $this->renderHelper('index/normal/entry_header'); ?><div class="flux_content"> - <div class="content <?php echo $content_width; ?>"> - <h1 class="title"><a target="_blank" rel="noreferrer" class="go_website" href="<?php echo $this->entry->link(); ?>"><?php echo $this->entry->title(); ?></a></h1> + <div class="content <?= $content_width ?>"> + <h1 class="title"><a target="_blank" rel="noreferrer" class="go_website" href="<?= $this->entry->link() ?>"><?= $this->entry->title() ?></a></h1> <div class="author"><?php $authors = $this->entry->authors(); if (is_array($authors)): @@ -75,7 +75,7 @@ if (!empty($this->entries)) { echo $first ? _t('gen.short.by_author') . ' ' : '· '; $first = false; ?> -<em><a href="<?php echo _url('index', 'index', 'search', 'author:' . str_replace(' ', '+', htmlspecialchars_decode($author, ENT_QUOTES))); ?>"><?php echo $author; ?></a></em> +<em><a href="<?= _url('index', 'index', 'search', 'author:' . str_replace(' ', '+', htmlspecialchars_decode($author, ENT_QUOTES))) ?>"><?= $author ?></a></em> <?php endforeach; ?> </div><?php endif; @@ -96,7 +96,7 @@ if (!empty($this->entries)) { <?php } else { ?> <div id="stream" class="prompt alert alert-warn normal"> - <h2><?php echo _t('index.feed.empty'); ?></h2> - <a href="<?php echo _url('subscription', 'index'); ?>"><?php echo _t('index.feed.add'); ?></a><br /><br /> + <h2><?= _t('index.feed.empty') ?></h2> + <a href="<?= _url('subscription', 'index') ?>"><?= _t('index.feed.add') ?></a><br /><br /> </div> <?php } ?> diff --git a/app/views/index/reader.phtml b/app/views/index/reader.phtml index 129fae937..bbb6bd22b 100644 --- a/app/views/index/reader.phtml +++ b/app/views/index/reader.phtml @@ -9,16 +9,16 @@ if (!empty($this->entries)) { <div id="stream" class="reader"> <div id="new-article"> - <a href="<?php echo Minz_Url::display(Minz_Request::currentRequest()); ?>"><?php echo _t('gen.js.new_article'); /* TODO: move string in JS*/ ?></a> + <a href="<?= Minz_Url::display(Minz_Request::currentRequest()) ?>"><?= _t('gen.js.new_article'); /* TODO: move string in JS*/ ?></a> </div> <?php foreach ($this->entries as $item) { $item = Minz_ExtensionManager::callHook('entry_before_display', $item); if (is_null($item)) { continue; } - ?><div class="flux<?php echo !$item->isRead() ? ' not_read' : ''; ?><?php echo $item->isFavorite() ? ' favorite' : ''; ?>" id="flux_<?php echo $item->id(); ?>"> + ?><div class="flux<?= !$item->isRead() ? ' not_read' : '' ?><?= $item->isFavorite() ? ' favorite' : '' ?>" id="flux_<?= $item->id() ?>"> <div class="flux_content"> - <div class="content <?php echo $content_width; ?>"> + <div class="content <?= $content_width ?>"> <?php $feed = FreshRSS_CategoryDAO::findFeed($this->categories, $item->feed()); //We most likely already have the feed object in cache if (empty($feed)) $feed = $item->feed(true); @@ -31,16 +31,16 @@ if (!empty($this->entries)) { $readUrl['params']['is_read'] = 0; } ?> - <a class="read" href="<?php echo Minz_Url::display($readUrl); ?>"> - <?php echo _i($item->isRead() ? 'read' : 'unread'); ?> + <a class="read" href="<?= Minz_Url::display($readUrl) ?>"> + <?= _i($item->isRead() ? 'read' : 'unread') ?> </a> - <a class="bookmark" href="<?php echo Minz_Url::display($favoriteUrl); ?>"> - <?php echo _i($item->isFavorite() ? 'starred' : 'non-starred'); ?> + <a class="bookmark" href="<?= Minz_Url::display($favoriteUrl) ?>"> + <?= _i($item->isFavorite() ? 'starred' : 'non-starred') ?> </a> - <a class="website" href="<?php echo _url('index', 'reader', 'get', 'f_' . $feed->id()); ?>"> - <img class="favicon" src="<?php echo $feed->favicon(); ?>" alt="✇" /> <span><?php echo $feed->name(); ?></span> + <a class="website" href="<?= _url('index', 'reader', 'get', 'f_' . $feed->id()) ?>"> + <img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" /> <span><?= $feed->name() ?></span> </a> - <h1 class="title"><a target="_blank" rel="noreferrer" class="go_website" href="<?php echo $item->link(); ?>"><?php echo $item->title(); ?></a></h1> + <h1 class="title"><a target="_blank" rel="noreferrer" class="go_website" href="<?= $item->link() ?>"><?= $item->title() ?></a></h1> <div class="author"><?php $authors = $item->authors(); @@ -50,7 +50,7 @@ if (!empty($this->entries)) { echo $first ? _t('gen.short.by_author') . ' ' : '· '; $first = false; ?> -<em><a href="<?php echo _url('index', 'index', 'search', 'author:' . str_replace(' ', '+', htmlspecialchars_decode($author, ENT_QUOTES))); ?>"><?php echo $author; ?></a></em> +<em><a href="<?= _url('index', 'index', 'search', 'author:' . str_replace(' ', '+', htmlspecialchars_decode($author, ENT_QUOTES))) ?>"><?= $author ?></a></em> <?php endforeach; echo ' — '; @@ -58,7 +58,7 @@ if (!empty($this->entries)) { echo $item->date(); ?></div> - <?php echo $item->content(); ?> + <?= $item->content() ?> </div> </div> </div> @@ -69,7 +69,7 @@ if (!empty($this->entries)) { <?php } else { ?> <div id="stream" class="prompt alert alert-warn reader"> - <h2><?php echo _t('index.feed.empty'); ?></h2> - <a href="<?php echo _url('subscription', 'index'); ?>"><?php echo _t('index.feed.add'); ?></a><br /><br /> + <h2><?= _t('index.feed.empty') ?></h2> + <a href="<?= _url('subscription', 'index') ?>"><?= _t('index.feed.add') ?></a><br /><br /> </div> <?php } ?> diff --git a/app/views/index/rss.phtml b/app/views/index/rss.phtml index 104e03d15..00be01c28 100755 --- a/app/views/index/rss.phtml +++ b/app/views/index/rss.phtml @@ -1,23 +1,23 @@ -<?php echo '<?xml version="1.0" encoding="UTF-8" ?>'; ?> +<?= '<?xml version="1.0" encoding="UTF-8" ?>'; ?> <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/"> <channel> - <title><?php echo $this->rss_title; ?></title> - <link><?php echo Minz_Url::display(null, 'html', true); ?></link> - <description><?php echo _t('index.feed.rss_of', $this->rss_title); ?></description> - <pubDate><?php echo date('D, d M Y H:i:s O'); ?></pubDate> - <lastBuildDate><?php echo gmdate('D, d M Y H:i:s'); ?> GMT</lastBuildDate> - <atom:link href="<?php echo Minz_Url::display($this->url, 'html', true); ?>" rel="self" type="application/rss+xml" /> + <title><?= $this->rss_title ?></title> + <link><?= Minz_Url::display(null, 'html', true) ?></link> + <description><?= _t('index.feed.rss_of', $this->rss_title) ?></description> + <pubDate><?= date('D, d M Y H:i:s O') ?></pubDate> + <lastBuildDate><?= gmdate('D, d M Y H:i:s') ?> GMT</lastBuildDate> + <atom:link href="<?= Minz_Url::display($this->url, 'html', true) ?>" rel="self" type="application/rss+xml" /> <?php foreach ($this->entries as $item) { ?> <item> - <title><?php echo $item->title(); ?></title> - <link><?php echo $item->link(); ?></link> + <title><?= $item->title() ?></title> + <link><?= $item->link() ?></link> <?php $authors = $item->authors(); if (is_array($authors)) { foreach ($authors as $author) { - echo "\t\t\t" , '<author>', $author, '</author>', "\n"; + echo "\t\t\t" , '<dc:creator>', $author, '</dc:creator>', "\n"; } } $categories = $item->tags(); @@ -30,8 +30,8 @@ foreach ($this->entries as $item) { <description><![CDATA[<?php echo $item->content(); ?>]]></description> - <pubDate><?php echo date('D, d M Y H:i:s O', $item->date(true)); ?></pubDate> - <guid isPermaLink="false"><?php echo $item->id(); ?></guid> + <pubDate><?= date('D, d M Y H:i:s O', $item->date(true)) ?></pubDate> + <guid isPermaLink="false"><?= $item->id() ?></guid> </item> <?php } ?> diff --git a/app/views/index/tos.phtml b/app/views/index/tos.phtml new file mode 100644 index 000000000..38dd0add6 --- /dev/null +++ b/app/views/index/tos.phtml @@ -0,0 +1,13 @@ +<div class="post content"> + <?php if ($this->can_register) { ?> + <a href="<?= _url('auth', 'register') ?>"> + <?= _t('gen.action.back') ?> + </a> + <?php } else { ?> + <a href="<?= _url('index', 'index') ?>"> + <?= _t('gen.action.back') ?> + </a> + <?php } ?> + + <?= $this->terms_of_service ?> +</div> |
