{#- 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. -#} {% import 'allura:templates/jinja_master/lib.html' as lib with context %}
{{widget.display_field_by_name('ticket_num')|safe}} {% if help_msg %}
{{g.markdown.convert(help_msg)}}
{% endif %}
{{widget.display_field_by_name('summary')|safe}}
{% if widget.fields['_milestone'] %}
{{widget.display_field_by_name('_milestone')|safe}}
{% endif %}
{{widget.display_field_by_name('status')|safe}}
{{widget.display_field_by_name('assigned_to')|safe}}
 
{% set min_c_fields = widget.fields['_milestone'] and 1 or 0 %} {% if c.app.globals.custom_fields and c.app.globals.custom_fields.__len__() > min_c_fields %} {{widget.display_field_by_name('custom_fields', ignore_errors=True)}}
 
{% endif %}
{{widget.display_field_by_name('labels')|safe}}
{{widget.display_field_by_name('private')}} {% if h.has_access(ticket, 'edit') %} {# Only users with the ability to edit will be able to see the Discussion Disable option. This also serves to hide the checkbox when creating new tickets #}
{{widget.display_field_by_name('discussion_disabled')}}
{% endif %}
 
{% if ticket %} {{lib.abbr_date(ticket.mod_date)}} {% else %} Now {% endif %}
{% if ticket %} {{lib.abbr_date(ticket.created_date)}} {% else %} Now {% endif %}
{% if ticket %} {{lib.user_link(ticket.reported_by)}} {% else %} {{lib.user_link(c.user)}} {% endif %}
 
{{widget.display_field_by_name('description')|safe}}
 
{% if ticket and ticket.attachments %}
{% for att in ticket.attachments %}
{% if att.is_image() and not att.is_embedded() %} Thumbnail {% endif %} {{att.filename}} {{ g.icons['delete'].render(href=att.url(), extra_css='btn delete_attachment') }}
{% endfor %}
{% endif %} {{widget.display_field_by_name('attachment')|safe}}
 

{{lib.gravatar(c.user, size=48)}}
{{lib.user_link(c.user)}}

{{widget.display_field_by_name('comment')|safe}}
 
{{widget.display_field_by_name('submit')|safe}} {% if c.user and c.user != c.user.anonymous() and not ticket and not subscribed_to_tool|default %} {% endif %} Cancel
{{lib.csrf_token()}}