aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-12-05 18:06:58 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-12-05 18:06:58 +0100
commitab14fcd190e47bd0fcb97165ef2954cc836a8052 (patch)
tree59254af3c5ed8a28e502be4b001b85608f67ceef
parent4038bc885ceaef2f2b991d1deb191a71408123a7 (diff)
Recherche mobile
Implémente https://github.com/marienfressinaud/FreshRSS/issues/305
-rw-r--r--app/i18n/en.php1
-rw-r--r--app/i18n/fr.php1
-rw-r--r--app/layout/nav_menu.phtml22
-rw-r--r--public/themes/default/freshrss.css14
-rw-r--r--public/themes/flat-design/freshrss.css14
5 files changed, 52 insertions, 0 deletions
diff --git a/app/i18n/en.php b/app/i18n/en.php
index 22bbd8eb0..f7dc6d3a5 100644
--- a/app/i18n/en.php
+++ b/app/i18n/en.php
@@ -5,6 +5,7 @@ return array (
'login' => 'Login',
'logout' => 'Logout',
'search' => 'Search words or #tags',
+ 'search_short' => 'Search',
'configuration' => 'Configuration',
'general_and_reading' => 'General and reading',
diff --git a/app/i18n/fr.php b/app/i18n/fr.php
index 1af8a95af..8082b07fb 100644
--- a/app/i18n/fr.php
+++ b/app/i18n/fr.php
@@ -5,6 +5,7 @@ return array (
'login' => 'Connexion',
'logout' => 'Déconnexion',
'search' => 'Rechercher des mots ou des #tags',
+ 'search_short' => 'Rechercher',
'configuration' => 'Configuration',
'general_and_reading' => 'Général et lecture',
diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml
index 5154b4aae..f3e985dc0 100644
--- a/app/layout/nav_menu.phtml
+++ b/app/layout/nav_menu.phtml
@@ -175,4 +175,26 @@
</li>
</ul>
</div>
+
+ <div class="item search">
+ <form action="<?php echo _url ('index', 'index'); ?>" method="get">
+ <?php $search = Request::param ('search', ''); ?>
+ <input type="search" name="search" value="<?php echo $search; ?>" placeholder="<?php echo Translate::t ('search_short'); ?>" />
+
+ <?php $get = Request::param ('get', ''); ?>
+ <?php if($get != '') { ?>
+ <input type="hidden" name="get" value="<?php echo $get; ?>" />
+ <?php } ?>
+
+ <?php $order = Request::param ('order', ''); ?>
+ <?php if($order != '') { ?>
+ <input type="hidden" name="order" value="<?php echo $order; ?>" />
+ <?php } ?>
+
+ <?php $state = Request::param ('state', ''); ?>
+ <?php if($state != '') { ?>
+ <input type="hidden" name="state" value="<?php echo $state; ?>" />
+ <?php } ?>
+ </form>
+ </div>
</div>
diff --git a/public/themes/default/freshrss.css b/public/themes/default/freshrss.css
index 59872a409..688f76cbf 100644
--- a/public/themes/default/freshrss.css
+++ b/public/themes/default/freshrss.css
@@ -87,6 +87,9 @@
text-align: center;
padding: 5px 0;
}
+ .nav_menu .search {
+ display:none;
+ }
.favicon {
height: 16px;
@@ -736,6 +739,17 @@
.nav_menu .stick .btn {
margin: 5px 0;
}
+ .nav_menu .search {
+ display: inline-block;
+ max-width: 97%;
+ }
+ .nav_menu .search input {
+ max-width: 97%;
+ width: 90px;
+ }
+ .nav_menu .search input:focus {
+ width: 400px;
+ }
#panel {
left: 5px; right: 5px;
diff --git a/public/themes/flat-design/freshrss.css b/public/themes/flat-design/freshrss.css
index bce97f262..dcc22ccea 100644
--- a/public/themes/flat-design/freshrss.css
+++ b/public/themes/flat-design/freshrss.css
@@ -85,6 +85,9 @@ body {
text-align: center;
padding: 5px 0;
}
+ .nav_menu .search {
+ display:none;
+ }
.favicon {
height: 16px;
@@ -731,6 +734,17 @@ body {
.nav_menu .stick .btn {
margin: 5px 0;
}
+ .nav_menu .search {
+ display: inline-block;
+ max-width: 97%;
+ }
+ .nav_menu .search input {
+ max-width: 97%;
+ width: 90px;
+ }
+ .nav_menu .search input:focus {
+ width: 400px;
+ }
#panel {
left: 5px; right: 5px;