#249: Provide ticket page with breadcrumb
--------------------------+-----------------------
Reporter: gjm | Owner: gjm
Type: enhancement | Status: review
Priority: major | Milestone: Release 4
Component: dashboard | Version:
Resolution: | Keywords:
--------------------------+-----------------------
Comment (by gjm):
Replying to [comment:7 olemis]:
> Replying to [comment:6 rjollos]:
> > Replying to [comment:5 olemis]:
> > > [..] But mainly the goal is to move permission checks out of source
code and include it in the template .
> >
> > What are the motivations / advantages to performing the permissions
checks in the template rather than the source code?
>
> Well in this case such change will allow us to reuse the same template
(i.e. bhtheme/templates/bh_path_ticket.html ) in another context if
necessary without the need for adding the same data in a different (...
completely unrelated ...) request handler .
I am not sure that I entirely follow that logic as we are already
effectively modifying the request to do the template swapping. For
generalisation we could separate out the relevant code to give a
{{{_modify_ticket_breadcrumb}}} request modifier method that is called by
the {{{_modify_ticket}}} method in the same way that it calls the
{{{_modify_scrollspy}}} method.
This would then work for any context that has data['ticket'] by calling
this request modifier or creating a new one to combine it with other
request modifiers.
Of course, we are going to have to work a fair bit harder to generalise
for milestone and version resources, unless we put that off until
multiproduct solves these issues by indicating ownership of these
resources.
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/249#comment:8>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker