aboutsummaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2018-02-24 12:02:16 +0100
committerGravatar GitHub <noreply@github.com> 2018-02-24 12:02:16 +0100
commit5ebeb9e3e5d46195a83211140c1d28d58be19b2a (patch)
tree6b93ae52a1206b6045087f893dde67a04b4e1bda /app/views
parent889888f20eb6f3dd476b78c0f59672f7c7962354 (diff)
parent294f9336ad0f315574c74d6b527b1bb8a280f3c6 (diff)
Merge pull request #1786 from FreshRSS/dev1.10.0
FreshRSS 1.10.0
Diffstat (limited to 'app/views')
-rw-r--r--app/views/configure/archiving.phtml4
-rw-r--r--app/views/configure/display.phtml11
-rw-r--r--app/views/configure/shortcut.phtml30
-rw-r--r--app/views/helpers/feed/update.phtml21
-rw-r--r--app/views/helpers/javascript_vars.phtml4
-rw-r--r--app/views/index/global.phtml2
-rw-r--r--app/views/index/normal.phtml2
-rw-r--r--app/views/index/reader.phtml18
-rw-r--r--app/views/subscription/index.phtml2
-rw-r--r--app/views/user/manage.phtml41
10 files changed, 117 insertions, 18 deletions
diff --git a/app/views/configure/archiving.phtml b/app/views/configure/archiving.phtml
index 2254f5dba..09be55fd9 100644
--- a/app/views/configure/archiving.phtml
+++ b/app/views/configure/archiving.phtml
@@ -19,7 +19,7 @@
<label class="group-name" for="keep_history_default"><?php echo _t('conf.archiving.keep_history_by_feed'); ?></label>
<div class="group-controls">
<select class="number" name="keep_history_default" id="keep_history_default" required="required" data-leave-validation="<?php echo FreshRSS_Context::$user_conf->keep_history_default; ?>"><?php
- foreach (array('' => '', 0 => '0', 10 => '10', 50 => '50', 100 => '100', 500 => '500', 1000 => '1 000', 5000 => '5 000', 10000 => '10 000', -1 => '∞') as $v => $t) {
+ foreach (array('' => '', 0 => '0', 10 => '10', 50 => '50', 100 => '100', 500 => '500', 1000 => '1 000', 5000 => '5 000', 10000 => '10 000', FreshRSS_Feed::KEEP_HISTORY_INFINITE => '∞') as $v => $t) {
echo '<option value="' . $v . (FreshRSS_Context::$user_conf->keep_history_default == $v ? '" selected="selected' : '') . '">' . $t . ' </option>';
}
?></select> (<?php echo _t('gen.short.by_default'); ?>)
@@ -34,7 +34,7 @@
3600 => '1h', 5400 => '1.5h', 7200 => '2h', 10800 => '3h', 14400 => '4h', 18800 => '5h', 21600 => '6h', 25200 => '7h', 28800 => '8h',
36000 => '10h', 43200 => '12h', 64800 => '18h',
86400 => '1d', 129600 => '1.5d', 172800 => '2d', 259200 => '3d', 345600 => '4d', 432000 => '5d', 518400 => '6d',
- 604800 => '1wk', -1 => '∞') as $v => $t) {
+ 604800 => '1wk') as $v => $t) {
echo '<option value="' . $v . (FreshRSS_Context::$user_conf->ttl_default == $v ? '" selected="selected' : '') . '">' . $t . '</option>';
if (FreshRSS_Context::$user_conf->ttl_default == $v) {
$found = true;
diff --git a/app/views/configure/display.phtml b/app/views/configure/display.phtml
index 62ecc1080..414fd2cd6 100644
--- a/app/views/configure/display.phtml
+++ b/app/views/configure/display.phtml
@@ -106,7 +106,7 @@
</tbody>
</table><br />
</div>
-
+
<div class="form-group">
<label class="group-name" for="html5_notif_timeout"><?php echo _t('conf.display.notif_html5.timeout'); ?></label>
<div class="group-controls">
@@ -114,6 +114,15 @@
</div>
</div>
+ <div class="form-group">
+ <div class="group-controls">
+ <label class="checkbox" for="show_nav_buttons">
+ <input type="checkbox" name="show_nav_buttons" id="show_nav_buttons" value="1"<?php echo FreshRSS_Context::$user_conf->show_nav_buttons ? ' checked="checked"' : ''; ?> data-leave-validation="<?php echo FreshRSS_Context::$user_conf->show_nav_buttons; ?>"/>
+ <?php echo _t('conf.display.show_nav_buttons'); ?>
+ </label>
+ </div>
+ </div>
+
<div class="form-group form-actions">
<div class="group-controls">
<button type="submit" class="btn btn-important"><?php echo _t('gen.action.submit'); ?></button>
diff --git a/app/views/configure/shortcut.phtml b/app/views/configure/shortcut.phtml
index dceeb17de..66db6a5d4 100644
--- a/app/views/configure/shortcut.phtml
+++ b/app/views/configure/shortcut.phtml
@@ -17,6 +17,36 @@
<noscript><p class="alert alert-error"><?php echo _t('conf.shortcut.javascript'); ?></p></noscript>
+ <legend><?php echo _t('conf.shortcut.views'); ?></legend>
+
+ <div class="form-group">
+ <label class="group-name" for="normal_view_shortcut"><?php echo _t('conf.shortcut.normal_view'); ?></label>
+ <div class="group-controls">
+ <input type="text" id="normal_view_shortcut" name="shortcuts[normal_view]" list="keys" value="<?php echo $s['normal_view']; ?>" data-leave-validation="<?php echo $s['normal_view']; ?>"/>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name" for="global_view_shortcut"><?php echo _t('conf.shortcut.global_view'); ?></label>
+ <div class="group-controls">
+ <input type="text" id="global_view_shortcut" name="shortcuts[global_view]" list="keys" value="<?php echo $s['global_view']; ?>" data-leave-validation="<?php echo $s['global_view']; ?>"/>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name" for="reading_view_shortcut"><?php echo _t('conf.shortcut.reading_view'); ?></label>
+ <div class="group-controls">
+ <input type="text" id="reading_view_shortcut" name="shortcuts[reading_view]" list="keys" value="<?php echo $s['reading_view']; ?>" data-leave-validation="<?php echo $s['reading_view']; ?>"/>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name" for="rss_view_shortcut"><?php echo _t('conf.shortcut.rss_view'); ?></label>
+ <div class="group-controls">
+ <input type="text" id="rss_view_shortcut" name="shortcuts[rss_view]" list="keys" value="<?php echo $s['rss_view']; ?>" data-leave-validation="<?php echo $s['rss_view']; ?>"/>
+ </div>
+ </div>
+
<legend><?php echo _t('conf.shortcut.navigation'); ?></legend>
<p class="alert alert-warn"><?php echo _t('conf.shortcut.navigation_help');?></p>
diff --git a/app/views/helpers/feed/update.phtml b/app/views/helpers/feed/update.phtml
index bf87a255a..d379c5df8 100644
--- a/app/views/helpers/feed/update.phtml
+++ b/app/views/helpers/feed/update.phtml
@@ -65,12 +65,13 @@
</div>
</div>
<div class="form-group">
- <label class="group-name" for="priority"><?php echo _t('sub.feed.in_main_stream'); ?></label>
+ <label class="group-name" for="priority"><?php echo _t('sub.feed.priority'); ?></label>
<div class="group-controls">
- <label class="checkbox" for="priority">
- <input type="checkbox" name="priority" id="priority" value="10"<?php echo $this->feed->priority() > 0 ? ' checked="checked"' : ''; ?> />
- <?php echo _t('gen.short.yes'); ?>
- </label>
+ <select name="priority" id="priority">
+ <option value='<?php echo FreshRSS_Feed::PRIORITY_MAIN_STREAM;?>' <?php if (FreshRSS_Feed::PRIORITY_MAIN_STREAM === $this->feed->priority()) {echo 'selected="selected"';}?>><?php echo _t('sub.feed.priority.main_stream'); ?></option>
+ <option value='<?php echo FreshRSS_Feed::PRIORITY_NORMAL;?>' <?php if (FreshRSS_Feed::PRIORITY_NORMAL === $this->feed->priority()) {echo 'selected="selected"';}?>><?php echo _t('sub.feed.priority.normal'); ?></option>
+ <option value='<?php echo FreshRSS_Feed::PRIORITY_ARCHIVED;?>' <?php if (FreshRSS_Feed::PRIORITY_ARCHIVED === $this->feed->priority()) {echo 'selected="selected"';}?>><?php echo _t('sub.feed.priority.archived'); ?></option>
+ </select>
</div>
</div>
@@ -100,7 +101,7 @@
<label class="group-name" for="keep_history"><?php echo _t('sub.feed.keep_history'); ?></label>
<div class="group-controls">
<select class="number" name="keep_history" id="keep_history" required="required"><?php
- foreach (array('' => '', -2 => _t('gen.short.by_default'), 0 => '0', 10 => '10', 50 => '50', 100 => '100', 500 => '500', 1000 => '1 000', 5000 => '5 000', 10000 => '10 000', -1 => '∞') as $v => $t) {
+ foreach (array('' => '', FreshRSS_Feed::KEEP_HISTORY_DEFAULT => _t('gen.short.by_default'), 0 => '0', 10 => '10', 50 => '50', 100 => '100', 500 => '500', 1000 => '1 000', 5000 => '5 000', 10000 => '10 000', FreshRSS_Feed::KEEP_HISTORY_INFINITE => '∞') as $v => $t) {
echo '<option value="' . $v . ($this->feed->keepHistory() === $v ? '" selected="selected' : '') . '">' . $t . '</option>';
}
?></select>
@@ -111,11 +112,11 @@
<div class="group-controls">
<select class="number" name="ttl" id="ttl" required="required"><?php
$found = false;
- foreach (array(-2 => _t('gen.short.by_default'), 900 => '15min', 1200 => '20min', 1500 => '25min', 1800 => '30min', 2700 => '45min',
+ foreach (array(FreshRSS_Feed::TTL_DEFAULT => _t('gen.short.by_default'), 900 => '15min', 1200 => '20min', 1500 => '25min', 1800 => '30min', 2700 => '45min',
3600 => '1h', 5400 => '1.5h', 7200 => '2h', 10800 => '3h', 14400 => '4h', 18800 => '5h', 21600 => '6h', 25200 => '7h', 28800 => '8h',
36000 => '10h', 43200 => '12h', 64800 => '18h',
86400 => '1d', 129600 => '1.5d', 172800 => '2d', 259200 => '3d', 345600 => '4d', 432000 => '5d', 518400 => '6d',
- 604800 => '1wk', 1209600 => '2wk', 1814400 => '3wk', 2419200 => '4wk', 2629744 => '1mo', -1 => '∞') as $v => $t) {
+ 604800 => '1wk', 1209600 => '2wk', 1814400 => '3wk', 2419200 => '4wk', 2629744 => '1mo') as $v => $t) {
echo '<option value="' . $v . ($this->feed->ttl() === $v ? '" selected="selected' : '') . '">' . $t . '</option>';
if ($this->feed->ttl() == $v) {
$found = true;
@@ -125,6 +126,10 @@
echo '<option value="' . intval($this->feed->ttl()) . '" selected="selected">' . intval($this->feed->ttl()) . 's</option>';
}
?></select>
+ <label for="mute">
+ <input type="checkbox" name="mute" id="mute" value="1"<?php echo $this->feed->mute() ? ' checked="checked"' : ''; ?> />
+ <?php echo _t('sub.feed.mute'); ?>
+ </label>
</div>
</div>
<div class="form-group">
diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml
index 2da53b679..1b9b614d2 100644
--- a/app/views/helpers/javascript_vars.phtml
+++ b/app/views/helpers/javascript_vars.phtml
@@ -35,6 +35,10 @@ echo htmlspecialchars(json_encode(array(
'user_filter' => @$s['user_filter'],
'help' => @$s['help'],
'close_dropdown' => @$s['close_dropdown'],
+ 'normal_view' => @$s['normal_view'],
+ 'global_view' => @$s['global_view'],
+ 'reading_view' => @$s['reading_view'],
+ 'rss_view' => @$s['rss_view'],
),
'url' => array(
'index' => _url('index', 'index'),
diff --git a/app/views/index/global.phtml b/app/views/index/global.phtml
index f35732c8f..2f25b6dc2 100644
--- a/app/views/index/global.phtml
+++ b/app/views/index/global.phtml
@@ -37,7 +37,7 @@
$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; ?>" data-unread="<?php echo $feed->nbNotRead(); ?>" data-priority="<?php echo $feed->priority(); ?>">
+ <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>
diff --git a/app/views/index/normal.phtml b/app/views/index/normal.phtml
index ba48b2501..c7cab2d3f 100644
--- a/app/views/index/normal.phtml
+++ b/app/views/index/normal.phtml
@@ -83,7 +83,7 @@ if (!empty($this->entries)) {
$this->renderHelper('pagination');
?></div>
-<?php $this->partial('nav_entries'); ?>
+<?php if (FreshRSS_Context::$user_conf->show_nav_buttons) $this->partial('nav_entries'); ?>
<?php } else { ?>
<div id="stream" class="prompt alert alert-warn normal">
diff --git a/app/views/index/reader.phtml b/app/views/index/reader.phtml
index f2af75af0..eb6613b28 100644
--- a/app/views/index/reader.phtml
+++ b/app/views/index/reader.phtml
@@ -18,11 +18,25 @@ if (!empty($this->entries)) {
<?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);
+ $favoriteUrl = array('c' => 'entry', 'a' => 'bookmark', 'params' => array('id' => $item->id()));
+ if ($item->isFavorite()) {
+ $favoriteUrl['params']['is_favorite'] = 0;
+ }
+ $readUrl = array('c' => 'entry', 'a' => 'read', 'params' => array('id' => $item->id()));
+ if ($item->isRead()) {
+ $readUrl['params']['is_read'] = 0;
+ }
?>
- <a target="_blank" rel="noreferrer" class="go_website" href="<?php echo $item->link(); ?>">
+ <a class="read" href="<?php echo Minz_Url::display($readUrl); ?>">
+ <?php echo _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>
+ <a 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>
- <h1 class="title"><?php echo $item->title(); ?></h1>
+ <h1 class="title"><a target="_blank" rel="noreferrer" class="go_website" href="<?php echo $item->link(); ?>"><?php echo $item->title(); ?></a></h1>
<div class="author"><?php
$author = $item->author();
diff --git a/app/views/subscription/index.phtml b/app/views/subscription/index.phtml
index 48f760d3e..26af0bd7c 100644
--- a/app/views/subscription/index.phtml
+++ b/app/views/subscription/index.phtml
@@ -125,7 +125,7 @@
$error = $feed->inError() ? ' error' : '';
$empty = $feed->nbEntries() == 0 ? ' empty' : '';
?>
- <li class="item feed<?php echo $error, $empty; ?>"
+ <li class="item feed<?php echo $error, $empty, $feed->mute() ? ' mute': ''; ?>"
draggable="true"
data-feed-id="<?php echo $feed->id(); ?>"
dropzone="move">
diff --git a/app/views/user/manage.phtml b/app/views/user/manage.phtml
index 793a3a0bd..26838fcc1 100644
--- a/app/views/user/manage.phtml
+++ b/app/views/user/manage.phtml
@@ -46,14 +46,51 @@
</div>
</form>
+ <form method="post" action="<?php echo _url('user', 'update'); ?>">
+ <input type="hidden" name="_csrf" value="<?php echo FreshRSS_Auth::csrfToken(); ?>" />
+ <legend><?php echo _t('admin.user.update_users'); ?></legend>
+
+ <div class="form-group">
+ <label class="group-name" for="current_user"><?php echo _t('admin.user.selected'); ?></label>
+ <div class="group-controls">
+ <select id="current_user" class="select-change" name="username">
+ <option selected="selected"> </option>
+ <?php foreach (listUsers() as $username) { ?>
+ <option value="<?php echo $username; ?>"><?php echo $username; ?></option>
+ <?php } ?>
+ </select>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name" for="newPasswordPlain"><?php echo _t('admin.user.password_form'); ?></label>
+ <div class="group-controls">
+ <div class="stick">
+ <input type="password" id="newPasswordPlain" name="newPasswordPlain" autocomplete="off" pattern=".{7,}" <?php echo cryptAvailable() ? '' : 'disabled="disabled" '; ?>/>
+ <a class="btn toggle-password" data-toggle="newPasswordPlain"><?php echo _i('key'); ?></a>
+ </div>
+ <?php echo _i('help'); ?> <?php echo _t('conf.profile.password_format'); ?>
+ <noscript><b><?php echo _t('gen.js.should_be_activated'); ?></b></noscript>
+ </div>
+ </div>
+
+ <div class="form-group form-actions">
+ <div class="group-controls">
+ <button type="submit" class="btn btn-important"><?php echo _t('gen.action.update'); ?></button>
+ <button type="reset" class="btn"><?php echo _t('gen.action.cancel'); ?></button>
+ </div>
+ </div>
+ </form>
+
<form method="post" action="<?php echo _url('user', 'delete'); ?>">
<input type="hidden" name="_csrf" value="<?php echo FreshRSS_Auth::csrfToken(); ?>" />
- <legend><?php echo _t('admin.user.users'); ?></legend>
+ <legend><?php echo _t('admin.user.delete_users'); ?></legend>
<div class="form-group">
- <label class="group-name" for="user-list"><?php echo _t('admin.user.user_list'); ?></label>
+ <label class="group-name" for="user-list"><?php echo _t('admin.user.selected'); ?></label>
<div class="group-controls">
<select id="user-list" class="select-change" name="username">
+ <option selected="selected"> </option>
<?php foreach (listUsers() as $username) { ?>
<option data-url="<?php echo _url('user', 'manage', 'u', $username); ?>" <?php echo $this->current_user === $username ? 'selected="selected"' : ''; ?> value="<?php echo $username; ?>"><?php echo $username; ?></option>
<?php } ?>