Author: matevz
Date: Mon May 27 13:06:25 2013
New Revision: 1486610

URL: http://svn.apache.org/r1486610
Log:
Ref. #533 - initial improvements to ticket change list

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_change.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=1486610&r1=1486609&r2=1486610&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css (original)
+++ bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css Mon May 27 
13:06:25 2013
@@ -238,10 +238,6 @@ pre {
 
 /* @group Ticket page modifications */
 
-.bh-ticket-buttons {
- padding-left: 5px;
-}
-
 .clearboth {
  clear: both;
 }
@@ -288,6 +284,10 @@ pre {
  width: 100%;
 }
 
+.comment-box #trac-comment-editor textarea {
+ width: 97%;
+}
+
 .relations {
   margin-top: 30px;
   margin-bottom: 30px;
@@ -437,16 +437,18 @@ h1, h2, h3, h4 {
 
 .comment blockquote p {
    font-size: 13px;
- }
+}
+
+.comment p {
+  margin: 5px inherit;
+  color: rgb(80, 80, 80);
+}
+
 
 /* @end */
 
 /* @group Search */
 
-.comment blockquote p {
- font-size: 13px;
-}
-
 .search_results dt {
  font-weight: inherit;
  text-decoration: underline;
@@ -1137,6 +1139,7 @@ table.wiki th {
   font-size: 90%;
   color: rgb(120, 120, 120);
   font-style: italic;
+  margin-bottom: 5px;
 }
 
 .description {
@@ -1169,14 +1172,20 @@ table.wiki th {
 }
 
 
-#changelog div.comment-box{
- border: 1px solid #ccc;
- border-radius: 6px;
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05) inset;
- padding: 13px;
- margin: 10px 0px 10px 0px;
- background-color: rgb(253, 252, 250);
- min-height: 20px;
+#changelog div.comment-box {
+  background-color: rgb(253, 252, 250);
+  margin-left: 30px;
+  margin-bottom: 10px;
+  display: block;
+  visibility: visible;
+  position: relative;
+  z-index: 0;
+  max-width: inherit;
+}
+
+#changelog hr {
+  margin: 10px auto 5px 0;
+  width: 75%;
 }
 
 #trac-add-comment fieldset{
@@ -1194,13 +1203,13 @@ textarea#comment, #trac-add-comment fiel
  content: attr(placeholder-content);
 }
 
-#changelog div.comment-box h4 {
-  margin-top: 0px;
-}
-
 #changelog ul.changes {
-  list-style-image: url('../common/collapsed.png');
-  padding: 0px 0px 0px 11px;
+  list-style-type: none;
+  margin-left: 0;
+  margin-bottom: 5px;
+  padding-right: 14px;
+  background-color: #f5fafd;
+  color: inherit;
 }
 
 .ticket form#prefs input[type="radio"]{

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=1486610&r1=1486609&r2=1486610&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html 
(original)
+++ bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html Mon May 
27 13:06:25 2013
@@ -358,66 +358,62 @@
 
       <div class="row">
         <div class="$colspan">
-        <div class="row">
-        <form py:strip="not has_property_editor" method="post" 
id="inplace-propertyform"
-            action="${href.ticket(ticket.id) + '#trac-add-comment' if 
ticket.exists else href.newticket() + '#ticket'}">
-          <py:if test="has_property_editor">
-            <input type="hidden" name="start_time" 
value="${to_utimestamp(start_time)}" />
-            <input type="hidden" name="view_time" 
value="${to_utimestamp(ticket['changetime'])}" />
-          </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 id="content" class="$colspan">
-            <div id="belowStatus">
-
-              <!--! ticket details -->
-                <!--! main ticket info -->
+          <div class="row">
+            <form py:strip="not has_property_editor" method="post" 
id="inplace-propertyform"
+                action="${href.ticket(ticket.id) + '#trac-add-comment' if 
ticket.exists else href.newticket() + '#ticket'}">
+              <py:if test="has_property_editor">
+                <input type="hidden" name="start_time" 
value="${to_utimestamp(start_time)}" />
+                <input type="hidden" name="view_time" 
value="${to_utimestamp(ticket['changetime'])}" />
+              </py:if>
+              <input id="hidden-comment" type="hidden" name="comment" value="" 
/>
+      
+              <div class="$colspan">
+                <!--! ticket properties -->
                 <div class="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"/>
+                  ${render_ticket_summary_details(ticket)}
                 </div>
+              </div>
 
-                <div id="dummy-vc-summary" style="display: none"/>
+              <div id="content" class="$colspan">
+                <div id="belowStatus">
 
-                <div py:if="bhrelations and ticket.exists" class="relations">
-                  <bh:widget urn="TicketRelations">
-                    <bh:args>
-                      <bh:arg name="tid">$ticket.id</bh:arg>
-                      <bh:arg name="max">20</bh:arg>
-                    </bh:args>
-                  </bh:widget>
+                  <!--! ticket details -->
+                    <!--! main ticket info -->
+                    <div class="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"/>
+                    </div>
+
+                    <div id="dummy-vc-summary" style="display: none"></div>
+
+                    <div py:if="bhrelations and ticket.exists" 
class="relations">
+                      <bh:widget urn="TicketRelations">
+                        <bh:args>
+                          <bh:arg name="tid">$ticket.id</bh:arg>
+                          <bh:arg name="max">20</bh:arg>
+                        </bh:args>
+                      </bh:widget>
+                    </div>
                 </div>
