aboutsummaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/configure/categorize.phtml11
-rw-r--r--app/views/configure/display.phtml8
-rw-r--r--app/views/configure/feed.phtml17
-rw-r--r--app/views/configure/importExport.phtml2
-rwxr-xr-xapp/views/helpers/rss.phtml (renamed from app/views/rss/public.phtml)11
-rw-r--r--app/views/index/about.phtml2
-rw-r--r--app/views/index/index.phtml62
-rw-r--r--app/views/javascript/actualize.phtml45
-rw-r--r--app/views/javascript/main.phtml8
9 files changed, 130 insertions, 36 deletions
diff --git a/app/views/configure/categorize.phtml b/app/views/configure/categorize.phtml
index 943dd489e..660ddef20 100644
--- a/app/views/configure/categorize.phtml
+++ b/app/views/configure/categorize.phtml
@@ -6,13 +6,18 @@
<form method="post" action="<?php echo _url ('configure', 'categorize'); ?>">
<legend>Gestion des catégories - <a href="<?php echo _url ('configure', 'feed'); ?>">gestion des flux</a></legend>
+ <p class="alert alert-warn">Lors de la suppression d'une catégorie, ses flux seront automatiquement classés dans <em><?php echo $this->defaultCategory->name (); ?></em>.</p>
+
<?php $i = 0; foreach ($this->categories as $cat) { $i++; ?>
<div class="form-group">
- <label class="group-name" for="cat_<?php echo $cat->id (); ?>">Catégorie n°<?php echo $i; ?></label>
+ <label class="group-name" for="cat_<?php echo $cat->id (); ?>">
+ Catégorie n°<?php echo $i; ?>
+ </label>
<div class="group-controls">
<input type="text" id="cat_<?php echo $cat->id (); ?>" name="categories[]" value="<?php echo $cat->name (); ?>" />
- <?php if ($cat->id () == '000000') { ?>
- <i class="icon i_help"></i> ne peut pas être supprimé
+ <a href="<?php echo _url ('feed', 'delete', 'id', $cat->id (), 'type', 'category'); ?>">Vider ?</a> (<?php echo $cat->nbFeed (); ?> flux)
+ <?php if ($cat->id () == $this->defaultCategory->id ()) { ?>
+ <i class="icon i_help"></i> ne peut pas être supprimée
<?php } ?>
<input type="hidden" name="ids[]" value="<?php echo $cat->id (); ?>" />
</div>
diff --git a/app/views/configure/display.phtml b/app/views/configure/display.phtml
index 240428493..79fa4b43c 100644
--- a/app/views/configure/display.phtml
+++ b/app/views/configure/display.phtml
@@ -87,6 +87,14 @@
</div>
</div>
+ <legend>Partage</legend>
+ <div class="form-group">
+ <label class="group-name" for="shaarli">Votre Shaarli</label>
+ <div class="group-controls">
+ <input type="text" id="shaarli" name="shaarli" value="<?php echo $this->conf->urlShaarli (); ?>" placeholder="Laissez vide pour désactiver"/>
+ </div>
+ </div>
+
<div class="form-group form-actions">
<div class="group-controls">
<button type="submit" class="btn btn-important">Valider</button>
diff --git a/app/views/configure/feed.phtml b/app/views/configure/feed.phtml
index 2ac601e3d..adea27e52 100644
--- a/app/views/configure/feed.phtml
+++ b/app/views/configure/feed.phtml
@@ -9,28 +9,25 @@
<form method="post" action="<?php echo _url ('configure', 'feed', 'id', $this->flux->id ()); ?>">
<legend>Informations</legend>
-
<div class="form-group">
<label class="group-name">URL du site</label>
<div class="group-controls">
<span class="control"><a target="_blank" href="<?php echo $this->flux->website (); ?>"><?php echo $this->flux->website (); ?></a></span>
</div>
</div>
-
<div class="form-group">
<label class="group-name">URL du flux</label>
<div class="group-controls">
<span class="control"><a target="_blank" href="<?php echo $this->flux->url (); ?>"><?php echo $this->flux->url (); ?></a></span>
</div>
</div>
-
<div class="form-group">
<label class="group-name">Nombre d'articles</label>
<div class="group-controls">
<span class="control"><?php echo $this->flux->nbEntries (); ?></span>
</div>
</div>
-
+
<legend>Catégorie - <a href="<?php echo _url ('configure', 'categorize'); ?>">gestion</a></legend>
<div class="form-group">
<label class="group-name">Ranger dans une catégorie</label>
@@ -46,13 +43,22 @@
<legend>Avancé</legend>
<div class="form-group">
+ <label class="group-name" for="priority">Afficher dans le flux principal</label>
+ <div class="group-controls">
+ <label class="checkbox" for="priority">
+ <input type="checkbox" name="priority" id="priority" value="10"<?php echo $this->flux->priority () > 0 ? ' checked="checked"' : ''; ?> />
+ Oui
+ </label>
+ </div>
+ </div>
+ <div class="form-group">
<label class="group-name" for="path_entries">Chemin CSS des articles sur le site d'origine</label>
<div class="group-controls">
<input type="text" name="path_entries" id="path_entries" value="<?php echo $this->flux->pathEntries (); ?>" placeholder="Laissez vide pour désactiver" />
<i class="icon i_help"></i> Permet de récupérer les flux tronqués (attention, demande plus de temps !)
</div>
</div>
-
+<!--
<div class="form-group">
<label class="group-name" for="http_user">Username HTTP</label>
<div class="group-controls">
@@ -65,6 +71,7 @@
<input type="text" name="http_pass" id="http_pass" value="Pas encore implémenté" />
</div>
</div>
+-->
<div class="form-group form-actions">
<div class="group-controls">
diff --git a/app/views/configure/importExport.phtml b/app/views/configure/importExport.phtml
index cd677c1eb..34bee4a07 100644
--- a/app/views/configure/importExport.phtml
+++ b/app/views/configure/importExport.phtml
@@ -29,7 +29,7 @@
<div class="group-controls">
<button type="submit" class="btn btn-important">Importer</button>
ou
- <button type="submit" class="btn btn-important" formaction="<?php echo Url::display (array ('c' => 'configure', 'a' => 'importExport', 'params' => array ('q' => 'export'))); ?>">Exporter</button>
+ <a target="_blank" class="btn btn-important" href="<?php echo _url ('configure', 'importExport', 'q', 'export'); ?>">Exporter</a>
</div>
</div>
</form>
diff --git a/app/views/rss/public.phtml b/app/views/helpers/rss.phtml
index 04a035699..1aa0ac44a 100755
--- a/app/views/rss/public.phtml
+++ b/app/views/helpers/rss.phtml
@@ -3,13 +3,12 @@
<channel>
<title><?php echo View::title(); ?></title>
<link><?php echo Url::display(); ?></link>
- <description>Flux public de <?php echo View::title(); ?></description>
- <language>fr</language>
+ <description>Flux RSS de <?php echo View::title(); ?></description>
<pubDate><?php echo date('D, d M Y H:i:s O'); ?></pubDate>
<lastBuildDate><?php echo gmdate('D, d M Y H:i:s'); ?> GMT</lastBuildDate>
- <atom:link href="<?php echo Url::display(array('a' => 'rss')); ?>" rel="self" type="application/rss+xml" />
+ <atom:link href="<?php echo _url ('index', 'index', 'output', 'rss'); ?>" rel="self" type="application/rss+xml" />
<?php
-$items = $this->itemPaginator->items ();
+$items = $this->entryPaginator->items ();
foreach ($items as $item) {
?>
<item>
@@ -20,10 +19,10 @@ foreach ($items as $item) {
<dc:creator><?php echo $author; ?></dc:creator>
<?php } ?>
<description><![CDATA[<?php
- echo html_entity_decode($item->notes (false, false));
+ echo $item->content ();
?>]]></description>
<pubDate><?php echo date('D, d M Y H:i:s O', $item->date (true)); ?></pubDate>
- <guid><?php echo $item->guid (); ?></guid>
+ <guid isPermaLink="false"><?php echo $item->id (); ?></guid>
</item>
<?php } ?>
diff --git a/app/views/index/about.phtml b/app/views/index/about.phtml
index ad3eb6cc6..73f5f4001 100644
--- a/app/views/index/about.phtml
+++ b/app/views/index/about.phtml
@@ -20,5 +20,5 @@
<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>
<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.
+ 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.
</div>
diff --git a/app/views/index/index.phtml b/app/views/index/index.phtml
index 53d7a2412..6889a8b51 100644
--- a/app/views/index/index.phtml
+++ b/app/views/index/index.phtml
@@ -1,3 +1,10 @@
+<?php
+if (Request::param ('output', '') == 'rss') {
+ $this->renderHelper ('rss');
+ return;
+}
+?>
+
<?php $this->partial ('aside_flux'); ?>
<?php $this->partial ('nav_menu'); ?>
@@ -25,7 +32,7 @@ if (isset ($this->entryPaginator)) {
<?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,27 +46,50 @@ 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 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 title"><?php echo $item->title (); ?></li>
<li class="item date">le <?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">Par <em>' . $author . '</em></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>
+ <?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>
+ <?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>
+
+ <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>
+ <?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>
+ <?php } ?>
+ </ul>
+ </div>
+ </li>
+ </ul>
</div>
</div>
<?php } ?>
diff --git a/app/views/javascript/actualize.phtml b/app/views/javascript/actualize.phtml
new file mode 100644
index 000000000..16188422a
--- /dev/null
+++ b/app/views/javascript/actualize.phtml
@@ -0,0 +1,45 @@
+var feeds = new Array ();
+<?php foreach ($this->feeds as $feed) { ?>
+feeds.push ("<?php echo Url::display (array ('c' => 'feed', 'a' => 'actualize', 'params' => array ('id' => $feed->id (), 'ajax' => '1')), 'php'); ?>");
+<?php } ?>
+
+function initProgressBar (init) {
+ if (init) {
+ $("body").after ("\<div id=\"actualizeProgress\" class=\"actualizeProgress\">\
+ Actualisation <span class=\"progress\">0 / " + feeds.length + "</span><br />\
+ <progress id=\"actualizeProgressBar\" value=\"0\" max=\"" + feeds.length + "\"></progress>\
+ </div>");
+ } else {
+ window.location.reload ();
+ }
+}
+function updateProgressBar (i) {
+ $("#actualizeProgressBar").val(i);
+ $("#actualizeProgress .progress").html (i + " / " + feeds.length);
+}
+
+function updateFeeds () {
+ initProgressBar (true);
+
+ var i = 0;
+ for (var f in feeds) {
+ $.ajax ({
+ type: 'POST',
+ url: feeds[f],
+ }).done (function (data) {
+ i++;
+ updateProgressBar (i);
+
+ if (i == feeds.length) {
+ initProgressBar (false);
+ }
+ });
+ }
+}
+
+$(document).ready (function () {
+ $("#actualize").click (function () {
+ updateFeeds ();
+ return false;
+ });
+});
diff --git a/app/views/javascript/main.phtml b/app/views/javascript/main.phtml
index 4f049e11d..e6c882333 100644
--- a/app/views/javascript/main.phtml
+++ b/app/views/javascript/main.phtml
@@ -26,10 +26,10 @@ function toggleContent (new_active, old_active) {
}
if (hide_posts) {
- old_active.children (".content").toggle (0);
+ old_active.children (".flux_content").toggle (0);
if (old_active[0] != new_active[0]) {
- new_active.children (".content").toggle (0, function () {
+ new_active.children (".flux_content").toggle (0, function () {
$("html,body").scrollTop (new_active.position ().top);
});
}
@@ -110,7 +110,7 @@ function mark_favorite (active) {
function init_img () {
$(".flux .content img").each (function () {
- if ($(this).width () > ($("#stream").width()) / 2) {
+ if ($(this).width () > ($("#stream .content").width()) / 2) {
$(this).addClass("big");
}
});
@@ -127,7 +127,7 @@ function init_posts () {
init_img ();
if (hide_posts) {
- $(".flux:not(.active) .content").hide ();
+ $(".flux:not(.active) .flux_content").hide ();
}
$(".flux_header .item.title, .flux_header .item.date").click (function () {