annotate MoinMoin/templates/tickets.html @ 2934:e2b5a79a1e06

Fixed issue #499 - Search for tickets assigned to a user
author Aabhas Majumdar <majumdaraabhas@gmail.com>
date Sun, 08 Mar 2015 20:57:53 +0530
parents 1259233ad807
children
rev   line source
2627
8f93193cfd9b Added +tickets view having list of tickets
Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
parents:
diff changeset
1 {% extends theme("layout.html") %}
8f93193cfd9b Added +tickets view having list of tickets
Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
parents:
diff changeset
2 {% set search_form=None %}
2688
d1872000dcdc Removed HTML validation errors from +tickets view
Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
parents: 2636
diff changeset
3 {% set title = _("Tickets") %}
2627
8f93193cfd9b Added +tickets view having list of tickets
Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
parents:
diff changeset
4
8f93193cfd9b Added +tickets view having list of tickets
Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
parents:
diff changeset
5 {% block content %}
2851
5a49eeb1f307 add spaces to jinja2 expressions, add tests for missing spaces to coding_std.py
RogerHaase <haaserd@gmail.com>
parents: 2821
diff changeset
6 <h1>{{ _("Tickets") }}</h1>
2627
8f93193cfd9b Added +tickets view having list of tickets
Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
parents:
diff changeset
7
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
8 {% set status_values = ['all', 'open', 'closed'] %}
2851
5a49eeb1f307 add spaces to jinja2 expressions, add tests for missing spaces to coding_std.py
RogerHaase <haaserd@gmail.com>
parents: 2821
diff changeset
9 <span>{{ _("Filter:") }}</span>
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
10 {% for status_value in status_values %}
2864
7de85ecc3669 rework +tickets, add Update and Assignee columns, remove itemid and sort by age button
RogerHaase <haaserd@gmail.com>
parents: 2862
diff changeset
11 <form action="{{ url_for('frontend.tickets', selected_tags=list()) }}" method="post" class='moin-ticketsearch-form'>
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
12 <input type="hidden" name="q" value="" >
2814
c8c498da08dd rework layout of tickets view, move tags list from left side to top, add show/hide tags button
RogerHaase <haaserd@gmail.com>
parents: 2801
diff changeset
13 <input type="hidden" name="status" value="{{ status_value }}">
2866
c9a8ff6d00cc make button styling more consistent for User, Admin, settings, and Ticket pages
RogerHaase <haaserd@gmail.com>
parents: 2864
diff changeset
14 <input type="submit" value="{{ status_value.capitalize() }}" title="{{ _('Show %(status)s tickets', status=status_value) }}" class="{{ 'moin-button active' if status == status_value else 'moin-button' }}">
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
15 </form>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
16 {% endfor %}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
17
2866
c9a8ff6d00cc make button styling more consistent for User, Admin, settings, and Ticket pages
RogerHaase <haaserd@gmail.com>
parents: 2864
diff changeset
18 <input type="button" class="moin-button ticket-tags-toggle" title="{{ _("Show all tags") }}" value="{{ _("Tags") }}">
2814
c8c498da08dd rework layout of tickets view, move tags list from left side to top, add show/hide tags button
RogerHaase <haaserd@gmail.com>
parents: 2801
diff changeset
19
2864
7de85ecc3669 rework +tickets, add Update and Assignee columns, remove itemid and sort by age button
RogerHaase <haaserd@gmail.com>
parents: 2862
diff changeset
20 <form class="moin-ticket-search" action="{{ url_for('frontend.tickets',selected_tags=list(selected_tags)) }}" method="post">
2814
c8c498da08dd rework layout of tickets view, move tags list from left side to top, add show/hide tags button
RogerHaase <haaserd@gmail.com>
parents: 2801
diff changeset
21 <input type="hidden" name="status" value="{{ status }}">
2851
5a49eeb1f307 add spaces to jinja2 expressions, add tests for missing spaces to coding_std.py
RogerHaase <haaserd@gmail.com>
parents: 2821
diff changeset
22 <input type="text" name="q" value="{{ query if query }}" id="moin-ticketsearch-query" placeholder="{{ _('Find tickets') }}">
2814
c8c498da08dd rework layout of tickets view, move tags list from left side to top, add show/hide tags button
RogerHaase <haaserd@gmail.com>
parents: 2801
diff changeset
23 </form>
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
24
2814
c8c498da08dd rework layout of tickets view, move tags list from left side to top, add show/hide tags button
RogerHaase <haaserd@gmail.com>
parents: 2801
diff changeset
25 {# TODO: This is a workaround that creates named tickets, rework when there is a means of creating unnamed tickets #}
c8c498da08dd rework layout of tickets view, move tags list from left side to top, add show/hide tags button
RogerHaase <haaserd@gmail.com>
parents: 2801
diff changeset
26 <form method="get" class="moin-ticket-create-link" action="{{ url_for('frontend.modify_item', item_name='ticket_'+current_timestamp ) }}">
2866
c9a8ff6d00cc make button styling more consistent for User, Admin, settings, and Ticket pages
RogerHaase <haaserd@gmail.com>
parents: 2864
diff changeset
27 <input class="moin-button" type="submit" value="{{ _('Create ticket') }}">
2814
c8c498da08dd rework layout of tickets view, move tags list from left side to top, add show/hide tags button
RogerHaase <haaserd@gmail.com>
parents: 2801
diff changeset
28 <input type="hidden" name="itemtype" value="ticket">
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
29 </form>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
30
2814
c8c498da08dd rework layout of tickets view, move tags list from left side to top, add show/hide tags button
RogerHaase <haaserd@gmail.com>
parents: 2801
diff changeset
31 <div class="moin-ticket-tags">
2851
5a49eeb1f307 add spaces to jinja2 expressions, add tests for missing spaces to coding_std.py
RogerHaase <haaserd@gmail.com>
parents: 2821
diff changeset
32 <span>{{ _("Tags:") }}</span>
2821
41ed0f7d1cb0 sort the list of tags in tickets.html
RogerHaase <haaserd@gmail.com>
parents: 2814
diff changeset
33 {% for tag in tags|sort %}
2814
c8c498da08dd rework layout of tickets view, move tags list from left side to top, add show/hide tags button
RogerHaase <haaserd@gmail.com>
parents: 2801
diff changeset
34 {# If user clicks on the tag then it gets selected if it is not already selected #}
c8c498da08dd rework layout of tickets view, move tags list from left side to top, add show/hide tags button
RogerHaase <haaserd@gmail.com>
parents: 2801
diff changeset
35 {# If that tag is already selected then it gets deselected #}
c8c498da08dd rework layout of tickets view, move tags list from left side to top, add show/hide tags button
RogerHaase <haaserd@gmail.com>
parents: 2801
diff changeset
36 {% set selected_tags_value = list(selected_tags.difference([tag]) if tag in selected_tags else selected_tags.union([tag])) %}
2864
7de85ecc3669 rework +tickets, add Update and Assignee columns, remove itemid and sort by age button
RogerHaase <haaserd@gmail.com>
parents: 2862
diff changeset
37 <form class="moin-existing-tags" action="{{ url_for('frontend.tickets', selected_tags=selected_tags_value) }}" method="post">
2814
c8c498da08dd rework layout of tickets view, move tags list from left side to top, add show/hide tags button
RogerHaase <haaserd@gmail.com>
parents: 2801
diff changeset
38 <input type="hidden" name="q" value="{{ query if query }}" >
c8c498da08dd rework layout of tickets view, move tags list from left side to top, add show/hide tags button
RogerHaase <haaserd@gmail.com>
parents: 2801
diff changeset
39 <input type="hidden" name="status" value="{{ status }}">
2866
c9a8ff6d00cc make button styling more consistent for User, Admin, settings, and Ticket pages
RogerHaase <haaserd@gmail.com>
parents: 2864
diff changeset
40 <input type="submit" value="{{ tag }}" class="{{ 'moin-button active' if tag in selected_tags else 'moin-button' }}">
2814
c8c498da08dd rework layout of tickets view, move tags list from left side to top, add show/hide tags button
RogerHaase <haaserd@gmail.com>
parents: 2801
diff changeset
41 </form>
c8c498da08dd rework layout of tickets view, move tags list from left side to top, add show/hide tags button
RogerHaase <haaserd@gmail.com>
parents: 2801
diff changeset
42 {% endfor %}
c8c498da08dd rework layout of tickets view, move tags list from left side to top, add show/hide tags button
RogerHaase <haaserd@gmail.com>
parents: 2801
diff changeset
43 </div>
c8c498da08dd rework layout of tickets view, move tags list from left side to top, add show/hide tags button
RogerHaase <haaserd@gmail.com>
parents: 2801
diff changeset
44
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
45 {% if results %}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
46 <p>{{ _("%(result_len)d Tickets found.", result_len=results|length) }}</p>
2867
1259233ad807 standardize look of tables within User, Admin, and Tickets; use zebra everywhere, remove table-hover
RogerHaase <haaserd@gmail.com>
parents: 2866
diff changeset
47 <table class="zebra moin-sortable" id="ticket-list">
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
48 <thead>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
49 <tr>
2851
5a49eeb1f307 add spaces to jinja2 expressions, add tests for missing spaces to coding_std.py
RogerHaase <haaserd@gmail.com>
parents: 2821
diff changeset
50 <th id="ticket-summary">{{ _("Summary") }}</th>
5a49eeb1f307 add spaces to jinja2 expressions, add tests for missing spaces to coding_std.py
RogerHaase <haaserd@gmail.com>
parents: 2821
diff changeset
51 <th id="ticket-status">{{ _("Status") }}</th>
2864
7de85ecc3669 rework +tickets, add Update and Assignee columns, remove itemid and sort by age button
RogerHaase <haaserd@gmail.com>
parents: 2862
diff changeset
52 <th id="ticket-mtime">{{ _("Updated") }}</th>
7de85ecc3669 rework +tickets, add Update and Assignee columns, remove itemid and sort by age button
RogerHaase <haaserd@gmail.com>
parents: 2862
diff changeset
53 <th id="ticket-assigned-to">{{ _("Assignee") }}</th>
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
54 <th id="ticket-effort" title="{{ _('Effort') }}">E</th>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
55 <th id="ticket-difficulty" title="{{ _('Difficulty') }}">D</th>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
56 <th id="ticket-severity" title="{{ _('Severity') }}">S</th>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
57 <th id="ticket-priority" title="{{ _('Priority') }}">P</th>
2851
5a49eeb1f307 add spaces to jinja2 expressions, add tests for missing spaces to coding_std.py
RogerHaase <haaserd@gmail.com>
parents: 2821
diff changeset
58 <th id="ticket-tags">{{ _("Tags") }}</th>
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
59 </tr>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
60 </thead>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
61 <tbody>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
62 {% for result in results %}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
63 <tr>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
64 <td>
2851
5a49eeb1f307 add spaces to jinja2 expressions, add tests for missing spaces to coding_std.py
RogerHaase <haaserd@gmail.com>
parents: 2821
diff changeset
65 <a href="{{ url_for_item(result['itemid'], field='itemid', namespace=result['namespace']) }}" title="{{ _('ITEMID: %(itemid)s', itemid=result['itemid']) }}">
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
66 {{ result['summary'] }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
67 </a>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
68 </td>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
69 <td>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
70 {{ _("Closed") if result['closed'] else _("Open") }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
71 </td>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
72 <td>
2864
7de85ecc3669 rework +tickets, add Update and Assignee columns, remove itemid and sort by age button
RogerHaase <haaserd@gmail.com>
parents: 2862
diff changeset
73 {{ result.get('mtime', '').strftime('%Y-%m-%d') }}
7de85ecc3669 rework +tickets, add Update and Assignee columns, remove itemid and sort by age button
RogerHaase <haaserd@gmail.com>
parents: 2862
diff changeset
74 </td>
7de85ecc3669 rework +tickets, add Update and Assignee columns, remove itemid and sort by age button
RogerHaase <haaserd@gmail.com>
parents: 2862
diff changeset
75 <td>
2934
e2b5a79a1e06 Fixed issue #499 - Search for tickets assigned to a user
Aabhas Majumdar <majumdaraabhas@gmail.com>
parents: 2867
diff changeset
76 <a href="{{ url_for('frontend.tickets', assigned_to= get_assigned_to_info(result)) }}">
e2b5a79a1e06 Fixed issue #499 - Search for tickets assigned to a user
Aabhas Majumdar <majumdaraabhas@gmail.com>
parents: 2867
diff changeset
77 {{ get_assigned_to_info(result) }}
e2b5a79a1e06 Fixed issue #499 - Search for tickets assigned to a user
Aabhas Majumdar <majumdaraabhas@gmail.com>
parents: 2867
diff changeset
78 </a>
2864
7de85ecc3669 rework +tickets, add Update and Assignee columns, remove itemid and sort by age button
RogerHaase <haaserd@gmail.com>
parents: 2862
diff changeset
79 </td>
7de85ecc3669 rework +tickets, add Update and Assignee columns, remove itemid and sort by age button
RogerHaase <haaserd@gmail.com>
parents: 2862
diff changeset
80 <td>
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
81 {{ result.get('effort', '') }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
82 </td>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
83 <td>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
84 {{ result.get('difficulty', '') }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
85 </td>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
86 <td>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
87 {{ result.get('severity', '') }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
88 </td>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
89 <td>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
90 {{ result.get('priority', '') }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
91 </td>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
92 <td>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
93 {% for tag in result['tags'] %}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
94 {{ tag }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
95 {% endfor %}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
96 </td>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
97 </tr>
2627
8f93193cfd9b Added +tickets view having list of tickets
Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
parents:
diff changeset
98 {% endfor %}
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
99 </tbody>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
100 </table>
2634
4cc1d15c203c Added tags filter option
Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
parents: 2632
diff changeset
101
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
102 <p id="ticket-table-tip">
2851
5a49eeb1f307 add spaces to jinja2 expressions, add tests for missing spaces to coding_std.py
RogerHaase <haaserd@gmail.com>
parents: 2821
diff changeset
103 {{ _("Tip: Sort multiple columns simultaneously by holding down the Shift key and clicking on additional column headers!") }}
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
104 </p>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
105 {% else %}
2862
9f2917f3a243 force No ticket found message below the ticket buttons
RogerHaase <haaserd@gmail.com>
parents: 2851
diff changeset
106 <p>
9f2917f3a243 force No ticket found message below the ticket buttons
RogerHaase <haaserd@gmail.com>
parents: 2851
diff changeset
107 {{ _("No tickets found.") }}
9f2917f3a243 force No ticket found message below the ticket buttons
RogerHaase <haaserd@gmail.com>
parents: 2851
diff changeset
108 </p>
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
109 {% endif %}
2636
5ed45d642d47 Added suggestions for in ticket modify and submit template and also shown all tags in +tickets view
Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
parents: 2635
diff changeset
110
2627
8f93193cfd9b Added +tickets view having list of tickets
Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
parents:
diff changeset
111 {% endblock %}
8f93193cfd9b Added +tickets view having list of tickets
Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
parents:
diff changeset
112 {% block body_scripts %}
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2756
diff changeset
113 {{ super() }}
2627
8f93193cfd9b Added +tickets view having list of tickets
Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
parents:
diff changeset
114 <script src="{{ url_for('static', filename='js/tickets.js') }}"></script>
8f93193cfd9b Added +tickets view having list of tickets
Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
parents:
diff changeset
115 {% endblock %}