-            </div>
-          </div>
-        </form>
+              </div>
+            </form>
 
-        <!--! do not show attachments for old versions of this ticket or for 
new tickets -->
-        <div class="$colspan" py:if="not version and version != 0 and 
ticket.exists">
-          <xi:include href="bh_list_of_attachments.html"
-                      py:with="alist = attachments; foldable = True"/>
-        </div>
+            <!--! do not show attachments for old versions of this ticket or 
for new tickets -->
+            <div class="$colspan" py:if="not version and version != 0 and 
ticket.exists">
+              <xi:include href="bh_list_of_attachments.html"
+                          py:with="alist = attachments; foldable = True"/>
+            </div>
 
-        <div class="$colspan">
-          <div id="help" class="help-block" i18n:msg="">
-            <span class="label label-info">Note:</span> See
-            <a href="${href.wiki('TracTickets')}">TracTickets</a> for help on 
using tickets.
+            <div class="$colspan">
+              <div id="help" class="help-block" i18n:msg="">
+                <span class="label label-info">Note:</span> See
+                <a href="${href.wiki('TracTickets')}">TracTickets</a> for help 
on using tickets.
+              </div>
+            </div>
           </div>
         </div>
-
-        </div>
-        </div>
         
-        <div class="$cols_activity">
-          
-        </div>
         <div class="$cols_activity activityfeed">
           <form py:if="ticket.exists" id="prefs" method="get" 
action="${href.prefs()}">
             <div id="trac-comments-order" style="display: inline" 
class="pull-right">
@@ -447,223 +443,222 @@
           <form py:if="has_property_editor" method="post" id="propertyform"
                     action="${href.ticket(ticket.id) + '#trac-add-comment' if 
ticket.exists
                               else href.newticket() + '#ticket'}">
-              <div py:if="ticket.exists and can_append">
-                <!--! Add comment -->
-                <div id="trac-add-comment" class="field">
-                  <div class="trac-nav">
-                    <a href="#content" title="View ticket fields and 
description">View</a> &uarr;
-                  </div>
-                  <div id="trac-edit-warning" class="warning system-message 
alert"
-                        style="${'display: none' if start_time == 
ticket['changetime'] else None}"
-                        i18n:msg="">
-                    <span class="label label-warning">Warning</span>
-                    This ticket has been modified since you started editing. 
You should review the
-                    <em class="trac-new">other modifications</em> which have 
been appended above,
-                    and any <em class="trac-conflict">conflicts</em> shown in 
the preview below.
-                    You can nevertheless proceed and submit your changes if 
you wish so.
-                  </div>
-                  <!--! Comment field -->
-                  <fieldset class="iefix">
-                    <textarea id="comment" name="comment" 
class="trac-resizable" rows="2"
-                        placeholder="Enter new comment" 
onfocus="this.placeholder = ''" onblur="this.placeholder = 'Enter new 
comment'">${comment}</textarea>
-                    <py:if test="ticket.exists">
-                      <input type="submit" class="btn pull-right" 
name="submit" value="${_('Submit')}" />
-                    </py:if>
-                    <label for="comment" class="help-block" i18n:msg="">
-                      <span class="label label-info">Tip</span>
-                      You may use
-                      <a tabindex="42" 
href="${href.wiki('WikiFormatting')}">WikiFormatting</a>
-                      here.
-                    </label>
-                  </fieldset>
+            <div py:if="ticket.exists and can_append">
+              <!--! Add comment -->
+              <div id="trac-add-comment" class="field">
+                <div class="trac-nav">
+                  <a href="#content" title="View ticket fields and 
description">View</a> &uarr;
+                </div>
+                <div id="trac-edit-warning" class="warning system-message 
alert"
+                      style="${'display: none' if start_time == 
ticket['changetime'] else None}"
+                      i18n:msg="">
+                  <span class="label label-warning">Warning</span>
+                  This ticket has been modified since you started editing. You 
should review the
+                  <em class="trac-new">other modifications</em> which have 
been appended above,
+                  and any <em class="trac-conflict">conflicts</em> shown in 
the preview below.
+                  You can nevertheless proceed and submit your changes if you 
wish so.
                 </div>
+                <!--! Comment field -->
+                <fieldset class="iefix">
+                  <textarea id="comment" name="comment" class="trac-resizable" 
rows="2"
+                      placeholder="Enter new comment" 
onfocus="this.placeholder = ''" onblur="this.placeholder = 'Enter new 
comment'">${comment}</textarea>
+                  <py:if test="ticket.exists">
+                    <input type="submit" class="btn pull-right" name="submit" 
value="${_('Submit')}" />
+                  </py:if>
+                  <label for="comment" class="help-block" i18n:msg="">
+                    <span class="label label-info">Tip</span>
+                    You may use
+                    <a tabindex="42" 
href="${href.wiki('WikiFormatting')}">WikiFormatting</a>
+                    here.
+                  </label>
+                </fieldset>
               </div>
