summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-03-13 22:48:13 +0100
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-03-13 22:48:13 +0100
commit9332fd5b0c1720a38aa5c85564da20c89a0f8a96 (patch)
tree3f6e3e5146e6510179408e93494b942f8b81a7b2 /app
parentf597b8d1c9a97776f64c573157d04fc9832734d6 (diff)
Continuation du design : amélioration nav-list + ajout nav-head (avec gestion de la connexion) + début formulaires
Diffstat (limited to 'app')
-rw-r--r--app/layout/aside_configure.phtml8
-rw-r--r--app/layout/aside_feed.phtml4
-rw-r--r--app/layout/aside_flux.phtml6
-rw-r--r--app/layout/header.phtml20
-rw-r--r--app/views/configure/display.phtml26
-rw-r--r--app/views/configure/feed.phtml9
6 files changed, 40 insertions, 33 deletions
diff --git a/app/layout/aside_configure.phtml b/app/layout/aside_configure.phtml
index cc81479e9..3f62ed9e7 100644
--- a/app/layout/aside_configure.phtml
+++ b/app/layout/aside_configure.phtml
@@ -1,16 +1,16 @@
<div class="nav nav-list aside">
<li class="nav-header">Configuration</li>
- <li <?php echo Request::actionName () == 'display' ? 'class="active"' : ''; ?>>
+ <li class="item<?php echo Request::actionName () == 'display' ? ' active' : ''; ?>">
<a href="<?php echo Url::display (array ('c' => 'configure', 'a' => 'display')); ?>">Général et affichage</a>
</li>
- <li <?php echo Request::actionName () == 'categorize' ? 'class="active"' : ''; ?>>
+ <li class="item<?php echo Request::actionName () == 'categorize' ? ' active' : ''; ?>">
<a href="<?php echo Url::display (array ('c' => 'configure', 'a' => 'categorize')); ?>">Catégories</a>
</li>
- <li <?php echo Request::actionName () == 'shortcut' ? 'class="active"' : ''; ?>>
+ <li class="item<?php echo Request::actionName () == 'shortcut' ? ' active' : ''; ?>">
<a href="<?php echo Url::display (array ('c' => 'configure', 'a' => 'shortcut')); ?>">Raccourcis</a>
</li>
- <li <?php echo Request::actionName () == 'importExport' ? 'class="active"' : ''; ?>>
+ <li class="item<?php echo Request::actionName () == 'importExport' ? ' active' : ''; ?>">
<a href="<?php echo Url::display (array ('c' => 'configure', 'a' => 'importExport')); ?>">Import / Export OPML</a>
</li>
</div>
diff --git a/app/layout/aside_feed.phtml b/app/layout/aside_feed.phtml
index a45c64e18..aca000cd6 100644
--- a/app/layout/aside_feed.phtml
+++ b/app/layout/aside_feed.phtml
@@ -3,7 +3,7 @@
<?php if (!empty ($this->feeds)) { ?>
<?php foreach ($this->feeds as $feed) { ?>
- <li <?php echo ($this->flux && $this->flux->id () == $feed->id ()) ? 'class="active"' : ''; ?>>
+ <li class="item<?php echo ($this->flux && $this->flux->id () == $feed->id ()) ? ' active' : ''; ?>">
<a href="<?php echo Url::display (array ('c' => 'configure', 'a' => 'feed', 'params' => array ('id' => $feed->id ()))); ?>"><?php echo $feed->name (); ?></a>
</li>
<?php } ?>
@@ -13,6 +13,6 @@
<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="+" />
+ <button class="btn"><i class="icon add"></i></button>
</form></li>
</ul>
diff --git a/app/layout/aside_flux.phtml b/app/layout/aside_flux.phtml
index 916b03331..9403a0445 100644
--- a/app/layout/aside_flux.phtml
+++ b/app/layout/aside_flux.phtml
@@ -1,7 +1,8 @@
<div class="aside aside_flux">
- <?php if (isset ($this->cat_aside)) { ?>
<ul class="categories">
+ <?php if (!login_is_conf ($this->conf) || is_logged ()) { ?>
<li><a class="btn btn-important" href="<?php echo _url ('configure', 'feed'); ?>">Gestion des abonnements</a></li>
+ <?php } ?>
<li class="all">
<a class="btn category<?php echo !$this->get ? ' active' : ''; ?>" href="<?php echo _url ('index', 'index'); ?>">
@@ -30,10 +31,10 @@
<ul class="feeds">
<?php foreach ($feeds as $feed) { ?>
<li>
+ <a class="website" href="<?php echo $feed->website(); ?>"><i class="icon link"></i></a>
<img src="http://www.google.com/s2/favicons?domain=<?php echo get_domain ($feed->website ()); ?>" alt="" />
<a class="feed" href="<?php echo _url ('index', 'index', 'get', 'f_' . $feed->id ()); ?>">
<?php echo $feed->name(); ?>
- <!--<span>X non lu</span>-->
</a>
</li>
<?php } ?>
@@ -42,5 +43,4 @@
</li>
<?php } ?>
</ul>
- <?php } ?>
</div>
diff --git a/app/layout/header.phtml b/app/layout/header.phtml
index d158e6353..bf6429780 100644
--- a/app/layout/header.phtml
+++ b/app/layout/header.phtml
@@ -1,3 +1,13 @@
+<?php if (login_is_conf ($this->conf)) { ?>
+<ul class="nav nav-head">
+ <?php if (!is_logged ()) { ?>
+ <li class="item"><i class="icon login"></i> <a id="signin" href="#">Connexion</a></li>
+ <?php } else { ?>
+ <li class="item"><i class="icon logout"></i> <a id="signout" href="#">Déconnexion</a></li>
+ <?php } ?>
+</ul>
+<?php } ?>
+
<div class="header">
<div class="item title">
<h1><a href="<?php echo _url ('index', 'index'); ?>">FreshRSS</a></h1>
@@ -15,14 +25,4 @@
<a class="btn" href="<?php echo _url ('configure', 'display'); ?>"><i class="icon configure"></i></a>
</div>
<?php } ?>
-
- <!--<?php if (login_is_conf ($this->conf)) { ?>
- <li>
- <?php if (!is_logged ()) { ?>
- <a id="signin" href="#">Connexion</a>
- <?php } else { ?>
- <a id="signout" href="#">Déconnexion</a>
- <?php } ?>
- </li>
- <?php } ?>-->
</div>
diff --git a/app/views/configure/display.phtml b/app/views/configure/display.phtml
index 5e27aa01a..d90f48240 100644
--- a/app/views/configure/display.phtml
+++ b/app/views/configure/display.phtml
@@ -20,11 +20,14 @@
<label>Vue par défaut</label>
<div class="radio_group">
- <input type="radio" name="default_view" id="radio_all" value="all"<?php echo $this->conf->defaultView () == 'all' ? ' checked="checked"' : ''; ?> />
- <label for="radio_all">Tout afficher</label>
- <br />
- <input type="radio" name="default_view" id="radio_not_read" value="not_read"<?php echo $this->conf->defaultView () == 'not_read' ? ' checked="checked"' : ''; ?> />
- <label for="radio_not_read">Afficher les non lus</label>
+ <label for="radio_all">
+ <input type="radio" name="default_view" id="radio_all" value="all"<?php echo $this->conf->defaultView () == 'all' ? ' checked="checked"' : ''; ?> />
+ Tout afficher
+ </label>
+ <label for="radio_not_read">
+ <input type="radio" name="default_view" id="radio_not_read" value="not_read"<?php echo $this->conf->defaultView () == 'not_read' ? ' checked="checked"' : ''; ?> />
+ Afficher les non lus
+ </label>
</div>
<label for="sort_order">Ordre de tri</label>
@@ -35,11 +38,14 @@
<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 () == 'yes' ? ' checked="checked"' : ''; ?> />
- <label for="radio_yes">Oui</label>
- <br />
- <input type="radio" name="display_posts" id="radio_no" value="no"<?php echo $this->conf->displayPosts () == 'no' ? ' checked="checked"' : ''; ?> />
- <label for="radio_no">Non<noscript> - <strong>nécessite que javascript soit activé</strong></noscript></label>
+ <label for="radio_yes">
+ <input type="radio" name="display_posts" id="radio_yes" value="yes"<?php echo $this->conf->displayPosts () == 'yes' ? ' checked="checked"' : ''; ?> />
+ Oui
+ </label>
+ <label for="radio_no">
+ <input type="radio" name="display_posts" id="radio_no" value="no"<?php echo $this->conf->displayPosts () == 'no' ? ' checked="checked"' : ''; ?> />
+ Non<noscript> - <strong>nécessite que javascript soit activé</strong></noscript>
+ </label>
</div>
<button class="btn btn-important">Valider</button>
diff --git a/app/views/configure/feed.phtml b/app/views/configure/feed.phtml
index 3e49ece99..dc1d7ff96 100644
--- a/app/views/configure/feed.phtml
+++ b/app/views/configure/feed.phtml
@@ -1,7 +1,7 @@
<?php $this->partial ('aside_feed'); ?>
<?php if ($this->flux) { ?>
-<form method="post" action="">
+<form method="post" action="<?php echo _url ('configure', 'feed', 'id', $this->flux->id ()); ?>">
<h1><?php echo $this->flux->name (); ?></h1>
<?php echo $this->flux->description (); ?>
@@ -15,9 +15,10 @@
<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 />
+ <label for="cat_<?php echo $cat->id (); ?>">
+ <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"' : ''; ?> />
+ <?php echo $cat->name (); ?>
+ </label>
<?php } ?>
</div>