summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-03-16 22:19:27 +0100
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-03-16 22:19:27 +0100
commit8c2b3bfc30caa22258b9569b8a228db0adc90618 (patch)
tree9d4ea433e309bf5bb7a2275f365dcc28bf14f8df /app/views
parent9daa4c14636ca6b70031344f812ac99947b3a2b0 (diff)
Fix bug #27 : le marquer comme lu s'adapte si on ne regarde qu'une catégorie ou qu'un flux
Diffstat (limited to 'app/views')
-rw-r--r--app/views/index/index.phtml20
1 files changed, 16 insertions, 4 deletions
diff --git a/app/views/index/index.phtml b/app/views/index/index.phtml
index df222b5d0..3e213d076 100644
--- a/app/views/index/index.phtml
+++ b/app/views/index/index.phtml
@@ -1,16 +1,28 @@
<?php $this->partial ('aside_flux'); ?>
<div class="nav_menu stick">
- <a class="btn" href="<?php echo Url::display (array ('c' => 'feed', 'a' => 'actualize')); ?>"><i class="icon i_refresh"></i></a>
+ <a class="btn" href="<?php echo _url ('feed', 'actualize'); ?>"><i class="icon i_refresh"></i></a>
+
+ <?php
+ $get = false;
+ $string_mark = 'Tout marquer comme lu';
+ if ($this->get_f) {
+ $get = 'f_' . $this->get_f;
+ $string_mark = 'Marquer le flux comme lu';
+ } elseif ($this->get_c) {
+ $get = 'c_' . $this->get_c;
+ $string_mark = 'Marquer la catégorie comme lue';
+ }
+ ?>
<?php if (!login_is_conf ($this->conf) || is_logged ()) { ?>
- <a class="read_all btn" href="<?php echo Url::display (array ('c' => 'entry', 'a' => 'read', 'params' => array ('is_read' => 1))); ?>">Tout marquer comme lu</a>
+ <a class="read_all btn" href="<?php echo _url ('entry', 'read', 'is_read', 1, 'get', $get); ?>"><?php echo $string_mark; ?></a>
<?php } ?>
<?php if ($this->mode == 'not_read') { ?>
- <a class="print_all btn" href="<?php echo Url::display (array ('a' => 'changeMode', 'params' => array ('mode' => 'all'))); ?>">Tout afficher</a>
+ <a class="print_all btn" href="<?php echo _url ('index', 'changeMode', 'mode', 'all'); ?>">Tout afficher</a>
<?php } else { ?>
- <a class="print_non_read btn" href="<?php echo Url::display (array ('a' => 'changeMode', 'params' => array ('mode' => 'not_read'))); ?>">Afficher les non lus</a>
+ <a class="print_non_read btn" href="<?php echo _url ('index', 'changeMode', 'mode', 'not_read'); ?>">Afficher les non lus</a>
<?php } ?>
</div>