-  
-              <div>
-                <h2 py:if="ticket.exists" class="foldable">Modify Ticket</h2>
-                <div id="modify" class="well">
-                  <!--! Properties -->
-                  <fieldset id="properties" py:if="can_modify or can_edit or 
can_create"
-                            py:with="fields = [f for f in fields if not f.skip 
and f.name != 'product']">
-                    <legend py:choose="">
-                      <py:when test="ticket.exists">Change Properties</py:when>
-                      <py:otherwise>Properties</py:otherwise>
-                    </legend>
-  
-                    <table id="modifyproperties">
-                      <tr py:if="can_modify or can_create">
-                        <td colspan="2">
-                          <label for="field-product-name">Product:</label>
-                          <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" />
-                        </td>
-                      </tr>
+            </div>
 
-                      <tr py:if="can_modify or can_create">
-                        <td colspan="2">
-                          <label for="field-summary">Summary:</label>
-                          <input class="span4" type="text" id="field-summary" 
name="field_summary" value="$ticket.summary" />
-                        </td>
-                      </tr>
-  
-                      <tr py:if="only_for_admin">
-                        <td colspan="2">
-                          <label for="field-reporter">Reporter:</label>
-                          <input type="text" id="field-reporter" 
name="field_reporter" value="${ticket.reporter}" />
-                        </td>
-                      </tr>
-  
-                      <tr py:if="can_edit or can_create">
-                        <td colspan="2">
-                          <label for="field-description">Description:</label>
-                          <fieldset class="iefix">
-                            <textarea id="field-description" 
name="field_description"
-                                      class="span7 wikitext trac-resizable" 
rows="10">${ticket.description}</textarea>
-                            <label for="field-description" 
id="field-description-help" class="help-block pull-right" i18n:msg="">
-                              <span class="label label-info">Tip</span>
-                              You may use
-                              <a tabindex="42" 
href="${href.wiki('WikiFormatting')}">WikiFormatting</a> here.
-                            </label>
-                          </fieldset>
-                        </td>
-                      </tr>
-  
-                      <tr py:for="row in group(fields, 2, lambda f: f.type != 
'textarea')"
-                          py:if="can_modify or can_create">
-                        <py:for each="idx, field in enumerate(row)"
-                                py:with="value = 
ticket.get_value_or_default(field.name)">
-                          <td>
-                            <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}">
-                                <option py:if="field.optional"></option>
-                                <option py:for="option in field.options"
+            <div>
+              <h2 py:if="ticket.exists" class="foldable">Modify Ticket</h2>
+              <div id="modify" class="well">
+                <!--! Properties -->
+                <fieldset id="properties" py:if="can_modify or can_edit or 
can_create"
+                          py:with="fields = [f for f in fields if not f.skip 
and f.name != 'product']">
+                  <legend py:choose="">
+                    <py:when test="ticket.exists">Change Properties</py:when>
+                    <py:otherwise>Properties</py:otherwise>
+                  </legend>
+
+                  <table id="modifyproperties">
+                    <tr py:if="can_modify or can_create">
+                      <td colspan="2">
+                        <label for="field-product-name">Product:</label>
+                        <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" />
+                      </td>
+                    </tr>
+
+                    <tr py:if="can_modify or can_create">
+                      <td colspan="2">
+                        <label for="field-summary">Summary:</label>
+                        <input class="span4" type="text" id="field-summary" 
name="field_summary" value="$ticket.summary" />
+                      </td>
+                    </tr>
+
+                    <tr py:if="only_for_admin">
+                      <td colspan="2">
+                        <label for="field-reporter">Reporter:</label>
+                        <input type="text" id="field-reporter" 
name="field_reporter" value="${ticket.reporter}" />
+                      </td>
+                    </tr>
+
+                    <tr py:if="can_edit or can_create">
+                      <td colspan="2">
+                        <label for="field-description">Description:</label>
+                        <fieldset class="iefix">
+                          <textarea id="field-description" 
name="field_description"
+                                    class="span7 wikitext trac-resizable" 
rows="10">${ticket.description}</textarea>
+                          <label for="field-description" 
id="field-description-help" class="help-block pull-right" i18n:msg="">
+                            <span class="label label-info">Tip</span>
+                            You may use
+                            <a tabindex="42" 
href="${href.wiki('WikiFormatting')}">WikiFormatting</a> here.
+                          </label>
+                        </fieldset>
+                      </td>
+                    </tr>
+
+                    <tr py:for="row in group(fields, 2, lambda f: f.type != 
'textarea')"
+                        py:if="can_modify or can_create">
+                      <py:for each="idx, field in enumerate(row)"
+                              py:with="value = 
ticket.get_value_or_default(field.name)">
+                        <td>
+                          <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}">
+                              <option py:if="field.optional"></option>
+                              <option py:for="option in field.options"
+                                      selected="${value == option or None}"
+                                      value="$option" 
py:content="option"></option>
+                              <optgroup py:for="optgroup in field.optgroups"
+                                        py:if="optgroup.options"
+                                        label="${optgroup.label}">
+                                <option py:for="option in optgroup.options"
                                         selected="${value == option or None}"
                                         value="$option" 
