aboutsummaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorGravatar plopoyop <clement@iMac-de-Clement.local> 2014-09-24 20:06:34 +0200
committerGravatar plopoyop <clement@iMac-de-Clement.local> 2014-09-24 20:06:34 +0200
commitc446625c7f6eda76b03fdac228b2f7b4ded74130 (patch)
tree42ab49b32804eeca003dfe69d6456ecf732b8fb1 /app/views
parentffbfbb92cc89c5ae07e0a28ee3477fcd0c44505d (diff)
parenta12d90d85d86c168a6e8a13345f05897f17958a4 (diff)
Merge remote-tracking branch 'upstream/dev' into dev
Diffstat (limited to 'app/views')
-rw-r--r--app/views/configure/categorize.phtml5
-rw-r--r--app/views/configure/feed.phtml30
-rw-r--r--app/views/configure/queries.phtml15
-rw-r--r--app/views/configure/reading.phtml6
-rw-r--r--app/views/helpers/javascript_vars.phtml2
-rwxr-xr-xapp/views/helpers/pagination.phtml4
-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/stats/idle.phtml18
-rw-r--r--app/views/stats/index.phtml2
-rw-r--r--app/views/stats/repartition.phtml4
12 files changed, 72 insertions, 34 deletions
diff --git a/app/views/configure/categorize.phtml b/app/views/configure/categorize.phtml
index 2f0e554ca..23d1c9fa1 100644
--- a/app/views/configure/categorize.phtml
+++ b/app/views/configure/categorize.phtml
@@ -21,7 +21,10 @@
<a class="btn" href="<?php echo _url('index', 'index', 'get', 'c_' . $cat->id ()); ?>">
<?php echo _i('link'); ?>
</a>
- <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>
+ <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/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 3dd457a2b..8b2da2a28 100644
--- a/app/views/configure/reading.phtml
+++ b/app/views/configure/reading.phtml
@@ -10,9 +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 if ($this->conf->display_posts) { ?>
- <?php echo _i('help'); ?> <?php echo _t('number_divided_when_unfolded'); ?>
- <?php } ?>
+ <?php echo _i('help'); ?> <?php echo _t('number_divided_when_reader'); ?>
</div>
</div>
@@ -43,7 +41,7 @@
<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_NOT_READ_STRICT; ?>"<?php echo $this->conf->default_view === FreshRSS_Entry::STATE_NOT_READ_STRICT ? ' selected="selected"' : ''; ?>><?php echo _t('show_not_reads'); ?></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/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml
index bf0ffdb76..1139eb446 100644
--- a/app/views/helpers/javascript_vars.phtml
+++ b/app/views/helpers/javascript_vars.phtml
@@ -51,7 +51,7 @@ 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";
diff --git a/app/views/helpers/pagination.phtml b/app/views/helpers/pagination.phtml
index 1b15cc632..cea338364 100755
--- a/app/views/helpers/pagination.phtml
+++ b/app/views/helpers/pagination.phtml
@@ -6,6 +6,8 @@
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)) { ?>
@@ -19,7 +21,7 @@
<?php } elseif ($markReadUrl) { ?>
<button id="bigMarkAsRead"
class="as-link <?php echo $this->conf->reading_confirm ? 'confirm' : ''; ?>"
- form="mark-read"
+ form="mark-read-pagination"
formaction="<?php echo $markReadUrl; ?>"
type="submit">
<?php echo _t('nothing_to_load'); ?><br />
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/stats/idle.phtml b/app/views/stats/idle.phtml
index 608e2d33c..6f3d4a117 100644
--- a/app/views/stats/idle.phtml
+++ b/app/views/stats/idle.phtml
@@ -6,8 +6,14 @@
<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>
@@ -20,15 +26,23 @@
<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']); ?>"><?php echo _t('delete'); ?></button>
+ <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']; ?></span></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 46cdc2a8b..412e77e16 100644
--- a/app/views/stats/index.phtml
+++ b/app/views/stats/index.phtml
@@ -53,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>
diff --git a/app/views/stats/repartition.phtml b/app/views/stats/repartition.phtml
index ead275696..b425c1458 100644
--- a/app/views/stats/repartition.phtml
+++ b/app/views/stats/repartition.phtml
@@ -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 }?>