Add basic support for per-page help URL
This commit is contained in:
parent
80e9a9cf1c
commit
18af33c9bb
|
@ -54,6 +54,9 @@
|
|||
% endif
|
||||
|
||||
<div class="feedback">
|
||||
% if help_url is not Undefined and help_url:
|
||||
${h.link_to("Help", help_url, target='_blank', class_='button')}
|
||||
% endif
|
||||
<button type="button" id="feedback">Feedback</button>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1192,6 +1192,9 @@ class MasterView(View):
|
|||
route_prefix = 'mobile.{}'.format(route_prefix)
|
||||
return self.request.route_url('{}.{}'.format(route_prefix, action), **kw)
|
||||
|
||||
def get_help_url(self):
|
||||
return getattr(self, 'help_url', None)
|
||||
|
||||
def render_to_response(self, template, data, mobile=False):
|
||||
"""
|
||||
Return a response with the given template rendered with the given data.
|
||||
|
@ -1210,6 +1213,7 @@ class MasterView(View):
|
|||
'index_url': self.get_index_url(mobile=mobile),
|
||||
'action_url': self.get_action_url,
|
||||
'grid_index': self.grid_index,
|
||||
'help_url': self.get_help_url(),
|
||||
}
|
||||
|
||||
if self.grid_index:
|
||||
|
|
Loading…
Reference in a new issue