changeset 103a6bdbc59b in bugs.tryton.org:default
details: https://hg.tryton.org/bugs.tryton.org?cmd=changeset;node=103a6bdbc59b
description:
Add search by creator and select option to assignedto
diffstat:
html/issue.search.html | 28 +++++++++++++++++++++++++---
1 files changed, 25 insertions(+), 3 deletions(-)
diffs (53 lines):
diff -r 1fb18ad96b9f -r 103a6bdbc59b html/issue.search.html
--- a/html/issue.search.html Tue Nov 10 19:04:36 2020 +0100
+++ b/html/issue.search.html Tue Nov 17 10:42:50 2020 +0100
@@ -24,9 +24,9 @@
<input type="radio" name="@group"
value="{{ name }}" {% if name == group_on %}checked{% endif %}
/>
{%- endmacro %}
-{% macro option_value(option, id, name) -%}
+{% macro option_value(option, id, name, default='') -%}
<option value="{{ id }}"
- {% if id == request.form.getvalue(option, '') %}selected{%
endif %} >{{ name|u }}</option>
+ {% if id == request.form.getvalue(option, default)
%}selected{% endif %} >{{ name|u }}</option>
{%- endmacro %}
{% block head_title %}
@@ -114,6 +114,21 @@
</tr>
<tr>
+ <th>{% trans %}Creator:{% endtrans %}</th>
+ <td><select class="custom-select" name="creator" id="creator">
+ {{ option_value('priority', '', 'don\'t care') }}
+ {{ option_value('creator', request.user.id, 'created by me') }}
+ {% for user in db['user'].list() %}
+ {{ option_value('creator', user.id, user.username) }}
+ {% endfor %}
+ </select><td>
+ </td>
+ <td class="text-center">{{ display_column('creator') }}</td>
+ <td class="text-center">{{ sort_column('creator') }}</td>
+ <td class="text-center">{{ group_column('creator') }}</td>
+</tr>
+
+<tr>
<th>{% trans %}Activity:{% endtrans %}</th>
<td>{{ input('activity') }}</td>
<td class="text-center">{{ display_column('activity') }}</td>
@@ -169,7 +184,14 @@
<tr>
<th>{% trans %}Assigned to:{% endtrans %}</th>
- <td>{{ input('submitter') }}</td>
+ <td><select class="custom-select" name="assignedto" id="assignedto">
+ {{ option_value('assignedto', request.user.id, 'assigned to me', -1)
}}
+ {{ option_value('assignedto', -1, 'unassigned', -1) }}
+ {% for user in db['user'].list() %}
+ {{ option_value('creator', user.id, user.username, -1) }}
+ {% endfor %}
+ </select><td>
+ </td>
<td class="text-center">{{ display_column('assignedto') }}</td>
<td class="text-center">{{ sort_column('assignedto') }}</td>
<td class="text-center">{{ group_column('assignedto') }}</td>