py:content="option"></option>
-                                <optgroup py:for="optgroup in field.optgroups"
-                                          py:if="optgroup.options"
-                                          label="${optgroup.label}">
-                                  <option py:for="option in optgroup.options"
-                                          selected="${value == option or None}"
-                                          value="$option" 
py:content="option"></option>
-                                </optgroup>
-                              </select>
-                              <textarea py:when="'textarea'" 
id="field-${field.name}" name="field_${field.name}"
-                                        cols="${field.width}" 
rows="${field.height}"
-                                        class="${'wikitext ' if field.format 
== 'wiki' else None}trac-resizable">${value}</textarea>
-                              <span py:when="'checkbox'">
-                                <input type="checkbox" 
id="field-${field.name}" name="field_${field.name}"
-                                        checked="${value == '1' or None}" 
value="1" />
-                                <input type="hidden" 
name="field_checkbox_${field.name}" value="1" />
-                              </span>
-                              <label py:when="'radio'" class="checkbox inline"
-                                      py:for="idx, option in 
enumerate(field.options)">
-                                <input type="radio" name="field_${field.name}" 
value="${option}"
-                                        checked="${value == option or None}" />
-                                ${option}
-                              </label>
-                              <py:otherwise><!--! Text input fields -->
-                                <py:choose>
-                                  <span py:when="field.cc_entry"><!--! Special 
case for Cc: field -->
-                                    <em>${field.cc_entry}</em>
-                                    <input type="checkbox" id="field-cc" 
name="cc_update"
-                                      title="This checkbox allows you to add 
or remove yourself from the CC list."
-                                      checked="${field.cc_update}" />
-                                  </span>
-                                  <!--! Cc: when TICKET_EDIT_CC is allowed -->
-                                  <span py:when="field.name == 'cc'">
-                                    <input type="text" id="field-${field.name}"
-                                      title="Space or comma delimited email 
addresses and usernames are accepted."
-                                      name="field_${field.name}" 
value="${value}" />
-                                  </span>
-                                  <!--! All the other text input fields -->
-                                  <input py:otherwise="" type="text" 
id="field-${field.name}"
+                              </optgroup>
+                            </select>
+                            <textarea py:when="'textarea'" 
id="field-${field.name}" name="field_${field.name}"
+                                      cols="${field.width}" 
rows="${field.height}"
+                                      class="${'wikitext ' if field.format == 
'wiki' else None}trac-resizable">${value}</textarea>
+                            <span py:when="'checkbox'">
+                              <input type="checkbox" id="field-${field.name}" 
name="field_${field.name}"
+                                      checked="${value == '1' or None}" 
value="1" />
+                              <input type="hidden" 
name="field_checkbox_${field.name}" value="1" />
+                            </span>
+                            <label py:when="'radio'" class="checkbox inline"
+                                    py:for="idx, option in 
enumerate(field.options)">
+                              <input type="radio" name="field_${field.name}" 
value="${option}"
+                                      checked="${value == option or None}" />
+                              ${option}
+                            </label>
+                            <py:otherwise><!--! Text input fields -->
+                              <py:choose>
+                                <span py:when="field.cc_entry"><!--! Special 
case for Cc: field -->
+                                  <em>${field.cc_entry}</em>
+                                  <input type="checkbox" id="field-cc" 
name="cc_update"
+                                    title="This checkbox allows you to add or 
remove yourself from the CC list."
+                                    checked="${field.cc_update}" />
+                                </span>
+                                <!--! Cc: when TICKET_EDIT_CC is allowed -->
+                                <span py:when="field.name == 'cc'">
+                                  <input type="text" id="field-${field.name}"
+                                    title="Space or comma delimited email 
addresses and usernames are accepted."
                                     name="field_${field.name}" 
value="${value}" />
-                                </py:choose>
-                              </py:otherwise>
-                            </py:choose>
-                          </td>
-                        </py:for>
-                      </tr>
-                    </table>
-                  </fieldset>
-  
-                  <!--! Workflow support -->
-                  <py:if test="ticket.exists"> <!--! do not display the 
actions for New tickets -->
-                    <py:choose>
-                      <fieldset py:when="can_append or can_modify" id="action">
-                        <legend>Action</legend>
-                        <xi:include href="bh_ticket_actions.html" />
-                      </fieldset>
-                      <py:otherwise>
-                        <py:for each="key, label, controls, hints in 
action_controls">
-                          <input py:if="key == action" type="hidden" 
name="action" value="$action" />
-                        </py:for>
-                      </py:otherwise>
-                    </py:choose>
-                  </py:if>
-                </div>
+                                </span>
+                                <!--! All the other text input fields -->
+                                <input py:otherwise="" type="text" 
id="field-${field.name}"
+                                  name="field_${field.name}" value="${value}" 
/>
+                              </py:choose>
+                            </py:otherwise>
+                          </py:choose>
+                        </td>
+                      </py:for>
+                    </tr>
+                  </table>
+                </fieldset>
+
+                <!--! Workflow support -->
+                <py:if test="ticket.exists"> <!--! do not display the actions 
for New tickets -->
+                  <py:choose>
+                    <fieldset py:when="can_append or can_modify" id="action">
+                      <legend>Action</legend>
+                      <xi:include href="bh_ticket_actions.html" />
+                    </fieldset>
+                    <py:otherwise>
+                      <py:for each="key, label, controls, hints in 
action_controls">
+                        <input py:if="key == action" type="hidden" 
name="action" value="$action" />
+                      </py:for>
+                    </py:otherwise>
+                  </py:choose>
+                </py:if>
               </div>
