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

Commit

Permalink
Set correct page type on diff navigation footer.
Browse files Browse the repository at this point in the history
[Resolves #312]
  • Loading branch information
jmcarp committed Apr 29, 2016
1 parent 407dc9c commit 9e01266
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 9e01266

Please sign in to comment.