aboutsummaryrefslogtreecommitdiff
path: root/app/views/index
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-05-05 13:29:31 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-05-05 13:29:31 +0200
commit51e9a7abe10b312a6887c75c5a9d51812d356cb4 (patch)
tree27208483aac8262cdc42ee492a0f222991a0b4fa /app/views/index
parent044908439bdd7280f7539e12441d7dfa6c4d4c63 (diff)
parentd4e6176a1ae210c011b14839023f91b4014f2881 (diff)
Merge branch 'releases' into hotfixes
Diffstat (limited to 'app/views/index')
-rw-r--r--app/views/index/about.phtml24
-rw-r--r--app/views/index/index.phtml108
2 files changed, 88 insertions, 44 deletions
diff --git a/app/views/index/about.phtml b/app/views/index/about.phtml
index ad3eb6cc6..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>
- Les <a href="https://git.gnome.org/browse/gnome-icon-theme-symbolic">icônes</a> sont issus 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 53d7a2412..0e09f84df 100644
--- a/app/views/index/index.phtml
+++ b/app/views/index/index.phtml
@@ -1,11 +1,16 @@
-<?php $this->partial ('aside_flux'); ?>
+<?php
+$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;
@@ -15,17 +20,17 @@ 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 (); ?>">
- <ul class="flux_header">
+ <ul class="horizontal-list flux_header">
<?php if (!login_is_conf ($this->conf) || is_logged ()) { ?>
<li class="item manage">
<?php if (!$item->isRead ()) { ?>
@@ -39,38 +44,77 @@ if (isset ($this->entryPaginator)) {
<?php } else { ?>
<a class="bookmark" href="<?php echo _url ('entry', 'bookmark', 'id', $item->id (), 'is_favorite', 0); ?>">&nbsp;</a>
<?php } ?>
-
- <a class="note" href="<?php echo _url ('entry', 'note', 'id', $item->id ()); ?>">
- <?php if ($item->notes () != '') { ?>
- <i class="icon i_note"></i>
- <?php } else { ?>
- <i class="icon i_note_empty"></i>
- <?php } ?>
- </a>
</li>
<?php } ?>
<?php $feed = $item->feed (true); ?>
- <li class="item website"><a target="_blank" href="<?php echo $feed->website (); ?>"><img class="favicon" src="http://g.etfv.co/<?php echo $feed->website (); ?>" alt="favicon <?php echo $feed->name (); ?>" /> <span><?php echo $feed->name (); ?></span></a></li>
- <li class="item title"><h1><?php echo $item->title (); ?></h1></li>
- <li class="item date">le <?php echo $item->date (); ?></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"><?php echo $item->date (); ?></li>
<li class="item link"><a target="_blank" href="<?php echo $item->link (); ?>">&nbsp;</a></li>
</ul>
-
- <div class="content">
- <?php $author = $item->author (); ?>
- <?php echo $author != '' ? '<div class="author">Par <em>' . $author . '</em></div>' : ''; ?>
- <?php echo $item->content (); ?>
+
+ <div class="flux_content">
+ <div class="content">
+ <h1 class="title"><?php echo $item->title (); ?></h1>
+ <?php $author = $item->author (); ?>
+ <?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 ()); ?>"><?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 ()); ?>"><?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 ();?>"><?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 ()); ?>"><?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'; ?>"><?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 } ?>