-  
-              <div class="$cols_activity" >
-                <!--! Preview of ticket changes -->
-                <div py:if="ticket.exists and can_append" id="ticketchange" 
class="ticketdraft"
-                      style="${'display: none' if not (change_preview.fields 
or change_preview.comment)
-                                                  or cnum_edit is not None 
else None}">
-                  <xi:include href="bh_ticket_change.html" py:with="change = 
change_preview; preview = True"/>
-                </div>
+            </div>
+
+            <div class="$cols_activity">
+              <!--! Preview of ticket changes -->
+              <div py:if="ticket.exists and can_append" id="ticketchange" 
class="ticketdraft"
+                    style="${'display: none' if not (change_preview.fields or 
change_preview.comment)
+                                                or cnum_edit is not None else 
None}">
+                <xi:include href="bh_ticket_change.html" py:with="change = 
change_preview; preview = True"/>
               </div>
-  
-              <div class="$cols_activity">
-                <!--! Author or Reporter -->
-                <div py:if="authname == 'anonymous'" class="field">
-                  <fieldset py:choose="">
-                    <legend py:when="ticket.exists">Author</legend>
-                    <legend py:otherwise="">Reporter</legend>
-                    <table>
-                      <tr>
-                        <th>
-                          <label for="author">Your email or 
username:</label><br />
-                        </th>
-                        <td>
-                          <input type="text" id="author" name="author" 
size="40" value="$author_id" />
-                          <br />
-                        </td>
-                      </tr>
-                    </table>
-                    <p py:if="author_id == 'anonymous'" class="hint">
-                      <i18n:msg>E-mail address and user name can be saved in 
the <a href="${href.prefs()}">Preferences</a>.</i18n:msg>
-                    </p>
-                  </fieldset>
-                </div>
-  
-                <!--! Attachment on creation checkbox -->
-                <p py:if="not ticket.exists and 'ATTACHMENT_CREATE' in 
perm(ticket.resource.child('attachment'))">
-                  <label>
-                    <input type="checkbox" name="attachment" 
checked="${'attachment' in req.args or None}" />
-                    I have files to attach to this ticket
-                  </label>
-                </p>
-  
-                <div py:if="ticket.exists" class="trac-nav">
-                  <a href="#attachments" title="Go to the list of 
attachments">Attachments</a> &uarr;
-                </div>
-                <div class="buttons">
-                  <py:if test="ticket.exists">
-                    <input type="hidden" name="start_time" 
value="${to_utimestamp(start_time)}" />
-                    <input type="hidden" name="view_time" 
value="${to_utimestamp(ticket['changetime'])}" />
-                    <input type="hidden" name="replyto" value="${replyto}" />
-                  </py:if>
-                  <py:if test="not ticket.exists">
-                    <input type="submit" class="btn" name="preview" 
value="${_('Preview')}" accesskey="r" />&nbsp;
-                    <input type="submit" class="btn" name="submit" 
value="${_('Submit') if ticket.exists else _('Create ticket')}" />
-                  </py:if>
-                </div>
+
+              <!--! Author or Reporter -->
+              <div py:if="authname == 'anonymous'" class="field">
+                <fieldset py:choose="">
+                  <legend py:when="ticket.exists">Author</legend>
+                  <legend py:otherwise="">Reporter</legend>
+                  <table>
+                    <tr>
+                      <th>
+                        <label for="author">Your email or username:</label><br 
/>
+                      </th>
+                      <td>
+                        <input type="text" id="author" name="author" size="40" 
value="$author_id" />
+                        <br />
+                      </td>
+                    </tr>
+                  </table>
+                  <p py:if="author_id == 'anonymous'" class="hint">
+                    <i18n:msg>E-mail address and user name can be saved in the 
<a href="${href.prefs()}">Preferences</a>.</i18n:msg>
+                  </p>
+                </fieldset>
               </div>
