Repeat search pattern in form above page

This commit is contained in:
2015-01-04 00:22:53 +01:00
parent a6e118f37d
commit 5a2b8cc040
4 changed files with 12 additions and 5 deletions

View File

@@ -16,6 +16,8 @@
#}
{% extends "ChillMainBundle::layout.html.twig" %}
{% set _search_pattern = pattern %}
{% block content %}
<p>{{ message }}</p>

View File

@@ -16,6 +16,8 @@
#}
{% extends "ChillMainBundle::layout.html.twig" %}
{% set _search_pattern = pattern %}
{% block content %}
{% for result in results %}

View File

@@ -33,7 +33,7 @@
</div>
<div class="grid-4 navigation-search">
<form action="{{ path('chill_main_search') }}" method="get">
<input name="q" type="search" placeholder="{{ 'Search'|trans }}" />
<input name="q" type="search" placeholder="{{ 'Search'|trans }}" {% if _search_pattern is defined %}value="{{ _search_pattern }}"{% endif %}/>
<button type="submit" class="sc-button white border"><i class="fa fa-search"></i></button>
</form>
</div>