You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by gj...@apache.org on 2012/10/15 10:53:14 UTC
svn commit: r1398220 - in
/incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates:
bh_ticket.html bh_ticket_box.html
Author: gjm
Date: Mon Oct 15 08:53:13 2012
New Revision: 1398220
URL: http://svn.apache.org/viewvc?rev=1398220&view=rev
Log:
reposition description above some of the ticket fields - towards #206 (from olemis)
Modified:
incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html
incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket_box.html
Modified: incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html?rev=1398220&r1=1398219&r2=1398220&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html (original)
+++ incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html Mon Oct 15 08:53:13 2012
@@ -127,47 +127,42 @@
<div class="stickyBox">
<div id="overview" class="stickyStatus $colspan">
<div class="whitebox"></div>
- <h1 id="trac-ticket-title" py:choose="">
- <py:when test="ticket.exists">
- <i18n:msg params="id">Ticket #${ticket.id}</i18n:msg>
- <span class="status"><small>(${ticket.status}<py:if
- test="ticket.type"> ${ticket.type}</py:if><py:if
- test="ticket.resolution">: ${ticket.resolution}</py:if>)</small></span>
- <py:choose test="">
- <py:when test="version is None" />
- <py:when test="version == 0">
- —
- <small>
- <i18n:msg>at <a href="#comment:description">Initial Version</a></i18n:msg>
- </small>
+ <div class="properties">
+ <h2 class="summary searchable" py:choose="">
+ <py:when test="ticket.exists">$ticket.summary</py:when>
+ <py:otherwise>Create Ticket</py:otherwise>
+ </h2>
+ </div>
+ <div class="row">
+ <div class="span3">
+ <h5 id="trac-ticket-title" py:choose="">
+ <py:when test="ticket.exists">
+ <a href="${href.ticket(ticket.id)}"
+ i18n:msg="id">Ticket #${ticket.id}</a>
</py:when>
<py:otherwise>
- —
- <small>
- <i18n:msg params="version">at <a href="#comment:$version">Version $version</a></i18n:msg>
- </small>
+ New Ticket <small><span py:if="preview_mode and ticket.type" class="status">(${ticket.type})</span></small>
</py:otherwise>
- </py:choose>
- </py:when>
- <py:otherwise>
- Create New Ticket <small><span py:if="preview_mode and ticket.type" class="status">(${ticket.type})</span></small>
- </py:otherwise>
- </h1>
- <h6 class="date">
- <span i18n:msg="created" py:if="ticket.exists">Opened ${pretty_dateinfo(ticket.time)}</span>
- <py:if test="ticket.changetime != ticket.time">,
- <span i18n:msg="modified">Last modified ${pretty_dateinfo(ticket.changetime)}</span>
- </py:if>
- <span py:if="not ticket.exists" class="label label-warning">(ticket not yet created)</span>
- </h6>
- <h6>
- <span id="h_reporter">Reported by
- ${reporter_link if defined('reporter_link') else authorinfo(ticket.reporter)}
- </span>,
- <span id="h_owner">Assigned to
- ${(owner_link if defined('owner_link') else authorinfo(ticket.owner)) if ticket.owner else ''}
- </span>
- </h6>
+ </h5>
+ </div>
+ <div class="offset3">
+ <h6 class="date pull-right">
+ <span i18n:msg="created" py:if="ticket.exists">Opened ${pretty_dateinfo(ticket.time)}</span>
+ <py:if test="ticket.changetime != ticket.time">,
+ <span i18n:msg="modified">Last modified ${pretty_dateinfo(ticket.changetime)}</span>
+ </py:if>
+ <span py:if="not ticket.exists" class="label label-warning">(ticket not yet created)</span>
+ </h6>
+ <h6 class="pull-right">
+ <span id="h_reporter">Reported by
+ ${reporter_link if defined('reporter_link') else authorinfo(ticket.reporter)}
+ </span>,
+ <span id="h_owner">Assigned to
+ ${(owner_link if defined('owner_link') else authorinfo(ticket.owner)) if ticket.owner else ''}
+ </span>
+ </h6>
+ </div>
+ </div>
<div class="stickyEndMark"></div>
</div>
</div>
@@ -176,6 +171,28 @@
</script>
<py:if test="ticket.exists">
<div class="row">
+ <div class="span6">
+ <h4 class="status"><small>${ticket.status}<py:if
+ test="ticket.type"> ${ticket.type}</py:if><py:if
+ test="ticket.resolution">: ${ticket.resolution}</py:if></small></h4>
+ <py:choose test="">
+ <py:when test="version is None" />
+ <py:when test="version == 0">
+ —
+ <small>
+ <i18n:msg>at <a href="#comment:description">Initial Version</a></i18n:msg>
+ </small>
+ </py:when>
+ <py:otherwise>
+ —
+ <small>
+ <i18n:msg params="version">at <a href="#comment:$version">Version $version</a></i18n:msg>
+ </small>
+ </py:otherwise>
+ </py:choose>
+ </div>
+ </div>
+ <div class="row">
<div class="$colspan">
<xi:include href="bh_ticket_box.html"
py:with="preview_mode = change_preview.fields ;
Modified: incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket_box.html
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket_box.html?rev=1398220&r1=1398219&r2=1398220&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket_box.html (original)
+++ incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket_box.html Mon Oct 15 08:53:13 2012
@@ -36,74 +36,89 @@ Arguments:
xmlns:i18n="http://genshi.edgewall.org/i18n"
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 f.name not in ('type', 'owner', 'keywords')];
- small_fields = [f for f in fields if f.type not in ('text', 'textarea') and f.name != 'cc'];
- text_fields = [f for f in fields if f.type == 'text' or f.name == 'cc'];
- area_fields = [f for f in fields if f.type == 'textarea'];
- _colcount = colcount or 6">
- <py:for each="_fields, csscls, count, fontsize, is_inline in
- [(small_fields, 'span4', _colcount / 2, None, True),
- (text_fields, 'span4', colcount / 2, None, False),
- (area_fields, colspan, 1, None, False)]">
- <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"
- class="$csscls" >
- <div class="row" py:strip="not is_inline">
+ <py:def function="render_fields_row(fields_row, csscls, fontsize, is_inline)">
+ <div class="row">
+ <div py:for="idx, field in enumerate(fields_row)" py:if="field is not None"
+ class="$csscls${' enum' if is_inline else None}" >
+ <div class="row" py:strip="not is_inline">
+ <div class="span2" py:strip="not is_inline">
<h5 id="${'h_' + field.name if field else None}"
- class="${'span2' if is_inline else None}">
+ class="${'pull-right' if is_inline else None}">
<py:if test="field"><i18n:msg params="field">${field.label or field.name}:</i18n:msg></py:if>
</h5>
- <div class="${'span2' if is_inline else None}"
- style="${'margin-top: 10px' if is_inline else None}">
- <py:if test="field">
- <py:choose test="">
- <py:when test="'rendered' in field">${field.rendered}</py:when>
- <py:otherwise>${ticket[field.name]}</py:otherwise>
- </py:choose>
- </py:if>
-
- </div>
+ </div>
+ <div class="${'span2' if is_inline else None}">
+ <py:if test="field">
+ <py:choose test="">
+ <py:when test="'rendered' in field">${field.rendered}</py:when>
+ <py:otherwise>${ticket[field.name]}</py:otherwise>
+ </py:choose>
+ </py:if>
+
</div>
</div>
</div>
- </py:for>
- </div>
- <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="field.name == 'keywords'">
- <div title="Keywords">
- <i class="icon-tags"></i> ${field.rendered}
- </div>
- </py:if>
- </py:for>
+ </div>
+ </py:def>
- <div class="description">
- <h5 id="comment:description">
- Description
- <span py:if="description_change" class="lastmod pull-right"
- title="$description_change.date">
- <i18n:msg params="author">(last modified by ${authorinfo(description_change.author)})</i18n:msg>
- (<a href="${href.ticket(ticket.id, action='diff', version=description_change.cnum)}">diff</a>)
- </span>
- </h5>
-
- <!--! 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" />
- </form>
- </div>
- <div py:if="ticket.description" class="searchable" xml:space="preserve">
- ${wiki_to_html(context, ticket.description, escape_newlines=preserve_newlines)}
+ <py:with vars="fields = [f for f in fields if not f.skip and f.name not in ('type', 'owner', 'keywords')];
+ small_fields = [f for f in fields if f.type not in ('text', 'textarea') and f.name != 'cc'];
+ text_fields = [f for f in fields if f.type == 'text' or f.name == 'cc'];
+ area_fields = [f for f in fields if f.type == 'textarea'];
+ _colcount = colcount or 6">
+ <div class="properties" style="margin: 1.2em 0px">
+ <py:with vars="_fields, csscls, count, fontsize, is_inline =
+ (small_fields, 'span4', _colcount / 2, None, True)">
+ <py:for each="fields_row in group(_fields, count)">
+ ${render_fields_row(fields_row, csscls, fontsize, is_inline)}
+ </py:for>
+ </py:with>
+ </div>
+ <div class="${'well' if not preview_mode else None}">
+ <!--! use a placeholder if it's a new ticket -->
+ <py:for each="field in fields">
+ <py:if test="field.name == 'keywords'">
+ <div title="Keywords">
+ <i class="icon-tags"></i> ${field.rendered}
+ </div>
+ </py:if>
+ </py:for>
+
+ <div class="description">
+ <h5 id="comment:description">
+ Description
+ <span py:if="description_change" class="lastmod pull-right"
+ title="$description_change.date">
+ <i18n:msg params="author">(last modified by ${authorinfo(description_change.author)})</i18n:msg>
+ (<a href="${href.ticket(ticket.id, action='diff', version=description_change.cnum)}">diff</a>)
+ </span>
+ </h5>
+
+ <!--! 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" />
+ </form>
+ </div>
+ <div py:if="ticket.description" class="searchable" xml:space="preserve">
+ ${wiki_to_html(context, ticket.description, escape_newlines=preserve_newlines)}
+ </div>
+ <br py:if="not ticket.description" style="clear: both" />
</div>
- <br py:if="not ticket.description" style="clear: both" />
</div>
- </div>
+ <div class="properties" style="margin-top: 1.2em">
+ <py:for each="_fields, csscls, count, fontsize, is_inline in
+ [(text_fields, 'span4', colcount / 2, None, False),
+ (area_fields, colspan, 1, None, False)]">
+ <py:for each="fields_row in group(_fields, count)">
+ ${render_fields_row(fields_row, csscls, fontsize, is_inline)}
+ </py:for>
+ </py:for>
+ </div>
+ </py:with>
</div>
+