Commits

Olemis Lang committed 3d261ff

BH Theme #146 : Edit ticket description and other special fields

  • Participants
  • Parent commits eff1835
  • Branches t146_inline_edit

Comments (0)

Files changed (2)

 #t146/t146_r1418195_scrollspy_btn.diff
 t146/t146_r1418195_ticket_header.diff
 t146/t146_r1420132_inplace_ticket_fields.diff
+t146/t146_r1420132_inplace_ticket_desc.diff
 #t146/t146_r1386655_inplace_ticket.diff
 #t146/t146_r1386655_inplace_ticket_backend.diff

t146/t146_r1420132_inplace_ticket_desc.diff

+# HG changeset patch
+# Parent d54205f62ec805215e8f4baa5d7a40fecd05a431
+BH Theme #146 : Edit special fields (e.g. summary, description, ...)
+
+diff -r d54205f62ec8 bhtheme/htdocs/bloodhound.css
+--- a/bhtheme/htdocs/bloodhound.css	Wed Dec 12 00:31:40 2012 -0500
++++ b/bhtheme/htdocs/bloodhound.css	Wed Dec 12 01:49:28 2012 -0500
+@@ -206,10 +206,6 @@
+   width: 505px;
+ }
+ 
+-#field-reporter {
+-  width: 505px;
+-}
+-
+ .bh-ticket-buttons {
+   padding-left: 5px;
+ }
+diff -r d54205f62ec8 bhtheme/templates/bh_ticket.html
+--- a/bhtheme/templates/bh_ticket.html	Wed Dec 12 00:31:40 2012 -0500
++++ b/bhtheme/templates/bh_ticket.html	Wed Dec 12 01:49:28 2012 -0500
+@@ -163,7 +163,9 @@
+           <div id="overview" class="stickyStatus $colspan">
+             <div class="whitebox"></div>
+             <div class="properties">
+-              <h2 class="summary searchable clip-affix" py:choose="">
++              <h2 class="summary searchable clip-affix" py:choose=""
++                  data-edit="${'inplace' if can_modify or can_create else None}"
++                  id="vc-summary">
+                 <py:when test="ticket.exists">&#9734; $ticket.summary</py:when>
+                 <py:otherwise>Create Ticket</py:otherwise>
+               </h2>
+@@ -232,7 +234,8 @@
+                           Reporter:
+                         </h5>
+                       </div>
+-                      <div class="span2">
++                      <div class="span2" id="vc-reporter"
++                          data-edit="${'inplace' if only_for_admin else None}">
+                         ${reporter_link if defined('reporter_link') else authorinfo(ticket.reporter)}
+                         &nbsp;
+                       </div>
+@@ -402,7 +405,7 @@
+                           <th><label for="field-reporter">Reporter:</label></th>
+                           <td class="fullrow" colspan="3">
+                             <input type="text" id="field-reporter" name="field_reporter"
+-                                   value="${ticket.reporter}" size="70" />
++                                   value="${ticket.reporter}" class="input-medium" />
+                           </td>
+                         </tr>
+                       </py:if>
+diff -r d54205f62ec8 bhtheme/templates/bh_ticket_box.html
+--- a/bhtheme/templates/bh_ticket_box.html	Wed Dec 12 00:31:40 2012 -0500
++++ b/bhtheme/templates/bh_ticket_box.html	Wed Dec 12 01:49:28 2012 -0500
+@@ -80,7 +80,8 @@
+       <py:for each="field in fields">
+         <py:if test="field.name == 'keywords'">
+           <div title="Keywords">
+-            <i class="icon-tags"></i> ${field.rendered}
++            <i class="icon-tags"></i>
++            <span data-edit="${'inplace' if can_modify or can_edit or can_create else None}" id="vc-keywords">${field.rendered}</span>
+           </div>
+         </py:if>
+       </py:for>
+@@ -105,7 +106,9 @@
+                 title="Reply, quoting this description" />
+           </form>
+         </div>
+-        <div py:if="ticket.description" class="searchable" xml:space="preserve">
++        <div py:if="ticket.description" class="searchable" xml:space="preserve"
++            data-edit="${'inplace' if can_edit or can_create else None}"
++            id="vc-description">
+           ${wiki_to_html(context, ticket.description, escape_newlines=preserve_newlines)}
+         </div>
+         <br py:if="not ticket.description" style="clear: both" />