diff options
| author | 2013-03-13 19:09:29 +0100 | |
|---|---|---|
| committer | 2013-03-13 19:09:29 +0100 | |
| commit | 8c72acbacb8fd4da39d505e8ac52e7e0cceed418 (patch) | |
| tree | 85f1d8445a29e9d374fa1b399ed843b779f01fdd /app/views | |
| parent | c62ec2a14428b528e20896d4e62fa08891e1399c (diff) | |
Suppression code HTML inutile + amélioration CSS + restructuration du layout + correction bug mise à jour d'articles lorsqu'on visualise une catégorie
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/configure/categorize.phtml | 4 | ||||
| -rw-r--r-- | app/views/configure/display.phtml | 4 | ||||
| -rw-r--r-- | app/views/configure/feed.phtml | 77 | ||||
| -rw-r--r-- | app/views/configure/importExport.phtml | 4 | ||||
| -rw-r--r-- | app/views/configure/shortcut.phtml | 4 | ||||
| -rwxr-xr-x | app/views/helpers/pagination.phtml | 16 | ||||
| -rw-r--r-- | app/views/index/index.phtml | 4 | ||||
| -rw-r--r-- | app/views/javascript/main.phtml | 2 |
8 files changed, 47 insertions, 68 deletions
diff --git a/app/views/configure/categorize.phtml b/app/views/configure/categorize.phtml index 9f03c187f..3e6bbdc47 100644 --- a/app/views/configure/categorize.phtml +++ b/app/views/configure/categorize.phtml @@ -1,6 +1,6 @@ -<div class="table"> - <?php $this->partial ('configure_aside'); ?> +<?php $this->partial ('aside_configure'); ?> +<div class="table"> <form method="post" action=""> <h1>Gérer les catégories</h1> diff --git a/app/views/configure/display.phtml b/app/views/configure/display.phtml index b468839c2..188499a61 100644 --- a/app/views/configure/display.phtml +++ b/app/views/configure/display.phtml @@ -1,6 +1,6 @@ -<div class="table"> - <?php $this->partial ('configure_aside'); ?> +<?php $this->partial ('aside_configure'); ?> +<div class="table"> <form method="post" action=""> <h1>Configuration générale</h1> diff --git a/app/views/configure/feed.phtml b/app/views/configure/feed.phtml index 1b8d77595..53b4d7939 100644 --- a/app/views/configure/feed.phtml +++ b/app/views/configure/feed.phtml @@ -1,54 +1,31 @@ -<div class="table"> - <?php /* $this->partial ('configure_aside'); */ ?> +<?php $this->partial ('aside_feed'); ?> - <div class="aside"> - <ul> - <li><h2>Vox flux RSS</h2></li> - <?php if (!login_is_conf ($this->conf) || is_logged ()) { ?> - <li><form id="add_rss" method="post" action="<?php echo Url::display (array ('c' => 'feed', 'a' => 'add')); ?>"> - <input type="url" name="url_rss" placeholder="Ajouter un flux RSS" /> - <input type="submit" value="+" /> - </form></li> - <?php } ?> - <?php if (!empty ($this->feeds)) { ?> - <?php foreach ($this->feeds as $feed) { ?> - <li <?php echo ($this->flux && $this->flux->id () == $feed->id ()) ? 'class="active"' : ''; ?>> - <a href="<?php echo Url::display (array ('c' => 'configure', 'a' => 'feed', 'params' => array ('id' => $feed->id ()))); ?>"><?php echo $feed->name (); ?></a> - </li> - <?php } ?> - <?php } else { ?> - <li class="disable"><span>Aucun flux</span></li> - <?php } ?> - </ul> - </div> +<?php if ($this->flux) { ?> +<form method="post" action=""> + <h1><?php echo $this->flux->name (); ?></h1> + <?php echo $this->flux->description (); ?> + + <label>URL du site</label> + <span><a target="_blank" href="<?php echo $this->flux->website (); ?>"><?php echo $this->flux->website (); ?></a></span> + + <label>Nombre d'articles</label> + <span><?php echo $this->flux->nbEntries (); ?></span> - <?php if ($this->flux) { ?> - <form method="post" action=""> - <h1><?php echo $this->flux->name (); ?></h1> - <?php echo $this->flux->description (); ?> - - <label>URL du site</label> - <span><a target="_blank" href="<?php echo $this->flux->website (); ?>"><?php echo $this->flux->website (); ?></a></span> - - <label>Nombre d'articles</label> - <span><?php echo $this->flux->nbEntries (); ?></span> - - <?php if (!empty ($this->categories)) { ?> - <label>Ranger dans une catégorie</label> - <div class="radio_group"> - <?php foreach ($this->categories as $cat) { ?> - <input type="radio" name="category" id="cat_<?php echo $cat->id (); ?>" value="<?php echo $cat->id (); ?>"<?php echo $cat->id () == $this->flux->category () ? ' checked="checked"' : ''; ?> /> - <label for="cat_<?php echo $cat->id (); ?>"><?php echo $cat->name (); ?></label> - <br /> - <?php } ?> - </div> - - <input type="submit" value="Valider" /> + <?php if (!empty ($this->categories)) { ?> + <label>Ranger dans une catégorie</label> + <div class="radio_group"> + <?php foreach ($this->categories as $cat) { ?> + <input type="radio" name="category" id="cat_<?php echo $cat->id (); ?>" value="<?php echo $cat->id (); ?>"<?php echo $cat->id () == $this->flux->category () ? ' checked="checked"' : ''; ?> /> + <label for="cat_<?php echo $cat->id (); ?>"><?php echo $cat->name (); ?></label> + <br /> <?php } ?> - - <button formaction="<?php echo Url::display (array ('c' => 'feed', 'a' => 'delete', 'params' => array ('id' => $this->flux->id ()))); ?>">Supprimer</button> - </form> - <?php } else { ?> - <div class="nothing">Aucun flux sélectionné</div> + </div> + + <input type="submit" value="Valider" /> <?php } ?> -</div> + + <button formaction="<?php echo Url::display (array ('c' => 'feed', 'a' => 'delete', 'params' => array ('id' => $this->flux->id ()))); ?>">Supprimer</button> +</form> +<?php } else { ?> +<div class="nothing">Aucun flux sélectionné</div> +<?php } ?> diff --git a/app/views/configure/importExport.phtml b/app/views/configure/importExport.phtml index 03e4746ac..ff5f7ca5a 100644 --- a/app/views/configure/importExport.phtml +++ b/app/views/configure/importExport.phtml @@ -11,9 +11,9 @@ </body> </opml> <?php } else { ?> -<div class="table"> - <?php $this->partial ('configure_aside'); ?> +<?php $this->partial ('aside_configure'); ?> +<div> <form method="post" action="<?php echo Url::display (array ('c' => 'configure', 'a' => 'importExport', 'params' => array ('q' => 'import'))); ?>" enctype="multipart/form-data"> <h1>Exporter au format OPML</h1> <button formaction="<?php echo Url::display (array ('c' => 'configure', 'a' => 'importExport', 'params' => array ('q' => 'export'))); ?>">Exporter</button> diff --git a/app/views/configure/shortcut.phtml b/app/views/configure/shortcut.phtml index eeaa89cda..4058f6bca 100644 --- a/app/views/configure/shortcut.phtml +++ b/app/views/configure/shortcut.phtml @@ -1,6 +1,6 @@ -<div class="table"> - <?php $this->partial ('configure_aside'); ?> +<?php $this->partial ('aside_configure'); ?> +<div> <datalist id="keys"> <?php foreach ($this->list_keys as $key) { ?> <option value="<?php echo $key; ?>"> diff --git a/app/views/helpers/pagination.phtml b/app/views/helpers/pagination.phtml index d116302d0..f91e3d95d 100755 --- a/app/views/helpers/pagination.phtml +++ b/app/views/helpers/pagination.phtml @@ -5,10 +5,10 @@ ?> <ul class="pagination"> - <li class="item pager-next"> - <?php if ($this->currentPage < $this->nbPage) { ?> - <?php $params[$getteur] = $this->currentPage + 1; ?> - <a href="<?php echo Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>">‹ Anciens</a> + <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)); ?>">‹ plus récents</a> <?php } else { ?> <?php } ?> @@ -16,10 +16,10 @@ <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> + <li class="item pager-next"> + <?php if ($this->currentPage < $this->nbPage) { ?> + <?php $params[$getteur] = $this->currentPage + 1; ?> + <a href="<?php echo Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>">plus anciens ›</a> <?php } else { ?> <?php } ?> diff --git a/app/views/index/index.phtml b/app/views/index/index.phtml index 127a09ddd..22cc84828 100644 --- a/app/views/index/index.phtml +++ b/app/views/index/index.phtml @@ -1,5 +1,7 @@ +<?php $this->partial ('aside_flux'); ?> + <?php $items = $this->entryPaginator->items (true); ?> -<div id="top"> +<div class="nav_menu"> <a class="btn" href="<?php echo Url::display (array ('c' => 'feed', 'a' => 'actualize')); ?>"><i class="icon refresh"></i></a> <?php if (!login_is_conf ($this->conf) || is_logged ()) { ?> diff --git a/app/views/javascript/main.phtml b/app/views/javascript/main.phtml index d8e15bca7..87af760d3 100644 --- a/app/views/javascript/main.phtml +++ b/app/views/javascript/main.phtml @@ -104,7 +104,7 @@ function mark_favorite (active) { } function init_img () { - var imgs = $(".post.flux .content img").each (function () { + $(".post.flux .content img").each (function () { if ($(this).width () > ($("#stream").width()) / 2) { $(this).addClass("big"); } |
