forked from Ugric/Komodo-Hub
add query to search bar
This commit is contained in:
1 parent
ca221771ba
commit
59e6dfbe49
4 files changed
+5
-5
No files matched your search
@@ -26,7 +26,7 @@
|
||||
<a href="/admin">Admin</a>
|
||||
{% endif %}
|
||||
<a href="/dashboard">Dashboard</a>
|
||||
<a href="/dashboard">Settings</a>
|
||||
<a href="/settings">Settings</a>
|
||||
<a href="/logout">Logout</a>
|
||||
{% else %}
|
||||
{{ button(url='/login', button_text='Login/Register', extra_classes='') }}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{% macro search_bar(destination)%}
|
||||
{% macro search_bar(destination, value)%}
|
||||
{# input the url of the page containing the backend for the search #}
|
||||
{# e.g. for the species search: "/species/search" #}
|
||||
{# used in species.jinja #}
|
||||
<form action="{{destination}}" method="GET" class="search">
|
||||
<input type="text" name="search-query" placeholder="Search all species..." class="bar">
|
||||
<input type="text" name="search-query" placeholder="Search all species..." value="{{value}}" class="bar">
|
||||
<input type="submit" value="Search" class="button">
|
||||
</form>
|
||||
{% endmacro %}
|
||||
@@ -14,7 +14,7 @@ Species Database
|
||||
{# If you want to change the featured species please do so in config.ini - CS #}
|
||||
{{featured_species_section(featured_species, False)}}
|
||||
{# All Species #}
|
||||
{{search_bar("/species/search")}}
|
||||
{{search_bar("/species/search", "")}}
|
||||
<h2 style="text-align: center; margin-top: 30px;">All Species</h2>
|
||||
{{display_all_items(species)}}
|
||||
{% endblock %}
|
||||
@@ -10,6 +10,6 @@
|
||||
Species Database
|
||||
</section>
|
||||
{# All Species #}
|
||||
{{search_bar("/species/search")}}
|
||||
{{search_bar("/species/search", query)}}
|
||||
{{display_all_items(results)}}
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user