-            </form>
+
+              <!--! Attachment on creation checkbox -->
+              <p py:if="not ticket.exists and 'ATTACHMENT_CREATE' in 
perm(ticket.resource.child('attachment'))">
+                <label>
+                  <input type="checkbox" name="attachment" 
checked="${'attachment' in req.args or None}" />
+                  I have files to attach to this ticket
+                </label>
+              </p>
+
+              <div py:if="ticket.exists" class="trac-nav">
+                <a href="#attachments" title="Go to the list of 
attachments">Attachments</a> &uarr;
+              </div>
+              <div class="buttons">
+                <py:if test="ticket.exists">
+                  <input type="hidden" name="start_time" 
value="${to_utimestamp(start_time)}" />
+                  <input type="hidden" name="view_time" 
value="${to_utimestamp(ticket['changetime'])}" />
+                  <input type="hidden" name="replyto" value="${replyto}" />
+                </py:if>
+                <py:if test="not ticket.exists">
+                  <input type="submit" class="btn" name="preview" 
value="${_('Preview')}" accesskey="r" />&nbsp;
+                  <input type="submit" class="btn" name="submit" 
value="${_('Submit') if ticket.exists else _('Create ticket')}" />
+                </py:if>
+              </div>
+            </div>
+          </form>
+
           <div id="changelog">
             <!--! add comment + modify ticket -->
             <py:for each="change in changes">

Modified: 
bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket_change.html
URL: 
http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket_change.html?rev=1486610&r1=1486609&r2=1486610&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket_change.html 
(original)
+++ bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket_change.html 
Mon May 27 13:06:25 2013
@@ -46,73 +46,72 @@ Arguments:
                comment_version = int(cversion or 0) if show_history else 
max_version;
                show_buttons = not hide_buttons and not show_editor and 
comment_version == max_version"
       py:strip="">
+
   <py:def function="commentref(prefix, cnum, cls=None)">
     <a href="#comment:$cnum" title="$prefix$cnum" class="$cls" 
style="margin-left:5px;">&#x260D;</a>
   </py:def>
-  <div class="visible-desktop-hover" py:if="change.comment">
-    <div py:if="cnum" class="comment-box" id="${'comment:' + str(cnum) if cnum 
else ''}">
-      <div>
-        <h4 class="change" style="display: inline-block;">        
-          ${authorinfo(change.author)}
-          <span py:if="preview or show_editor" class="trac-loading"/>
-        </h4>
-        <div class="pull-right">
-          <span py:if="'cnum' in change" id="comment:$cnum" 
class="cnum">${commentref('comment:', cnum)}</span>
-        </div>
-        <div py:if="show_buttons" class="pull-right bh-ticket-buttons 
hidden-desktop trac-ticket-buttons">
-          <py:if test="'date' in change">
-              ${pretty_dateinfo(change.date)}
-          </py:if>
-          <form py:if="'cnum' in change and can_edit_comment" method="get"
-              style="display:inline" action="#comment:${cnum}">
-            <div class="inlinebuttons">
-              <input type="hidden" name="cnum_edit" value="${cnum}"/>
-              <input type="submit" value="${_('Edit')}" class="btn-link"
-                  title="${_('Edit comment %(cnum)s', cnum=cnum)}"/>
-            </div>
-          </form>
-          <form py:if="'cnum' in change and can_append" 
id="reply-to-comment-${cnum}"
-                method="get" action="#comment" style="display: inline">
-            <div class="inlinebuttons">
-              <input type="hidden" name="replyto" value="${cnum}"/>
-              <input type="submit" value="${_('Reply')}" class="btn-link"
-                  title="${_('Reply to comment %(cnum)s', cnum=cnum)}"/>
-            </div>
-          </form>
-        </div>
-        <form py:if="show_editor" id="trac-comment-editor" method="post"
-              action="${href.ticket(ticket.id) + '#comment:%d' % cnum}">
-          <div>
-            <textarea name="edited_comment" class="wikitext trac-resizable" 
rows="10" cols="78">
-  ${edited_comment if edited_comment is not None else 
change.comment}</textarea>
-            <input type="hidden" name="cnum_edit" value="${cnum}"/>
-          </div>
-          <div class="btn-toolbar buttons">
-            <div class="btn-group">
-              <input class="btn" type="submit" name="preview_comment" 
value="${_('Preview')}"
-                     title="${_('Preview changes to comment %(cnum)s', 
cnum=cnum)}"/>
-              <input class="btn" type="submit" name="edit_comment" 
value="${_('Submit changes')}"
-                     title="${_('Submit changes to comment %(cnum)s', 
cnum=cnum)}"/>
-            </div>
-            <input class="btn-link" type="submit" name="cancel_comment" 
value="${_('Cancel')}"
-                   title="Cancel comment edit"/>
-          </div>
-        </form>
+
+  <py:def function="wikiout(ctx, text)">
+    ${wiki_to_html(ctx, text, escape_newlines=preserve_newlines)}
+  </py:def>
+
+
+  <div class="comment-box popover fade in${' right' if change.comment else 
None}" id="${'comment:' + str(cnum) if cnum else ''}">
+    <div py:if="change.comment" class="arrow"></div>
+    <div class="popover-title">
+      <i class="icon-user"></i> <i>${authorinfo(change.author)}</i>
+      <span class="pull-right small" py:if="'date' in 
change"><small>${pretty_dateinfo(change.date)}</small></span>
+    </div>
+    <div class="popover-content">
+      <ul py:if="change.fields" class="alert alert-info changes${' 
creation-event' if not change.cnum else ''}">
+        <li py:for="field_name, field in sorted(change.fields.iteritems(), 
key=lambda item: item[1].label.lower())"
+            class="trac-field-${field_name}${'trac-conflict' if preview and 
field_name in conflicts else None} visible-desktop-hover">
+          <strong class="trac-field-${field_name}">${field.label}</strong>
+          <span>
+            <py:choose>
+              <py:when test="field_name == 'reported'">
+              </py:when>
+              <py:when test="field_name == 'attachment'"><i18n:msg 
params="name">
+                <a href="${href.attachment('ticket', ticket.id, 
field.new)}"><em>${field.new
+                  }</em></a><a href="${href('raw-attachment', 'ticket', 
ticket.id, field.new)}"
+                                title="Download" 
class="trac-rawlink">&#8203;</a>
+                added
+              </i18n:msg></py:when>
+              <py:when test="'rendered' in field">${field.rendered}</py:when>
+              <py:when test="field.old and field.new"><i18n:msg params="old, 
new">
+                changed from <em>${field.old}</em> to <em>${field.new}</em>
+              </i18n:msg></py:when>
+              <py:when test="not field.old and field.new"><i18n:msg 
params="value">
+                set to <em>${field.new}</em>
+              </i18n:msg></py:when>
+              <py:otherwise><i18n:msg params="value">
+                <em>${field.old}</em> deleted
+              </i18n:msg></py:otherwise>
+            </py:choose>
+            <span py:if="field_name == 'attachment' and change.comment" 
class="attachment-desc searchable" xml:space="preserve">
+              ${wiki_to_html(context, change.comment, 
escape_newlines=preserve_newlines)}
+            </span>
+          </span>
+        </li>
+      </ul>
+
+      <py:if test="change.comment and cnum">
         <py:choose>
           <div py:when="str(cnum) == cnum_edit"
