You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by gj...@apache.org on 2012/11/29 11:26:13 UTC
svn commit: r1415116 -
/incubator/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py
Author: gjm
Date: Thu Nov 29 10:26:12 2012
New Revision: 1415116
URL: http://svn.apache.org/viewvc?rev=1415116&view=rev
Log:
separating permission checking for ticket resources into new method for potential reuse - towards #249
Modified:
incubator/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py
Modified: incubator/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py?rev=1415116&r1=1415115&r2=1415116&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py (original)
+++ incubator/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py Thu Nov 29 10:26:12 2012
@@ -242,10 +242,17 @@ class BloodhoundTheme(ThemeBase):
add_stylesheet(req, 'dashboard/css/roadmap.css')
def _modify_ticket(self, req, template, data, content_type, is_active):
- """Insert Bootstrap scroll spy files.
+ """Ticket modifications
"""
self._modify_scrollspy(req, template, data, content_type, is_active)
- if data:
+ self._modify_resource_breadcrumb(req, template, data, content_type,
+ is_active)
+
+ def _modify_resource_breadcrumb(self, req, template, data, content_type,
+ is_active):
+ """Provides logic for breadcrumb resource permissions
+ """
+ if data and ('ticket' in data.keys()) and data['ticket'].exists:
data['resourcepath_template'] = 'bh_path_ticket.html'
# determine path permissions
for resname, permname in [('milestone', 'MILESTONE_VIEW'),