summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-03-04 13:30:45 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-03-04 13:30:45 +0100
commitb3239256dc6d188cda970adab516b3fcf1b86129 (patch)
treed8e65dd9784834ba2e82ce7ee94b4718f8af19ea /app/views
parent27b71ffa99f7dff013fb8d51d020ed628e0d2ce6 (diff)
parent0fe0ce894cbad09757d719dd4b400b9862c1a12a (diff)
Merge branch 'edge' into latest
Diffstat (limited to 'app/views')
-rw-r--r--app/views/auth/register.phtml12
-rw-r--r--app/views/configure/display.phtml47
-rw-r--r--app/views/configure/integration.phtml4
-rw-r--r--app/views/configure/system.phtml4
-rw-r--r--app/views/feed/add.phtml2
-rw-r--r--app/views/helpers/category/update.phtml2
-rw-r--r--app/views/helpers/configure/query.phtml4
-rw-r--r--app/views/helpers/export/opml.phtml66
-rw-r--r--app/views/helpers/feed/update.phtml7
-rw-r--r--app/views/helpers/index/normal/entry_header.phtml5
-rwxr-xr-xapp/views/helpers/stream-footer.phtml11
-rw-r--r--app/views/index/logs.phtml10
-rw-r--r--app/views/index/normal.phtml2
-rw-r--r--app/views/index/reader.phtml6
-rwxr-xr-xapp/views/index/rss.phtml22
-rw-r--r--app/views/subscription/add.phtml11
-rw-r--r--app/views/user/manage.phtml16
17 files changed, 164 insertions, 67 deletions
diff --git a/app/views/auth/register.phtml b/app/views/auth/register.phtml
index a56eff3ee..999b2406a 100644
--- a/app/views/auth/register.phtml
+++ b/app/views/auth/register.phtml
@@ -16,6 +16,18 @@
</div>
<div class="form-group">
+ <label for="new_user_timezone"><?= _t('conf.display.timezone') ?></label>
+ <select name="new_user_timezone" id="new_user_timezone">
+ <?php $timezones = array_merge([''], DateTimeZone::listIdentifiers()); ?>
+ <?php foreach ($timezones as $timezone): ?>
+ <option value="<?= $timezone ?>"<?= $timezone === '' ? ' selected="selected"' : '' ?>>
+ <?= $timezone == '' ? _t('gen.short.by_default') . ' (' . FreshRSS_Context::defaultTimeZone() . ')' : $timezone ?>
+ </option>
+ <?php endforeach; ?>
+ </select>
+ </div>
+
+ <div class="form-group">
<label for="new_user_name"><?= _t('gen.auth.username') ?></label>
<input id="new_user_name" name="new_user_name" type="text" size="16" required="required" autocomplete="off"
pattern="<?= FreshRSS_user_Controller::USERNAME_PATTERN ?>" autocapitalize="off" />
diff --git a/app/views/configure/display.phtml b/app/views/configure/display.phtml
index e3e18f5a0..44ca242ad 100644
--- a/app/views/configure/display.phtml
+++ b/app/views/configure/display.phtml
@@ -26,6 +26,25 @@
</div>
<div class="form-group">
+ <label class="group-name" for="language"><?= _t('conf.display.timezone') ?></label>
+ <div class="group-controls">
+ <select name="timezone" id="timezone" data-leave-validation="<?= FreshRSS_Context::$user_conf->timezone ?>">
+ <?php
+ $timezones = array_merge([''], DateTimeZone::listIdentifiers());
+ if (!in_array(FreshRSS_Context::$user_conf->timezone, $timezones, true)) {
+ FreshRSS_Context::$user_conf->timezone = '';
+ }
+ ?>
+ <?php foreach ($timezones as $timezone): ?>
+ <option value="<?= $timezone ?>"<?= FreshRSS_Context::$user_conf->timezone === $timezone ? ' selected="selected"' : '' ?>>
+ <?= $timezone == '' ? _t('gen.short.by_default') . ' (' . FreshRSS_Context::defaultTimeZone() . ')' : $timezone ?>
+ </option>
+ <?php endforeach; ?>
+ </select>
+ </div>
+ </div>
+
+ <div class="form-group">
<label class="group-name" for="theme"><?= _t('conf.display.theme') ?></label>
<div class="group-controls">
<ul class="slides">
@@ -41,7 +60,7 @@
data-leave-validation="<?= (FreshRSS_Context::$user_conf->theme === $theme['id']) ? 1 : 0 ?>" />
<li class="slide-container">
<div class="slide">
- <img src="<?= Minz_Url::display('/themes/' . $theme['id'] . '/thumbs/original.png') ?>" />
+ <img src="<?= Minz_Url::display('/themes/' . $theme['id'] . '/thumbs/original.png') ?>" loading="lazy" />
</div>
<div class="nav">
<?php if ($i !== 1) {?>
@@ -52,8 +71,18 @@
<?php } ?>
</div>
<div class="properties">
- <div><?= sprintf('%s — %s %s', $theme['name'], _t('gen.short.by_author'), $theme['author']) ?></div>
- <div><?= $theme['description'] ?></div>
+ <div>
+ <?php if (!empty($theme['deprecated'])) { ?>
+ <span class="deprecated error"><?= _t('conf.display.theme.deprecated') ?>:</span>
+ <?php } ?>
+ <?= sprintf('%s — %s %s', $theme['name'], _t('gen.short.by_author'), $theme['author']) ?>
+ </div>
+ <div>
+ <?php if (!empty($theme['deprecated'])) { ?>
+ <span class="deprecated"><?= _t('conf.display.theme.deprecated.description') ?></span><br />
+ <?php } ?>
+ <?= $theme['description'] ?>
+ </div>
<div class="page-number"><?= sprintf('%d/%d', $i, $slides) ?></div>
</div>
</li>
@@ -76,6 +105,16 @@
</div>
</div>
+ <div class="form-group">
+ <label class="group-name" for="darkMode"><?= _t('conf.display.darkMode') ?></label>
+ <div class="group-controls">
+ <select name="darkMode" id="darkMode" data-leave-validation="<?= FreshRSS_Context::$user_conf->darkMode ?>">
+ <option value="no"<?= FreshRSS_Context::$user_conf->darkMode === 'no' ? ' selected' : '' ?>>No</option>
+ <option value="auto"<?= FreshRSS_Context::$user_conf->darkMode === 'auto' ? ' selected' : '' ?>>Auto</option>
+ </select>
+ </div>
+ </div>
+
<?php $width = FreshRSS_Context::$user_conf->content_width; ?>
<div class="form-group">
<label class="group-name" for="content_width"><?= _t('conf.display.width.content') ?></label>
@@ -126,7 +165,7 @@
<tr>
<th> </th>
<th title="<?= _t('conf.shortcut.mark_read') ?>"><?= _i('read') ?></th>
- <th title="<?= _t('conf.shortcut.mark_favorite') ?>"><?= _i('bookmark') ?></th>
+ <th title="<?= _t('conf.shortcut.mark_favorite') ?>"><?= _i('starred') ?></th>
<th><?= _t('conf.display.icon.related_tags') ?></th>
<th><?= _t('conf.display.icon.sharing') ?></th>
<th><?= _t('conf.display.icon.summary') ?></th>
diff --git a/app/views/configure/integration.phtml b/app/views/configure/integration.phtml
index c078ae709..34c10b3c3 100644
--- a/app/views/configure/integration.phtml
+++ b/app/views/configure/integration.phtml
@@ -15,7 +15,7 @@
<template id="simple-share">
<formgroup class="group-share dragbox">
<legend draggable="true">##label##</legend>
- <input type="hidden" id="share_##key##_type" name="share[##key##][type]" value="##type##" />
+ <input type="hidden" id="share_##key##_type" name="share[##key##][type]" value="##type##" data-leave-validation="" />
<div class="form-group" id="group-share-##key##">
<label class="group-name" for="share_##key##_name"><?= _t('conf.sharing.share_name') ?></label>
<div class="group-controls">
@@ -32,7 +32,7 @@
<template id="advanced-share">
<formgroup class="group-share dragbox">
<legend draggable="true">##label##</legend>
- <input type="hidden" id="share_##key##_type" name="share[##key##][type]" value="##type##" />
+ <input type="hidden" id="share_##key##_type" name="share[##key##][type]" value="##type##" data-leave-validation="" />
<input type="hidden" id="share_##key##_method" name="share[##key##][method]" value="##method##" />
<input type="hidden" id="share_##key##_field" name="share[##key##][field]" value="##field##" />
<div class="form-group" id="group-share-##key##">
diff --git a/app/views/configure/system.phtml b/app/views/configure/system.phtml
index 94fe34b94..bf14cac5d 100644
--- a/app/views/configure/system.phtml
+++ b/app/views/configure/system.phtml
@@ -16,7 +16,7 @@
<div class="form-group">
<label class="group-name" for="instance-name"><?= _t('admin.system.instance-name') ?></label>
<div class="group-controls">
- <input type="text" class="extend" id="instance-name" name="instance-name" value="<?= FreshRSS_Context::$system_conf->title ?>"
+ <input type="text" id="instance-name" name="instance-name" value="<?= FreshRSS_Context::$system_conf->title ?>"
data-leave-validation="<?= FreshRSS_Context::$system_conf->title ?>"/>
</div>
</div>
@@ -24,7 +24,7 @@
<div class="form-group">
<label class="group-name" for="auto-update-url"><?= _t('admin.system.auto-update-url') ?></label>
<div class="group-controls">
- <input type="text" class="extend" id="auto-update-url" name="auto-update-url" value="<?= FreshRSS_Context::$system_conf->auto_update_url ?>"
+ <input type="text" id="auto-update-url" name="auto-update-url" value="<?= FreshRSS_Context::$system_conf->auto_update_url ?>"
data-leave-validation="<?= FreshRSS_Context::$system_conf->auto_update_url ?>"/>
</div>
</div>
diff --git a/app/views/feed/add.phtml b/app/views/feed/add.phtml
index 8f5594526..3461e6e61 100644
--- a/app/views/feed/add.phtml
+++ b/app/views/feed/add.phtml
@@ -67,7 +67,7 @@
<div class="form-group">
<label class="group-name" for="http_user"><?= _t('sub.feed.auth.username') ?></label>
<div class="group-controls">
- <input type="text" name="http_user" id="http_user" class="extend" value="<?= $auth['username'] ?>" autocomplete="off" />
+ <input type="text" name="http_user" id="http_user" value="<?= $auth['username'] ?>" autocomplete="off" />
<p class="help"><?= _i('help') ?> <?= _t('sub.feed.auth.help') ?></p>
</div>
diff --git a/app/views/helpers/category/update.phtml b/app/views/helpers/category/update.phtml
index 171ee20a4..a0986ff04 100644
--- a/app/views/helpers/category/update.phtml
+++ b/app/views/helpers/category/update.phtml
@@ -16,7 +16,7 @@
<div class="form-group">
<label class="group-name" for="name"><?= _t('sub.category.title') ?></label>
<div class="group-controls">
- <input type="text" name="name" id="name" class="extend" value="<?= $this->category->name() ?>" <?php
+ <input type="text" name="name" id="name" value="<?= $this->category->name() ?>" <?php
//Disallow changing the name of the default category
echo $this->category->id() == FreshRSS_CategoryDAO::DEFAULTCATEGORYID ? 'disabled="disabled"' : '';
?> />
diff --git a/app/views/helpers/configure/query.phtml b/app/views/helpers/configure/query.phtml
index a75333cfc..f8d51c193 100644
--- a/app/views/helpers/configure/query.phtml
+++ b/app/views/helpers/configure/query.phtml
@@ -12,7 +12,7 @@
<div class="form-group">
<label class="group-name" for="name"><?= _t('conf.query.name') ?></label>
<div class="group-controls">
- <input type="text" name="name" id="name" class="extend" value="<?= $this->query->getName() ?>" />
+ <input type="text" name="name" id="name" value="<?= $this->query->getName() ?>" />
</div>
</div>
<legend><?= _t('conf.query.filter') ?></legend>
@@ -20,7 +20,7 @@
<div class="form-group">
<label class="group-name" for=""><?= _t('conf.query.filter.search') ?></label>
<div class="group-controls">
- <input type="text" id="query_search" name="query[search]" class="extend" value="<?= htmlspecialchars($this->query->getSearch(), ENT_COMPAT, 'UTF-8') ?>"/>
+ <input type="text" id="query_search" name="query[search]" value="<?= htmlspecialchars($this->query->getSearch(), ENT_COMPAT, 'UTF-8') ?>"/>
</div>
</div>
<div class="form-group">
diff --git a/app/views/helpers/export/opml.phtml b/app/views/helpers/export/opml.phtml
index d97641fd2..64c83c960 100644
--- a/app/views/helpers/export/opml.phtml
+++ b/app/views/helpers/export/opml.phtml
@@ -9,6 +9,7 @@ function feedsToOutlines($feeds, $excludeMutedFeeds = false): array {
if ($feed->mute() && $excludeMutedFeeds) {
continue;
}
+
$outline = [
'text' => htmlspecialchars_decode($feed->name(), ENT_QUOTES),
'type' => FreshRSS_Export_Service::TYPE_RSS_ATOM,
@@ -16,49 +17,65 @@ function feedsToOutlines($feeds, $excludeMutedFeeds = false): array {
'htmlUrl' => htmlspecialchars_decode($feed->website(), ENT_QUOTES),
'description' => htmlspecialchars_decode($feed->description(), ENT_QUOTES),
];
- if ($feed->kind() === FreshRSS_Feed::KIND_HTML_XPATH) {
- $outline['type'] = FreshRSS_Export_Service::TYPE_HTML_XPATH;
+
+ if ($feed->kind() === FreshRSS_Feed::KIND_HTML_XPATH || $feed->kind() === FreshRSS_Feed::KIND_XML_XPATH) {
+ switch ($feed->kind()) {
+ case FreshRSS_Feed::KIND_HTML_XPATH:
+ $outline['type'] = FreshRSS_Export_Service::TYPE_HTML_XPATH;
+ break;
+ case FreshRSS_Feed::KIND_XML_XPATH:
+ $outline['type'] = FreshRSS_Export_Service::TYPE_XML_XPATH;
+ break;
+ }
/** @var array<string,string> */
$xPathSettings = $feed->attributes('xpath');
- $outline['frss:xPathItem'] = ['namespace' => FreshRSS_Export_Service::FRSS_NAMESPACE, 'value' => $xPathSettings['item'] ?? null];
- $outline['frss:xPathItemTitle'] = ['namespace' => FreshRSS_Export_Service::FRSS_NAMESPACE, 'value' => $xPathSettings['itemTitle'] ?? null];
- $outline['frss:xPathItemContent'] = ['namespace' => FreshRSS_Export_Service::FRSS_NAMESPACE, 'value' => $xPathSettings['itemContent'] ?? null];
- $outline['frss:xPathItemUri'] = ['namespace' => FreshRSS_Export_Service::FRSS_NAMESPACE, 'value' => $xPathSettings['itemUri'] ?? null];
- $outline['frss:xPathItemAuthor'] = ['namespace' => FreshRSS_Export_Service::FRSS_NAMESPACE, 'value' => $xPathSettings['itemAuthor'] ?? null];
- $outline['frss:xPathItemTimestamp'] = ['namespace' => FreshRSS_Export_Service::FRSS_NAMESPACE, 'value' => $xPathSettings['itemTimestamp'] ?? null];
- $outline['frss:xPathItemTimeformat'] = ['namespace' => FreshRSS_Export_Service::FRSS_NAMESPACE, 'value' => $xPathSettings['itemTimeformat'] ?? null];
- $outline['frss:xPathItemThumbnail'] = ['namespace' => FreshRSS_Export_Service::FRSS_NAMESPACE, 'value' => $xPathSettings['itemThumbnail'] ?? null];
- $outline['frss:xPathItemCategories'] = ['namespace' => FreshRSS_Export_Service::FRSS_NAMESPACE, 'value' => $xPathSettings['itemCategories'] ?? null];
- $outline['frss:xPathItemUid'] = ['namespace' => FreshRSS_Export_Service::FRSS_NAMESPACE, 'value' => $xPathSettings['itemUid'] ?? null];
+ $outline['frss:xPathItem'] = $xPathSettings['item'] ?? null;
+ $outline['frss:xPathItemTitle'] = $xPathSettings['itemTitle'] ?? null;
+ $outline['frss:xPathItemContent'] = $xPathSettings['itemContent'] ?? null;
+ $outline['frss:xPathItemUri'] = $xPathSettings['itemUri'] ?? null;
+ $outline['frss:xPathItemAuthor'] = $xPathSettings['itemAuthor'] ?? null;
+ $outline['frss:xPathItemTimestamp'] = $xPathSettings['itemTimestamp'] ?? null;
+ $outline['frss:xPathItemTimeformat'] = $xPathSettings['itemTimeformat'] ?? null;
+ $outline['frss:xPathItemThumbnail'] = $xPathSettings['itemThumbnail'] ?? null;
+ $outline['frss:xPathItemCategories'] = $xPathSettings['itemCategories'] ?? null;
+ $outline['frss:xPathItemUid'] = $xPathSettings['itemUid'] ?? null;
}
+
if (!empty($feed->filtersAction('read'))) {
$filters = '';
foreach ($feed->filtersAction('read') as $filterRead) {
$filters .= $filterRead->getRawInput() . "\n";
}
$filters = trim($filters);
- $outline['frss:filtersActionRead'] = ['namespace' => FreshRSS_Export_Service::FRSS_NAMESPACE, 'value' => $filters];
+ $outline['frss:filtersActionRead'] = $filters;
}
+
if ($feed->pathEntries() != '') {
- $outline['frss:cssFullContent'] = ['namespace' => FreshRSS_Export_Service::FRSS_NAMESPACE, 'value' => htmlspecialchars_decode($feed->pathEntries(), ENT_QUOTES)];
+ $outline['frss:cssFullContent'] = htmlspecialchars_decode($feed->pathEntries(), ENT_QUOTES);
}
+
if ($feed->attributes('path_entries_filter') != '') {
- $outline['frss:cssFullContentFilter'] = ['namespace' => FreshRSS_Export_Service::FRSS_NAMESPACE, 'value' => $feed->attributes('path_entries_filter')];
+ $outline['frss:cssFullContentFilter'] = $feed->attributes('path_entries_filter');
}
+
$outlines[] = $outline;
}
+
return $outlines;
}
/** @var FreshRSS_View $this */
-$opml_array = array(
- 'head' => array(
+$opml_array = [
+ 'namespaces' => [
+ 'frss' => FreshRSS_Export_Service::FRSS_NAMESPACE,
+ ],
+ 'head' => [
'title' => FreshRSS_Context::$system_conf->title,
- 'dateCreated' => date('D, d M Y H:i:s')
- ),
- 'body' => array()
-);
+ 'dateCreated' => new DateTime(),
+ ],
+ 'body' => [],
+];
if (!empty($this->categories)) {
foreach ($this->categories as $key => $cat) {
@@ -66,9 +83,11 @@ if (!empty($this->categories)) {
'text' => htmlspecialchars_decode($cat->name(), ENT_QUOTES),
'@outlines' => feedsToOutlines($cat->feeds(), $this->excludeMutedFeeds),
];
+
if ($cat->kind() === FreshRSS_Category::KIND_DYNAMIC_OPML) {
- $outline['frss:opmlUrl'] = ['namespace' => FreshRSS_Export_Service::FRSS_NAMESPACE, 'value' => $cat->attributes('opml_url')];;
+ $outline['frss:opmlUrl'] = $cat->attributes('opml_url');
}
+
$opml_array['body'][$key] = $outline;
}
}
@@ -77,4 +96,5 @@ if (!empty($this->feeds)) {
$opml_array['body'][] = feedsToOutlines($this->feeds, $this->excludeMutedFeeds);
}
-echo libopml_render($opml_array);
+$libopml = new \marienfressinaud\LibOpml\LibOpml(true);
+echo $libopml->render($opml_array);
diff --git a/app/views/helpers/feed/update.phtml b/app/views/helpers/feed/update.phtml
index 8dbba0ab0..0cd2ec0c3 100644
--- a/app/views/helpers/feed/update.phtml
+++ b/app/views/helpers/feed/update.phtml
@@ -391,8 +391,9 @@
<label class="group-name" for="feed_kind"><?= _t('sub.feed.kind') ?></label>
<div class="group-controls">
<select name="feed_kind" id="feed_kind" class="select-show w100">
- <option value="<?= FreshRSS_Feed::KIND_RSS ?>" <?= $this->feed->kind() == FreshRSS_Feed::KIND_RSS ? 'selected="selected"' : '' ?>><?= _t('sub.feed.kind.rss') ?></option>
- <option value="<?= FreshRSS_Feed::KIND_HTML_XPATH ?>" <?= $this->feed->kind() == FreshRSS_Feed::KIND_HTML_XPATH ? 'selected="selected"' : '' ?> data-show="html_xpath"><?= _t('sub.feed.kind.html_xpath') ?></option>
+ <option value="<?= FreshRSS_Feed::KIND_RSS ?>" <?= $this->feed->kind() === FreshRSS_Feed::KIND_RSS ? 'selected="selected"' : '' ?>><?= _t('sub.feed.kind.rss') ?></option>
+ <option value="<?= FreshRSS_Feed::KIND_HTML_XPATH ?>" <?= $this->feed->kind() === FreshRSS_Feed::KIND_HTML_XPATH ? 'selected="selected"' : '' ?> data-show="html_xpath"><?= _t('sub.feed.kind.html_xpath') ?></option>
+ <option value="<?= FreshRSS_Feed::KIND_XML_XPATH ?>" <?= $this->feed->kind() === FreshRSS_Feed::KIND_XML_XPATH ? 'selected="selected"' : '' ?> data-show="html_xpath"><?= _t('sub.feed.kind.xml_xpath') ?></option>
</select>
</div>
</div>
@@ -602,7 +603,7 @@
<div class="form-group">
<label class="group-name" for="timeout"><?= _t('sub.feed.timeout') ?></label>
<div class="group-controls">
- <input type="number" name="timeout" id="timeout" class="w50" min="3" max="120" value="<?= $this->feed->attributes('timeout') ?>" placeholder="<?= _t('gen.short.by_default') ?>" />
+ <input type="number" name="timeout" id="timeout" class="w50" min="3" max="900" value="<?= $this->feed->attributes('timeout') ?>" placeholder="<?= _t('gen.short.by_default') ?>" />
</div>
</div>
diff --git a/app/views/helpers/index/normal/entry_header.phtml b/app/views/helpers/index/normal/entry_header.phtml
index 43eeb7f8a..92eacf617 100644
--- a/app/views/helpers/index/normal/entry_header.phtml
+++ b/app/views/helpers/index/normal/entry_header.phtml
@@ -42,8 +42,7 @@
?><li class="item thumbnail <?= $topline_thumbnail ?> <?= $topline_summary ? '' : 'small' ?>"><?php
$thumbnail = $this->entry->thumbnail();
if ($thumbnail != null):
- ?><img src="<?= htmlspecialchars($thumbnail['url'], ENT_COMPAT, 'UTF-8') ?>" class="item-element "<?= $lazyload ? ' loading="lazy"' : '' ?><?=
- empty($thumbnail['alt']) ? '' : ' alt="' . htmlspecialchars(strip_tags($thumbnail['alt']), ENT_COMPAT, 'UTF-8') . '"' ?> /><?php
+ ?><img src="<?= $thumbnail['url'] ?>" class="item-element "<?= $lazyload ? ' loading="lazy"' : '' ?> alt="" /><?php
endif;
?></li><?php
endif; ?>
@@ -62,7 +61,7 @@
?></span><?php
endif;
if ($topline_summary):
- ?><div class="summary"><?= trim(mb_substr(strip_tags($this->entry->content()), 0, 500, 'UTF-8')) ?></div><?php
+ ?><div class="summary"><?= trim(mb_substr(strip_tags($this->entry->content(false)), 0, 500, 'UTF-8')) ?></div><?php
endif;
?></a></li>
<?php if ($topline_date) { ?><li class="item date"><time datetime="<?= $this->entry->machineReadableDate() ?>" class="item-element"><?= $this->entry->date() ?></time>&nbsp;</li><?php } ?>
diff --git a/app/views/helpers/stream-footer.phtml b/app/views/helpers/stream-footer.phtml
index ebce4d852..f37ba59d6 100755
--- a/app/views/helpers/stream-footer.phtml
+++ b/app/views/helpers/stream-footer.phtml
@@ -30,19 +30,20 @@ if ($hasAccess) { ?>
<?php if (FreshRSS_Context::$next_id) { ?>
<button id="load_more" type="submit" class="btn" formaction="<?= Minz_Url::display($url_next) ?>"><?= _t('gen.stream.load_more') ?></button>
<?php } elseif ($hasAccess) { ?>
+ <?= _t('gen.stream.nothing_to_load') ?><br />
<button id="bigMarkAsRead"
class="as-link <?= FreshRSS_Context::$user_conf->reading_confirm ? 'confirm" disabled="disabled' : '' ?>"
form="stream-footer"
formaction="<?= Minz_Url::display($url_mark_read) ?>"
type="submit">
- <?= _t('gen.stream.nothing_to_load') ?><br />
<span class="bigTick">✓</span><br />
- <?= _t('gen.stream.mark_all_read') ?>
+ <span class="markAllRead"><?= _t('gen.stream.mark_all_read') ?></span>
+ <?php if (FreshRSS_Context::$user_conf->onread_jump_next) { ?>
+ <div class="jumpNext"><?= _t('conf.reading.jump_next') ?></div>
+ <?php } ?>
</button>
<?php } else { ?>
- <div id="bigMarkAsRead">
- <?= _t('gen.stream.nothing_to_load') ?><br />
- </div>
+ <?= _t('gen.stream.nothing_to_load') ?><br />
<?php } ?>
</div>
<?php if ($hasAccess) { ?>
diff --git a/app/views/index/logs.phtml b/app/views/index/logs.phtml
index f6a76b922..896a19765 100644
--- a/app/views/index/logs.phtml
+++ b/app/views/index/logs.phtml
@@ -6,7 +6,7 @@
</div>
<h1><?= _t('index.log') ?></h1>
-
+
<?php
/** @var array<FreshRSS_Log> $items */
@@ -29,8 +29,8 @@
<?= _i($log->level()) ?>
</td>
<td class="log-date">
- <time datetime="<?= @date('Y-m-d H:i:s', @strtotime($log->date())) ?>">
- <?= @date('Y-m-d H:i:s', @strtotime($log->date())) ?>
+ <time datetime="<?= date('Y-m-d H:i:s', @strtotime($log->date()) ?: 0) ?>">
+ <?= date('Y-m-d H:i:s', @strtotime($log->date()) ?: 0) ?>
</time>
</td>
<td class="log-message">
@@ -42,7 +42,7 @@
</table>
</div>
<?php $this->logsPaginator->render('logs_pagination.phtml', 'page'); ?>
-
+
<form method="post" action="<?= _url('index', 'logs') ?>">
@@ -58,5 +58,5 @@
<?php } else { ?>
<p class="alert alert-warn"><?= _t('index.log.empty') ?></p>
<?php } ?>
-
+
</main>
diff --git a/app/views/index/normal.phtml b/app/views/index/normal.phtml
index 6f7c47677..847c307ab 100644
--- a/app/views/index/normal.phtml
+++ b/app/views/index/normal.phtml
@@ -162,7 +162,7 @@ $today = @strtotime('today');
<?php } ?>
</header>
<div class="text"><?php
- echo $lazyload && $hidePosts ? lazyimg($this->entry->content()) : $this->entry->content();
+ echo $lazyload && $hidePosts ? lazyimg($this->entry->content(true)) : $this->entry->content(true);
?></div>
<?php
$display_authors_date = FreshRSS_Context::$user_conf->show_author_date === 'f' || FreshRSS_Context::$user_conf->show_author_date === 'b';
diff --git a/app/views/index/reader.phtml b/app/views/index/reader.phtml
index 5789f229b..9dcd07435 100644
--- a/app/views/index/reader.phtml
+++ b/app/views/index/reader.phtml
@@ -87,8 +87,8 @@ $MAX_TAGS_DISPLAYED = FreshRSS_Context::$user_conf->show_tags_max;
if (!empty($remainingTags)) { // more than 7 tags: show dropdown menu ?>
<li class="item tag">
<div class="dropdown">
- <div id="dropdown-tags2-<?= $this->entry->id() ?>" class="dropdown-target"></div>
- <a class="dropdown-toggle" href="#dropdown-tags2-<?= $this->entry->id() ?>"><?= _i('down') ?></a>
+ <div id="dropdown-tags-<?= $this->entry->id() ?>" class="dropdown-target"></div>
+ <a class="dropdown-toggle" href="#dropdown-tags-<?= $this->entry->id() ?>"><?= _i('down') ?></a>
<ul class="dropdown-menu">
<li class="dropdown-header"><?= _t('index.tag.related') ?></li>
<?php
@@ -136,7 +136,7 @@ $MAX_TAGS_DISPLAYED = FreshRSS_Context::$user_conf->show_tags_max;
</header>
<div class="text">
- <?= $item->content() ?>
+ <?= $item->content(true) ?>
</div>
<?php
$display_authors_date = FreshRSS_Context::$user_conf->show_author_date === 'f' || FreshRSS_Context::$user_conf->show_author_date === 'b';
diff --git a/app/views/index/rss.phtml b/app/views/index/rss.phtml
index 0b07a02f3..0b3dc7955 100755
--- a/app/views/index/rss.phtml
+++ b/app/views/index/rss.phtml
@@ -29,29 +29,41 @@ foreach ($this->entries as $item) {
$authors = $item->authors();
if (is_array($authors)) {
foreach ($authors as $author) {
- echo "\t\t\t" , '<dc:creator>', $author, '</dc:creator>', "\n";
+ echo "\t\t\t", '<dc:creator>', $author, '</dc:creator>', "\n";
}
}
$categories = $item->tags();
if (is_array($categories)) {
foreach ($categories as $category) {
- echo "\t\t\t" , '<category>', $category, '</category>', "\n";
+ echo "\t\t\t", '<category>', $category, '</category>', "\n";
}
}
+ $thumbnail = $item->thumbnail(false);
+ if (!empty($thumbnail['url'])) {
+ // https://www.rssboard.org/media-rss#media-thumbnails
+ echo "\t\t\t", '<media:thumbnail url="' . $thumbnail['url']
+ . (empty($thumbnail['width']) ? '' : '" width="' . $thumbnail['width'])
+ . (empty($thumbnail['height']) ? '' : '" height="' . $thumbnail['height'])
+ . (empty($thumbnail['time']) ? '' : '" time="' . $thumbnail['time'])
+ . '" />', "\n";
+ }
$enclosures = $item->enclosures(false);
if (is_array($enclosures)) {
foreach ($enclosures as $enclosure) {
// https://www.rssboard.org/media-rss
- echo "\t\t\t" , '<media:content url="' . $enclosure['url']
+ echo "\t\t\t", '<media:content url="' . $enclosure['url']
. (empty($enclosure['medium']) ? '' : '" medium="' . $enclosure['medium'])
. (empty($enclosure['type']) ? '' : '" type="' . $enclosure['type'])
. (empty($enclosure['length']) ? '' : '" length="' . $enclosure['length'])
- . '"></media:content>', "\n";
+ . '">'
+ . (empty($enclosure['title']) ? '' : '<media:title type="html">' . $enclosure['title'] . '</media:title>')
+ . (empty($enclosure['credit']) ? '' : '<media:credit>' . $enclosure['credit'] . '</media:credit>')
+ . '</media:content>', "\n";
}
}
?>
<description><![CDATA[<?php
- echo $item->content();
+ echo $item->content(false);
?>]]></description>
<pubDate><?= date('D, d M Y H:i:s O', $item->date(true)) ?></pubDate>
<guid isPermaLink="false"><?= $item->id() > 0 ? $item->id() : $item->guid() ?></guid>
diff --git a/app/views/subscription/add.phtml b/app/views/subscription/add.phtml
index 800093bed..4e9da877f 100644
--- a/app/views/subscription/add.phtml
+++ b/app/views/subscription/add.phtml
@@ -70,6 +70,7 @@
<select name="feed_kind" id="feed_kind" class="select-show">
<option value="<?= FreshRSS_Feed::KIND_RSS ?>" selected="selected"><?= _t('sub.feed.kind.rss') ?></option>
<option value="<?= FreshRSS_Feed::KIND_HTML_XPATH ?>" data-show="html_xpath"><?= _t('sub.feed.kind.html_xpath') ?></option>
+ <option value="<?= FreshRSS_Feed::KIND_XML_XPATH ?>" data-show="html_xpath"><?= _t('sub.feed.kind.xml_xpath') ?></option>
</select>
</div>
</div>
@@ -190,7 +191,7 @@
<div class="form-group">
<label class="group-name" for="curl_params_cookie"><?= _t('sub.feed.css_cookie') ?></label>
<div class="group-controls">
- <input type="text" name="curl_params_cookie" id="curl_params_cookie" class="extend" value="" placeholder="<?= _t('gen.short.blank_to_disable') ?>" />
+ <input type="text" name="curl_params_cookie" id="curl_params_cookie" value="" placeholder="<?= _t('gen.short.blank_to_disable') ?>" />
<p class="help"><?= _i('help') ?> <?= _t('sub.feed.css_cookie_help') ?></p>
<label for="curl_params_cookiefile">
<input type="checkbox" name="curl_params_cookiefile" id="curl_params_cookiefile" value="1" />
@@ -203,7 +204,7 @@
<div class="form-group">
<label class="group-name" for="curl_params_redirects"><?= _t('sub.feed.max_http_redir') ?></label>
<div class="group-controls">
- <input type="number" name="curl_params_redirects" id="curl_params_redirects" class="extend" min="-1" value="" placeholder="<?= _t('gen.short.blank_to_disable') ?>" />
+ <input type="number" name="curl_params_redirects" id="curl_params_redirects" min="-1" value="" placeholder="<?= _t('gen.short.blank_to_disable') ?>" />
<p class="help"><?= _i('help') ?> <?= _t('sub.feed.max_http_redir_help') ?></p>
</div>
</div>
@@ -212,7 +213,7 @@
<label class="group-name" for="curl_params_useragent"><?= _t('sub.feed.useragent') ?></label>
<div class="group-controls">
<div class="stick">
- <input type="text" name="curl_params_useragent" id="curl_params_useragent" class="extend" value="" placeholder="<?= _t('gen.short.blank_to_disable') ?>" />
+ <input type="text" name="curl_params_useragent" id="curl_params_useragent" value="" placeholder="<?= _t('gen.short.blank_to_disable') ?>" />
</div>
<p class="help"><?= _i('help') ?> <?= _t('sub.feed.useragent_help') ?></p>
</div>
@@ -228,7 +229,7 @@
?>
</select>
<div class="stick">
- <input type="text" name="curl_params" id="curl_params" class="extend" value="" placeholder="<?= _t('gen.short.blank_to_disable') ?>" />
+ <input type="text" name="curl_params" id="curl_params" value="" placeholder="<?= _t('gen.short.blank_to_disable') ?>" />
</div>
<p class="help"><?= _i('help') ?> <?= _t('sub.feed.proxy_help') ?></p>
</div>
@@ -237,7 +238,7 @@
<div class="form-group">
<label class="group-name" for="timeout"><?= _t('sub.feed.timeout') ?></label>
<div class="group-controls">
- <input type="number" name="timeout" id="timeout" min="3" max="120" value="" placeholder="<?= _t('gen.short.by_default') ?>" />
+ <input type="number" name="timeout" id="timeout" min="3" max="900" value="" placeholder="<?= _t('gen.short.by_default') ?>" />
</div>
</div>
diff --git a/app/views/user/manage.phtml b/app/views/user/manage.phtml
index 0d01d33d7..b996cdf2b 100644
--- a/app/views/user/manage.phtml
+++ b/app/views/user/manage.phtml
@@ -15,8 +15,6 @@
<input type="hidden" name="originController" value="<?= Minz_Request::controllerName() ?>" />
<input type="hidden" name="originAction" value="<?= Minz_Request::actionName() ?>" />
-
-
<div class="form-group">
<label class="group-name" for="new_user_language"><?= _t('admin.user.language') ?></label>
<div class="group-controls">
@@ -31,6 +29,20 @@
</div>
<div class="form-group">
+ <label class="group-name" for="new_user_timezone"><?= _t('conf.display.timezone') ?></label>
+ <div class="group-controls">
+ <select name="new_user_timezone" id="new_user_timezone">
+ <?php $timezones = array_merge([''], DateTimeZone::listIdentifiers()); ?>
+ <?php foreach ($timezones as $timezone): ?>
+ <option value="<?= $timezone ?>"<?= $timezone === '' ? ' selected="selected"' : '' ?>>
+ <?= $timezone == '' ? _t('gen.short.by_default') . ' (' . FreshRSS_Context::defaultTimeZone() . ')' : $timezone ?>
+ </option>
+ <?php endforeach; ?>
+ </select>
+ </div>
+ </div>
+
+ <div class="form-group">
<label class="group-name" for="new_user_name"><?= _t('admin.user.username') ?></label>
<div class="group-controls">
<input id="new_user_name" name="new_user_name" type="text" size="16" required="required" autocomplete="off"