-               py:with="text = edited_comment if edited_comment is not None 
else change.comment"
-               class="comment searchable ticketdraft" style="${'display: none' 
if not text else None}" xml:space="preserve">
-            ${wiki_to_html(context, text, escape_newlines=preserve_newlines)}
+                py:with="text = edited_comment if edited_comment is not None 
else change.comment"
+                class="comment searchable ticketdraft" style="${'display: 
none' if not text else None}" xml:space="preserve">
+            ${wikiout(context, text)}
           </div>
           <div py:when="show_history" class="comment searchable" 
xml:space="preserve">
-            ${wiki_to_html(context, 
change.comment_history[int(cversion)].comment, 
escape_newlines=preserve_newlines)}
+            ${wikiout(context, change.comment_history[int(cversion)].comment)}
           </div>
           <div py:when="change.comment" class="comment searchable" 
xml:space="preserve">
-            ${wiki_to_html(context, change.comment, 
escape_newlines=preserve_newlines)}
+            ${wikiout(context, change.comment)}
           </div>
         </py:choose>
+        <hr />
         <div py:if="not show_editor and len(change.comment_history) > 1" 
py:choose=""
-             class="trac-lastedit ${'trac-shade' if comment_version != 
max_version else None} lastmod">
+              class="trac-lastedit ${'trac-shade' if comment_version != 
max_version else None} lastmod">
           <i18n:msg params="version, date, author" py:when="comment_version != 
max_version">
               Version ${comment_version}, edited 
${pretty_dateinfo(change.comment_history[comment_version].date)}
               by ${authorinfo(change.comment_history[comment_version].author)}
@@ -123,88 +122,58 @@ Arguments:
           </i18n:msg>
           <py:if test="comment_version > 0">
             (<a href="${href.ticket(ticket.id, cnum_hist=cnum, 
cversion=comment_version - 1)
-                       }#comment:${cnum}">previous</a>)
+                        }#comment:${cnum}">previous</a>)
           </py:if>
           <py:if test="comment_version &lt; max_version">
             (<a href="${href.ticket(ticket.id, cnum_hist=cnum, 
cversion=comment_version + 1)
-                       }#comment:${cnum}">next</a>)
+                        }#comment:${cnum}">next</a>)
           </py:if>
           <py:if test="comment_version > 0">
             (<a href="${href.ticket(ticket.id, action='comment-diff', 
cnum=cnum,
                                     version=comment_version)}">diff</a>)
           </py:if>
         </div>
