bloodhound_theme / bhtheme / templates / bh_ticket_box.html

  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

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an
  KIND, either express or implied.  See the License for the
  specific language governing permissions and limitations
  under the License.

Ticket Box (ticket fields along with description).

 - 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
 - reporter_link=None: rendered link for the reporter field
 - owner_link=None: rendered link for the owner field
 - colcount=6: the number of fields to display in a row
<div xmlns=""
     id="ticket" class="${'ticketdraft' if preview_mode else None}">

  <div class="properties" style="margin-top: 1.2em"
         py:with="fields = [f for f in fields if not f.skip and not in ('type', 'owner', 'keywords')];
            small_fields = [f for f in fields if f.type not in ('text', 'textarea') and != 'cc'];
            text_fields = [f for f in fields if f.type == 'text' or == 'cc'];
            area_fields = [f for f in fields if f.type == 'textarea'];
            _colcount = colcount or 6">
    <py:for each="_fields, csscls, count, fontsize in 
        [(small_fields, 'span2', _colcount, '150%'),
         (text_fields, 'span4', colcount / 2, None),
         (area_fields, 'span', 1, None)]">
      <div class="row" py:for="fields_row in group(_fields, count)">
        <div py:for="idx, field in enumerate(fields_row)" py:if="field is not None"
          <p id="${'h_' + if field else None}">
            <py:if test="field"><i18n:msg params="field">${field.label or}:</i18n:msg></py:if>
          <p style="font-size: ${fontsize if field and != 'cc' else '120%'}">
            <py:if test="field">
              <py:choose test="">
                <py:when test="'rendered' in field">${field.rendered}</py:when>
  <div class="${'well' if not preview_mode else None}">
    <!--! use a placeholder if it's a new ticket -->
    <h3 class="summary searchable">$ticket.summary</h3>
    <py:for each="field in fields">
      <py:if test=" == 'keywords'">
        <div title="Keywords">
          <i class="icon-tags"></i> ${field.rendered}

    <div class="description">
      <h5 id="comment:description">
        <span py:if="description_change" class="lastmod pull-right"
          <i18n:msg params="author">(last modified by ${authorinfo(})</i18n:msg>
          (<a href="${href.ticket(, action='diff', version=description_change.cnum)}">diff</a>)
      <!--! Quote the description (only for existing tickets) -->
      <div class="pull-right">
        <form py:if="ticket.exists and ticket.description and can_append"
            id="addreply" method="get" action="#comment">
          <input type="hidden" name="replyto" value="description" />
          <input type="submit" name="reply" value="${_('Reply')}"
              class="btn btn-mini"
              title="Reply, quoting this description" />
      <div py:if="ticket.description" class="searchable" xml:space="preserve">
        ${wiki_to_html(context, ticket.description, escape_newlines=preserve_newlines)}
      <br py:if="not ticket.description" style="clear: both" />
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.