summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-03-16 16:08:19 +0100
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-03-16 16:08:19 +0100
commitdd628faaded8e6feb990c2eb76cc15460e7a631f (patch)
tree49792004664479f5219260127e95582c22e25063 /app
parent49e1a798ba8f240add11f7c287696e9e47dfc467 (diff)
Amélioration design formulaires (boutons collés)
Diffstat (limited to 'app')
-rwxr-xr-xapp/controllers/feedController.php4
-rw-r--r--app/layout/aside_feed.phtml14
-rw-r--r--app/layout/header.phtml7
3 files changed, 16 insertions, 9 deletions
diff --git a/app/controllers/feedController.php b/app/controllers/feedController.php
index 585405ee7..48fcdf8cb 100755
--- a/app/controllers/feedController.php
+++ b/app/controllers/feedController.php
@@ -10,6 +10,7 @@ class feedController extends ActionController {
} else {
if (Request::isPost ()) {
$url = Request::param ('url_rss');
+ $params = array ();
try {
$feed = new Feed ($url);
@@ -51,6 +52,7 @@ class feedController extends ActionController {
'content' => 'Le flux <em>' . $feed->url () . '</em> a bien été ajouté'
);
Session::_param ('notification', $notif);
+ $params['id'] = $feed->id ();
} catch (FileNotExistException $e) {
Log::record ($e->getMessage (), Log::ERROR);
// notif
@@ -68,7 +70,7 @@ class feedController extends ActionController {
Session::_param ('notification', $notif);
}
- Request::forward (array (), true);
+ Request::forward (array ('c' => 'configure', 'a' => 'feed', 'params' => $params), true);
}
}
}
diff --git a/app/layout/aside_feed.phtml b/app/layout/aside_feed.phtml
index 7e37b2ac4..df6a1462b 100644
--- a/app/layout/aside_feed.phtml
+++ b/app/layout/aside_feed.phtml
@@ -1,6 +1,13 @@
<ul class="nav nav-list aside">
<li class="nav-header">Vos flux RSS</li>
+ <li class="nav-form"><form id="add_rss" method="post" action="<?php echo Url::display (array ('c' => 'feed', 'a' => 'add')); ?>">
+ <div class="stick">
+ <input type="url" name="url_rss" placeholder="Ajouter un flux RSS" />
+ <button class="btn" type="submit"><i class="icon add"></i></button>
+ </div>
+ </form></li>
+
<?php if (!empty ($this->feeds)) { ?>
<?php foreach ($this->feeds as $feed) { ?>
<li class="item<?php echo ($this->flux && $this->flux->id () == $feed->id ()) ? ' active' : ''; ?>">
@@ -8,11 +15,6 @@
</li>
<?php } ?>
<?php } else { ?>
- <li class="disable">Aucun flux</li>
+ <li class="item disable">Aucun flux</li>
<?php } ?>
-
- <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" />
- <button class="btn"><i class="icon add"></i></button>
- </form></li>
</ul>
diff --git a/app/layout/header.phtml b/app/layout/header.phtml
index bf6429780..36c53654c 100644
--- a/app/layout/header.phtml
+++ b/app/layout/header.phtml
@@ -15,8 +15,11 @@
<div class="item search">
<form action="<?php echo _url ('index', 'index'); ?>" method="get">
- <input type="text" name="search" id="search" placeholder="Rechercher (non fonctionnel)" />
- <button class="btn"><i class="icon search"></i></button>
+ <div class="stick">
+ <?php $s = Request::param ('search', ''); ?>
+ <input type="text" name="search" id="search" value="<?php echo $s; ?>" placeholder="Rechercher (non fonctionnel)" />
+ <button class="btn" type="submit"><i class="icon search"></i></button>
+ </div>
</form>
</div>