changeset 2396:35b64d97bd9c

Fixes #39, by making the history tab active for diff views
author sharky93 <rishabhr123@gmail.com>
date Sun, 18 Aug 2013 03:05:26 +0530
parents e0a4950b9658
children 4aacb749947b
files MoinMoin/themes/__init__.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/themes/__init__.py	Sun Aug 18 03:04:16 2013 +0530
+++ b/MoinMoin/themes/__init__.py	Sun Aug 18 03:05:26 2013 +0530
@@ -89,6 +89,7 @@
         icon = self.get_endpoint_iconmap()
         exists = flaskg.storage.has_item(item_name)
         navtabs = []
+        spl_active = [('frontend.history', 'frontend.diff'),]
 
         for endpoint, label, title, check_exists in app.cfg.item_views:
             if endpoint not in app.cfg.endpoints_excluded:
@@ -106,7 +107,7 @@
                         else:
                             maincls = None
                             href = url_for(endpoint, item_name=item_name)
-                            if endpoint == current_endpoint:
+                            if endpoint == current_endpoint or (endpoint, current_endpoint) in spl_active:
                                 maincls = "active"
 
                         navtabs.append((endpoint, href, maincls, iconcls, title, label))