summaryrefslogtreecommitdiff
path: root/app/views/index
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-05-05 13:20:13 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-05-05 13:20:13 +0200
commit2e7afb7d340eb367d65ac042ae24a10fa021c073 (patch)
tree27208483aac8262cdc42ee492a0f222991a0b4fa /app/views/index
parentae7c9787cd8afd4313d356c6525e40d4ce79f99b (diff)
parentd4e6176a1ae210c011b14839023f91b4014f2881 (diff)
Merge branch 'releases'0.3.0
Diffstat (limited to 'app/views/index')
-rw-r--r--app/views/index/about.phtml24
-rw-r--r--app/views/index/index.phtml72
2 files changed, 55 insertions, 41 deletions
diff --git a/app/views/index/about.phtml b/app/views/index/about.phtml
index 73f5f4001..7c228b581 100644
--- a/app/views/index/about.phtml
+++ b/app/views/index/about.phtml
@@ -1,24 +1,24 @@
<div class="post content">
- <a href="<?php echo _url ('index', 'index'); ?>">← Retour à vos flux RSS</a>
+ <a href="<?php echo _url ('index', 'index'); ?>"><?php echo Translate::t ('back_to_rss_feeds'); ?></a>
- <h1>À propos de FreshRSS</h1>
+ <h1><?php echo Translate::t ('about_freshrss'); ?></h1>
<dl class="infos">
- <dt>Url du projet</dt>
+ <dt><?php echo Translate::t ('project_website'); ?></dt>
<dd><a href="https://github.com/marienfressinaud/FreshRSS">https://github.com/marienfressinaud/FreshRSS</a></dd>
- <dt>Développeur principal</dt>
- <dd><a href="mailto:contact@marienfressinaud.fr">Marien Fressinaud</a> - <a href="http://marienfressinaud.fr">site Internet</a></dd>
+ <dt><?php echo Translate::t ('lead_developer'); ?></dt>
+ <dd><a href="mailto:contact@marienfressinaud.fr">Marien Fressinaud</a> - <a href="http://marienfressinaud.fr"><?php echo Translate::t ('website'); ?></a></dd>
- <dt>Pour les rapports de bugs</dt>
- <dd><a href="https://github.com/marienfressinaud/FreshRSS/issues">sur Github</a> ou <a href="mailto:dev@marienfressinaud.fr">par mail</a></dd>
+ <dt><?php echo Translate::t ('bugs_reports'); ?></dt>
+ <dd><?php echo Translate::t ('github_or_email'); ?></dd>
- <dt>Licence</dt>
- <dd><a href="https://www.gnu.org/licenses/agpl-3.0.html">AGPL 3</a></dd>
+ <dt><?php echo Translate::t ('license'); ?></dt>
+ <dd><?php echo Translate::t ('agpl3'); ?></dd>
</dl>
- <p>FreshRSS est un agrégateur de flux RSS à auto-héberger à l'image de <a href="http://rsslounge.aditu.de/">RSSLounge</a>, <a href="http://tt-rss.org/redmine/projects/tt-rss/wiki">TinyTinyRSS</a> ou <a href="http://projet.idleman.fr/leed/">Leed</a>. Il se veut léger et facile à prendre en main tout en étant un outil puissant et paramétrable. L'objectif étant d'offrir une alternative sérieuse au futur feu-Google Reader.</p>
+ <p><?php echo Translate::t ('freshrss_description'); ?></p>
- <h1>Crédits</h1>
- Des éléments de design sont issus du <a href="http://twitter.github.io/bootstrap/">projet Bootstrap</a> bien que FreshRSS n'utilise pas ce framework. Les <a href="https://git.gnome.org/browse/gnome-icon-theme-symbolic">icônes</a> sont issues du <a href="https://www.gnome.org/">projet GNOME</a>. La police <em>Open Sans</em> utilisée a été créée par <a href="https://www.google.com/webfonts/specimen/Open+Sans">Steve Matteson</a>. Les favicons sont récupérés grâce au site <a href="https://getfavicon.appspot.com/">getFavicon</a>. FreshRSS repose sur <a href="https://github.com/marienfressinaud/MINZ">Minz</a>, un framework PHP.
+ <h1><?php echo Translate::t ('credits'); ?></h1>
+ <p><?php echo Translate::t ('credits_content'); ?></p>
</div>
diff --git a/app/views/index/index.phtml b/app/views/index/index.phtml
index 6889a8b51..0e09f84df 100644
--- a/app/views/index/index.phtml
+++ b/app/views/index/index.phtml
@@ -1,18 +1,16 @@
<?php
-if (Request::param ('output', '') == 'rss') {
- $this->renderHelper ('rss');
- return;
-}
-?>
-
-<?php $this->partial ('aside_flux'); ?>
+$output = Request::param ('output', 'normal');
-<?php $this->partial ('nav_menu'); ?>
+if ($output == 'rss') {
+ $this->renderHelper ('rss');
+} else {
+ $this->partial ('aside_flux');
+ $this->partial ('nav_menu');
-<?php
-if (isset ($this->entryPaginator)) {
- $items = $this->entryPaginator->items (true);
+ if (isset ($this->entryPaginator) && !$this->entryPaginator->isEmpty ()) {
+ $items = $this->entryPaginator->items ();
?>
+
<div id="stream">
<?php
$display_today = true;
@@ -22,13 +20,13 @@ if (isset ($this->entryPaginator)) {
<?php foreach ($items as $item) { ?>
<?php if ($display_today && $item->isDay (Days::TODAY)) { ?>
- <div class="day">Aujourd'hui - <?php echo timestamptodate (time (), false); ?></div>
+ <div class="day"><?php echo Translate::t ('today'); ?> - <?php echo timestamptodate (time (), false); ?></div>
<?php $display_today = false; } ?>
<?php if ($display_yesterday && $item->isDay (Days::YESTERDAY)) { ?>
- <div class="day">Hier - <?php echo timestamptodate (time () - 86400, false); ?></div>
+ <div class="day"><?php echo Translate::t ('yesterday'); ?> - <?php echo timestamptodate (time () - 86400, false); ?></div>
<?php $display_yesterday = false; } ?>
<?php if ($display_others && $item->isDay (Days::BEFORE_YESTERDAY)) { ?>
- <div class="day">À partir d'avant-hier</div>
+ <div class="day"><?php echo Translate::t ('before_yesterday'); ?></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 (); ?>">
@@ -49,9 +47,9 @@ if (isset ($this->entryPaginator)) {
</li>
<?php } ?>
<?php $feed = $item->feed (true); ?>
- <li class="item website"><a href="<?php echo _url ('index', 'index', 'get', 'f_' . $feed->id ()); ?>"><img class="favicon" src="http://g.etfv.co/<?php echo $feed->website (); ?>" alt="" /> <span><?php echo $feed->name (); ?></span></a></li>
+ <li class="item website"><a href="<?php echo _url ('index', 'index', 'get', 'f_' . $feed->id ()); ?>"><img class="favicon" src="<?php echo $feed->favicon (); ?>" alt="" /> <span><?php echo $feed->name (); ?></span></a></li>
<li class="item title"><?php echo $item->title (); ?></li>
- <li class="item date">le <?php echo $item->date (); ?></li>
+ <li class="item date"><?php echo $item->date (); ?></li>
<li class="item link"><a target="_blank" href="<?php echo $item->link (); ?>">&nbsp;</a></li>
</ul>
@@ -59,48 +57,64 @@ if (isset ($this->entryPaginator)) {
<div class="content">
<h1 class="title"><?php echo $item->title (); ?></h1>
<?php $author = $item->author (); ?>
- <?php echo $author != '' ? '<div class="author">Par <em>' . $author . '</em></div>' : ''; ?>
+ <?php echo $author != '' ? '<div class="author">' . Translate::t ('by_author', $author) . '</div>' : ''; ?>
<?php echo $item->content (); ?>
</div>
<ul class="horizontal-list bottom">
<li class="item">
<?php if ($item->notes () != '') { ?>
- <i class="icon i_note"></i> <a class="note" href="<?php echo _url ('entry', 'note', 'id', $item->id ()); ?>">Modifier votre note</a>
+ <i class="icon i_note"></i> <a class="note" href="<?php echo _url ('entry', 'note', 'id', $item->id ()); ?>"><?php echo Translate::t ('update_note'); ?></a>
<?php } else { ?>
- <i class="icon i_note_empty"></i> <a class="note" href="<?php echo _url ('entry', 'note', 'id', $item->id ()); ?>">Ajouter une note</a>
+ <i class="icon i_note_empty"></i> <a class="note" href="<?php echo _url ('entry', 'note', 'id', $item->id ()); ?>"><?php echo Translate::t ('add_note'); ?></a>
<?php } ?>
</li>
<li class="item">
<div class="dropdown">
<div id="dropdown-share-<?php echo $item->id ();?>" class="dropdown-target"></div>
- <i class="icon i_share"></i> <a class="dropdown-toggle" href="#dropdown-share-<?php echo $item->id ();?>">Partager</a>
+ <i class="icon i_share"></i> <a class="dropdown-toggle" href="#dropdown-share-<?php echo $item->id ();?>"><?php echo Translate::t ('share'); ?></a>
<ul class="dropdown-menu">
<li class="dropdown-close"><a href="#close"><i class="icon i_close"></i></a></li>
- <li class="item"><a href="mailto:?subject=<?php echo $item->title (); ?>&amp;body=J'ai trouvé cet article intéressant, tu peux le lire à cette adresse : <?php echo urlencode($item->link ()); ?>">Par mail</a></li>
+ <li class="item"><a href="mailto:?subject=<?php echo $item->title (); ?>&amp;body=J'ai trouvé cet article intéressant, tu peux le lire à cette adresse : <?php echo urlencode($item->link ()); ?>"><?php echo Translate::t ('by_email'); ?></a></li>
<?php
$shaarli = $this->conf->urlShaarli ();
if ($shaarli) {
?>
- <li class="item"><a target="_blank" href="<?php echo $shaarli . '?post=' . urlencode($item->link ()) . '&amp;title=' . urlencode ($item->title ()) . '&amp;source=bookmarklet'; ?>">Shaarli</a></li>
+ <li class="item"><a target="_blank" href="<?php echo $shaarli . '?post=' . urlencode($item->link ()) . '&amp;title=' . urlencode ($item->title ()) . '&amp;source=bookmarklet'; ?>"><?php echo Translate::t ('on_shaarli'); ?></a></li>
<?php } ?>
</ul>
</div>
</li>
+ <?php $tags = $item->tags(); ?>
+ <?php if(!empty($tags)) { ?>
+ <li class="item">
+ <div class="dropdown">
+ <div id="dropdown-tags-<?php echo $item->id ();?>" class="dropdown-target"></div>
+ <i class="icon i_tag"></i> <a class="dropdown-toggle" href="#dropdown-tags-<?php echo $item->id ();?>"><?php echo Translate::t ('related_tags'); ?></a>
+
+ <ul class="dropdown-menu">
+ <li class="dropdown-close"><a href="#close"><i class="icon i_close"></i></a></li>
+
+ <?php foreach($tags as $tag) { ?>
+ <li class="item"><span><?php echo $tag; ?></span></li>
+ <?php } ?>
+ </ul>
+ </div>
+ </li>
+ <?php } ?>
</ul>
</div>
</div>
<?php } ?>
- <?php $this->entryPaginator->render ('pagination.phtml', 'page'); ?>
+ <?php $this->entryPaginator->render ('pagination.phtml', 'next'); ?>
</div>
-<?php } else { ?>
-<div class="alert">
- <span class="alert-head">Il n'y a aucun flux à afficher.</span>
- <?php if (Session::param ('mode', 'all') == 'not_read') { ?>
- <a class="print_all" href="<?php echo _url ('index', 'changeMode', 'mode', 'all'); ?>">Afficher tous les articles ?</a>
- <?php } ?>
+
+ <?php } else { ?>
+<div class="alert alert-warn">
+ <span class="alert-head"><?php echo Translate::t ('no_feed_to_display'); ?></span>
</div>
+ <?php } ?>
<?php } ?>