Author: gjm
Date: Tue Aug 28 15:50:50 2012
New Revision: 1378191
URL: http://svn.apache.org/viewvc?rev=1378191&view=rev
Log:
theme: specifies the number of columns in a row for ticket fields in ticket
view - fixes #129 (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=1378191&r1=1378190&r2=1378191&view=diff
==============================================================================
---
incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html
(original)
+++
incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html
Tue Aug 28 15:50:50 2012
@@ -177,7 +177,9 @@
<py:if test="ticket.exists">
<div class="row">
<div class="$colspan">
- <xi:include href="bh_ticket_box.html" py:with="preview_mode =
change_preview.fields"/>
+ <xi:include href="bh_ticket_box.html"
+ py:with="preview_mode = change_preview.fields ;
+ colcount = 4 if bhdb else 6"/>
</div>
<!--! do not show attachments for old versions of this ticket or
for new tickets -->
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=1378191&r1=1378190&r2=1378191&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
Tue Aug 28 15:50:50 2012
@@ -28,6 +28,7 @@ Arguments:
- 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="http://www.w3.org/1999/xhtml"
xmlns:py="http://genshi.edgewall.org/"
@@ -35,23 +36,26 @@ Arguments:
xmlns:i18n="http://genshi.edgewall.org/i18n"
id="ticket" class="${'ticketdraft' if preview_mode else None}">
- <div class="properties row" style="margin-top: 1.2em"
+ <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')]">
- <div py:for="idx, field in enumerate(fields)"
- class="${'span2' if field.name != 'cc' else 'span4'}">
- <py:if test="field.type != 'textarea'">
- <p id="${'h_' + field.name if field else None}">
- <py:if test="field"><i18n:msg params="field">${field.label or
field.name}:</i18n:msg></py:if>
- </p>
- <p style="font-size: ${'150%' if field and field.name != 'cc' else
'120%'}">
- <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>
- </p>
- </py:if>
+ <div class="row" py:for="fields_row in group(fields, colcount or 6)">
+ <div py:for="idx, field in enumerate(fields_row)" py:if="field is not
None"
+ class="${'span2' if field.name != 'cc' else 'span4'}">
+ <py:if test="field.type != 'textarea'">
+ <p id="${'h_' + field.name if field else None}">
+ <py:if test="field"><i18n:msg params="field">${field.label or
field.name}:</i18n:msg></py:if>
+ </p>
+ <p style="font-size: ${'150%' if field and field.name != 'cc' else
'120%'}">
+ <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>
+
+ </p>
+ </py:if>
+ </div>
</div>
</div>
<div class="${'well' if not preview_mode else None}">