| {#- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| -#} |
| {% from 'allura:templates/jinja_master/lib.html' import abbr_date with context %} |
| <div id="ticket_search_results_holder" style="clear:both"> |
| {% if solr_error %}<p>{{solr_error}}</p>{% endif %} |
| {{widget.fields['page_size'].display(page=page, count=count, limit=limit)}} |
| {% if count %} |
| <table class="ticket-list"> |
| <thead> |
| <tr> |
| {% for col in columns if col['active'] %} |
| <th data-sort="{{col['sort_name']}}" title="{{col['label']}}"> |
| {% if col['name'] == 'ticket_num' %} |
| # |
| {% else %} |
| {{col['label']}} |
| {% endif %} |
| </th> |
| {% endfor %} |
| <th style="width:15px"> |
| <a href="#" id="col_menu" title="Select Columns"><b data-icon="{{g.icons['admin'].char}}" class="ico {{g.icons['admin'].css}}"></b></a> |
| </th> |
| </tr> |
| </thead> |
| <tbody> |
| {% for t in tickets %} |
| <tr class="{{loop.index0%2 and 'even' or ''}} {% if t.deleted %}deleted{%endif%}"> |
| {% for col in columns if col['active'] %} |
| {% if col['name'] == 'ticket_num' %} |
| <td><a href="{{t.url()}}">{{t[col['name']]}}</a></td> |
| {% elif col['name'] == 'summary' %} |
| <td><a href="{{t.url()}}">{{t[col['name']]}}</a></td> |
| {% elif col['name'] == 'status' %} |
| <td class="{{t.open_or_closed}}">{{t.status}}</td> |
| {% elif col['name'] == 'assigned_to' %} |
| <td>{% if t.assigned_to_id %}{{t.assigned_to.display_name}}{% endif %}</td> |
| {% elif col['name'] == 'reported_by' %} |
| <td>{% if t.reported_by %}{{t.reported_by.display_name}}{% endif %}</td> |
| {% elif col['name'] == 'created_date' %} |
| <td>{% if t.created_date %}{{abbr_date(t.created_date)}}{% endif %}</td> |
| {% elif col['name'] == 'mod_date' %} |
| <td>{% if t.mod_date %}{{abbr_date(t.mod_date)}}{% endif %}</td> |
| {% elif col['name'] == 'labels' %} |
| <td> |
| {%- for l in t.labels -%} |
| <a href="{{c.app.url}}search?q=labels:{{h.urlquoteplus(l)}}">{{l}}</a> |
| {%- if not loop.last -%}, {% endif -%} |
| {%- endfor -%} |
| </td> |
| {% elif col['name'] == 'votes' %} |
| <td>{{ t.votes }}</td> |
| {% else %} |
| {% set fld = c.app.globals.get_custom_field(col['name']) %} |
| {% if fld and fld.type == 'user' %} |
| {% set user = t.get_custom_user(col['name']) %} |
| <td>{% if user %}{{user.get_pref('display_name')}}{% endif %}</td> |
| {% else %} |
| <td>{{t.custom_fields.get(col['name'])}}</td> |
| {% endif %} |
| {% endif %} |
| {% endfor %} |
| <td> </td> |
| </tr> |
| {% endfor %} |
| </tbody> |
| </table> |
| <form action="." id="col_list_form" style="display:none"> |
| <input type="hidden" name="limit" value="{{limit}}"> |
| <input type="hidden" name="page" value="{{page}}"> |
| {% if sort %} |
| <input type="hidden" name="sort" value="{{sort}}"> |
| {% endif %} |
| <input type="hidden" name="q" value="{{query}}"> |
| <ul> |
| {% for col in columns %} |
| <li class="clear"> |
| <input type="hidden" name="columns-{{loop.index0}}.name" value="{{col['name']}}"> |
| <input type="hidden" name="columns-{{loop.index0}}.sort_name" value="{{col['sort_name']}}"> |
| <input type="hidden" name="columns-{{loop.index0}}.label" value="{{col['label']}}"> |
| <input type="checkbox" name="columns-{{loop.index0}}.active"{% if col['active'] %} checked="checked"{% endif %}> {{col['label']}} |
| </li> |
| {% endfor %} |
| </ul> |
| <div class="clear"> </div> |
| <input type="submit" value="Save"> |
| (applies to this page only) |
| {% if h.has_access(c.app, 'configure') %} |
| <a href="{{c.project.url()}}admin/{{c.app.config.options.mount_point}}/fields">Change field settings permanently.</a> |
| {% endif %} |
| </form> |
| {{widget.fields['lightbox'].display()}} |
| {% endif %} |
| {{widget.fields['page_list'].display(limit=limit, page=page, count=count)}} |
| <script type="text/javascript"> |
| var q="{{query and h.urlquoteplus(query) or ''}}", count={{count}}, limit={{limit}}, page={{page}}, sort="{{sort}}"; |
| </script> |
| </div> |
| {% block wiki_extra_css %} |
| <style type="text/css"> |
| tr.deleted a { color:red; } |
| tr.deleted { color:red; } |
| </style> |
| {% endblock %} |