aboutsummaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2012-10-22 18:00:13 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2012-10-22 18:00:13 +0200
commit0426541acbeb44d240e6dbf7a93f3a104bea61b4 (patch)
tree209a425c5afee9e627d11023b262326812be1fbc /app/views
parentfb57be5a5af3a2fb46b2dbf2b503ffe78eb5cf49 (diff)
Grosse màj : ajout de la configuration + ajouts divers fonctionnalités
Diffstat (limited to 'app/views')
-rw-r--r--app/views/configure/categorize.phtml17
-rw-r--r--app/views/configure/display.phtml6
-rw-r--r--app/views/configure/flux.phtml45
-rw-r--r--app/views/index/index.phtml8
4 files changed, 70 insertions, 6 deletions
diff --git a/app/views/configure/categorize.phtml b/app/views/configure/categorize.phtml
index 126f6b48a..093ec1dcf 100644
--- a/app/views/configure/categorize.phtml
+++ b/app/views/configure/categorize.phtml
@@ -1,3 +1,14 @@
-<div class="post">
- Fonctionnalité non implémentée (pour le moment)
-</div>
+<form method="post" action="">
+ <h1>Gérer les catégories</h1>
+
+ <?php $i = 0; foreach ($this->categories as $cat) { $i++; ?>
+ <label for="cat_<?php echo $cat->id (); ?>">Catégorie n°<?php echo $i; ?></label>
+ <input type="text" id="cat_<?php echo $cat->id (); ?>" name="categories[]" value="<?php echo $cat->name (); ?>" />
+ <input type="hidden" name="ids[]" value="<?php echo $cat->id (); ?>" />
+ <?php } ?>
+
+ <label for="new_category">Ajouter une catégorie</label>
+ <input type="text" id="new_category" name="new_category" placeholder="Nouvelle catégorie" />
+
+ <input type="submit" value="Valider" />
+</form>
diff --git a/app/views/configure/display.phtml b/app/views/configure/display.phtml
index 23c41712b..228957b6a 100644
--- a/app/views/configure/display.phtml
+++ b/app/views/configure/display.phtml
@@ -14,6 +14,12 @@
<label for="radio_not_read">Afficher les non lus</label>
</div>
+ <label for="sort_order">Ordre de tri</label>
+ <select name="sort_order" id="sort_order">
+ <option value="low_to_high"<?php echo $this->conf->sortOrder () == 'low_to_high' ? ' selected="selected"' : ''; ?>>Du plus récent au plus ancien</option>
+ <option value="high_to_low"<?php echo $this->conf->sortOrder () == 'high_to_low' ? ' selected="selected"' : ''; ?>>Du plus ancien au plus récent</option>
+ </select>
+
<label>Afficher les articles dépliés par défaut</label>
<div class="radio_group">
<input type="radio" name="display_posts" id="radio_yes" value="yes"<?php echo $this->conf->displayPosts () ? ' checked="checked"' : ''; ?> />
diff --git a/app/views/configure/flux.phtml b/app/views/configure/flux.phtml
index 126f6b48a..34255bc59 100644
--- a/app/views/configure/flux.phtml
+++ b/app/views/configure/flux.phtml
@@ -1,3 +1,44 @@
-<div class="post">
- Fonctionnalité non implémentée (pour le moment)
+<div class="table">
+ <div class="aside">
+ <ul>
+ <li><h2>Vox flux RSS</h2></li>
+ <?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' => 'flux', '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 count ($this->flux->entries ()); ?></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 } ?>
+ </form>
+ <?php } else { ?>
+ <div class="nothing">Aucun flux sélectionné</div>
+ <?php } ?>
</div>
diff --git a/app/views/index/index.phtml b/app/views/index/index.phtml
index 2dfdb5064..8863d08a2 100644
--- a/app/views/index/index.phtml
+++ b/app/views/index/index.phtml
@@ -14,7 +14,13 @@
<?php foreach ($items as $item) { ?>
<div class="post flux<?php echo !$item->isRead () ? ' not_read' : ''; ?><?php echo $item->isFavorite () ? ' favorite' : ''; ?>">
- <div class="before"><?php echo $item->author (); ?> a écrit le <?php echo $item->date (); ?>,</div>
+ <?php $author = $item->author (); ?>
+ <div class="before">
+ <?php echo $author != '' ? $author . ' a écrit' : ''; ?>
+ le <?php echo $item->date (); ?>
+ <?php $feed = $item->feed (true); ?>
+ sur <a target="_blank" href="<?php echo $feed->website (); ?>"><?php echo $feed->name (); ?></a>,
+ </div>
<h1><a target="_blank" href="<?php echo $item->link (); ?>"> <?php echo $item->title (); ?></a></h1>
<div class="content"><?php echo $item->content (); ?></div>