aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-04-13 12:24:14 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-04-13 12:24:14 +0200
commit1cc118acdc52895ca500c93b36bbb5cf3a149bc7 (patch)
treed8215d3b80c94b8a7b933a0d6cef000015fc277d /app
parent2f7ecb2e490ade40350a68b902b4ff28e3168cbb (diff)
Ajout partage par mail (voir issue #34) + déplacement des options de partage en bas des articles
Diffstat (limited to 'app')
-rw-r--r--app/App_FrontController.php4
-rw-r--r--app/views/index/index.phtml47
-rw-r--r--app/views/javascript/main.phtml6
3 files changed, 37 insertions, 20 deletions
diff --git a/app/App_FrontController.php b/app/App_FrontController.php
index 1ddbfd89c..b7b060418 100644
--- a/app/App_FrontController.php
+++ b/app/App_FrontController.php
@@ -33,8 +33,8 @@ class App_FrontController extends FrontController {
}
private function loadStylesAndScripts () {
- View::prependStyle (Url::display ('/theme/global.css'));
- View::prependStyle (Url::display ('/theme/freshrss.css'));
+ View::appendStyle (Url::display ('/theme/global.css'));
+ View::appendStyle (Url::display ('/theme/freshrss.css'));
View::appendScript ('https://login.persona.org/include.js');
View::appendScript (Url::display ('/scripts/jquery.js'));
View::appendScript (Url::display ('/scripts/notification.js'));
diff --git a/app/views/index/index.phtml b/app/views/index/index.phtml
index 47118264e..f9e953858 100644
--- a/app/views/index/index.phtml
+++ b/app/views/index/index.phtml
@@ -25,7 +25,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 +39,44 @@ 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 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"><h1><?php echo $item->title (); ?></h1></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>
+ <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>
+ </ul>
+ </div>
+ </li>
+ </ul>
</div>
</div>
<?php } ?>
diff --git a/app/views/javascript/main.phtml b/app/views/javascript/main.phtml
index 05368683c..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);
});
}
@@ -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 () {