-      </div>
-    </div>
-  </div>
-  <py:if test="not change.comment">
-  <div py:if="show_buttons" class="pull-right bh-ticket-buttons hidden-desktop 
trac-ticket-buttons">
-    <py:if test="'date' in change">
-        ${pretty_dateinfo(change.date)}
-    </py:if>
-    <h4 class="change">
-    <div class="pull-right">
-      <span py:if="'cnum' in change" id="comment:$cnum" 
class="cnum">${commentref('comment:', cnum)}</span>
-    </div>
-    <div py:if="show_buttons" class="pull-right bh-ticket-buttons 
hidden-desktop trac-ticket-buttons">
-      <py:if test="'date' in change">
-          ${pretty_dateinfo(change.date)}
-      </py:if>
-      <form py:if="'cnum' in change and can_edit_comment" method="get"
-          style="display:inline" action="#comment:${cnum}">
-        <div class="inlinebuttons">
-          <input type="hidden" name="cnum_edit" value="${cnum}"/>
-          <input type="submit" value="${_('Edit')}" class="btn-link"
-              title="${_('Edit comment %(cnum)s', cnum=cnum)}"/>
-        </div>
-      </form>
-      <form py:if="'cnum' in change and can_append" 
id="reply-to-comment-${cnum}"
-            method="get" action="#comment" style="display: inline">
-        <div class="inlinebuttons">
-          <input type="hidden" name="replyto" value="${cnum}"/>
-          <input type="submit" value="${_('Reply')}" class="btn-link"
-              title="${_('Reply to comment %(cnum)s', cnum=cnum)}"/>
+
+        <div py:if="show_buttons" class="trac-ticket-buttons">
+          <div py:if="'cnum' in change" class="pull-right">
+            <span id="comment:$cnum" class="cnum">${commentref('comment:', 
cnum)}</span>
+          </div>
+          <form py:if="'cnum' in change and can_edit_comment" method="get"
+              style="display:inline" action="#comment:${cnum}">
+            <div class="inlinebuttons">
+              <input type="hidden" name="cnum_edit" value="${cnum}"/>
+              <button class="btn-link btn-mini" title="${_('Edit comment 
%(cnum)s', cnum=cnum)}">${_('Edit')}</button>
+            </div>
+          </form>
+          <form py:if="'cnum' in change and can_append" 
id="reply-to-comment-${cnum}"
+                method="get" action="#comment" style="display: inline">
+            <div class="inlinebuttons">
+              <input type="hidden" name="replyto" value="${cnum}"/>
+              <button class="btn-link btn-mini" title="${_('Reply to comment 
%(cnum)s', cnum=cnum)}">${_('Reply')}</button>
+            </div>
+          </form>
         </div>
-      </form>
+
+        <form py:if="show_editor" id="trac-comment-editor" method="post"
+              action="${href.ticket(ticket.id) + '#comment:%d' % cnum}">
+          <div>
+            <textarea name="edited_comment" class="wikitext trac-resizable" 
rows="10">
+  ${edited_comment if edited_comment is not None else 
change.comment}</textarea>
+            <input type="hidden" name="cnum_edit" value="${cnum}"/>
+          </div>
+          <div class="btn-toolbar buttons">
+            <div class="btn-group">
+              <input class="btn" type="submit" name="preview_comment" 
value="${_('Preview')}"
+                      title="${_('Preview changes to comment %(cnum)s', 
cnum=cnum)}"/>
+              <input class="btn" type="submit" name="edit_comment" 
value="${_('Submit changes')}"
+                      title="${_('Submit changes to comment %(cnum)s', 
cnum=cnum)}"/>
+            </div>
+            <input class="btn-link" type="submit" name="cancel_comment" 
value="${_('Cancel')}"
+                    title="Cancel comment edit"/>
+          </div>
+        </form>
+      </py:if>
+
     </div>
-    
-      ${authorinfo(change.author)}
-      <span py:if="preview or show_editor" class="trac-loading"/>
-    </h4>
-  </div >
-  </py:if>
-  <ul py:if="change.fields" class="changes ${'creation-event' if not 
change.cnum else ''}">
-    <li py:for="field_name, field in sorted(change.fields.iteritems(), 
key=lambda item: item[1].label.lower())"
-        class="trac-field-${field_name}${'trac-conflict' if preview and 
field_name in conflicts else None} visible-desktop-hover">
-      <strong class="trac-field-${field_name}">${field.label}</strong>
-      <span>
-        <py:choose>
-          <py:when test="field_name == 'reported'">
-          </py:when>
-          <py:when test="field_name == 'attachment'"><i18n:msg params="name">
-            <a href="${href.attachment('ticket', ticket.id, 
field.new)}"><em>${field.new
-              }</em></a><a href="${href('raw-attachment', 'ticket', ticket.id, 
field.new)}"
-                           title="Download" class="trac-rawlink">&#8203;</a>
-            added
-          </i18n:msg></py:when>
-          <py:when test="'rendered' in field">${field.rendered}</py:when>
-          <py:when test="field.old and field.new"><i18n:msg params="old, new">
-            changed from <em>${field.old}</em> to <em>${field.new}</em>
-          </i18n:msg></py:when>
-          <py:when test="not field.old and field.new"><i18n:msg params="value">
-            set to <em>${field.new}</em>
-          </i18n:msg></py:when>
-          <py:otherwise><i18n:msg params="value">
-            <em>${field.old}</em> deleted
-          </i18n:msg></py:otherwise>
-        </py:choose>
-        <span class="${'hidden-desktop' if change.cnum else ''}">
-        - by ${authorinfo(change.author)}, ${pretty_dateinfo(change.date)}
-        </span>
-        <span py:if="field_name == 'attachment' and change.comment" 
class="attachment-desc searchable" xml:space="preserve">
-          ${wiki_to_html(context, change.comment, 
escape_newlines=preserve_newlines)}
-        </span>
-      </span>
-    </li>
-  </ul>
+  </div>
 </html>


Reply via email to