From 2c4e7a1cea0e692b39055eec7a8ebf142839f120 Mon Sep 17 00:00:00 2001 From: tcit <tcit@tcit.fr> Date: Sun, 23 Mar 2014 23:52:05 +0100 Subject: Fixes to search engine Changed the search parameter from POST to GET. Also, adapted the Baggy theme. --- themes/default/_menu.twig | 1 + themes/default/_search-form.twig | 23 +++++++++++++++++++++++ themes/default/home.twig | 21 --------------------- 3 files changed, 24 insertions(+), 21 deletions(-) create mode 100644 themes/default/_search-form.twig (limited to 'themes/default') diff --git a/themes/default/_menu.twig b/themes/default/_menu.twig index e2644b0f..0e7dd0a7 100644 --- a/themes/default/_menu.twig +++ b/themes/default/_menu.twig @@ -9,4 +9,5 @@ <li><a href="./?logout" title="{% trans "logout" %}">{% trans "logout" %}</a></li> </ul> {% include '_pocheit-form.twig' %} + {% include '_search-form.twig' %} diff --git a/themes/default/_search-form.twig b/themes/default/_search-form.twig new file mode 100644 index 00000000..74f420d0 --- /dev/null +++ b/themes/default/_search-form.twig @@ -0,0 +1,23 @@ +<div id="search-form" class="messages info"> +<form method="get" action="index.php"> + <p> + <input type="hidden" name="view" value="search"></input> + <label>{% trans "Search" %}</label> : <input type="text" placeholder="{% trans "Enter your search here" %}" name="search" /> + <input type="submit" value="{% trans "Search" %} !"></input> + </p> +</form> +</div> +<script type="text/javascript"> + $(document).ready(function() { + + $("#search-form").hide(); + + $("#search").click(function(){ + $("#search-form").toggle(); + $("#search").toggleClass("current"); + $("#search-arrow").toggleClass("arrow-down"); + }); + + + }); +</script> \ No newline at end of file diff --git a/themes/default/home.twig b/themes/default/home.twig index e3e8c6af..b6185df1 100755 --- a/themes/default/home.twig +++ b/themes/default/home.twig @@ -12,28 +12,7 @@ {% include '_menu.twig' %} {% endblock %} {% block precontent %} -<div id="search-form" class="messages info"> -<form method="post" action="index.php?view=search"> - <p> - <label>{% trans "Search" %}</label> : <input type="text" placeholder="{% trans "Enter your search here" %}" name="search" /> - <input type="submit" value="{% trans "Search" %} !"></input> - </p> -</form> -</div> -<script type="text/javascript"> - $(document).ready(function() { - $("#search-form").hide(); - - $("#search").click(function(){ - $("#search-form").toggle(); - $("#search").toggleClass("current"); - $("#search-arrow").toggleClass("arrow-down"); - }); - - - }); -</script> {% include '_sorting.twig' %} {% endblock %} {% block content %} -- cgit v1.2.3