upper and lower batch navigators create duplicate and invalid ids

Bug #637654 reported by Curtis Hovey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Low
Robert Collins

Bug Description

batchnavigator-navigation-links.pt has hardcoded ids. The same template is used for upper and lower navigations that are distinguished only by the class (upper or lower) on the table that holds the links. The ids also have underscores which are not valid CSS Ids.

The simple fix is to concatenate unique table class to the ids to ensure they are unique for the navigator

Related branches

Revision history for this message
Curtis Hovey (sinzui) wrote :

I think this is the fix:

=== modified file 'lib/canonical/launchpad/templates/batchnavigator-navigation-links.pt'
--- lib/canonical/launchpad/templates/batchnavigator-navigation-links.pt 2010-02-25 00:47:17 +0000
+++ lib/canonical/launchpad/templates/batchnavigator-navigation-links.pt 2010-09-13 22:57:52 +0000
@@ -27,9 +27,9 @@
           class="batch-navigation-links">
         <a
           tal:condition="first_page_url"
- tal:attributes="href first_page_url"
+ tal:attributes="href first_page_url;
+ id string:${view/css_class}-batchnav-first"
           class="first"
- id="batchnav_first"
           rel="first"
         >First</a>
         <span tal:condition="not:first_page_url" class="first inactive"
@@ -37,9 +37,9 @@
         &#149;
         <a
           tal:condition="prev_page_url"
- tal:attributes="href prev_page_url"
+ tal:attributes="href prev_page_url;
+ id string:${view/css_class}-batchnav-previous"
           class="previous"
- id="batchnav_previous"
           rel="previous"
         >Previous</a>
         <span tal:condition="not:prev_page_url" class="previous inactive"
@@ -47,8 +47,8 @@
         &#149;
         <a
           tal:condition="next_page_url"
- tal:attributes="href next_page_url"
- id="batchnav_next"
+ tal:attributes="href next_page_url;
+ id string:${view/css_class}-batchnav-next"
           class="next"
           rel="next"
         ><strong>Next</strong></a>
@@ -58,9 +58,9 @@
           &#149;
           <a
             tal:condition="last_page_url"
- tal:attributes="href last_page_url"
+ tal:attributes="href last_page_url;
+ id string:${view/css_class}-batchnav-last"
             class="last"
- id="batchnav_last"
             rel="last"
           >Last</a>
           <span tal:condition="not:last_page_url" class="last inactive"

Curtis Hovey (sinzui)
Changed in launchpad-foundations:
milestone: none → 10.10
assignee: nobody → Robert Collins (lifeless)
status: Triaged → In Progress
Revision history for this message
Launchpad QA Bot (lpqabot) wrote : Bug fixed by a commit
tags: added: qa-needstesting
Changed in launchpad-foundations:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
tags: added: qa-ok
removed: qa-needstesting
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
removed: qa-ok
tags: added: qa-ok
removed: qa-needstesting
Curtis Hovey (sinzui)
Changed in launchpad-foundations:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.