{# Copyright (C) 2010-2023 Edgewall Software This software is licensed as described in the file COPYING, which you should have received as part of this distribution. The terms are also available at https://trac.edgewall.org/wiki/TracLicense. This software consists of voluntary contributions made by many individuals. For the exact contribution history, see the revision history and logs, available at https://trac.edgewall.org/. #} ## Ticket Box (ticket fields along with description). # import 'macros.html' as jmacros with context {# Arguments: - ticket: the ticket to be shown - fields: ticket field metadata - description_change: metadata about changes in the description - can_append: True if the user is allowed to append to tickets - preview_mode: if True, show the "draft" background - hide=False: if True, hide the box - reporter_link=None: rendered link for the reporter field - owner_link=None: rendered link for the owner field #}
${tag_("Opened %(created)s", created=pretty_dateinfo(ticket.time))}
# endif # if closetime:${tag_("Closed %(closed)s", closed=pretty_dateinfo(closetime))}
# endif # if ticket.changetime != ticket.time and ticket.changetime != closetime:${ tag_("Last modified %(modified)s", modified=pretty_dateinfo(ticket.changetime)) }
# endif # if not ticket.exists:${ _("(ticket not yet created)")}
# endif${ _("Reported by:")} | ${v_reporter} | ${ _("Owned by:")} | ${v_owner} |
---|---|---|---|
# if field: ${_("%(label)s:", label=field.label or field.name)} # endif | # endif # if loop.first or not fullrow:
# if field:
# set value = ticket[field.name]
# if 'rendered' in field:
${field.rendered}
# elif not value:
# elif field.type == 'time':
${pretty_dateinfo(value, field.format,
dateonly=field.format != 'relative')}
# elif field.type == 'text' and field.format == 'wiki':
${wiki_to_oneliner(context, value)}
# elif field.type == 'textarea' and field.format == 'wiki':
${wiki_to_html(context, value, escape_newlines=preserve_newlines)}
# elif field.type == 'textarea':
# for line in value.splitlines():
# if loop.index > 1:
# endif ${line} # endfor # else: ${value} # endif # endif |
# endif
# endfor