From bda05aed86e13ed4d46f29e44a052646fa9a6c4b Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sun, 24 Sep 2023 08:37:50 -0500 Subject: [PATCH] Use header button instead of link for "touch" instance --- tailbone/templates/master/view.mako | 31 ++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/tailbone/templates/master/view.mako b/tailbone/templates/master/view.mako index 69485dd1..e6d0c8de 100644 --- a/tailbone/templates/master/view.mako +++ b/tailbone/templates/master/view.mako @@ -7,6 +7,18 @@ ${instance_title} +<%def name="render_instance_header_title_extras()"> + + % if master.touchable and master.has_perm('touch'): + + + % endif + + <%def name="object_helpers()"> ${parent.object_helpers()} ${self.render_xref_helper()} @@ -37,9 +49,6 @@ % if master.has_versions and request.rattail_config.versioning_enabled() and request.has_perm('{}.versions'.format(permission_prefix)):
  • ${h.link_to("Version History", action_url('versions', instance))}
  • % endif - % if master.touchable and request.has_perm('{}.touch'.format(permission_prefix)): -
  • ${h.link_to("\"Touch\" this {}".format(model_title), master.get_action_url('touch', instance))}
  • - % endif <%def name="render_row_grid_tools()"> @@ -83,6 +92,22 @@ ${parent.render_this_page_template()} +<%def name="modify_whole_page_vars()"> + ${parent.modify_whole_page_vars()} + % if master.touchable and master.has_perm('touch'): + + % endif + + <%def name="finalize_this_page_vars()"> ${parent.finalize_this_page_vars()} % if master.has_rows: