{#- 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. -#} {% extends g.theme.master %} {% from 'allura:templates/jinja_master/lib.html' import abbr_date with context %} {% from 'allura:templates/jinja_master/lib.html' import canonical_tag %} {% do g.register_forge_css('css/forge/hilite.css') %} {% do g.register_app_css('css/tracker.css') %} {% block title %}{{c.project.name}} / {{c.app.config.options.mount_label}} / #{{ticket.ticket_num}} {{ticket.summary}}{% endblock %} {%- block head -%} {{ canonical_tag() }} {%- endblock -%} {% block header %}#{{ticket.ticket_num}} {{ticket.summary}}{% if ticket.deleted %} (deleted){% endif %}{% endblock %} {% set editable = h.has_access(ticket, 'update') and not ticket.deleted %} {% block actions %} {{ g.icons['feed'].render(href='feed.rss', title='Follow this Ticket', rel='nofollow') }} {% if c.user and c.user != c.user.anonymous() %} {{c.subscribe_form.display(value=subscribed, action='subscribe', style='icon')}} {% endif %} {% if h.has_access(ticket.app, 'admin') %} {{ g.icons['move'].render(show_title=True, href='move') }} {% endif %} {% if editable %} {{ g.icons['edit'].render(show_title=True, extra_css='edit_ticket') }} {%if h.has_access(ticket, 'delete') and not ticket.deleted%} {{ g.icons['delete'].render(href='delete', extra_css='post-link') }} {% endif %} {%elif h.has_access(ticket, 'delete') and ticket.deleted%} {{ g.icons['undelete'].render(href='undelete', extra_css='post-link') }} {% endif %} {% endblock %} {% block edit_box %}
{% if editable %} {% endif %}
{% if '_milestone' in ticket.custom_fields %}
{% if ticket.custom_fields['_milestone'] %} {{ticket.custom_fields['_milestone']}} {% else %} None {% endif %}
{% endif %}
{{ticket.status}}
{% if ticket.assigned_to_id %} {{lib.user_link(ticket.assigned_to)}} {% else %} {{ticket.assigned_to_name()}} {% endif %}
{% for label in ticket.labels %} {{label}} ({{ticket.artifacts_labeled_with(label, ticket.app_config).count()}}) {% else %} None {% endfor %}
{% set min_c_fields = '_milestone' in ticket.custom_fields and 1 or 0 %} {% if globals.custom_fields and globals.custom_fields.__len__() > min_c_fields %} {% set cf_count=0 %} {% for field in globals.custom_fields or [] %} {% if field.name != '_milestone' %} {% if cf_count%4 == 0 and cf_count != 0 %}
{% endif %}
{% if field.type == 'user' %} {% set user = ticket.get_custom_user(field.name) %} {% if user and not user.is_anonymous() %} {{lib.user_link(user, avatar=False)}} {% else %} nobody {% endif %} {% elif field.type == 'milestone' %} {{ticket.custom_fields[field.name]}} {% else %} {{ticket.custom_fields[field.name]}} {% endif %}
{% set cf_count=cf_count+1 %} {% endif %} {% endfor %} {% endif %}
{{abbr_date(ticket.mod_date)}}
{{abbr_date(ticket.created_date)}}
{{lib.user_link(ticket.reported_by)}}
{{'Yes' if ticket.private else 'No'}} {% if ticket.discussion_disabled %} {% endif %}
{% endblock %} {% block content %} {% if voting_enabled %} {{ c.vote_form.display(artifact=ticket) }} {% endif %}
{{g.markdown.cached_convert(ticket, 'description')}}
{% if ticket.attachments %} {{ticket.attachments|length}} Attachments
{% for att in ticket.attachments %}
{% if att.is_image() and not att.is_embedded() %} {% endif %} {{att.filename}}
{% endfor %}
{% endif %} {% endblock %} {% block after_content %} {{lib.related_artifacts(ticket, c.user)}}

Discussion

{% set thread=ticket.discussion_thread %} {{c.thread.display(value=thread,new_post_text="New Comment",page=page,limit=limit,count=count)}}
{% endblock %} {% block extra_js %} {% if h.has_access(ticket, 'update') %} {% endif %} {% endblock %} {% block extra_css %} {% endblock %}