Author: matevz
Date: Thu May 30 12:38:10 2013
New Revision: 1487829

URL: http://svn.apache.org/r1487829
Log:
Ref. #533 - reverted back to previous ticket change history implementation

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=1487829&r1=1487828&r2=1487829&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css (original)
+++ bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css Thu May 30 
12:38:10 2013
@@ -178,6 +178,20 @@ div.reports form {
  font-weight: normal;
 }
 
+.activityfeed {
+  background-image: url("img/change_history_arrow_line.png");
+  background-repeat: repeat-y;
+  background-position: 20px 0px;
+}
+
+.timeline .activityfeed {
+  background-image: none;
+}
+
+.activityfeed .help-block {
+  margin-left: 30px;
+}
+
 #mobile-activity {
  margin-top: 50px;
 }
@@ -224,6 +238,10 @@ pre {
 
 /* @group Ticket page modifications */
 
+.bh-ticket-buttons {
+ padding-left: 5px;
+}
+
 .clearboth {
  clear: both;
 }
@@ -274,10 +292,6 @@ pre {
  width: 100%;
 }
 
-.comment-box #trac-comment-editor textarea {
- width: 97%;
-}
-
 .relations {
   margin-top: 30px;
   margin-bottom: 30px;
@@ -1152,35 +1166,14 @@ table.wiki th {
 }
 
 
-#changelog div.comment-box,
-#trac-add-comment div.comment-box {
-  background-color: rgb(253, 252, 250);
-  margin-bottom: 5px;
-  display: block;
-  visibility: visible;
-  position: relative;
-  z-index: 0;
-  max-width: inherit;
-  box-shadow: none;
-}
-
-#trac-add-comment div.comment-box {
-  background-color: rgb(220,239,248);
-}
-
-div.comment-box .popover-title {
-  background-color: inherit;
-  border: none;
-  padding-bottom: 2px;
-}
-
-div.comment-box .comment p {
-  display: inline;
-}
-
-#changelog hr {
-  margin: 5px auto 5px 0;
-  width: 75%;
+#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;
 }
 
 #trac-add-comment fieldset{
@@ -1198,20 +1191,13 @@ textarea#comment, #trac-add-comment fiel
  content: attr(placeholder-content);
 }
 
-#changelog ul.changes {
-  list-style-type: none;
-  margin-left: 0;
-  margin-bottom: 5px;
-  padding-right: 14px;
+#changelog div.comment-box h4 {
+  margin-top: 0px;
 }
 
-.popover-content i[class^="icon-"],
-.popover-content i[class*=" icon-"] {
-  opacity: 0.6;
-}
-
-.activityfeed #prefs {
-  margin-bottom: 5px;
+#changelog ul.changes {
+  list-style-image: url('../common/collapsed.png');
+  padding: 0px 0px 0px 11px;
 }
 
 .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=1487829&r1=1487828&r2=1487829&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html 
(original)
+++ bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html Thu May 
30 12:38:10 2013
@@ -456,6 +456,20 @@
         </div>
         
         <div class="${cols_activity + ' activityfeed' if ticket.exists else 
None}">
+          <form py:if="ticket.exists" id="prefs" method="get" 
action="${href.prefs()}">
+            <div id="trac-comments-order" class="pull-right">
+              <input type="radio" id="trac-comments-newest" 
name="trac-comments-order" value="newest" />
+              <label for="trac-comments-newest">
+                <span>Newest first</span>
+              </label>
+              <input type="radio" id="trac-comments-oldest" 
name="trac-comments-order" value="oldest" checked="checked" />
+              <label for="trac-comments-oldest">
+                <span>Oldest first</span>
+              </label>
+            </div>
+            <div class="clearboth"></div>
+          </form>
+
           <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'}">
@@ -478,22 +492,15 @@
 
                 <!--! Comment field -->
                 <fieldset class="iefix">
-                  <div class="comment-box popover fade in" id="newcomment">
-                    <div class="popover-title"><i class="icon-comment"></i> 
Add quick comment</div>
-                    <div class="popover-content">
-                      <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>
-                      <input type="submit" id="comment-submit" class="btn 
btn-small pull-right" name="submit" value="${_('Submit')}" />
-                      <label for="comment" class="help-block" i18n:msg="">
-                        <span class="label label-info">Tip</span>
-                        <small>
-                        You may use
-                        <a tabindex="42" 
href="${href.wiki('WikiFormatting')}">WikiFormatting</a>
-                        here.
-                        </small>
-                      </label>
-                    </div>
-                  </div>
+                  <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>
+                  <input type="submit" id="comment-submit" class="btn 
pull-right" name="submit" value="${_('Submit')}" />
+                  <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>
@@ -670,20 +677,6 @@
             </div>
           </form>
 
-          <form py:if="ticket.exists" id="prefs" method="get" 
action="${href.prefs()}">
-            <div id="trac-comments-order" class="pull-right">
-              <input type="radio" id="trac-comments-newest" 
name="trac-comments-order" value="newest" />
-              <label for="trac-comments-newest">
-                <span>Newest first</span>
-              </label>
-              <input type="radio" id="trac-comments-oldest" 
name="trac-comments-order" value="oldest" checked="checked" />
-              <label for="trac-comments-oldest">
-                <span>Oldest first</span>
-              </label>
-            </div>
-            <div class="clearboth"></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=1487829&r1=1487828&r2=1487829&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket_change.html 
(original)
+++ bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket_change.html 
Thu May 30 12:38:10 2013
@@ -46,72 +46,73 @@ 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>
-
-  <py:def function="wikiout(ctx, text)">
-    ${wiki_to_html(ctx, text, escape_newlines=preserve_newlines)}
-  </py:def>
-
-
-  <div class="comment-box popover fade in" id="${'comment:' + str(cnum) if 
cnum else ''}">
-    <div class="popover-title">
-      <i class="icon-user"></i> <i>${authorinfo(change.author)}</i>
-      <span class="pull-right" py:if="'date' in 
change"><small>${pretty_dateinfo(change.date)}</small></span>
-    </div>
-    <div class="popover-content">
-      <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">
-          <i class="icon-pencil"></i> <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">
+  <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: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">
-            ${wikiout(context, text)}
+               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)}
           </div>
           <div py:when="show_history" class="comment searchable" 
xml:space="preserve">
-            <i class="icon-comment"></i> ${wikiout(context, 
change.comment_history[int(cversion)].comment)}
-            <hr />
+            ${wiki_to_html(context, 
change.comment_history[int(cversion)].comment, 
escape_newlines=preserve_newlines)}
           </div>
           <div py:when="change.comment" class="comment searchable" 
xml:space="preserve">
-            <i class="icon-comment"></i> ${wikiout(context, change.comment)}
-            <hr />
+            ${wiki_to_html(context, change.comment, 
escape_newlines=preserve_newlines)}
           </div>
         </py:choose>
         <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)}
@@ -122,57 +123,88 @@ 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 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 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 btn-small" type="submit" 
name="preview_comment" value="${_('Preview')}"
-                      title="${_('Preview changes to comment %(cnum)s', 
cnum=cnum)}"/>
-              <input class="btn btn-small" type="submit" name="edit_comment" 
value="${_('Submit changes')}"
-                      title="${_('Submit changes to comment %(cnum)s', 
cnum=cnum)}"/>
-            </div>
-            <input class="btn-link btn-small" type="submit" 
name="cancel_comment" value="${_('Cancel')}"
-                    title="Cancel comment edit"/>
-          </div>
-        </form>
-      </py:if>
+      </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>
+      </form>
+    </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>
 </html>


Reply via email to