[enh] displaying shortcuts at engines page

This commit is contained in:
asciimoo 2014-01-31 16:09:58 +01:00
parent af6e90009f
commit 48dc019b94
2 changed files with 5 additions and 2 deletions

View File

@ -6,6 +6,7 @@
<table style="width: 80%;"> <table style="width: 80%;">
<tr> <tr>
<th>{{ _('Engine name') }}</th> <th>{{ _('Engine name') }}</th>
<th>{{ _('Shortcut') }}</th>
<th>{{ _('Category') }}</th> <th>{{ _('Category') }}</th>
</tr> </tr>
{% for (categ,search_engines) in categs %} {% for (categ,search_engines) in categs %}
@ -14,6 +15,7 @@
{% if not search_engine.private %} {% if not search_engine.private %}
<tr> <tr>
<td>{{ search_engine.name }}</td> <td>{{ search_engine.name }}</td>
<td>{{ shortcuts[search_engine.name] }}</td>
<td>{{ _(categ) }}</td> <td>{{ _(categ) }}</td>
</tr> </tr>
{% endif %} {% endif %}

View File

@ -250,8 +250,9 @@ def list_engines():
List of all supported engines. List of all supported engines.
""" """
global categories return render('engines.html',
return render('engines.html', categs=categories.items()) categs=categories.items(),
shortcuts={y:x for x,y in engine_shortcuts.items()})
@app.route('/preferences', methods=['GET', 'POST']) @app.route('/preferences', methods=['GET', 'POST'])