comparison MoinMoin/templates/tickets.html @ 2688:d1872000dcdc

Removed HTML validation errors from +tickets view
author Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
date Fri, 01 Aug 2014 18:13:11 +0530
parents 5ed45d642d47
children 43987f1b008e
comparison
equal deleted inserted replaced
2687:daf1dbbf507c 2688:d1872000dcdc
1 {% extends theme("layout.html") %} 1 {% extends theme("layout.html") %}
2 {% set search_form=None %} 2 {% set search_form=None %}
3 <head> 3 {% set title = _("Tickets") %}
4 {% block head %}
5 <title>{{_("Tickets")}}</title>
6 {{ super() }}
7 {% endblock %}
8 </head>
9 4
10 {% block content %} 5 {% block content %}
11 <h1>{{_("Tickets")}}</h1> 6 <h1>{{_("Tickets")}}</h1>
12 7
13 {% set status_values = ['all', 'open', 'closed'] %} 8 {% set status_values = ['all', 'open', 'closed'] %}
46 41
47 <form action="{{ url_for('frontend.tickets',selected_tags=list(selected_tags), time_sorting=time_sorting if time_sorting) }}" method="post"> 42 <form action="{{ url_for('frontend.tickets',selected_tags=list(selected_tags), time_sorting=time_sorting if time_sorting) }}" method="post">
48 <input type="hidden" name="status" value="{{ status }}"> 43 <input type="hidden" name="status" value="{{ status }}">
49 <input type="text" name="q" value="{{ query if query }}" id="moin-ticketsearch-query" class="form-control" placeholder="{{_('Find tickets')}}"> 44 <input type="text" name="q" value="{{ query if query }}" id="moin-ticketsearch-query" class="form-control" placeholder="{{_('Find tickets')}}">
50 </form> 45 </form>
51 <br>
52 46
53 <p>
54 {% if results %} 47 {% if results %}
55 {{ _("%(result_len)d Tickets found.", result_len=results|length) }} 48 <p>{{ _("%(result_len)d Tickets found.", result_len=results|length) }}</p>
56 <table class="table table-hover" id="ticket-list"> 49 <table class="table table-hover" id="ticket-list">
57 <thead> 50 <thead>
58 <th id="ticket-itemid">{{_("ID")}}</th> 51 <tr>
59 <th id="ticket-summary">{{_("Summary")}}</th> 52 <th id="ticket-itemid">{{_("ID")}}</th>
60 <th id="ticket-status">{{_("Status")}}</th> 53 <th id="ticket-summary">{{_("Summary")}}</th>
61 <th id="ticket-effort" title="{{ _('Effort') }}">E</th> 54 <th id="ticket-status">{{_("Status")}}</th>
62 <th id="ticket-difficulty" title="{{ _('Difficulty') }}">D</th> 55 <th id="ticket-effort" title="{{ _('Effort') }}">E</th>
63 <th id="ticket-severity" title="{{ _('Severity') }}">S</th> 56 <th id="ticket-difficulty" title="{{ _('Difficulty') }}">D</th>
64 <th id="ticket-priority" title="{{ _('Priority') }}">P</th> 57 <th id="ticket-severity" title="{{ _('Severity') }}">S</th>
65 <th id="ticket-tags">{{_("Tags")}}</th> 58 <th id="ticket-priority" title="{{ _('Priority') }}">P</th>
66 </thead> 59 <th id="ticket-tags">{{_("Tags")}}</th>
60 </tr>
61 </thead>
67 <tbody> 62 <tbody>
68 {% for result in results %} 63 {% for result in results %}
69 <tr> 64 <tr>
70 <td> 65 <td>
71 <a href="{{ url_for_item(result['itemid'], field='itemid', namespace=result['namespace'])}}" title="{{ _('ITEMID: %(itemid)s', itemid=result['itemid'])}}"> 66 <a href="{{ url_for_item(result['itemid'], field='itemid', namespace=result['namespace'])}}" title="{{ _('ITEMID: %(itemid)s', itemid=result['itemid'])}}">
106 </p> 101 </p>
107 {% else %} 102 {% else %}
108 {{ _("No Ticket found.") }} 103 {{ _("No Ticket found.") }}
109 {% endif %} 104 {% endif %}
110 105
111 <h3>{{_("Tags")}}</h3> 106 <h3 class="moin-ticket-tags">{{_("Tags")}}</h3>
112 {% for tag in tags %} 107 {% for tag in tags %}
113 {# If user clicks on the tag then it gets selected if it is not already selected #} 108 {# If user clicks on the tag then it gets selected if it is not already selected #}
114 {# If that tag is already selected then it gets deselected #} 109 {# If that tag is already selected then it gets deselected #}
115 {% set selected_tags_value = list(selected_tags.difference([tag]) if tag in selected_tags else selected_tags.union([tag])) %} 110 {% set selected_tags_value = list(selected_tags.difference([tag]) if tag in selected_tags else selected_tags.union([tag])) %}
116 <form action="{{ url_for('frontend.tickets', selected_tags=selected_tags_value, time_sorting=time_sorting if time_sorting) }}" method="post"> 111 <form action="{{ url_for('frontend.tickets', selected_tags=selected_tags_value, time_sorting=time_sorting if time_sorting) }}" method="post">
118 <input type="hidden" name="status" value="{{ status }}"> 113 <input type="hidden" name="status" value="{{ status }}">
119 <input type="submit" value="{{ tag }}" class="{{ 'ticket-tags-button btn btn-primary active' if tag in selected_tags else 'ticket-tags-button btn btn-default' }}"> 114 <input type="submit" value="{{ tag }}" class="{{ 'ticket-tags-button btn btn-primary active' if tag in selected_tags else 'ticket-tags-button btn btn-default' }}">
120 </form> 115 </form>
121 {% endfor %} 116 {% endfor %}
122 117
123 </p>
124 {% endblock %} 118 {% endblock %}
125 {% block body_scripts %} 119 {% block body_scripts %}
126 {{ super() }} 120 {{ super() }}
127 <script src="{{ url_for('serve.files', name='jquery_tablesorter', filename='jquery.tablesorter.js') }}"></script> 121 <script src="{{ url_for('serve.files', name='jquery_tablesorter', filename='jquery.tablesorter.js') }}"></script>
128 <script src="{{ url_for('static', filename='js/tickets.js') }}"></script> 122 <script src="{{ url_for('static', filename='js/tickets.js') }}"></script>