Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
Merge pull request #313 from jmcarp/312-diff-footer-nav
Browse files Browse the repository at this point in the history
Set correct page type on diff navigation footer.
  • Loading branch information
cmc333333 committed May 2, 2016
2 parents d4f3797 + 9e01266 commit d78c738
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions regulations/tests/views_diff_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ def assert_correct_nav(self, section_id, prev, following):
"""Verify that the generated nav contains the appropriate url entries
for prev and next"""
nav = self.view.footer_nav(section_id, self.toc, self.versions)
self.assertEqual(nav['page_type'], 'diff')
if prev:
self.assert_url_contains_versions(nav['previous']['url'], prev)
else:
Expand Down
3 changes: 3 additions & 0 deletions regulations/views/diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ def footer_nav(self, label, toc, versions):
for entry in nav.values():
entry['url'] = reverse_chrome_diff_view(
entry['section_id'], *versions)

nav['page_type'] = 'diff'

return nav

def get_context_data(self, **kwargs):
Expand Down

0 comments on commit d78c738

Please sign in to comment.