aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2017-09-25 17:06:25 +0100
committerStruan Donald <struan@exo.org.uk>2017-09-26 15:32:13 +0100
commit57af14d2ba3e93c8563d6b415228d6ac1a5064e6 (patch)
tree721c298e806b1759b54936941efcbdfc235978e1
parent880684361b2e73ed8a1a94ee1b022cb2fe5e05d6 (diff)
shortlist menu item is always a link
avoids odd problems caused when using pushstate Fixes mysociety/fixmystreetforcouncils#233
-rw-r--r--CHANGELOG.md2
-rw-r--r--templates/web/base/main_nav.html2
-rw-r--r--templates/web/base/main_nav_items.html2
3 files changed, 4 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d2333a85e..0df6b5fdf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,8 @@
* Unreleased
- New features:
- Area summary statistics page in admin #1834
+ - Bugfixes
+ - Shortlist menu item always remains a link #1855
* v2.2 (13th September 2017)
- New features:
diff --git a/templates/web/base/main_nav.html b/templates/web/base/main_nav.html
index b8a3165a4..9736697e3 100644
--- a/templates/web/base/main_nav.html
+++ b/templates/web/base/main_nav.html
@@ -8,7 +8,7 @@
%]
[% BLOCK navitem ~%]
<li [% liattrs %]>
- [%~ IF c.req.uri.path == uri ~%]
+ [%~ IF c.req.uri.path == uri AND NOT always_url ~%]
<span [% attrs %]>[% label %]</span>
[%~ ELSE ~%]
<a href="[% base %][% uri %][% suffix IF suffix %]" [% attrs %]>[% label %]</a>
diff --git a/templates/web/base/main_nav_items.html b/templates/web/base/main_nav_items.html
index 845ef7c65..84657444e 100644
--- a/templates/web/base/main_nav_items.html
+++ b/templates/web/base/main_nav_items.html
@@ -7,7 +7,7 @@
[%~ END ~%]
[%~ IF c.user_exists AND c.user.has_body_permission_to('planned_reports') ~%]
- [%~ INCLUDE navitem uri='/my/planned' label=loc('Shortlist') ~%]
+ [%~ INCLUDE navitem always_url=1 uri='/my/planned' label=loc('Shortlist') ~%]
[%~ END ~%]