aboutsummaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/configure/categorize.phtml8
-rw-r--r--app/views/configure/display.phtml7
-rw-r--r--app/views/configure/feed.phtml30
-rw-r--r--app/views/configure/queries.phtml15
-rw-r--r--app/views/configure/reading.phtml20
-rw-r--r--app/views/configure/shortcut.phtml15
-rw-r--r--app/views/helpers/javascript_vars.phtml11
-rwxr-xr-xapp/views/helpers/pagination.phtml41
-rw-r--r--app/views/helpers/view/global_view.phtml8
-rw-r--r--app/views/helpers/view/normal_view.phtml6
-rw-r--r--app/views/helpers/view/reader_view.phtml6
-rw-r--r--app/views/index/formLogin.phtml13
-rw-r--r--app/views/index/resetAuth.phtml33
-rw-r--r--app/views/stats/idle.phtml33
-rw-r--r--app/views/stats/index.phtml48
-rw-r--r--app/views/stats/repartition.phtml66
-rw-r--r--app/views/update/apply.phtml9
-rw-r--r--app/views/update/index.phtml36
18 files changed, 309 insertions, 96 deletions
diff --git a/app/views/configure/categorize.phtml b/app/views/configure/categorize.phtml
index 9bae99b39..23d1c9fa1 100644
--- a/app/views/configure/categorize.phtml
+++ b/app/views/configure/categorize.phtml
@@ -18,7 +18,13 @@
<input type="text" id="cat_<?php echo $cat->id (); ?>" name="categories[]" value="<?php echo $cat->name (); ?>" />
<?php if ($cat->nbFeed () > 0) { ?>
- <button type="submit" class="btn btn-attention confirm" formaction="<?php echo _url ('feed', 'delete', 'id', $cat->id (), 'type', 'category'); ?>"><?php echo Minz_Translate::t ('ask_empty'); ?></button>
+ <a class="btn" href="<?php echo _url('index', 'index', 'get', 'c_' . $cat->id ()); ?>">
+ <?php echo _i('link'); ?>
+ </a>
+ <button formaction="<?php echo _url('feed', 'delete', 'id', $cat->id (), 'type', 'category'); ?>"
+ class="btn btn-attention confirm"
+ data-str-confirm="<?php echo _t('confirm_action_feed_cat'); ?>"
+ type="submit"><?php echo _t('ask_empty'); ?></button>
<?php } ?>
</div>
(<?php echo Minz_Translate::t ('number_feeds', $cat->nbFeed ()); ?>)
diff --git a/app/views/configure/display.phtml b/app/views/configure/display.phtml
index 955fc6747..8eb3a156b 100644
--- a/app/views/configure/display.phtml
+++ b/app/views/configure/display.phtml
@@ -91,6 +91,13 @@
</tbody>
</table><br />
</div>
+
+ <div class="form-group">
+ <label class="group-name" for="posts_per_page"><?php echo Minz_Translate::t ('html5_notif_timeout'); ?></label>
+ <div class="group-controls">
+ <input type="number" id="html5_notif_timeout" name="html5_notif_timeout" value="<?php echo $this->conf->html5_notif_timeout; ?>" /> <?php echo Minz_Translate::t ('seconds_(0_means_no_timeout)'); ?>
+ </div>
+ </div>
<div class="form-group form-actions">
<div class="group-controls">
diff --git a/app/views/configure/feed.phtml b/app/views/configure/feed.phtml
index a8dd9a8cb..e96a28739 100644
--- a/app/views/configure/feed.phtml
+++ b/app/views/configure/feed.phtml
@@ -70,27 +70,33 @@
</label>
</div>
</div>
+ <div class="form-group">
+ <div class="group-controls">
+ <a href="<?php echo _url('stats', 'repartition', 'id', $this->flux->id()); ?>">
+ <?php echo _i('stats'); ?> <?php echo _t('stats'); ?>
+ </a>
+ </div>
+ </div>
<div class="form-group form-actions">
<div class="group-controls">
- <button class="btn btn-important"><?php echo Minz_Translate::t ('save'); ?></button>
- <button class="btn btn-attention confirm" formmethod="post" formaction="<?php echo Minz_Url::display (array ('c' => 'feed', 'a' => 'delete', 'params' => array ('id' => $this->flux->id ()))); ?>"><?php echo Minz_Translate::t ('delete'); ?></button>
+ <button class="btn btn-important"><?php echo _t('save'); ?></button>
+ <button class="btn btn-attention confirm"
+ data-str-confirm="<?php echo _t('confirm_action_feed_cat'); ?>"
+ formaction="<?php echo _url('feed', 'delete', 'id', $this->flux->id ()); ?>"
+ formmethod="post"><?php echo _t('delete'); ?></button>
</div>
</div>
<legend><?php echo Minz_Translate::t ('archiving_configuration'); ?></legend>
<div class="form-group">
- <label class="group-name"></label>
<div class="group-controls">
- <a class="btn" href="<?php echo _url ('feed', 'actualize', 'id', $this->flux->id ()); ?>">
- <?php echo FreshRSS_Themes::icon('refresh'); ?> <?php echo Minz_Translate::t('actualize'); ?>
- </a>
- </div>
- </div>
- <div class="form-group">
- <label class="group-name"><?php echo Minz_Translate::t ('number_articles'); ?></label>
- <div class="group-controls">
- <span class="control"><?php echo $nbEntries; ?></span>
+ <div class="stick">
+ <input type="text" value="<?php echo _t('number_articles', $nbEntries); ?>" disabled="disabled" />
+ <a class="btn" href="<?php echo _url('feed', 'actualize', 'id', $this->flux->id ()); ?>">
+ <?php echo _i('refresh'); ?> <?php echo _t('actualize'); ?>
+ </a>
+ </div>
</div>
</div>
<div class="form-group">
diff --git a/app/views/configure/queries.phtml b/app/views/configure/queries.phtml
index 2895f584c..e778ce078 100644
--- a/app/views/configure/queries.phtml
+++ b/app/views/configure/queries.phtml
@@ -42,30 +42,37 @@
+ (isset($query['get']) ? 1 : 0);
// If the only filter is "all" articles, we consider there is no filter
$exist = ($exist === 1 && isset($query['get']) && $query['get'] === 'a') ? 0 : $exist;
+
+ $deprecated = (isset($this->query_get[$key]) &&
+ $this->query_get[$key]['deprecated']);
?>
<?php if ($exist === 0) { ?>
<div class="alert alert-warn">
<div class="alert-head"><?php echo _t('no_query_filter'); ?></div>
</div>
+ <?php } elseif ($deprecated) { ?>
+ <div class="alert alert-error">
+ <div class="alert-head"><?php echo _t('query_deprecated'); ?></div>
+ </div>
<?php } else { ?>
<div class="alert alert-success">
<div class="alert-head"><?php echo _t('query_filter'); ?></div>
<ul>
- <?php if (isset($query['search'])) { $exist = true; ?>
+ <?php if (isset($query['search'])) { ?>
<li class="item"><?php echo _t('query_search', $query['search']); ?></li>
<?php } ?>
- <?php if (isset($query['state'])) { $exist = true; ?>
+ <?php if (isset($query['state'])) { ?>
<li class="item"><?php echo _t('query_state_' . $query['state']); ?></li>
<?php } ?>
- <?php if (isset($query['order'])) { $exist = true; ?>
+ <?php if (isset($query['order'])) { ?>
<li class="item"><?php echo _t('query_order_' . strtolower($query['order'])); ?></li>
<?php } ?>
- <?php if (isset($query['get'])) { $exist = true; ?>
+ <?php if (isset($query['get'])) { ?>
<li class="item"><?php echo _t('query_get_' . $this->query_get[$key]['type'], $this->query_get[$key]['name']); ?></li>
<?php } ?>
</ul>
diff --git a/app/views/configure/reading.phtml b/app/views/configure/reading.phtml
index 5a26501a4..8b2da2a28 100644
--- a/app/views/configure/reading.phtml
+++ b/app/views/configure/reading.phtml
@@ -10,6 +10,7 @@
<label class="group-name" for="posts_per_page"><?php echo Minz_Translate::t ('articles_per_page'); ?></label>
<div class="group-controls">
<input type="number" id="posts_per_page" name="posts_per_page" value="<?php echo $this->conf->posts_per_page; ?>" min="5" max="50" />
+ <?php echo _i('help'); ?> <?php echo _t('number_divided_when_reader'); ?>
</div>
</div>
@@ -31,14 +32,17 @@
<option value="reader"<?php echo $this->conf->view_mode === 'reader' ? ' selected="selected"' : ''; ?>><?php echo Minz_Translate::t ('reader_view'); ?></option>
<option value="global"<?php echo $this->conf->view_mode === 'global' ? ' selected="selected"' : ''; ?>><?php echo Minz_Translate::t ('global_view'); ?></option>
</select>
- <label class="radio" for="radio_all">
- <input type="radio" name="default_view" id="radio_all" value="<?php echo FreshRSS_Entry::STATE_ALL; ?>"<?php echo $this->conf->default_view === FreshRSS_Entry::STATE_ALL ? ' checked="checked"' : ''; ?> />
- <?php echo Minz_Translate::t ('show_all_articles'); ?>
- </label>
- <label class="radio" for="radio_not_read">
- <input type="radio" name="default_view" id="radio_not_read" value="<?php echo FreshRSS_Entry::STATE_NOT_READ; ?>"<?php echo $this->conf->default_view === FreshRSS_Entry::STATE_NOT_READ ? ' checked="checked"' : ''; ?> />
- <?php echo Minz_Translate::t ('show_not_reads'); ?>
- </label>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name" for="view_mode"><?php echo _t('articles_to_display'); ?></label>
+ <div class="group-controls">
+ <select name="default_view" id="default_view">
+ <option value="<?php echo FreshRSS_Entry::STATE_NOT_READ; ?>"<?php echo $this->conf->default_view === FreshRSS_Entry::STATE_NOT_READ ? ' selected="selected"' : ''; ?>><?php echo _t('show_adaptive'); ?></option>
+ <option value="<?php echo FreshRSS_Entry::STATE_ALL; ?>"<?php echo $this->conf->default_view === FreshRSS_Entry::STATE_ALL ? ' selected="selected"' : ''; ?>><?php echo _t('show_all_articles'); ?></option>
+ <option value="<?php echo FreshRSS_Entry::STATE_STRICT + FreshRSS_Entry::STATE_NOT_READ; ?>"<?php echo $this->conf->default_view === FreshRSS_Entry::STATE_STRICT + FreshRSS_Entry::STATE_NOT_READ ? ' selected="selected"' : ''; ?>><?php echo _t('show_not_reads'); ?></option>
+ </select>
</div>
</div>
diff --git a/app/views/configure/shortcut.phtml b/app/views/configure/shortcut.phtml
index bfb13f003..a4029b676 100644
--- a/app/views/configure/shortcut.phtml
+++ b/app/views/configure/shortcut.phtml
@@ -103,6 +103,21 @@
</div>
</div>
+ <div class="form-group">
+ <label class="group-name" for="user_filter_shortcut"><?php echo Minz_Translate::t ('user_filter'); ?></label>
+ <div class="group-controls">
+ <input type="text" id="user_filter_shortcut" name="shortcuts[user_filter]" list="keys" value="<?php echo $s['user_filter']; ?>" />
+ <?php echo Minz_Translate::t ('user_filter_help'); ?>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name" for="help_shortcut"><?php echo Minz_Translate::t ('help'); ?></label>
+ <div class="group-controls">
+ <input type="text" id="help_shortcut" name="shortcuts[help]" list="keys" value="<?php echo $s['help']; ?>" />
+ </div>
+ </div>
+
<div class="form-group form-actions">
<div class="group-controls">
<button type="submit" class="btn btn-important"><?php echo Minz_Translate::t ('save'); ?></button>
diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml
index 7144c519a..1139eb446 100644
--- a/app/views/helpers/javascript_vars.phtml
+++ b/app/views/helpers/javascript_vars.phtml
@@ -4,7 +4,8 @@ echo '"use strict";', "\n";
$mark = $this->conf->mark_when;
echo 'var ',
- 'hide_posts=', ($this->conf->display_posts || Minz_Request::param('output') === 'reader') ? 'false' : 'true',
+ 'help_url="', FRESHRSS_WIKI, '"',
+ ',hide_posts=', ($this->conf->display_posts || Minz_Request::param('output') === 'reader') ? 'false' : 'true',
',display_order="', Minz_Request::param('order', $this->conf->sort_order), '"',
',auto_mark_article=', $mark['article'] ? 'true' : 'false',
',auto_mark_site=', $mark['site'] ? 'true' : 'false',
@@ -25,7 +26,9 @@ echo ',shortcuts={',
'collapse_entry:"', $s['collapse_entry'], '",',
'load_more:"', $s['load_more'], '",',
'auto_share:"', $s['auto_share'], '",',
- 'focus_search:"', $s['focus_search'], '"',
+ 'focus_search:"', $s['focus_search'], '",',
+ 'user_filter:"', $s['user_filter'], '",',
+ 'help:"', $s['help'], '"',
"},\n";
if (Minz_Request::param ('output') === 'global') {
@@ -48,9 +51,11 @@ echo 'authType="', $authType, '",',
'url_login="', _url ('index', 'login'), '",',
'url_logout="', _url ('index', 'logout'), '",';
-echo 'str_confirmation="', Minz_Translate::t('confirm_action'), '"', ",\n";
+echo 'str_confirmation_default="', Minz_Translate::t('confirm_action'), '"', ",\n";
echo 'str_notif_title_articles="', Minz_Translate::t('notif_title_new_articles'), '"', ",\n";
echo 'str_notif_body_articles="', Minz_Translate::t('notif_body_new_articles'), '"', ",\n";
+echo 'html5_notif_timeout=', $this->conf->html5_notif_timeout,",\n";
+
$autoActualise = Minz_Session::param('actualize_feeds', false);
echo 'auto_actualize_feeds=', $autoActualise ? 'true' : 'false', ";\n";
diff --git a/app/views/helpers/pagination.phtml b/app/views/helpers/pagination.phtml
index f237e1f3e..cea338364 100755
--- a/app/views/helpers/pagination.phtml
+++ b/app/views/helpers/pagination.phtml
@@ -1,26 +1,37 @@
<?php
- $c = Minz_Request::controllerName ();
- $a = Minz_Request::actionName ();
- $params = Minz_Request::params ();
- $markReadUrl = Minz_Session::param ('markReadUrl');
- Minz_Session::_param ('markReadUrl', false);
+ $c = Minz_Request::controllerName();
+ $a = Minz_Request::actionName();
+ $params = Minz_Request::params();
+ $markReadUrl = Minz_Session::param('markReadUrl');
+ Minz_Session::_param('markReadUrl', false);
?>
+<form id="mark-read-pagination" method="post" style="display: none"></form>
+
<ul class="pagination">
<li class="item pager-next">
<?php if (!empty($this->nextId)) { ?>
- <?php $params['next'] = $this->nextId; ?>
- <a id="load_more" href="<?php echo Minz_Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>"><?php echo Minz_Translate::t ('load_more'); ?></a>
+ <?php
+ $params['next'] = $this->nextId;
+ $params['ajax'] = 1;
+ ?>
+ <a id="load_more" href="<?php echo Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)); ?>">
+ <?php echo _t('load_more'); ?>
+ </a>
<?php } elseif ($markReadUrl) { ?>
- <a id="bigMarkAsRead" href="<?php echo $markReadUrl; ?>"<?php if ($this->conf->reading_confirm) { echo ' class="confirm"';} ?>>
- <?php echo Minz_Translate::t ('nothing_to_load'); ?><br />
- <span class="bigTick">✓</span><br />
- <?php echo Minz_Translate::t ('mark_all_read'); ?>
- </a>
+ <button id="bigMarkAsRead"
+ class="as-link <?php echo $this->conf->reading_confirm ? 'confirm' : ''; ?>"
+ form="mark-read-pagination"
+ formaction="<?php echo $markReadUrl; ?>"
+ type="submit">
+ <?php echo _t('nothing_to_load'); ?><br />
+ <span class="bigTick">✓</span><br />
+ <?php echo _t('mark_all_read'); ?>
+ </button>
<?php } else { ?>
- <a id="bigMarkAsRead" href=".">
- <?php echo Minz_Translate::t ('nothing_to_load'); ?><br />
- </a>
+ <a id="bigMarkAsRead" href=".">
+ <?php echo _t('nothing_to_load'); ?><br />
+ </a>
<?php } ?>
</li>
</ul>
diff --git a/app/views/helpers/view/global_view.phtml b/app/views/helpers/view/global_view.phtml
index db937eeae..72bcf4c73 100644
--- a/app/views/helpers/view/global_view.phtml
+++ b/app/views/helpers/view/global_view.phtml
@@ -1,5 +1,6 @@
<?php $this->partial ('nav_menu'); ?>
+<?php if (!empty($this->entries)) { ?>
<div id="stream" class="global categories">
<?php
$arUrl = array('c' => 'index', 'a' => 'index', 'params' => array());
@@ -43,3 +44,10 @@
<div id="panel"<?php echo $this->conf->display_posts ? '' : ' class="hide_posts"'; ?>>
<a class="close" href="#"><?php echo FreshRSS_Themes::icon('close'); ?></a>
</div>
+
+<?php } else { ?>
+<div id="stream" class="prompt alert alert-warn global">
+ <h2><?php echo _t('no_feed_to_display'); ?></h2>
+ <a href="<?php echo _url('configure', 'feed'); ?>"><?php echo _t('think_to_add'); ?></a><br /><br />
+</div>
+<?php } ?>
diff --git a/app/views/helpers/view/normal_view.phtml b/app/views/helpers/view/normal_view.phtml
index 87bf2e22a..1dbf14f4c 100644
--- a/app/views/helpers/view/normal_view.phtml
+++ b/app/views/helpers/view/normal_view.phtml
@@ -183,8 +183,8 @@ if (!empty($this->entries)) {
<?php $this->partial ('nav_entries'); ?>
<?php } else { ?>
-<div id="stream" class="alert alert-warn normal">
- <span class="alert-head"><?php echo Minz_Translate::t ('no_feed_to_display'); ?></span>
- <?php echo Minz_Translate::t ('think_to_add'); ?>
+<div id="stream" class="prompt alert alert-warn normal">
+ <h2><?php echo _t('no_feed_to_display'); ?></h2>
+ <a href="<?php echo _url('configure', 'feed'); ?>"><?php echo _t('think_to_add'); ?></a><br /><br />
</div>
<?php } ?>
diff --git a/app/views/helpers/view/reader_view.phtml b/app/views/helpers/view/reader_view.phtml
index 665f72849..c80dca519 100644
--- a/app/views/helpers/view/reader_view.phtml
+++ b/app/views/helpers/view/reader_view.phtml
@@ -37,8 +37,8 @@ if (!empty($this->entries)) {
</div>
<?php } else { ?>
-<div id="stream" class="alert alert-warn reader">
- <span class="alert-head"><?php echo Minz_Translate::t ('no_feed_to_display'); ?></span>
- <?php echo Minz_Translate::t ('think_to_add'); ?>
+<div id="stream" class="prompt alert alert-warn reader">
+ <h2><?php echo _t('no_feed_to_display'); ?></h2>
+ <a href="<?php echo _url('configure', 'feed'); ?>"><?php echo _t('think_to_add'); ?></a><br /><br />
</div>
<?php } ?>
diff --git a/app/views/index/formLogin.phtml b/app/views/index/formLogin.phtml
index b79c1b614..b05cdced4 100644
--- a/app/views/index/formLogin.phtml
+++ b/app/views/index/formLogin.phtml
@@ -3,7 +3,7 @@
switch (Minz_Configuration::authType()) {
case 'form':
- ?><form id="loginForm" method="post" action="<?php echo _url('index', 'formLogin'); ?>">
+ ?><form id="crypto-form" method="post" action="<?php echo _url('index', 'formLogin'); ?>">
<div>
<label for="username"><?php echo _t('username'); ?></label>
<input type="text" id="username" name="username" size="16" required="required" maxlength="16" pattern="[0-9a-zA-Z]{1,16}" autofocus="autofocus" />
@@ -29,8 +29,15 @@
case 'persona':
?><p>
- <?php echo _i('login'); ?>
- <a class="signin" href="#"><?php echo _t('login_with_persona'); ?></a>
+ <a class="signin btn btn-important" href="#">
+ <?php echo _i('login'); ?>
+ <?php echo _t('login_with_persona'); ?>
+ </a><br /><br />
+
+ <?php echo _i('help'); ?>
+ <small>
+ <a href="<?php echo _url('index', 'resetAuth'); ?>"><?php echo _t('login_persona_problem'); ?></a>
+ </small>
</p><?php
break;
} ?>
diff --git a/app/views/index/resetAuth.phtml b/app/views/index/resetAuth.phtml
new file mode 100644
index 000000000..6d4282c14
--- /dev/null
+++ b/app/views/index/resetAuth.phtml
@@ -0,0 +1,33 @@
+<div class="prompt">
+ <h1><?php echo _t('auth_reset'); ?></h1>
+
+ <?php if (!empty($this->message)) { ?>
+ <p class="alert <?php echo $this->message['status'] === 'bad' ? 'alert-error' : 'alert-warn'; ?>">
+ <span class="alert-head"><?php echo $this->message['title']; ?></span><br />
+ <?php echo $this->message['body']; ?>
+ </p>
+ <?php } ?>
+
+ <?php if (!$this->no_form) { ?>
+ <form id="crypto-form" method="post" action="<?php echo _url('index', 'resetAuth'); ?>">
+ <p class="alert alert-warn">
+ <span class="alert-head"><?php echo _t('attention'); ?></span><br />
+ <?php echo _t('auth_will_reset'); ?>
+ </p>
+
+ <div>
+ <label for="username"><?php echo _t('username_admin'); ?></label>
+ <input type="text" id="username" name="username" size="16" required="required" maxlength="16" pattern="[0-9a-zA-Z]{1,16}" autofocus="autofocus" />
+ </div>
+ <div>
+ <label for="passwordPlain"><?php echo _t('password'); ?></label>
+ <input type="password" id="passwordPlain" required="required" />
+ <input type="hidden" id="challenge" name="challenge" /><br />
+ <noscript><strong><?php echo _t('javascript_should_be_activated'); ?></strong></noscript>
+ </div>
+ <div>
+ <button id="loginButton" type="submit" class="btn btn-important"><?php echo _t('submit'); ?></button>
+ </div>
+ </form>
+ <?php } ?>
+</div>
diff --git a/app/views/stats/idle.phtml b/app/views/stats/idle.phtml
index 2ba5237f7..6f3d4a117 100644
--- a/app/views/stats/idle.phtml
+++ b/app/views/stats/idle.phtml
@@ -1,25 +1,48 @@
<?php $this->partial('aside_stats'); ?>
-<div class="post content">
+<div class="post">
<a href="<?php echo _url('index', 'index'); ?>"><?php echo _t('back_to_rss_feeds'); ?></a>
<h1><?php echo _t('stats_idle'); ?></h1>
<?php
+ $current_url = urlencode(Minz_Url::display(
+ array('c' => 'stats', 'a' => 'idle'),
+ 'php', true
+ ));
+ $nothing = true;
foreach ($this->idleFeeds as $period => $feeds) {
if (!empty($feeds)) {
+ $nothing = false;
?>
<div class="stat">
<h2><?php echo _t($period); ?></h2>
- <ul>
- <?php foreach ($feeds as $feed) { ?>
- <li><a href="<?php echo _url('configure', 'feed', 'id', $feed['id']); ?>" title="<?php echo date('Y-m-d', $feed['last_date']); ?>"><?php echo $feed['name']; ?></a></li>
- <?php } ?>
+ <form id="form-delete" method="post" style="display: none"></form>
+
+ <?php foreach ($feeds as $feed) { ?>
+ <ul class="horizontal-list">
+ <li class="item">
+ <div class="stick">
+ <a class="btn" href="<?php echo _url('index', 'index', 'get', 'f_' . $feed['id']); ?>"><?php echo _i('link'); ?> <?php echo _t('filter'); ?></a>
+ <a class="btn" href="<?php echo _url('configure', 'feed', 'id', $feed['id']); ?>"><?php echo _i('configure'); ?> <?php echo _t('administration'); ?></a>
+ <button class="btn btn-attention confirm" form="form-delete" formaction="<?php echo _url('feed', 'delete', 'id', $feed['id'], 'r', $current_url); ?>"><?php echo _t('delete'); ?></button>
+ </div>
+ </li>
+ <li class="item">
+ <span title="<?php echo timestamptodate($feed['last_date'], false); ?>"><?php echo $feed['name']; ?> (<?php echo _t('number_articles', $feed['nb_articles']); ?>)</span>
+ </li>
</ul>
+ <?php } ?>
</div>
<?php
}
}
+
+ if ($nothing) {
?>
+ <p class="alert alert-warn">
+ <span class="alert-head"><?php echo _t('stats_no_idle'); ?></span>
+ </p>
+ <?php } ?>
</div>
diff --git a/app/views/stats/index.phtml b/app/views/stats/index.phtml
index a48181fe4..412e77e16 100644
--- a/app/views/stats/index.phtml
+++ b/app/views/stats/index.phtml
@@ -1,11 +1,11 @@
<?php $this->partial('aside_stats'); ?>
-<div class="post content">
+<div class="post">
<a href="<?php echo _url ('index', 'index'); ?>"><?php echo _t ('back_to_rss_feeds'); ?></a>
-
+
<h1><?php echo _t ('stats_main'); ?></h1>
- <div class="stat">
+ <div class="stat half">
<h2><?php echo _t ('stats_entry_repartition'); ?></h2>
<table>
<thead>
@@ -38,26 +38,9 @@
</tr>
</tbody>
</table>
- </div>
-
- <div class="stat">
- <h2><?php echo _t ('stats_entry_per_day'); ?></h2>
- <div id="statsEntryPerDay" style="height: 300px"></div>
- </div>
-
- <div class="stat">
- <h2><?php echo _t ('stats_feed_per_category'); ?></h2>
- <div id="statsFeedPerCategory" style="height: 300px"></div>
- <div id="statsFeedPerCategoryLegend"></div>
- </div>
-
- <div class="stat">
- <h2><?php echo _t ('stats_entry_per_category'); ?></h2>
- <div id="statsEntryPerCategory" style="height: 300px"></div>
- <div id="statsEntryPerCategoryLegend"></div>
- </div>
-
- <div class="stat">
+ </div><!--
+
+ --><div class="stat half">
<h2><?php echo _t ('stats_top_feed'); ?></h2>
<table>
<thead>
@@ -70,7 +53,7 @@
<tbody>
<?php foreach ($this->topFeed as $feed): ?>
<tr>
- <td><?php echo $feed['name']; ?></td>
+ <td><a href="<?php echo _url('stats', 'repartition', 'id', $feed['id']); ?>"><?php echo $feed['name']; ?></a></td>
<td><?php echo $feed['category']; ?></td>
<td class="numeric"><?php echo formatNumber($feed['count']); ?></td>
</tr>
@@ -78,6 +61,23 @@
</tbody>
</table>
</div>
+
+ <div class="stat">
+ <h2><?php echo _t ('stats_entry_per_day'); ?></h2>
+ <div id="statsEntryPerDay" style="height: 300px"></div>
+ </div>
+
+ <div class="stat half">
+ <h2><?php echo _t ('stats_feed_per_category'); ?></h2>
+ <div id="statsFeedPerCategory" style="height: 300px"></div>
+ <div id="statsFeedPerCategoryLegend"></div>
+ </div><!--
+
+ --><div class="stat half">
+ <h2><?php echo _t ('stats_entry_per_category'); ?></h2>
+ <div id="statsEntryPerCategory" style="height: 300px"></div>
+ <div id="statsEntryPerCategoryLegend"></div>
+ </div>
</div>
<script>
diff --git a/app/views/stats/repartition.phtml b/app/views/stats/repartition.phtml
index 9d2eb28e4..b425c1458 100644
--- a/app/views/stats/repartition.phtml
+++ b/app/views/stats/repartition.phtml
@@ -1,6 +1,6 @@
<?php $this->partial('aside_stats'); ?>
-<div class="post content">
+<div class="post ">
<a href="<?php echo _url('index', 'index'); ?>"><?php echo _t('back_to_rss_feeds'); ?></a>
<h1><?php echo _t('stats_repartition'); ?></h1>
@@ -10,12 +10,12 @@
<?php foreach ($this->categories as $category) {
$feeds = $category->feeds();
if (!empty($feeds)) {
- echo '<optgroup label=', $category->name(), '>';
+ echo '<optgroup label="', $category->name(), '">';
foreach ($feeds as $feed) {
if ($this->feed && $feed->id() == $this->feed->id()){
- echo '<option value ="', $feed->id(), '" selected data-url="', _url('stats', 'repartition', 'id', $feed->id()), '">', $feed->name(), '</option>';
+ echo '<option value="', $feed->id(), '" selected="selected" data-url="', _url('stats', 'repartition', 'id', $feed->id()), '">', $feed->name(), '</option>';
} else {
- echo '<option value ="', $feed->id(), '" data-url="', _url('stats', 'repartition', 'id', $feed->id()), '">', $feed->name(), '</option>';
+ echo '<option value="', $feed->id(), '" data-url="', _url('stats', 'repartition', 'id', $feed->id()), '">', $feed->name(), '</option>';
}
}
echo '</optgroup>';
@@ -24,8 +24,8 @@
</select>
<?php if ($this->feed) {?>
- <a href="<?php echo _url('configure', 'feed', 'id', $this->feed->id()); ?>">
- <?php echo _t('administration'); ?>
+ <a class="btn" href="<?php echo _url('configure', 'feed', 'id', $this->feed->id()); ?>">
+ <?php echo _i('configure'); ?> <?php echo _t('administration'); ?>
</a>
<?php }?>
@@ -34,12 +34,12 @@
<div id="statsEntryPerHour" style="height: 300px"></div>
</div>
- <div class="stat">
+ <div class="stat half">
<h2><?php echo _t('stats_entry_per_day_of_week'); ?></h2>
<div id="statsEntryPerDayOfWeek" style="height: 300px"></div>
- </div>
+ </div><!--
- <div class="stat">
+ --><div class="stat half">
<h2><?php echo _t('stats_entry_per_month'); ?></h2>
<div id="statsEntryPerMonth" style="height: 300px"></div>
</div>
@@ -56,11 +56,22 @@ function initStats() {
return;
}
// Entry per hour
+ var avg_h = [];
+ for (var i = -1; i <= 24; i++) {
+ avg_h.push([i, <?php echo $this->averageHour?>]);
+ }
Flotr.draw(document.getElementById('statsEntryPerHour'),
- [<?php echo $this->repartitionHour ?>],
+ [{
+ data: <?php echo $this->repartitionHour ?>,
+ bars: {horizontal: false, show: true}
+ }, {
+ data: avg_h,
+ lines: {show: true},
+ label: <?php echo $this->averageHour?>,
+ yaxis: 2
+ }],
{
grid: {verticalLines: false},
- bars: {horizontal: false, show: true},
xaxis: {noTicks: 23,
tickFormatter: function(x) {
var x = parseInt(x);
@@ -70,14 +81,26 @@ function initStats() {
max: 23.9,
tickDecimals: 0},
yaxis: {min: 0},
+ y2axis: {showLabels: false},
mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function(obj) {return numberFormat(obj.y);}}
});
// Entry per day of week
+ var avg_dow = [];
+ for (var i = -1; i <= 7; i++) {
+ avg_dow.push([i, <?php echo $this->averageDayOfWeek?>]);
+ }
Flotr.draw(document.getElementById('statsEntryPerDayOfWeek'),
- [<?php echo $this->repartitionDayOfWeek ?>],
+ [{
+ data: <?php echo $this->repartitionDayOfWeek ?>,
+ bars: {horizontal: false, show: true}
+ }, {
+ data: avg_dow,
+ lines: {show: true},
+ label: <?php echo $this->averageDayOfWeek?>,
+ yaxis: 2
+ }],
{
grid: {verticalLines: false},
- bars: {horizontal: false, show: true},
xaxis: {noTicks: 6,
tickFormatter: function(x) {
var x = parseInt(x),
@@ -88,14 +111,26 @@ function initStats() {
max: 6.9,
tickDecimals: 0},
yaxis: {min: 0},
+ y2axis: {showLabels: false},
mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function(obj) {return numberFormat(obj.y);}}
});
// Entry per month
+ var avg_m = [];
+ for (var i = 0; i <= 13; i++) {
+ avg_m.push([i, <?php echo $this->averageMonth?>]);
+ }
Flotr.draw(document.getElementById('statsEntryPerMonth'),
- [<?php echo $this->repartitionMonth ?>],
+ [{
+ data: <?php echo $this->repartitionMonth ?>,
+ bars: {horizontal: false, show: true}
+ }, {
+ data: avg_m,
+ lines: {show: true},
+ label: <?php echo $this->averageMonth?>,
+ yaxis: 2
+ }],
{
grid: {verticalLines: false},
- bars: {horizontal: false, show: true},
xaxis: {noTicks: 12,
tickFormatter: function(x) {
var x = parseInt(x),
@@ -106,6 +141,7 @@ function initStats() {
max: 12.9,
tickDecimals: 0},
yaxis: {min: 0},
+ y2axis: {showLabels: false},
mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function(obj) {return numberFormat(obj.y);}}
});
diff --git a/app/views/update/apply.phtml b/app/views/update/apply.phtml
new file mode 100644
index 000000000..30566c7ab
--- /dev/null
+++ b/app/views/update/apply.phtml
@@ -0,0 +1,9 @@
+<?php $this->partial('aside_configure'); ?>
+
+<div class="post">
+ <a href="<?php echo _url('index', 'index'); ?>"><?php echo _t('back_to_rss_feeds'); ?></a>
+
+ <h1><?php echo _t('update_system'); ?></h1>
+
+ <?php ask_info_update(); ?>
+</div>
diff --git a/app/views/update/index.phtml b/app/views/update/index.phtml
new file mode 100644
index 000000000..401f6acd6
--- /dev/null
+++ b/app/views/update/index.phtml
@@ -0,0 +1,36 @@
+<?php $this->partial('aside_configure'); ?>
+
+<div class="post">
+ <a href="<?php echo _url('index', 'index'); ?>"><?php echo _t('back_to_rss_feeds'); ?></a>
+
+ <h1><?php echo _t('update_system'); ?></h1>
+
+ <p>
+ <?php echo _i('help'); ?> <?php echo _t('update_last', $this->last_update_time); ?>
+ </p>
+
+ <?php if (!empty($this->message)) { ?>
+ <p class="alert <?php echo $this->message['status'] === 'bad' ? 'alert-error' : 'alert-warn'; ?>">
+ <span class="alert-head"><?php echo $this->message['title']; ?></span>
+ <?php echo $this->message['body']; ?>
+ </p>
+ <?php } elseif ($this->check_last_hour) { ?>
+ <p class="alert alert-warn">
+ <span class="alert-head"><?php echo _t('damn'); ?></span>
+ <?php echo _t('no_update'); ?>
+ </p>
+ <?php } ?>
+
+ <?php
+ if (!$this->check_last_hour &&
+ (empty($this->message) || $this->message['status'] !== 'good')) {
+ ?>
+ <p>
+ <a href="<?php echo _url('update', 'check'); ?>" class="btn"><?php echo _t('update_check'); ?></a>
+ </p>
+ <?php } ?>
+
+ <?php if ($this->update_to_apply) { ?>
+ <a class="btn btn-important" href="<?php echo _url('update', 'apply'); ?>"><?php echo _t('update_apply'); ?></a>
+ <?php } ?>
+</div>