← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~wgrant/launchpad/bugfilters-ie8 into lp:launchpad

 

William Grant has proposed merging lp:~wgrant/launchpad/bugfilters-ie8 into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~wgrant/launchpad/bugfilters-ie8/+merge/97404

Fix the bugtarget bugfilters portlet in IE. Trident doesn't permit setting innerHTML of part of a table, so we have to load the whole thing. I moved the <table> and <tbody> into the subview.

This caused oddness with the "Subscribe to bug mail" and "Edit bug mail" links, which were pretending to be additional stats. I moved them into a new portlet higher up, as they aren't related related to any of the others.
-- 
https://code.launchpad.net/~wgrant/launchpad/bugfilters-ie8/+merge/97404
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/bugfilters-ie8 into lp:launchpad.
=== modified file 'lib/lp/bugs/templates/buglisting-default.pt'
--- lib/lp/bugs/templates/buglisting-default.pt	2012-03-01 19:59:46 +0000
+++ lib/lp/bugs/templates/buglisting-default.pt	2012-03-14 13:53:51 +0000
@@ -142,17 +142,22 @@
         </ul>
 
       </div>
+      <div class="portlet">
+        <ul tal:define="menu context/menu:bugs">
+          <li tal:condition="menu/subscribe_to_bug_mail/enabled|nothing">
+            <a tal:replace="structure menu/subscribe_to_bug_mail/fmt:link" />
+          </li>
+          <li tal:condition="menu/edit_bug_mail/enabled|nothing">
+            <a tal:replace="structure menu/edit_bug_mail/fmt:link" />
+          </li>
+        </ul>
+      </div>
       <div class="portlet" tal:condition="view/show_config_portlet">
-        <tal:bugtracker
-           define="link context/menu:bugs/configure_bugtracker|nothing"
-           condition="link">
-          <ul tal:condition="link/enabled"
-              style="padding-top: 1em">
-            <li>
-              <a tal:replace="structure link/fmt:link" />
-            </li>
-          </ul>
-        </tal:bugtracker>
+        <ul tal:define="menu context/menu:bugs">
+          <li tal:condition="menu/configure_bugtracker/enabled|nothing">
+            <a tal:replace="structure menu/configure_bugtracker/fmt:link" />
+          </li>
+        </ul>
         <dl tal:define="bug_supervisor context/bug_supervisor"
             id="bug-supervisor">
           <dt>Bug supervisor:</dt>

=== modified file 'lib/lp/bugs/templates/bugtarget-portlet-bugfilters-content.pt'
--- lib/lp/bugs/templates/bugtarget-portlet-bugfilters-content.pt	2012-03-09 02:55:54 +0000
+++ lib/lp/bugs/templates/bugtarget-portlet-bugfilters-content.pt	2012-03-14 13:53:51 +0000
@@ -6,6 +6,8 @@
     template can be rendered by a view that does not have count
     information available.
   </tal:comment>
+<table class="bug-links">
+<tbody>
   <tr tal:define="count view/new_bugs_count|nothing;
                   plural string: New bugs;
                   singular string: New bug;">
@@ -168,4 +170,6 @@
       </a>
     </td>
   </tr>
+</tbody>
+</table>
 </tal:portlet-bug-filters-content>

=== modified file 'lib/lp/bugs/templates/bugtarget-portlet-bugfilters.pt'
--- lib/lp/bugs/templates/bugtarget-portlet-bugfilters.pt	2012-02-01 15:31:32 +0000
+++ lib/lp/bugs/templates/bugtarget-portlet-bugfilters.pt	2012-03-14 13:53:51 +0000
@@ -6,54 +6,9 @@
   <a id="bugtarget-bugfilters-link"
      tal:attributes="href context/fmt:url/+bugtarget-portlet-bugfilters-stats">
   </a>
-  <table class="bug-links">
-    <tbody id="bugfilters-portlet-content"
-           tal:content="structure context/@@+bugtarget-portlet-bugfilters-info" />
-    <tbody tal:define="menu context/menu:bugs">
-
-      <tr class="menu-link-subscribe_to_bug_mail invisible-link"
-          tal:define="link menu/subscribe_to_bug_mail|nothing"
-          tal:condition="python: link and link.enabled">
-        <td class="bugs-count" style="padding-top: 3px">
-          <a tal:attributes="href link/url">
-            <img tal:attributes="src link/icon_url" />
-          </a>
-        </td>
-        <td class="bugs-link">
-          <a class="js-action"
-              tal:attributes="href link/url"
-              tal:content="link/escapedtext" />
-        </td>
-      </tr>
-      <tr class="menu-link-edit_bug_mail"
-          tal:define="link menu/edit_bug_mail|nothing"
-          tal:condition="python: link and link.enabled">
-        <td class="bugs-count" style="padding-top: 3px">
-          <a tal:attributes="href link/url">
-            <img tal:attributes="src link/icon_url" />
-          </a>
-        </td>
-        <td class="bugs-link">
-          <a tal:attributes="href link/url"
-              tal:content="link/escapedtext" />
-        </td>
-      </tr>
-
-      <tr tal:define="review_nominations_link context/menu:bugs/nominations|nothing"
-          tal:condition="review_nominations_link"
-          style="padding-top: 1em">
-        <td class="bugs-count">
-          <a tal:attributes="href review_nominations_link/url">
-            <img tal:attributes="src review_nominations_link/icon_url" />
-          </a>
-        </td>
-        <td class="bugs-link">
-          <a tal:attributes="href review_nominations_link/url"
-             tal:content="review_nominations_link/escapedtext" />
-        </td>
-      </tr>
-    </tbody>
-  </table>
+  <div
+    id="bugfilters-portlet-content"
+    tal:content="structure context/@@+bugtarget-portlet-bugfilters-info" />
   <script type="text/javascript">
     LPJS.use('io-base', 'node', function(Y) {
         Y.on('domready', function() {