aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-01-27 21:51:24 +0100
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-01-27 21:51:24 +0100
commit7f51bf0d02b410c482fff60c39c4af532fbc683e (patch)
treefa1a418b0b1be15c8703fc211ac373c873561b5a /app
parent4e4b0f717fe0a8378e2b751393a8c19d1ada6eb2 (diff)
parent16fffc16dd4cfddc15d3edb224c27147e7661e13 (diff)
Merge branch 'dev' into beta
Diffstat (limited to 'app')
-rwxr-xr-xapp/Controllers/configureController.php2
-rwxr-xr-xapp/Controllers/indexController.php40
-rwxr-xr-xapp/Controllers/javascriptController.php2
-rw-r--r--app/Controllers/usersController.php1
-rw-r--r--app/FreshRSS.php4
-rw-r--r--app/Models/Configuration.php4
-rw-r--r--app/Models/Feed.php44
-rw-r--r--app/Models/StatsDAO.php205
-rw-r--r--app/i18n/en.php31
-rw-r--r--app/i18n/fr.php29
-rw-r--r--app/i18n/install.en.php2
-rw-r--r--app/i18n/install.fr.php1
-rw-r--r--app/layout/aside_configure.phtml7
-rw-r--r--app/layout/aside_feed.phtml4
-rw-r--r--app/layout/aside_flux.phtml2
-rw-r--r--app/layout/header.phtml6
-rw-r--r--app/layout/layout.phtml2
-rw-r--r--app/layout/nav_menu.phtml11
-rw-r--r--app/views/configure/archiving.phtml2
-rw-r--r--app/views/configure/display.phtml19
-rw-r--r--app/views/configure/feed.phtml18
-rw-r--r--app/views/configure/sharing.phtml12
-rw-r--r--app/views/configure/users.phtml8
-rw-r--r--app/views/helpers/view/normal_view.phtml16
-rw-r--r--app/views/index/formLogin.phtml31
-rw-r--r--app/views/index/index.phtml2
-rw-r--r--app/views/index/stats.phtml125
27 files changed, 484 insertions, 146 deletions
diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php
index 70144a8db..645f9eabf 100755
--- a/app/Controllers/configureController.php
+++ b/app/Controllers/configureController.php
@@ -196,7 +196,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController {
if (Minz_Request::isPost ()) {
$this->view->conf->_sharing (array(
'shaarli' => Minz_Request::param ('shaarli', false),
- 'poche' => Minz_Request::param ('poche', false),
+ 'wallabag' => Minz_Request::param ('wallabag', false),
'diaspora' => Minz_Request::param ('diaspora', false),
'twitter' => Minz_Request::param ('twitter', false),
'g+' => Minz_Request::param ('g+', false),
diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php
index 45ded6fd4..c49054a5c 100755
--- a/app/Controllers/indexController.php
+++ b/app/Controllers/indexController.php
@@ -1,18 +1,7 @@
<?php
class FreshRSS_index_Controller extends Minz_ActionController {
- private $get = false;
private $nb_not_read_cat = 0;
- private $entryDAO;
- private $feedDAO;
- private $catDAO;
-
- function __construct($router) {
- parent::__construct($router);
- $this->entryDAO = new FreshRSS_EntryDAO ();
- $this->feedDAO = new FreshRSS_FeedDAO ();
- $this->catDAO = new FreshRSS_CategoryDAO ();
- }
public function indexAction () {
$output = Minz_Request::param ('output');
@@ -50,8 +39,11 @@ class FreshRSS_index_Controller extends Minz_ActionController {
Minz_View::appendScript (Minz_Url::display ('/scripts/global_view.js?' . @filemtime(PUBLIC_PATH . '/scripts/global_view.js')));
}
- $this->view->cat_aside = $this->catDAO->listCategories ();
- $this->view->nb_favorites = $this->entryDAO->countUnreadReadFavorites ();
+ $catDAO = new FreshRSS_CategoryDAO();
+ $entryDAO = new FreshRSS_EntryDAO();
+
+ $this->view->cat_aside = $catDAO->listCategories ();
+ $this->view->nb_favorites = $entryDAO->countUnreadReadFavorites ();
$this->view->currentName = '';
$this->view->get_c = '';
@@ -125,14 +117,14 @@ class FreshRSS_index_Controller extends Minz_ActionController {
$keepHistoryDefault = $this->view->conf->keep_history_default;
try {
- $entries = $this->entryDAO->listWhere($getType, $getId, $state, $order, $nb + 1, $first, $filter, $date_min, $keepHistoryDefault);
+ $entries = $entryDAO->listWhere($getType, $getId, $state, $order, $nb + 1, $first, $filter, $date_min, $keepHistoryDefault);
// Si on a récupéré aucun article "non lus"
// on essaye de récupérer tous les articles
if ($state === 'not_read' && empty($entries)) {
Minz_Log::record ('Conflicting information about nbNotRead!', Minz_Log::DEBUG);
$this->view->state = 'all';
- $entries = $this->entryDAO->listWhere($getType, $getId, 'all', $order, $nb, $first, $filter, $date_min, $keepHistoryDefault);
+ $entries = $entryDAO->listWhere($getType, $getId, 'all', $order, $nb, $first, $filter, $date_min, $keepHistoryDefault);
}
if (count($entries) <= $nb) {
@@ -170,7 +162,8 @@ class FreshRSS_index_Controller extends Minz_ActionController {
case 'c':
$cat = isset($this->view->cat_aside[$getId]) ? $this->view->cat_aside[$getId] : null;
if ($cat === null) {
- $cat = $this->catDAO->searchById ($getId);
+ $catDAO = new FreshRSS_CategoryDAO();
+ $cat = $catDAO->searchById($getId);
}
if ($cat) {
$this->view->currentName = $cat->name ();
@@ -183,7 +176,8 @@ class FreshRSS_index_Controller extends Minz_ActionController {
case 'f':
$feed = FreshRSS_CategoryDAO::findFeed($this->view->cat_aside, $getId);
if (empty($feed)) {
- $feed = $this->feedDAO->searchById ($getId);
+ $feedDAO = new FreshRSS_FeedDAO();
+ $feed = $feedDAO->searchById($getId);
}
if ($feed) {
$this->view->currentName = $feed->name ();
@@ -198,6 +192,16 @@ class FreshRSS_index_Controller extends Minz_ActionController {
return false;
}
}
+
+ public function statsAction () {
+ $statsDAO = new FreshRSS_StatsDAO ();
+ Minz_View::appendScript (Minz_Url::display ('/scripts/flotr2.min.js?' . @filemtime(PUBLIC_PATH . '/scripts/flotr2.min.js')));
+ $this->view->repartition = $statsDAO->calculateEntryRepartition();
+ $this->view->count = ($statsDAO->calculateEntryCount());
+ $this->view->feedByCategory = $statsDAO->calculateFeedByCategory();
+ $this->view->entryByCategory = $statsDAO->calculateEntryByCategory();
+ $this->view->topFeed = $statsDAO->calculateTopFeed();
+ }
public function aboutAction () {
Minz_View::prependTitle (Minz_Translate::t ('about') . ' · ');
@@ -316,6 +320,8 @@ class FreshRSS_index_Controller extends Minz_ActionController {
} catch (Minz_Exception $me) {
Minz_Log::record('Login failure: ' . $me->getMessage(), Minz_Log::WARNING);
}
+ } else {
+ Minz_Log::record('Invalid credential parameters: user=' . $username . ' challenge=' . $c . ' nonce=' . $nonce, Minz_Log::DEBUG);
}
if (!$ok) {
$notif = array(
diff --git a/app/Controllers/javascriptController.php b/app/Controllers/javascriptController.php
index 02e424437..b879dcd6d 100755
--- a/app/Controllers/javascriptController.php
+++ b/app/Controllers/javascriptController.php
@@ -37,7 +37,7 @@ class FreshRSS_javascript_Controller extends Minz_ActionController {
return; //Success
}
} catch (Minz_Exception $me) {
- Minz_Log::record('Login failure: ' . $me->getMessage(), Minz_Log::WARNING);
+ Minz_Log::record('Nonce failure: ' . $me->getMessage(), Minz_Log::WARNING);
}
}
$this->view->nonce = ''; //Failure
diff --git a/app/Controllers/usersController.php b/app/Controllers/usersController.php
index a044cd25b..8314b75fc 100644
--- a/app/Controllers/usersController.php
+++ b/app/Controllers/usersController.php
@@ -106,6 +106,7 @@ class FreshRSS_users_Controller extends Minz_ActionController {
}
$passwordHash = password_hash($passwordPlain, PASSWORD_BCRYPT, array('cost' => self::BCRYPT_COST));
$passwordPlain = '';
+ $passwordHash = preg_replace('/^\$2[xy]\$/', '\$2a\$', $passwordHash); //Compatibility with bcrypt.js
$ok &= ($passwordHash != '');
}
if (empty($passwordHash)) {
diff --git a/app/FreshRSS.php b/app/FreshRSS.php
index 40e1d23db..c51f91dec 100644
--- a/app/FreshRSS.php
+++ b/app/FreshRSS.php
@@ -106,8 +106,8 @@ class FreshRSS extends Minz_FrontController {
private function loadParamsView () {
Minz_Session::_param ('language', $this->conf->language);
Minz_Translate::init();
- $output = Minz_Request::param ('output');
- if (!$output) {
+ $output = Minz_Request::param ('output', '');
+ if (($output === '') || ($output !== 'normal' && $output !== 'rss' && $output !== 'reader' && $output !== 'global')) {
$output = $this->conf->view_mode;
Minz_Request::_param ('output', $output);
}
diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php
index f3fb76e72..2a7fe95aa 100644
--- a/app/Models/Configuration.php
+++ b/app/Models/Configuration.php
@@ -48,7 +48,7 @@ class FreshRSS_Configuration {
'bottomline_link' => true,
'sharing' => array(
'shaarli' => '',
- 'poche' => '',
+ 'wallabag' => '',
'diaspora' => '',
'twitter' => true,
'g+' => true,
@@ -185,7 +185,7 @@ class FreshRSS_Configuration {
}
}
public function _sharing ($values) {
- $are_url = array ('shaarli', 'poche', 'diaspora');
+ $are_url = array ('shaarli', 'wallabag', 'diaspora');
foreach ($values as $key => $value) {
if (in_array($key, $are_url)) {
$is_url = (
diff --git a/app/Models/Feed.php b/app/Models/Feed.php
index df762c8fa..22c019080 100644
--- a/app/Models/Feed.php
+++ b/app/Models/Feed.php
@@ -187,54 +187,12 @@ class FreshRSS_Feed extends Minz_Model {
Minz_Exception::ERROR
);
} else {
- $feed = new SimplePie ();
- $feed->set_useragent(Minz_Translate::t ('freshrss') . '/' . FRESHRSS_VERSION . ' (' . PHP_OS . '; ' . FRESHRSS_WEBSITE . ') ' . SIMPLEPIE_NAME . '/' . SIMPLEPIE_VERSION);
$url = htmlspecialchars_decode ($this->url, ENT_QUOTES);
if ($this->httpAuth != '') {
$url = preg_replace ('#((.+)://)(.+)#', '${1}' . $this->httpAuth . '@${3}', $url);
}
-
+ $feed = customSimplePie();
$feed->set_feed_url ($url);
- $feed->set_cache_location (CACHE_PATH);
- $feed->set_cache_duration(1500);
- $feed->strip_htmltags (array (
- 'base', 'blink', 'body', 'doctype', 'embed',
- 'font', 'form', 'frame', 'frameset', 'html',
- 'input', 'marquee', 'meta', 'noscript',
- 'object', 'param', 'plaintext', 'script', 'style',
- ));
- $feed->strip_attributes(array_merge($feed->strip_attributes, array(
- 'autoplay', 'onload', 'onunload', 'onclick', 'ondblclick', 'onmousedown', 'onmouseup',
- 'onmouseover', 'onmousemove', 'onmouseout', 'onfocus', 'onblur',
- 'onkeypress', 'onkeydown', 'onkeyup', 'onselect', 'onchange', 'seamless')));
- $feed->add_attributes(array(
- 'img' => array('lazyload' => ''), //http://www.w3.org/TR/resource-priorities/
- 'audio' => array('preload' => 'none'),
- 'iframe' => array('postpone' => '', 'sandbox' => 'allow-scripts allow-same-origin'),
- 'video' => array('postpone' => '', 'preload' => 'none'),
- ));
- $feed->set_url_replacements(array(
- 'a' => 'href',
- 'area' => 'href',
- 'audio' => 'src',
- 'blockquote' => 'cite',
- 'del' => 'cite',
- 'form' => 'action',
- 'iframe' => 'src',
- 'img' => array(
- 'longdesc',
- 'src'
- ),
- 'input' => 'src',
- 'ins' => 'cite',
- 'q' => 'cite',
- 'source' => 'src',
- 'track' => 'src',
- 'video' => array(
- 'poster',
- 'src',
- ),
- ));
$feed->init ();
if ($feed->error ()) {
diff --git a/app/Models/StatsDAO.php b/app/Models/StatsDAO.php
new file mode 100644
index 000000000..60cec7847
--- /dev/null
+++ b/app/Models/StatsDAO.php
@@ -0,0 +1,205 @@
+<?php
+
+class FreshRSS_StatsDAO extends Minz_ModelPdo {
+
+ /**
+ * Calculates entry repartition for all feeds and for main stream.
+ * The repartition includes:
+ * - total entries
+ * - read entries
+ * - unread entries
+ * - favorite entries
+ *
+ * @return type
+ */
+ public function calculateEntryRepartition() {
+ $repartition = array();
+
+ // Generates the repartition for the main stream of entry
+ $sql = <<<SQL
+SELECT COUNT(1) AS `total`,
+COUNT(1) - SUM(e.is_read) AS `unread`,
+SUM(e.is_read) AS `read`,
+SUM(e.is_favorite) AS `favorite`
+FROM {$this->prefix}entry AS e
+, {$this->prefix}feed AS f
+WHERE e.id_feed = f.id
+AND f.priority = 10
+SQL;
+ $stm = $this->bd->prepare($sql);
+ $stm->execute();
+ $res = $stm->fetchAll(PDO::FETCH_ASSOC);
+ $repartition['main_stream'] = $res[0];
+
+ // Generates the repartition for all entries
+ $sql = <<<SQL
+SELECT COUNT(1) AS `total`,
+COUNT(1) - SUM(e.is_read) AS `unread`,
+SUM(e.is_read) AS `read`,
+SUM(e.is_favorite) AS `favorite`
+FROM {$this->prefix}entry AS e
+SQL;
+ $stm = $this->bd->prepare($sql);
+ $stm->execute();
+ $res = $stm->fetchAll(PDO::FETCH_ASSOC);
+ $repartition['all_feeds'] = $res[0];
+
+ return $repartition;
+ }
+
+ /**
+ * Calculates entry count per day on a 30 days period.
+ * Returns the result as a JSON string.
+ *
+ * @return string
+ */
+ public function calculateEntryCount() {
+ $count = array();
+
+ // Generates a list of 30 last day to be sure we always have 30 days.
+ // If we do not do that kind of thing, we'll end up with holes in the
+ // days if the user do not have a lot of feeds.
+ $sql = <<<SQL
+SELECT - (tens.val + units.val + 1) AS day
+FROM (
+ SELECT 0 AS val
+ UNION ALL SELECT 1
+ UNION ALL SELECT 2
+ UNION ALL SELECT 3
+ UNION ALL SELECT 4
+ UNION ALL SELECT 5
+ UNION ALL SELECT 6
+ UNION ALL SELECT 7
+ UNION ALL SELECT 8
+ UNION ALL SELECT 9
+) AS units
+CROSS JOIN (
+ SELECT 0 AS val
+ UNION ALL SELECT 10
+ UNION ALL SELECT 20
+) AS tens
+ORDER BY day ASC
+SQL;
+ $stm = $this->bd->prepare($sql);
+ $stm->execute();
+ $res = $stm->fetchAll(PDO::FETCH_ASSOC);
+ foreach ($res as $value) {
+ $count[$value['day']] = 0;
+ }
+
+ // Get stats per day for the last 30 days and applies the result on
+ // the array created with the last query.
+ $sql = <<<SQL
+SELECT DATEDIFF(FROM_UNIXTIME(e.date), NOW()) AS day,
+COUNT(1) AS count
+FROM {$this->prefix}entry AS e
+WHERE FROM_UNIXTIME(e.date, '%Y%m%d') BETWEEN DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -30 DAY), '%Y%m%d') AND DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -1 DAY), '%Y%m%d')
+GROUP BY day
+ORDER BY day ASC
+SQL;
+ $stm = $this->bd->prepare($sql);
+ $stm->execute();
+ $res = $stm->fetchAll(PDO::FETCH_ASSOC);
+
+ foreach ($res as $value) {
+ $count[$value['day']] = (int) $value['count'];
+ }
+
+ return $this->convertToSerie($count);
+ }
+
+ /**
+ * Calculates feed count per category.
+ * Returns the result as a JSON string.
+ *
+ * @return string
+ */
+ public function calculateFeedByCategory() {
+ $sql = <<<SQL
+SELECT c.name AS label
+, COUNT(f.id) AS data
+FROM {$this->prefix}category AS c,
+{$this->prefix}feed AS f
+WHERE c.id = f.category
+GROUP BY label
+ORDER BY data DESC
+SQL;
+ $stm = $this->bd->prepare($sql);
+ $stm->execute();
+ $res = $stm->fetchAll(PDO::FETCH_ASSOC);
+
+ return $this->convertToPieSerie($res);
+ }
+
+ /**
+ * Calculates entry count per category.
+ * Returns the result as a JSON string.
+ *
+ * @return string
+ */
+ public function calculateEntryByCategory() {
+ $sql = <<<SQL
+SELECT c.name AS label
+, COUNT(e.id) AS data
+FROM {$this->prefix}category AS c,
+{$this->prefix}feed AS f,
+{$this->prefix}entry AS e
+WHERE c.id = f.category
+AND f.id = e.id_feed
+GROUP BY label
+ORDER BY data DESC
+SQL;
+ $stm = $this->bd->prepare($sql);
+ $stm->execute();
+ $res = $stm->fetchAll(PDO::FETCH_ASSOC);
+
+ return $this->convertToPieSerie($res);
+ }
+
+ /**
+ * Calculates the 10 top feeds based on their number of entries
+ *
+ * @return array
+ */
+ public function calculateTopFeed() {
+ $sql = <<<SQL
+SELECT f.id AS id
+, MAX(f.name) AS name
+, MAX(c.name) AS category
+, COUNT(e.id) AS count
+FROM {$this->prefix}category AS c,
+{$this->prefix}feed AS f,
+{$this->prefix}entry AS e
+WHERE c.id = f.category
+AND f.id = e.id_feed
+GROUP BY id
+ORDER BY count DESC
+LIMIT 10
+SQL;
+ $stm = $this->bd->prepare($sql);
+ $stm->execute();
+ return $stm->fetchAll(PDO::FETCH_ASSOC);
+ }
+
+ private function convertToSerie($data) {
+ $serie = array();
+
+ foreach ($data as $key => $value) {
+ $serie[] = array($key, $value);
+ }
+
+ return json_encode($serie);
+ }
+
+ private function convertToPieSerie($data) {
+ $serie = array();
+
+ foreach ($data as $value) {
+ $value['data'] = array(array(0, (int) $value['data']));
+ $serie[] = $value;
+ }
+
+ return json_encode($serie);
+ }
+
+}
diff --git a/app/i18n/en.php b/app/i18n/en.php
index bb983d397..a2cc461c5 100644
--- a/app/i18n/en.php
+++ b/app/i18n/en.php
@@ -11,8 +11,11 @@ return array (
'users' => 'Users',
'categories' => 'Categories',
'category' => 'Category',
+ 'feed' => 'Feed',
+ 'feeds' => 'Feeds',
'shortcuts' => 'Shortcuts',
'about' => 'About',
+ 'stats' => 'Statistics',
'your_rss_feeds' => 'Your RSS feeds',
'add_rss_feed' => 'Add a RSS feed',
@@ -20,7 +23,8 @@ return array (
'import_export_opml' => 'Import / export (OPML)',
'subscription_management' => 'Subscriptions management',
- 'all_feeds' => 'Main stream',
+ 'main_stream' => 'Main stream',
+ 'all_feeds' => 'All feeds',
'favorite_feeds' => 'Favourites (%d)',
'not_read' => '%d unread',
'not_reads' => '%d unread',
@@ -157,7 +161,7 @@ return array (
'not_yet_implemented' => 'Not yet implemented',
'access_protected_feeds' => 'Connection allows to access HTTP protected RSS feeds',
'no_selected_feed' => 'No feed selected.',
- 'think_to_add' => '<a href="./?c=configure&amp;a=feed">Remember to add some RSS feeds!</a>',
+ 'think_to_add' => '<a href="./?c=configure&amp;a=feed">You may add some feeds</a>.',
'current_user' => 'Current user',
'default_user' => 'Username of the default user <small>(maximum 16 alphanumeric characters)</small>',
@@ -206,7 +210,7 @@ return array (
'scroll' => 'during page scrolls',
'upon_reception' => 'upon reception of the article',
'your_shaarli' => 'Your Shaarli',
- 'your_poche' => 'Your Poche',
+ 'your_wallabag' => 'Your wallabag',
'your_diaspora_pod' => 'Your Diaspora* pod',
'sharing' => 'Sharing',
'share' => 'Share',
@@ -217,7 +221,7 @@ return array (
'more_information' => 'More information',
'activate_sharing' => 'Activate sharing',
'shaarli' => 'Shaarli',
- 'poche' => 'Poche',
+ 'wallabag' => 'wallabag',
'diaspora' => 'Diaspora*',
'twitter' => 'Twitter',
'g+' => 'Google+',
@@ -232,7 +236,7 @@ return array (
'by' => 'by',
'load_more' => 'Load more articles',
- 'nothing_to_load' => 'There is no more articles',
+ 'nothing_to_load' => 'There are no more articles',
'rss_feeds_of' => 'RSS feed of %s',
@@ -241,9 +245,10 @@ return array (
'today' => 'Today',
'yesterday' => 'Yesterday',
'before_yesterday' => 'Before yesterday',
+ 'new_article' => 'There are new available articles, click to refresh the page.',
'by_author' => 'By <em>%s</em>',
'related_tags' => 'Related tags',
- 'no_feed_to_display' => 'There is no feed to show yet.',
+ 'no_feed_to_display' => 'There is no article to show.',
'about_freshrss' => 'About FreshRSS',
'project_website' => 'Project website',
@@ -295,5 +300,17 @@ return array (
'Dec' => '\D\e\c\e\m\b\e\r',
// format for date() function, %s allows to indicate month in letter
'format_date' => '%s j\<\s\u\p\>S\<\/\s\u\p\> Y',
- 'format_date_hour' => '%s j\<\s\u\p\>S\<\/\s\u\p\> Y \a\t H\.i',
+ 'format_date_hour' => '%s j\<\s\u\p\>S\<\/\s\u\p\> Y \a\t H\:i',
+
+ 'status_favorites' => 'Favourites',
+ 'status_read' => 'Read',
+ 'status_unread' => 'Unread',
+ 'status_total' => 'Total',
+
+ 'stats_entry_repartition' => 'Entries repartition',
+ 'stats_entry_per_day' => 'Entries per day (last 30 days)',
+ 'stats_feed_per_category' => 'Feeds per category',
+ 'stats_entry_per_category' => 'Entries per category',
+ 'stats_top_feed' => 'Top ten feeds',
+ 'stats_entry_count' => 'Entry count',
);
diff --git a/app/i18n/fr.php b/app/i18n/fr.php
index 2c44aa8d0..9ab06ba26 100644
--- a/app/i18n/fr.php
+++ b/app/i18n/fr.php
@@ -11,8 +11,11 @@ return array (
'users' => 'Utilisateurs',
'categories' => 'Catégories',
'category' => 'Catégorie',
+ 'feed' => 'Flux',
+ 'feeds' => 'Flux',
'shortcuts' => 'Raccourcis',
'about' => 'À propos',
+ 'stats' => 'Statistiques',
'your_rss_feeds' => 'Vos flux RSS',
'add_rss_feed' => 'Ajouter un flux RSS',
@@ -20,7 +23,8 @@ return array (
'import_export_opml' => 'Importer / exporter (OPML)',
'subscription_management' => 'Gestion des abonnements',
- 'all_feeds' => 'Flux principal',
+ 'main_stream' => 'Flux principal',
+ 'all_feeds' => 'Tous les flux',
'favorite_feeds' => 'Favoris (%d)',
'not_read' => '%d non lu',
'not_reads' => '%d non lus',
@@ -157,7 +161,7 @@ return array (
'not_yet_implemented' => 'Pas encore implémenté',
'access_protected_feeds' => 'La connexion permet d’accéder aux flux protégés par une authentification HTTP',
'no_selected_feed' => 'Aucun flux sélectionné.',
- 'think_to_add' => '<a href="./?c=configure&amp;a=feed">Pensez à en ajouter !</a>',
+ 'think_to_add' => '<a href="./?c=configure&amp;a=feed">Vous pouvez ajouter des flux</a>.',
'current_user' => 'Utilisateur actuel',
'password_form' => 'Mot de passe<br /><small>(pour connexion par formulaire)</small>',
@@ -206,7 +210,7 @@ return array (
'scroll' => 'au défilement de la page',
'upon_reception' => 'dès la réception du nouvel article',
'your_shaarli' => 'Votre Shaarli',
- 'your_poche' => 'Votre Poche',
+ 'your_wallabag' => 'Votre wallabag',
'your_diaspora_pod' => 'Votre pod Diaspora*',
'sharing' => 'Partage',
'share' => 'Partager',
@@ -217,7 +221,7 @@ return array (
'more_information' => 'Plus d’informations',
'activate_sharing' => 'Activer le partage',
'shaarli' => 'Shaarli',
- 'poche' => 'Poche',
+ 'wallabag' => 'wallabag',
'diaspora' => 'Diaspora*',
'twitter' => 'Twitter',
'g+' => 'Google+',
@@ -241,9 +245,10 @@ return array (
'today' => 'Aujourd’hui',
'yesterday' => 'Hier',
'before_yesterday' => 'À partir d’avant-hier',
+ 'new_article' => 'Il y a de nouveaux articles disponibles, cliquez pour rafraîchir la page.',
'by_author' => 'Par <em>%s</em>',
'related_tags' => 'Tags associés',
- 'no_feed_to_display' => 'Il n’y a aucun flux à afficher pour l’instant.',
+ 'no_feed_to_display' => 'Il n’y a aucun article à afficher.',
'about_freshrss' => 'À propos de FreshRSS',
'project_website' => 'Site du projet',
@@ -295,5 +300,17 @@ return array (
'Dec' => '\d\é\c\e\m\b\r\e',
// format pour la fonction date(), %s permet d'indiquer le mois en toutes lettres
'format_date' => 'j %s Y',
- 'format_date_hour' => '\l\e j %s Y \à H\:i',
+ 'format_date_hour' => 'j %s Y \à H\:i',
+
+ 'status_favorites' => 'favoris',
+ 'status_read' => 'lus',
+ 'status_unread' => 'non lus',
+ 'status_total' => 'total',
+
+ 'stats_entry_repartition' => 'Répartition des articles',
+ 'stats_entry_per_day' => 'Nombre d’articles par jour (30 derniers jours)',
+ 'stats_feed_per_category' => 'Flux par catégorie',
+ 'stats_entry_per_category' => 'Articles par catégorie',
+ 'stats_top_feed' => 'Les dix plus gros flux',
+ 'stats_entry_count' => 'Nombre d’articles',
);
diff --git a/app/i18n/install.en.php b/app/i18n/install.en.php
index 1c24c7d7e..0311ee9a4 100644
--- a/app/i18n/install.en.php
+++ b/app/i18n/install.en.php
@@ -58,6 +58,8 @@ return array (
'update_start' => 'Start update process',
'update_long' => 'This can take a long time, depending on the size of your database. You may have to wait for this page to time out (~5 minutes) and then refresh this page.',
+ 'update_end' => 'Update process is completed, now you can go to the final step.',
+
'installation_is_ok' => 'The installation process was successful.<br />The final step will now attempt to delete the <kbd>./p/i/install.php</kbd> file and any database backup created during the update process.<br />You may choose to skip this step and delete <kbd>./p/i/install.php</kbd> manually.',
'finish_installation' => 'Complete installation',
diff --git a/app/i18n/install.fr.php b/app/i18n/install.fr.php
index 68927df6d..bb183642f 100644
--- a/app/i18n/install.fr.php
+++ b/app/i18n/install.fr.php
@@ -58,6 +58,7 @@ return array (
'update_start' => 'Lancer la mise à jour',
'update_long' => 'Ce processus peut prendre longtemps, selon la taille de votre base de données. Vous aurez peut-être à attendre que cette page dépasse son temps maximum d’exécution (~5 minutes) puis à la recharger.',
+ 'update_end' => 'La mise à jour est terminée, vous pouvez maintenant passer à l’étape finale.',
'installation_is_ok' => 'L’installation s’est bien passée.<br />La dernière étape va maintenant tenter de supprimer le fichier <kbd>./p/i/install.php</kbd>, ainsi que d’éventuelles copies de base de données créées durant le processus de mise à jour.<br />Vous pouvez choisir de sauter cette étape et de supprimer <kbd>./p/i/install.php</kbd> manuellement.',
'finish_installation' => 'Terminer l’installation',
diff --git a/app/layout/aside_configure.phtml b/app/layout/aside_configure.phtml
index 89f63e36c..27f11ab6d 100644
--- a/app/layout/aside_configure.phtml
+++ b/app/layout/aside_configure.phtml
@@ -1,8 +1,5 @@
<ul class="nav nav-list aside">
<li class="nav-header"><?php echo Minz_Translate::t ('configuration'); ?></li>
- <li class="item<?php echo Minz_Request::actionName () == 'users' ? ' active' : ''; ?>">
- <a href="<?php echo _url ('configure', 'users'); ?>"><?php echo Minz_Translate::t ('users'); ?></a>
- </li>
<li class="item<?php echo Minz_Request::actionName () == 'display' ? ' active' : ''; ?>">
<a href="<?php echo _url ('configure', 'display'); ?>"><?php echo Minz_Translate::t ('reading_configuration'); ?></a>
</li>
@@ -15,4 +12,8 @@
<li class="item<?php echo Minz_Request::actionName () == 'shortcut' ? ' active' : ''; ?>">
<a href="<?php echo _url ('configure', 'shortcut'); ?>"><?php echo Minz_Translate::t ('shortcuts'); ?></a>
</li>
+ <li class="separator"></li>
+ <li class="item<?php echo Minz_Request::actionName () == 'users' ? ' active' : ''; ?>">
+ <a href="<?php echo _url ('configure', 'users'); ?>"><?php echo Minz_Translate::t ('users'); ?></a>
+ </li>
</ul>
diff --git a/app/layout/aside_feed.phtml b/app/layout/aside_feed.phtml
index 2446e72cb..e324b15bd 100644
--- a/app/layout/aside_feed.phtml
+++ b/app/layout/aside_feed.phtml
@@ -27,10 +27,10 @@
<li class="dropdown-header"><?php echo Minz_Translate::t ('http_authentication'); ?></li>
<li class="input">
- <input type="text" name="http_user" id="http_user" autocomplete="off" placeholder="<?php echo Minz_Translate::t ('username'); ?>" />
+ <input type="text" name="http_user" id="http_user_add" autocomplete="off" placeholder="<?php echo Minz_Translate::t ('username'); ?>" />
</li>
<li class="input">
- <input type="password" name="http_pass" id="http_pass" autocomplete="off" placeholder="<?php echo Minz_Translate::t ('password'); ?>" />
+ <input type="password" name="http_pass" id="http_pass_add" autocomplete="off" placeholder="<?php echo Minz_Translate::t ('password'); ?>" />
</li>
</ul>
</div>
diff --git a/app/layout/aside_flux.phtml b/app/layout/aside_flux.phtml
index f7d8b12b9..1e3211886 100644
--- a/app/layout/aside_flux.phtml
+++ b/app/layout/aside_flux.phtml
@@ -23,7 +23,7 @@
<div class="category all">
<a data-unread="<?php echo $this->nb_not_read; ?>" class="btn<?php echo $this->get_c == 'a' ? ' active' : ''; ?>" href="<?php echo Minz_Url::display($arUrl); ?>">
<?php echo FreshRSS_Themes::icon('all'); ?>
- <?php echo Minz_Translate::t ('all_feeds'); ?>
+ <?php echo Minz_Translate::t ('main_stream'); ?>
</a>
</div>
</li>
diff --git a/app/layout/header.phtml b/app/layout/header.phtml
index d43f682b0..eef53a3fd 100644
--- a/app/layout/header.phtml
+++ b/app/layout/header.phtml
@@ -36,7 +36,7 @@ if (Minz_Configuration::canLogIn()) {
<form action="<?php echo _url ('index', 'index'); ?>" method="get">
<div class="stick">
<?php $search = Minz_Request::param ('search', ''); ?>
- <input type="search" name="search" id="search" value="<?php echo $search; ?>" placeholder="<?php echo Minz_Translate::t ('search'); ?>" />
+ <input type="search" name="search" id="search" class="extend" value="<?php echo $search; ?>" placeholder="<?php echo Minz_Translate::t ('search'); ?>" />
<?php $get = Minz_Request::param ('get', ''); ?>
<?php if($get != '') { ?>
@@ -67,12 +67,14 @@ if (Minz_Configuration::canLogIn()) {
<ul class="dropdown-menu">
<li class="dropdown-close"><a href="#close">❌</a></li>
<li class="dropdown-header"><?php echo Minz_Translate::t ('configuration'); ?></li>
- <li class="item"><a href="<?php echo _url ('configure', 'users'); ?>"><?php echo Minz_Translate::t ('users'); ?></a></li>
<li class="item"><a href="<?php echo _url ('configure', 'display'); ?>"><?php echo Minz_Translate::t ('reading_configuration'); ?></a></li>
<li class="item"><a href="<?php echo _url ('configure', 'archiving'); ?>"><?php echo Minz_Translate::t ('archiving_configuration'); ?></a></li>
<li class="item"><a href="<?php echo _url ('configure', 'sharing'); ?>"><?php echo Minz_Translate::t ('sharing'); ?></a></li>
<li class="item"><a href="<?php echo _url ('configure', 'shortcut'); ?>"><?php echo Minz_Translate::t ('shortcuts'); ?></a></li>
<li class="separator"></li>
+ <li class="item"><a href="<?php echo _url ('configure', 'users'); ?>"><?php echo Minz_Translate::t ('users'); ?></a></li>
+ <li class="separator"></li>
+ <li class="item"><a href="<?php echo _url ('index', 'stats'); ?>"><?php echo Minz_Translate::t ('stats'); ?></a></li>
<li class="item"><a href="<?php echo _url ('index', 'about'); ?>"><?php echo Minz_Translate::t ('about'); ?></a></li>
<li class="item"><a href="<?php echo _url ('index', 'logs'); ?>"><?php echo Minz_Translate::t ('logs'); ?></a></li>
<?php
diff --git a/app/layout/layout.phtml b/app/layout/layout.phtml
index e67d8a791..d6a1737ee 100644
--- a/app/layout/layout.phtml
+++ b/app/layout/layout.phtml
@@ -28,7 +28,7 @@
<meta name="msapplication-TileColor" content="#FFF" />
<meta name="robots" content="noindex,nofollow" />
</head>
- <body>
+ <body class="<?php echo Minz_Request::param('output', 'normal'); ?>">
<?php $this->partial ('header'); ?>
<div id="global">
diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml
index b9ce33295..c807e6dd5 100644
--- a/app/layout/nav_menu.phtml
+++ b/app/layout/nav_menu.phtml
@@ -1,5 +1,10 @@
+<?php
+ $actual_view = Minz_Request::param('output', 'normal');
+?>
<div class="nav_menu">
+ <?php if ($actual_view === 'normal') { ?>
<a class="btn toggle_aside" href="#aside_flux"><?php echo FreshRSS_Themes::icon('category'); ?></a>
+ <?php } ?>
<?php if ($this->loginOk) { ?>
<a id="actualize" class="btn" href="<?php echo _url ('feed', 'actualize'); ?>"><?php echo FreshRSS_Themes::icon('refresh'); ?></a>
@@ -107,9 +112,7 @@
<?php
$url_output = $url;
- $actual_view = Minz_Request::param('output', 'normal');
- ?>
- <?php if($actual_view !== 'normal') { ?>
+ if ($actual_view !== 'normal') { ?>
<li class="item">
<?php $url_output['params']['output'] = 'normal'; ?>
<a class="view_normal" href="<?php echo Minz_Url::display ($url_output); ?>">
@@ -202,7 +205,7 @@
<div class="item search">
<form action="<?php echo _url ('index', 'index'); ?>" method="get">
<?php $search = Minz_Request::param ('search', ''); ?>
- <input type="search" name="search" value="<?php echo $search; ?>" placeholder="<?php echo Minz_Translate::t ('search_short'); ?>" />
+ <input type="search" name="search" class="extend" value="<?php echo $search; ?>" placeholder="<?php echo Minz_Translate::t ('search_short'); ?>" />
<?php $get = Minz_Request::param ('get', ''); ?>
<?php if($get != '') { ?>
diff --git a/app/views/configure/archiving.phtml b/app/views/configure/archiving.phtml
index 6e26ca81e..e144d0f45 100644
--- a/app/views/configure/archiving.phtml
+++ b/app/views/configure/archiving.phtml
@@ -39,7 +39,7 @@
<div class="form-group">
<p class="group-name"><?php echo Minz_Translate::t('current_user'); ?></p>
<div class="group-controls">
- <p><?php echo $this->nb_total, ' ', Minz_Translate::t('articles'), ', ', formatBytes($this->size_user); ?></p>
+ <p><?php echo formatNumber($this->nb_total), ' ', Minz_Translate::t('articles'), ', ', formatBytes($this->size_user); ?></p>
<input type="hidden" name="optimiseDatabase" value="1" />
<button type="submit" class="btn btn-important"><?php echo Minz_Translate::t('optimize_bdd'); ?></button>
<?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t('optimize_todo_sometimes'); ?>
diff --git a/app/views/configure/display.phtml b/app/views/configure/display.phtml
index 725356c8d..9104e4ef1 100644
--- a/app/views/configure/display.phtml
+++ b/app/views/configure/display.phtml
@@ -21,14 +21,17 @@
<div class="form-group">
<label class="group-name" for="theme"><?php echo Minz_Translate::t ('theme'); ?></label>
<div class="group-controls">
- <select name="theme" id="theme" required="">
- <option></option>
- <?php foreach ($this->themes as $theme) { ?>
- <option value="<?php echo $theme['id']; ?>"<?php echo $this->conf->theme === $theme['id'] ? ' selected="selected"' : ''; ?>>
- <?php echo $theme['name'] . ' — ' . Minz_Translate::t ('by') . ' ' . $theme['author']; ?>
- </option>
- <?php } ?>
- </select>
+ <select name="theme" id="theme" required=""><?php
+ $found = false;
+ foreach ($this->themes as $theme) {
+ ?><option value="<?php echo $theme['id']; ?>"<?php if ($this->conf->theme === $theme['id']) { echo ' selected="selected"'; $found = true; } ?>><?php
+ echo $theme['name'] . ' — ' . Minz_Translate::t ('by') . ' ' . $theme['author'];
+ ?></option><?php
+ }
+ if (!$found) {
+ ?><option selected="selected"></option><?php
+ }
+ ?></select>
</div>
</div>
diff --git a/app/views/configure/feed.phtml b/app/views/configure/feed.phtml
index fc26ab58b..138808a9f 100644
--- a/app/views/configure/feed.phtml
+++ b/app/views/configure/feed.phtml
@@ -16,26 +16,26 @@
<div class="form-group">
<label class="group-name" for="name"><?php echo Minz_Translate::t ('title'); ?></label>
<div class="group-controls">
- <input type="text" name="name" id="name" value="<?php echo $this->flux->name () ; ?>" />
+ <input type="text" name="name" id="name" class="extend" value="<?php echo $this->flux->name () ; ?>" />
</div>
</div>
<div class="form-group">
- <label class="group-name"><?php echo Minz_Translate::t ('feed_description'); ?></label>
+ <label class="group-name" for="description"><?php echo Minz_Translate::t ('feed_description'); ?></label>
<div class="group-controls">
<textarea name="description" id="description"><?php echo htmlspecialchars($this->flux->description(), ENT_NOQUOTES, 'UTF-8'); ?></textarea>
</div>
</div>
<div class="form-group">
- <label class="group-name"><?php echo Minz_Translate::t ('website_url'); ?></label>
+ <label class="group-name" for="website"><?php echo Minz_Translate::t ('website_url'); ?></label>
<div class="group-controls">
- <input type="text" name="website" id="website" value="<?php echo $this->flux->website (); ?>" />
+ <input type="text" name="website" id="website" class="extend" value="<?php echo $this->flux->website (); ?>" />
<a target="_blank" href="<?php echo $this->flux->website (); ?>"><?php echo FreshRSS_Themes::icon('link'); ?></a>
</div>
</div>
<div class="form-group">
- <label class="group-name"><?php echo Minz_Translate::t ('feed_url'); ?></label>
+ <label class="group-name" for="url"><?php echo Minz_Translate::t ('feed_url'); ?></label>
<div class="group-controls">
- <input type="text" name="url" id="url" value="<?php echo $this->flux->url (); ?>" />
+ <input type="text" name="url" id="url" class="extend" value="<?php echo $this->flux->url (); ?>" />
<a target="_blank" href="<?php echo $this->flux->url (); ?>"><?php echo FreshRSS_Themes::icon('link'); ?></a>
  <a class="btn" target="_blank" href="http://validator.w3.org/feed/check.cgi?url=<?php echo $this->flux->url (); ?>"><?php echo Minz_Translate::t ('feed_validator'); ?></a>
</div>
@@ -106,13 +106,13 @@
<div class="form-group">
<label class="group-name" for="http_user"><?php echo Minz_Translate::t ('http_username'); ?></label>
<div class="group-controls">
- <input type="text" name="http_user" id="http_user" value="<?php echo $auth['username']; ?>" autocomplete="off" />
+ <input type="text" name="http_user" id="http_user" class="extend" value="<?php echo $auth['username']; ?>" autocomplete="off" />
<?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t ('access_protected_feeds'); ?>
</div>
<label class="group-name" for="http_pass"><?php echo Minz_Translate::t ('http_password'); ?></label>
<div class="group-controls">
- <input type="password" name="http_pass" id="http_pass" value="<?php echo $auth['password']; ?>" autocomplete="off" />
+ <input type="password" name="http_pass" id="http_pass" class="extend" value="<?php echo $auth['password']; ?>" autocomplete="off" />
</div>
</div>
@@ -127,7 +127,7 @@
<div class="form-group">
<label class="group-name" for="path_entries"><?php echo Minz_Translate::t ('css_path_on_website'); ?></label>
<div class="group-controls">
- <input type="text" name="path_entries" id="path_entries" value="<?php echo $this->flux->pathEntries (); ?>" placeholder="<?php echo Minz_Translate::t ('blank_to_disable'); ?>" />
+ <input type="text" name="path_entries" id="path_entries" class="extend" value="<?php echo $this->flux->pathEntries (); ?>" placeholder="<?php echo Minz_Translate::t ('blank_to_disable'); ?>" />
<?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t ('retrieve_truncated_feeds'); ?>
</div>
</div>
diff --git a/app/views/configure/sharing.phtml b/app/views/configure/sharing.phtml
index c6a96b48a..e3ea11665 100644
--- a/app/views/configure/sharing.phtml
+++ b/app/views/configure/sharing.phtml
@@ -10,20 +10,20 @@
<?php echo Minz_Translate::t ('your_shaarli'); ?>
</label>
<div class="group-controls">
- <input type="url" id="shaarli" name="shaarli" value="<?php echo $this->conf->sharing ('shaarli'); ?>" placeholder="<?php echo Minz_Translate::t ('blank_to_disable'); ?>" size="64" />
+ <input type="url" id="shaarli" name="shaarli" class="extend" value="<?php echo $this->conf->sharing ('shaarli'); ?>" placeholder="<?php echo Minz_Translate::t ('blank_to_disable'); ?>" size="64" />
<?php echo FreshRSS_Themes::icon('help'); ?> <a target="_blank" href="http://sebsauvage.net/wiki/doku.php?id=php:shaarli"><?php echo Minz_Translate::t ('more_information'); ?></a>
</div>
</div>
<div class="form-group">
- <label class="group-name" for="poche">
- <?php echo Minz_Translate::t ('your_poche'); ?>
+ <label class="group-name" for="wallabag">
+ <?php echo Minz_Translate::t ('your_wallabag'); ?>
</label>
<div class="group-controls">
- <input type="url" id="poche" name="poche" value="<?php echo $this->conf->sharing ('poche'); ?>" placeholder="<?php echo Minz_Translate::t ('blank_to_disable'); ?>" size="64" />
+ <input type="url" id="wallabag" name="wallabag" class="extend" value="<?php echo $this->conf->sharing ('wallabag'); ?>" placeholder="<?php echo Minz_Translate::t ('blank_to_disable'); ?>" size="64" />
- <?php echo FreshRSS_Themes::icon('help'); ?> <a target="_blank" href="http://www.inthepoche.com/"><?php echo Minz_Translate::t ('more_information'); ?></a>
+ <?php echo FreshRSS_Themes::icon('help'); ?> <a target="_blank" href="http://www.wallabag.org"><?php echo Minz_Translate::t ('more_information'); ?></a>
</div>
</div>
@@ -32,7 +32,7 @@
<?php echo Minz_Translate::t ('your_diaspora_pod'); ?>
</label>
<div class="group-controls">
- <input type="url" id="diaspora" name="diaspora" value="<?php echo $this->conf->sharing ('diaspora'); ?>" placeholder="<?php echo Minz_Translate::t ('blank_to_disable'); ?>" size="64" />
+ <input type="url" id="diaspora" name="diaspora" class="extend" value="<?php echo $this->conf->sharing ('diaspora'); ?>" placeholder="<?php echo Minz_Translate::t ('blank_to_disable'); ?>" size="64" />
<?php echo FreshRSS_Themes::icon('help'); ?> <a target="_blank" href="https://diasporafoundation.org/"><?php echo Minz_Translate::t ('more_information'); ?></a>
</div>
diff --git a/app/views/configure/users.phtml b/app/views/configure/users.phtml
index 990c80acc..8ab4c04ba 100644
--- a/app/views/configure/users.phtml
+++ b/app/views/configure/users.phtml
@@ -29,7 +29,7 @@
<label class="group-name" for="mail_login"><?php echo Minz_Translate::t('persona_connection_email'); ?></label>
<?php $mail = $this->conf->mail_login; ?>
<div class="group-controls">
- <input type="email" id="mail_login" name="mail_login" value="<?php echo $mail; ?>" <?php echo Minz_Configuration::isAdmin(Minz_Session::param('currentUser', '_')) ? '' : 'disabled="disabled"'; ?> placeholder="alice@example.net" />
+ <input type="email" id="mail_login" name="mail_login" class="extend" value="<?php echo $mail; ?>" <?php echo Minz_Configuration::isAdmin(Minz_Session::param('currentUser', '_')) ? '' : 'disabled="disabled"'; ?> placeholder="alice@example.net" />
<noscript><b><?php echo Minz_Translate::t('javascript_should_be_activated'); ?></b></noscript>
</div>
</div>
@@ -49,7 +49,9 @@
<label class="group-name" for="auth_type"><?php echo Minz_Translate::t('auth_type'); ?></label>
<div class="group-controls">
<select id="auth_type" name="auth_type" required="required">
- <option value=""></option>
+ <?php if (!in_array(Minz_Configuration::authType(), array('form', 'persona', 'http_auth', 'none'))) { ?>
+ <option selected="selected"></option>
+ <?php } ?>
<option value="form"<?php echo Minz_Configuration::authType() === 'form' ? ' selected="selected"' : '', version_compare(PHP_VERSION, '5.3', '<') ? ' disabled="disabled"' : ''; ?>><?php echo Minz_Translate::t('auth_form'); ?></option>
<option value="persona"<?php echo Minz_Configuration::authType() === 'persona' ? ' selected="selected"' : '', $this->conf->mail_login == '' ? ' disabled="disabled"' : ''; ?>><?php echo Minz_Translate::t('auth_persona'); ?></option>
<option value="http_auth"<?php echo Minz_Configuration::authType() === 'http_auth' ? ' selected="selected"' : '', httpAuthUser() == '' ? ' disabled="disabled"' : ''; ?>><?php echo Minz_Translate::t('http_auth'); ?> (REMOTE_USER = '<?php echo httpAuthUser(); ?>')</option>
@@ -143,7 +145,7 @@
<label class="group-name" for="new_user_email"><?php echo Minz_Translate::t('persona_connection_email'); ?></label>
<?php $mail = $this->conf->mail_login; ?>
<div class="group-controls">
- <input type="email" id="new_user_email" name="new_user_email" placeholder="alice@example.net" />
+ <input type="email" id="new_user_email" name="new_user_email" class="extend" placeholder="alice@example.net" />
</div>
</div>
diff --git a/app/views/helpers/view/normal_view.phtml b/app/views/helpers/view/normal_view.phtml
index a1df87579..7b7faccee 100644
--- a/app/views/helpers/view/normal_view.phtml
+++ b/app/views/helpers/view/normal_view.phtml
@@ -9,11 +9,11 @@ if (!empty($this->entries)) {
$display_others = true;
if ($this->loginOk) {
$shaarli = $this->conf->sharing ('shaarli');
- $poche = $this->conf->sharing ('poche');
+ $wallabag = $this->conf->sharing ('wallabag');
$diaspora = $this->conf->sharing ('diaspora');
} else {
$shaarli = '';
- $poche = '';
+ $wallabag = '';
$diaspora = '';
}
$twitter = $this->conf->sharing ('twitter');
@@ -30,7 +30,7 @@ if (!empty($this->entries)) {
$bottomline_read = $this->conf->bottomline_read;
$bottomline_favorite = $this->conf->bottomline_favorite;
$bottomline_sharing = $this->conf->bottomline_sharing && (
- $shaarli || $poche || $diaspora || $twitter ||
+ $shaarli || $wallabag || $diaspora || $twitter ||
$google_plus || $facebook || $email || $print);
$bottomline_tags = $this->conf->bottomline_tags;
$bottomline_date = $this->conf->bottomline_date;
@@ -38,6 +38,9 @@ if (!empty($this->entries)) {
?>
<div id="stream" class="normal<?php echo $hidePosts ? ' hide_posts' : ''; ?>"><?php
+ ?><div id="new-article">
+ <a href="<?php echo _url('index', 'index'); ?>"><?php echo Minz_Translate::t ('new_article'); ?></a>
+ </div><?php
foreach ($this->entries as $item) {
if ($display_today && $item->isDay (FreshRSS_Days::TODAY, $this->today)) {
?><div class="day" id="day_today"><?php
@@ -62,7 +65,6 @@ if (!empty($this->entries)) {
?></div><?php
$display_others = false;
}
-
?><div class="flux<?php echo !$item->isRead () ? ' not_read' : ''; ?><?php echo $item->isFavorite () ? ' favorite' : ''; ?>" id="flux_<?php echo $item->id (); ?>">
<ul class="horizontal-list flux_header"><?php
if ($this->loginOk) {
@@ -150,10 +152,10 @@ if (!empty($this->entries)) {
<?php echo Minz_Translate::t ('shaarli'); ?>
</a>
</li>
- <?php } if ($poche) { ?>
+ <?php } if ($wallabag) { ?>
<li class="item">
- <a target="_blank" href="<?php echo $poche . '?action=add&amp;url=' . base64_encode (urldecode($link)); ?>">
- <?php echo Minz_Translate::t ('poche'); ?>
+ <a target="_blank" href="<?php echo $wallabag . '?action=add&amp;url=' . base64_encode (urldecode($link)); ?>">
+ <?php echo Minz_Translate::t ('wallabag'); ?>
</a>
</li>
<?php } if ($diaspora) { ?>
diff --git a/app/views/index/formLogin.phtml b/app/views/index/formLogin.phtml
index cc43bcd19..e4560c1a0 100644
--- a/app/views/index/formLogin.phtml
+++ b/app/views/index/formLogin.phtml
@@ -1,5 +1,4 @@
-<div class="post content">
-
+<div class="prompt">
<?php
if (Minz_Configuration::canLogIn()) {
?><h1><?php echo Minz_Translate::t('login'); ?></h1><?php
@@ -7,25 +6,17 @@ if (Minz_Configuration::canLogIn()) {
case 'form':
?><form id="loginForm" method="post" action="<?php echo _url('index', 'formLogin'); ?>">
- <div class="form-group">
- <label class="group-name" for="username"><?php echo Minz_Translate::t('username'); ?></label>
- <div class="group-controls">
- <input type="text" id="username" name="username" size="16" required="required" maxlength="16" pattern="[0-9a-zA-Z]{1,16}" autofocus="autofocus" />
- </div>
- </div>
- <div class="form-group">
- <label class="group-name" for="passwordPlain"><?php echo Minz_Translate::t('password'); ?></label>
- <div class="group-controls">
+ <p>
+ <label for="username"><?php echo Minz_Translate::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" />
+ </p><p>
+ <label for="passwordPlain"><?php echo Minz_Translate::t('password'); ?></label>
<input type="password" id="passwordPlain" required="required" />
- <input type="hidden" id="challenge" name="challenge" />
+ <input type="hidden" id="challenge" name="challenge" /><br />
<noscript><strong><?php echo Minz_Translate::t('javascript_should_be_activated'); ?></strong></noscript>
- </div>
- </div>
- <div class="form-group form-actions">
- <div class="group-controls">
- <button id="loginButton" type="submit" class="btn btn-important"><?php echo Minz_Translate::t('login'); ?></button>
- </div>
- </div>
+ </p><p>
+ <button id="loginButton" type="submit" class="btn btn-important"><?php echo Minz_Translate::t('login'); ?></button>
+ </p>
</form><?php
break;
@@ -39,5 +30,5 @@ if (Minz_Configuration::canLogIn()) {
}
?>
- <p><a href="<?php echo _url('index', 'about'); ?>"><?php echo Minz_Translate::t('about_freshrss'); ?></a></p>
+<p><a href="<?php echo _url('index', 'about'); ?>"><?php echo Minz_Translate::t('about_freshrss'); ?></a></p>
</div>
diff --git a/app/views/index/index.phtml b/app/views/index/index.phtml
index 9a7c9f3b9..4545a33e4 100644
--- a/app/views/index/index.phtml
+++ b/app/views/index/index.phtml
@@ -12,6 +12,8 @@ if ($this->loginOk || Minz_Configuration::allowAnonymous()) {
} elseif ($output === 'global') {
$this->renderHelper ('view/global_view');
} else {
+ Minz_Request::_param ('output', 'normal');
+ $output = 'normal';
$this->renderHelper ('view/normal_view');
}
} elseif ($output === 'rss') {
diff --git a/app/views/index/stats.phtml b/app/views/index/stats.phtml
new file mode 100644
index 000000000..ae9db172b
--- /dev/null
+++ b/app/views/index/stats.phtml
@@ -0,0 +1,125 @@
+<div class="post content">
+ <a href="<?php echo _url ('index', 'index'); ?>"><?php echo Minz_Translate::t ('back_to_rss_feeds'); ?></a>
+
+ <h1><?php echo Minz_Translate::t ('stats'); ?></h1>
+
+ <div class="stat">
+ <h2><?php echo Minz_Translate::t ('stats_entry_repartition')?></h2>
+ <table>
+ <thead>
+ <tr>
+ <th> </th>
+ <th><?php echo Minz_Translate::t ('main_stream')?></th>
+ <th><?php echo Minz_Translate::t ('all_feeds')?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <th><?php echo Minz_Translate::t ('status_total')?></th>
+ <td class="numeric"><?php echo $this->repartition['main_stream']['total']?></td>
+ <td class="numeric"><?php echo $this->repartition['all_feeds']['total']?></td>
+ </tr>
+ <tr>
+ <th><?php echo Minz_Translate::t ('status_read')?></th>
+ <td class="numeric"><?php echo $this->repartition['main_stream']['read']?></td>
+ <td class="numeric"><?php echo $this->repartition['all_feeds']['read']?></td>
+ </tr>
+ <tr>
+ <th><?php echo Minz_Translate::t ('status_unread')?></th>
+ <td class="numeric"><?php echo $this->repartition['main_stream']['unread']?></td>
+ <td class="numeric"><?php echo $this->repartition['all_feeds']['unread']?></td>
+ </tr>
+ <tr>
+ <th><?php echo Minz_Translate::t ('status_favorites')?></th>
+ <td class="numeric"><?php echo $this->repartition['main_stream']['favorite']?></td>
+ <td class="numeric"><?php echo $this->repartition['all_feeds']['favorite']?></td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
+ <div class="stat">
+ <h2><?php echo Minz_Translate::t ('stats_entry_per_day')?></h2>
+ <div id="statsEntryPerDay" style="height: 300px"></div>
+ </div>
+
+ <div class="stat">
+ <h2><?php echo Minz_Translate::t ('stats_feed_per_category')?></h2>
+ <div id="statsFeedPerCategory" style="height: 300px"></div>
+ <div id="statsFeedPerCategoryLegend"></div>
+ </div>
+
+ <div class="stat">
+ <h2><?php echo Minz_Translate::t ('stats_entry_per_category')?></h2>
+ <div id="statsEntryPerCategory" style="height: 300px"></div>
+ <div id="statsEntryPerCategoryLegend"></div>
+ </div>
+
+ <div class="stat">
+ <h2><?php echo Minz_Translate::t ('stats_top_feed')?></h2>
+ <table>
+ <thead>
+ <tr>
+ <th><?php echo Minz_Translate::t ('feed')?></th>
+ <th><?php echo Minz_Translate::t ('category')?></th>
+ <th><?php echo Minz_Translate::t ('stats_entry_count')?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach ($this->topFeed as $feed):?>
+ <tr>
+ <td><?php echo $feed['name']?></td>
+ <td><?php echo $feed['category']?></td>
+ <td class="numeric"><?php echo $feed['count']?></td>
+ </tr>
+ <?php endforeach;?>
+ </tbody>
+ </table>
+ </div>
+</div>
+
+<script>
+"use strict";
+function initStats() {
+ if (!window.Flotr) {
+ if (window.console) {
+ console.log('FreshRSS waiting for Flotr…');
+ }
+ window.setTimeout(initStats, 50);
+ return;
+ }
+ // Entry per day
+ Flotr.draw(document.getElementById('statsEntryPerDay'),
+ [<?php echo $this->count ?>],
+ {
+ grid: {verticalLines: false},
+ bars: {horizontal: false, show: true},
+ xaxis: {noTicks: 6, showLabels: false, tickDecimals: 0},
+ yaxis: {min: 0},
+ mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function(obj) {return obj.y;}}
+ });
+ // Feed per category
+ Flotr.draw(document.getElementById('statsFeedPerCategory'),
+ <?php echo $this->feedByCategory ?>,
+ {
+ grid: {verticalLines: false, horizontalLines: false},
+ pie: {explode: 10, show: true, labelFormatter: function(){return '';}},
+ xaxis: {showLabels: false},
+ yaxis: {showLabels: false},
+ mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function(obj) {return obj.series.label + ' - '+ obj.y + ' ('+ (obj.fraction * 100).toFixed(1) + '%)';}},
+ legend: {container: document.getElementById('statsFeedPerCategoryLegend'), noColumns: 3}
+ });
+ // Entry per category
+ Flotr.draw(document.getElementById('statsEntryPerCategory'),
+ <?php echo $this->entryByCategory ?>,
+ {
+ grid: {verticalLines: false, horizontalLines: false},
+ pie: {explode: 10, show: true, labelFormatter: function(){return '';}},
+ xaxis: {showLabels: false},
+ yaxis: {showLabels: false},
+ mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function(obj) {return obj.series.label + ' - '+ obj.y + ' ('+ (obj.fraction * 100).toFixed(1) + '%)';}},
+ legend: {container: document.getElementById('statsEntryPerCategoryLegend'), noColumns: 3}
+ });
+}
+initStats();
+</script>