diff options
| author | 2013-03-11 20:26:22 +0100 | |
|---|---|---|
| committer | 2013-03-11 20:26:22 +0100 | |
| commit | e405af1049a6abbee717db0d4e289f4cd4862b67 (patch) | |
| tree | 6f2551ca2ea2f95bd31fd045a86e85caa79a7898 /app | |
| parent | 53aef139b8c61f41fede93b3f58659820b10ccf4 (diff) | |
Màj design + suppression endless_mode + suppression read_mode (reviendra sous une autre forme ?)
Diffstat (limited to 'app')
| -rwxr-xr-x | app/controllers/indexController.php | 2 | ||||
| -rw-r--r-- | app/layout/aside.phtml | 6 | ||||
| -rw-r--r-- | app/layout/layout.phtml | 6 | ||||
| -rwxr-xr-x | app/views/helpers/pagination.phtml | 39 | ||||
| -rw-r--r-- | app/views/index/index.phtml | 20 | ||||
| -rw-r--r-- | app/views/javascript/main.phtml | 10 |
6 files changed, 34 insertions, 49 deletions
diff --git a/app/controllers/indexController.php b/app/controllers/indexController.php index 7d42de67a..bd5f31b08 100755 --- a/app/controllers/indexController.php +++ b/app/controllers/indexController.php @@ -5,8 +5,6 @@ class indexController extends ActionController { View::appendScript (Url::display ('/scripts/smoothscroll.js')); View::appendScript (Url::display ('/scripts/shortcut.js')); View::appendScript (Url::display (array ('c' => 'javascript', 'a' => 'main'))); - View::appendScript (Url::display ('/scripts/endless_mode.js')); - View::appendScript (Url::display ('/scripts/read_mode.js')); $entryDAO = new EntryDAO (); $catDAO = new CategoryDAO (); diff --git a/app/layout/aside.phtml b/app/layout/aside.phtml index 82bd2b051..1432c10ca 100644 --- a/app/layout/aside.phtml +++ b/app/layout/aside.phtml @@ -17,10 +17,6 @@ </li> <?php } ?> - <li> - <a href="<?php echo Url::display (array ('c' => 'feed', 'a' => 'actualize')); ?>">Mettre les flux à jour</a> - </li> - <?php if (login_is_conf ($this->conf)) { ?> <li> <?php if (!is_logged ()) { ?> @@ -47,7 +43,7 @@ <li class="category<?php echo $this->get == $cat->id () ? ' active' : ''; ?>"> <a href="<?php echo Url::display (array ('params' => array ('get' => $cat->id ()))); ?>"> <?php echo $cat->name (); ?> - <span><?php echo $cat->nbFeed (); ?> flux (<?php echo $cat->nbNotRead (); ?>)</span> + <span><?php echo $cat->nbNotRead (); ?> non lu</span> </a> </li> <?php } ?> diff --git a/app/layout/layout.phtml b/app/layout/layout.phtml index de9b76775..5b2adae1e 100644 --- a/app/layout/layout.phtml +++ b/app/layout/layout.phtml @@ -19,9 +19,9 @@ <?php $this->partial ('persona'); ?> <?php if (isset ($this->notification)) { ?> -<div id="notification" class="<?php echo $this->notification['type']; ?>"> -<?php echo $this->notification['content']; ?> -<a class="close" href="">X</a> +<div class="notification <?php echo $this->notification['type']; ?>"> + <?php echo $this->notification['content']; ?> + <a class="close" href="">X</a> </div> <?php } ?> </body> diff --git a/app/views/helpers/pagination.phtml b/app/views/helpers/pagination.phtml index fe9feb0e8..d116302d0 100755 --- a/app/views/helpers/pagination.phtml +++ b/app/views/helpers/pagination.phtml @@ -4,31 +4,24 @@ $params = Request::params (); ?> -<?php if ($this->nbPage > 1) { ?> <ul class="pagination"> - <?php if ($this->currentPage > 1) { ?> - <?php $params[$getteur] = 1; ?> - <li class="pager-first"><a href="<?php echo Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>">« Début</a></li> - <?php $params[$getteur] = $this->currentPage - 1; ?> - <li class="pager-previous"><a href="<?php echo Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>">‹ Précédent</a></li> - <?php } ?> - - <?php for ($i = $this->currentPage - 2; $i <= $this->currentPage + 2; $i++) { ?> - <?php if($i > 0 && $i <= $this->nbPage) { ?> - <?php if ($i != $this->currentPage) { ?> - <?php $params[$getteur] = $i; ?> - <li class="pager-item"><a href="<?php echo Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>"><?php echo $i; ?></a></li> - <?php } else { ?> - <li class="pager-current"><?php echo $i; ?></li> - <?php } ?> - <?php } ?> - <?php } ?> - + <li class="item pager-next"> <?php if ($this->currentPage < $this->nbPage) { ?> <?php $params[$getteur] = $this->currentPage + 1; ?> - <li class="pager-next"><a href="<?php echo Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>">Suivant ›</a></li> - <?php $params[$getteur] = $this->nbPage; ?> - <li class="pager-last"><a href="<?php echo Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>">Fin »</a></li> + <a href="<?php echo Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>">‹ Anciens</a> + <?php } else { ?> + + <?php } ?> + </li> + + <li class="item pager-current">page <?php echo $this->currentPage; ?> / <?php echo $this->nbPage; ?></li> + + <li class="item pager-previous"> + <?php if ($this->currentPage > 1) { ?> + <?php $params[$getteur] = $this->currentPage - 1; ?> + <a href="<?php echo Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>">Récents ›</a> + <?php } else { ?> + <?php } ?> + </li> </ul> -<?php } ?> diff --git a/app/views/index/index.phtml b/app/views/index/index.phtml index 711ed5b2c..429792b71 100644 --- a/app/views/index/index.phtml +++ b/app/views/index/index.phtml @@ -2,38 +2,38 @@ <?php if (!empty ($items)) { ?> <div id="top"> + <a class="btn" href="<?php echo Url::display (array ('c' => 'feed', 'a' => 'actualize')); ?>"><i class="refresh"></i></a> + <?php if (!login_is_conf ($this->conf) || is_logged ()) { ?> - <a class="read_all" href="<?php echo Url::display (array ('c' => 'entry', 'a' => 'read', 'params' => array ('is_read' => 1))); ?>">Tout marquer comme lu</a><?php } ?><!-- + <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><?php } ?><!-- <?php if ($this->mode == 'not_read') { ?> - --><a class="print_all" href="<?php echo Url::display (array ('a' => 'changeMode', 'params' => array ('mode' => 'all'))); ?>">Tout afficher</a> + --><a class="print_all btn" href="<?php echo Url::display (array ('a' => 'changeMode', 'params' => array ('mode' => 'all'))); ?>">Tout afficher</a> <?php } else { ?> - --><a class="print_non_read" 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::display (array ('a' => 'changeMode', 'params' => array ('mode' => 'not_read'))); ?>">Afficher les non lus</a> <?php } ?> </div> <div id="stream"> - <?php $this->entryPaginator->render ('pagination.phtml', 'page'); ?> - <?php foreach ($items as $item) { ?> <div class="post flux<?php echo !$item->isRead () ? ' not_read' : ''; ?><?php echo $item->isFavorite () ? ' favorite' : ''; ?>" id="flux_<?php echo $item->id (); ?>"> <ul class="flux_header"> <li class="item manage"> <?php if (!login_is_conf ($this->conf) || is_logged ()) { ?> <?php if (!$item->isRead ()) { ?> - <a class="read" href="<?php echo Url::display (array ('c' => 'entry', 'a' => 'read', 'params' => array ('id' => $item->id (), 'is_read' => 1))); ?>"> </a> + <a class="read" href="<?php echo Url::display (array ('c' => 'entry', 'a' => 'read', 'params' => array ('id' => $item->id (), 'is_read' => 1))); ?>"> </a><!-- <?php } else { ?> - <a class="read" href="<?php echo Url::display (array ('c' => 'entry', 'a' => 'read', 'params' => array ('id' => $item->id (), 'is_read' => 0))); ?>"> </a> + <a class="read" href="<?php echo Url::display (array ('c' => 'entry', 'a' => 'read', 'params' => array ('id' => $item->id (), 'is_read' => 0))); ?>"> </a><!-- <?php } ?> <?php if (!$item->isFavorite ()) { ?> - <a class="bookmark" href="<?php echo Url::display (array ('c' => 'entry', 'a' => 'bookmark', 'params' => array ('id' => $item->id (), 'is_favorite' => 1))); ?>"> </a> + --><a class="bookmark" href="<?php echo Url::display (array ('c' => 'entry', 'a' => 'bookmark', 'params' => array ('id' => $item->id (), 'is_favorite' => 1))); ?>"> </a> <?php } else { ?> - <a class="bookmark" href="<?php echo Url::display (array ('c' => 'entry', 'a' => 'bookmark', 'params' => array ('id' => $item->id (), 'is_favorite' => 0))); ?>"> </a> + --><a class="bookmark" href="<?php echo Url::display (array ('c' => 'entry', 'a' => 'bookmark', 'params' => array ('id' => $item->id (), 'is_favorite' => 0))); ?>"> </a> <?php } ?> <?php } ?> </li> <?php $feed = $item->feed (true); ?> - <li class="item website"><a target="_blank" href="<?php echo $feed->website (); ?>"><img src="http://www.google.com/s2/favicons?domain=<?php echo get_domain ($feed->website ()); ?>" alt="" /> <?php echo $feed->name (); ?></a></li> + <li class="item website"><a target="_blank" href="<?php echo $feed->website (); ?>"><img src="http://www.google.com/s2/favicons?domain=<?php echo get_domain ($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 date">le <?php echo $item->date (); ?></li> <li class="item link"><a target="_blank" href="<?php echo $item->link (); ?>"> </a></li> diff --git a/app/views/javascript/main.phtml b/app/views/javascript/main.phtml index cb8f0c0c4..7ea16737b 100644 --- a/app/views/javascript/main.phtml +++ b/app/views/javascript/main.phtml @@ -20,11 +20,11 @@ function slide (new_active, old_active) { old_active.removeClass ("active"); new_active.addClass ("active"); - if (hide_posts && !read_mode_on ) { + if (hide_posts) { old_active.children (".content").slideUp (500); new_active.children (".content").slideDown (500, function () { $.smoothScroll({ - offset: new_active.position ().top - 50 + offset: new_active.position ().top }); }); } else { @@ -104,7 +104,7 @@ function mark_favorite (active) { } function init_posts () { - if (hide_posts && !read_mode_on) { + if (hide_posts) { $(".post.flux:not(.active) .content").slideUp (); } @@ -212,10 +212,8 @@ $(document).ready (function () { redirect (url, false); }); shortcut.add("<?php echo $s['go_website']; ?>", function () { - url = $(".post.flux.active h1.title a").attr ("href"); + url = $(".post.flux.active .link a").attr ("href"); redirect (url, true); }); - - $("#categories").height ($('body').height () - $("#categories").position ().top); }); |
