You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by ma...@apache.org on 2013/05/24 13:34:52 UTC
svn commit: r1486019 - in /bloodhound/trunk/bloodhound_theme/bhtheme:
htdocs/bloodhound.css templates/bh_ticket.html templates/bh_ticket_box.html
Author: matevz
Date: Fri May 24 11:34:52 2013
New Revision: 1486019
URL: http://svn.apache.org/r1486019
Log:
#533 - Ticket page cleanup
Modified:
bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css
bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html
bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket_box.html
Modified: bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css
URL: http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css?rev=1486019&r1=1486018&r2=1486019&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css (original)
+++ bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css Fri May 24 11:34:52 2013
@@ -1135,7 +1135,7 @@ table.wiki th {
.lastmod {
font-size: 90%;
- color: rgb(80, 80, 80);
+ color: rgb(120, 120, 120);
font-style: italic;
}
@@ -1147,13 +1147,18 @@ table.wiki th {
font-weight: normal;
}
-.ticket-properties td{
+.ticket-properties td {
border: none;
+ padding-left: 0;
+}
+
+.ticket-properties input, .ticket-properties select {
+ margin-bottom: 0;
}
.ticket-properties td:first-child{
- text-align: right;
- font-weight: bold;
+ color: rgb(120, 120, 120);
+ width: 35%;
}
#trac-add-comment textarea#comment{
@@ -1216,4 +1221,4 @@ input[type="radio"]:checked + label span
}
input[type="radio"]:not(:checked) + label span {
text-decoration:underline;
-}
\ No newline at end of file
+}
Modified: bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html
URL: http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html?rev=1486019&r1=1486018&r2=1486019&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html (original)
+++ bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html Fri May 24 11:34:52 2013
@@ -301,12 +301,10 @@
</py:def>
<py:def function="render_ticket_summary(t, showid)">
- <py:if test="showid"> <h2><span class="visible-phone">${'#' + t.id if t.exists else 'NEW'} - </span></h2></py:if>
+ <py:if test="showid"><h2><span class="visible-phone">${'#' + t.id if t.exists else 'NEW'} - </span></h2></py:if>
<h2 class="ticket-summary searchable clip-affix" contenteditable="false"
- data-edit="${'inplace' if can_modify or can_create else None}"
- id="vc-summary" placeholder-content="${'Enter ticket summary' if not t.summary else ''}">
- <py:if test="t.summary">$t.summary</py:if><br />
- </h2>
+ data-edit="${'inplace' if can_modify or can_create else None}" id="vc-summary"
+ placeholder-content="${'Enter ticket summary' if not t.summary else ''}">${t.summary if t.summary else None}</h2>
</py:def>
<py:def function="render_ticket_summary_details(t)">
@@ -332,7 +330,7 @@
<span id="inplace-edit-button" py:if="can_modify or can_edit or can_create" class="btn-toolbar" style="${'display: None;' if not t.exists else ''}">
<button id="inplace-edit" class="btn">
<i class="icon-edit"></i>
- <span class="hidden-phone hidden-tablet">${_('Modify Ticket')}</span>
+ <span>${_('Modify Ticket')}</span>
</button>
<span id="edit-state-buttons" class="btn-toolbar" style="display: None">
<button id="edit-submit" class="btn" type="submit"
@@ -369,14 +367,12 @@
</py:if>
<input id="hidden-comment" type="hidden" name="comment" value="" />
-
-
- <div class="$colspan">
- <!--! ticket properties -->
- <div class="properties">
- ${render_ticket_summary_details(ticket)}
- </div>
- </div>
+ <div class="$colspan">
+ <!--! ticket properties -->
+ <div class="properties">
+ ${render_ticket_summary_details(ticket)}
+ </div>
+ </div>
<div id="content" class="$colspan">
<div id="belowStatus">
@@ -384,12 +380,11 @@
<!--! ticket details -->
<!--! main ticket info -->
<div class="properties">
- <table class="ticket-properties">
<xi:include href="bh_ticket_box.html"
py:with="preview_mode = change_preview.fields if change_preview else False;
colcount = 4 if bhdb else 6"/>
- </table>
</div>
+
<div id="dummy-vc-summary" style="display: none"/>
<div py:if="bhrelations and ticket.exists" class="relations">
@@ -499,7 +494,7 @@
<tr py:if="can_modify or can_create">
<td colspan="2">
<label for="field-product-name">Product:</label>
- <input type="text" disabled="disabled" class="span2"
+ <input type="text" disabled="disabled"
id="field-product-name" name="field_product_name"
value="$req.perm.env.product.name ($req.perm.env.product.prefix)" />
<input type="hidden" id="field-product" name="field_product" value="$req.perm.env.product.prefix" />
@@ -516,7 +511,7 @@
<tr py:if="only_for_admin">
<td colspan="2">
<label for="field-reporter">Reporter:</label>
- <input class="span2" type="text" id="field-reporter" name="field_reporter" value="${ticket.reporter}" />
+ <input type="text" id="field-reporter" name="field_reporter" value="${ticket.reporter}" />
</td>
</tr>
@@ -543,8 +538,7 @@
<label for="field-${field.name}" py:if="field" id="${'editor-' + field.name}"
i18n:msg="field">${field.edit_label or field.label or field.name}:</label>
<py:choose test="field.type" py:if="field">
- <select py:when="'select'" id="field-${field.name}" name="field_${field.name}"
- class="span2">
+ <select py:when="'select'" id="field-${field.name}" name="field_${field.name}">
<option py:if="field.optional"></option>
<option py:for="option in field.options"
selected="${value == option or None}"
Modified: bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket_box.html
URL: http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket_box.html?rev=1486019&r1=1486018&r2=1486019&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket_box.html (original)
+++ bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket_box.html Fri May 24 11:34:52 2013
@@ -40,112 +40,107 @@ Arguments:
<py:def function="render_fields_row(fields_row, fontsize, is_inline)">
<py:for each="idx, field in enumerate(fields_row)">
<py:if test="field is not None">
- <tr>
- <td 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>
- </td>
- <td data-edit="${'inplace' if (field and field.name not in ('status', 'product')) else None}" id="${'vc-' + field.name if field 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>
- <py:if test="field.name == 'status'">
- <div id="edit-workflow-buttons" class="btn-group" style="display: none">
- <button class="btn dropdown-toggle" data-toggle="dropdown" style="white-space: normal">
- <span id="submit-action-label"></span>
- <span class="caret"></span>
- </button>
- <ul class="dropdown-menu">
- <fieldset id="workflow-actions">
- </fieldset>
- </ul>
- </div>
- </py:if>
- </td>
- </tr>
+ <tr>
+ <td id="${'h_' + field.name if field else None}">
+ <i18n:msg py:if="field" params="field">${field.label or field.name} </i18n:msg>
+ </td>
+ <td data-edit="${'inplace' if (field and field.name not in ('status', 'product')) else None}" id="${'vc-' + field.name if field 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>
+ <py:if test="field.name == 'status'">
+ <div id="edit-workflow-buttons" class="btn-group" style="display: none">
+ <button class="btn dropdown-toggle input-block-level" data-toggle="dropdown" style="white-space: normal">
+ <span id="submit-action-label"></span>
+ <span class="caret"></span>
+ </button>
+ <ul class="dropdown-menu">
+ <fieldset id="workflow-actions">
+ </fieldset>
+ </ul>
+ </div>
+ </py:if>
+ </td>
+ </tr>
</py:if>
</py:for>
</py:def>
- <tr>
- <td id="h_reporter">
- Reporter:
- </td>
- <td id="vc-reporter" data-edit="${'inplace' if only_for_admin else None}">
- ${reporter_link if defined('reporter_link') else authorinfo(ticket.reporter)}
- </td>
- </tr>
- <!--! use a placeholder if it's a new ticket -->
- <py:for each="field in fields">
+
+ <h4>Details</h4>
+ <table class="ticket-properties">
+ <tr>
+ <td id="h_reporter">Reporter</td>
+ <td id="vc-reporter" data-edit="${'inplace' if only_for_admin else None}">
+ ${reporter_link if defined('reporter_link') else authorinfo(ticket.reporter)}
+ </td>
+ </tr>
+
+ <!--! use a placeholder if it's a new ticket -->
+ <py:for each="field in fields">
<py:if test="field.name == 'keywords'">
<tr title="Keywords" class="keywords">
- <td>Keywords:</td>
+ <td>Keywords</td>
<td><span data-edit="${'inplace' if can_modify or can_edit or can_create else None}" id="vc-keywords">${field.rendered}</span></td>
</tr>
</py:if>
</py:for>
- <!--!
- Todo: ticket status and type are included here and thrown out of
- bh_ticket view. The resolution field is still missing, and all of
- this should probably be consolidated into the ticket widget itself,
- instead of this code (i.e., status, type and resolution should not
- be marked as .skip)
- -->
- <py:with vars="basefields = [f for f in fields if (f.name == 'status' or f.name == 'type' or not f.skip)
- and f.name not in ('owner', 'keywords')];
- small_fields = [f for f in basefields if f.type not in ('text', 'textarea') and f.name != 'cc'];
- text_fields = [f for f in basefields if (f.type == 'text' and f.name != 'type') or f.name == 'cc'];
- area_fields = [f for f in basefields if f.type == 'textarea'];
- _colcount = colcount or 6">
- <div class="properties">
+ <!--!
+ Todo: ticket status and type are included here and thrown out of
+ bh_ticket view. The resolution field is still missing, and all of
+ this should probably be consolidated into the ticket widget itself,
+ instead of this code (i.e., status, type and resolution should not
+ be marked as .skip)
+ -->
+ <py:with vars="basefields = [f for f in fields if (f.name == 'status' or f.name == 'type' or not f.skip)
+ and f.name not in ('owner', 'keywords')];
+ small_fields = [f for f in basefields if f.type not in ('text', 'textarea') and f.name != 'cc'];
+ text_fields = [f for f in basefields if (f.type == 'text' and f.name != 'type') or f.name == 'cc'];
+ area_fields = [f for f in basefields if f.type == 'textarea'];
+ _colcount = colcount or 6">
<py:with vars="_fields, count = (small_fields, _colcount / 2)">
- <div py:for="fields_row in group(_fields, count)" class="row">
+ <py:for each="fields_row in group(_fields, count)">
${render_fields_row(fields_row, None, True)}
- </div>
+ </py:for>
</py:with>
- </div>
-
- <div class="clearboth"></div>
-
- <div class="description">
- <h3 id="comment:description">
- Description
- </h3>
- <!--! 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">
- <a href="?replyto=description#trac-add-comment" class="btn btn-mini"
- title="Reply, quoting this description" type="submit">Reply</a>
- </form>
- </div>
- <div class="searchable" xml:space="preserve"
- data-edit="${'inplace' if can_edit or can_create else None}"
- id="vc-description">
- <py:if test="ticket.description">
- ${wiki_to_html(context, ticket.description, escape_newlines=preserve_newlines)}
- </py:if>
- </div>
- <br py:if="not ticket.description" style="clear: both" />
- <span py:if="description_change" class="lastmod" 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>
- </div>
- <div class="properties">
<py:for each="_fields, count in
[(text_fields, _colcount / 2), (area_fields, 1)]">
- <div py:for="fields_row in group(_fields, count)" class="row">
+ <py:for each="fields_row in group(_fields, count)">
${render_fields_row(fields_row, None, False)}
- </div>
+ </py:for>
</py:for>
+ </py:with>
+ </table>
+
+
+ <div class="description">
+ <h4 id="comment:description">Description</h4>
+
+ <!--! 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">
+ <a href="?replyto=description#trac-add-comment" class="btn btn-mini"
+ title="Reply, quoting this description" type="submit">Reply</a>
+ </form>
+ </div>
+ <div class="searchable" xml:space="preserve"
+ data-edit="${'inplace' if can_edit or can_create else None}"
+ id="vc-description">
+ <py:if test="ticket.description">
+ ${wiki_to_html(context, ticket.description, escape_newlines=preserve_newlines)}
+ </py:if>
</div>
- </py:with>
+ <br py:if="not ticket.description" style="clear: both" />
+ <span py:if="description_change" class="lastmod" 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>
+ </div>
</div>