Commits

Olemis Lang committed 9f9d7ce

BH Theme #158 : Follow ups links in drop down menu

Comments (0)

Files changed (2)

 hgsvn/rm_files.diff
+t158/t158_r1365626_followups_menu.diff

t158/t158_r1365626_followups_menu.diff

+# HG changeset patch
+# Parent dc930d2f035d4ff63b8cfbcfb210b9f9747e4c6c
+BH Theme #158 : Follow ups to ticket comments inside drop-down menu
+
+diff -r dc930d2f035d bhtheme/templates/bh_ticket_change.html
+--- a/bhtheme/templates/bh_ticket_change.html	Mon Aug 13 00:21:48 2012 -0400
++++ b/bhtheme/templates/bh_ticket_change.html	Mon Aug 13 01:16:34 2012 -0400
+@@ -87,14 +87,31 @@
+             in reply to: ${commentref('↑ ', change.replyto)}
+             <py:if test="change_replies">; </py:if>
+           </py:if>
+-          <py:if test="change_replies">
+-            <i18n:choose numeral="len(change_replies)">
++          <py:if test="change_replies" 
++              py:with="change_replies_count = len(change_replies)">
++            <i18n:choose numeral="change_replies_count">
+               <span i18n:singular="">follow-up:</span>
+               <span i18n:plural="">follow-ups:</span>
+             </i18n:choose>
+-            <py:for each="reply in change_replies">
+-              ${commentref('&darr;&nbsp;', reply, 'follow-up')}
+-            </py:for>
++            <py:choose test="change_replies_count">
++              <py:when test="1">
++                ${commentref('&darr;&nbsp;', change_replies[0], 'follow-up')}
++              </py:when>
++              <div class="bh-ticket-buttons pull-right btn-group"
++                  py:otherwise="">
++                <a class="btn btn-mini dropdown-toggle" href="#"
++                    data-toggle="dropdown">
++                  <i class="icon-comment"></i>
++                  ${change_replies_count}
++                  <b class="caret"></b>
++                </a>
++                <ul class="dropdown-menu">
++                  <li py:for="reply in change_replies">
++                    ${commentref('&darr;&nbsp;', reply, 'follow-up')}
++                  </li>
++                </ul>
++              </div>
++            </py:choose>
+           </py:if>
+         </span>
+         ${authorinfo(change.author)}