fix: various fixes for waterpark theme
This commit is contained in:
parent
c176d97870
commit
4c3e3aeb6a
|
@ -668,7 +668,7 @@
|
|||
text="Edit This">
|
||||
</once-button>
|
||||
% endif
|
||||
% if getattr(master, 'cloneable', False) and master.has_perm('clone'):
|
||||
% if getattr(master, 'cloneable', False) and not master.cloning and master.has_perm('clone'):
|
||||
<once-button tag="a" href="${master.get_action_url('clone', instance)}"
|
||||
icon-left="object-ungroup"
|
||||
text="Clone This">
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
<%def name="base_styles()">
|
||||
${parent.base_styles()}
|
||||
${h.stylesheet_link(request.static_url('tailbone:static/css/diffs.css') + '?ver={}'.format(tailbone.__version__))}
|
||||
<style>
|
||||
|
||||
.filters .filter-fieldname .field,
|
||||
|
@ -171,6 +172,88 @@
|
|||
% endif
|
||||
</%def>
|
||||
|
||||
<%def name="render_crud_header_buttons()">
|
||||
% if master:
|
||||
% if master.viewing:
|
||||
% if instance_editable and master.has_perm('edit'):
|
||||
<wutta-button once
|
||||
tag="a" href="${master.get_action_url('edit', instance)}"
|
||||
icon-left="edit"
|
||||
label="Edit This" />
|
||||
% endif
|
||||
% if getattr(master, 'cloneable', False) and not master.cloning and master.has_perm('clone'):
|
||||
<wutta-button once
|
||||
tag="a" href="${master.get_action_url('clone', instance)}"
|
||||
icon-left="object-ungroup"
|
||||
label="Clone This" />
|
||||
% endif
|
||||
% if instance_deletable and master.has_perm('delete'):
|
||||
<wutta-button once type="is-danger"
|
||||
tag="a" href="${master.get_action_url('delete', instance)}"
|
||||
icon-left="trash"
|
||||
label="Delete This" />
|
||||
% endif
|
||||
% elif master.editing:
|
||||
% if master.has_perm('view'):
|
||||
<wutta-button once
|
||||
tag="a" href="${master.get_action_url('view', instance)}"
|
||||
icon-left="eye"
|
||||
label="View This" />
|
||||
% endif
|
||||
% if instance_deletable and master.has_perm('delete'):
|
||||
<wutta-button once type="is-danger"
|
||||
tag="a" href="${master.get_action_url('delete', instance)}"
|
||||
icon-left="trash"
|
||||
label="Delete This" />
|
||||
% endif
|
||||
% elif master.deleting:
|
||||
% if master.has_perm('view'):
|
||||
<wutta-button once
|
||||
tag="a" href="${master.get_action_url('view', instance)}"
|
||||
icon-left="eye"
|
||||
label="View This" />
|
||||
% endif
|
||||
% if instance_editable and master.has_perm('edit'):
|
||||
<wutta-button once
|
||||
tag="a" href="${master.get_action_url('edit', instance)}"
|
||||
icon-left="edit"
|
||||
label="Edit This" />
|
||||
% endif
|
||||
% endif
|
||||
% endif
|
||||
</%def>
|
||||
|
||||
<%def name="render_prevnext_header_buttons()">
|
||||
% if show_prev_next is not Undefined and show_prev_next:
|
||||
% if prev_url:
|
||||
<wutta-button once
|
||||
tag="a" href="${prev_url}"
|
||||
icon-left="arrow-left"
|
||||
label="Older" />
|
||||
% else:
|
||||
<b-button tag="a" href="#"
|
||||
disabled
|
||||
icon-pack="fas"
|
||||
icon-left="arrow-left">
|
||||
Older
|
||||
</b-button>
|
||||
% endif
|
||||
% if next_url:
|
||||
<wutta-button once
|
||||
tag="a" href="${next_url}"
|
||||
icon-left="arrow-right"
|
||||
label="Newer" />
|
||||
% else:
|
||||
<b-button tag="a" href="#"
|
||||
disabled
|
||||
icon-pack="fas"
|
||||
icon-left="arrow-right">
|
||||
Newer
|
||||
</b-button>
|
||||
% endif
|
||||
% endif
|
||||
</%def>
|
||||
|
||||
<%def name="render_this_page_component()">
|
||||
<this-page @change-content-title="changeContentTitle"
|
||||
% if can_edit_help:
|
||||
|
|
|
@ -1,2 +1,10 @@
|
|||
## -*- coding: utf-8; -*-
|
||||
<%inherit file="wuttaweb:templates/form.mako" />
|
||||
|
||||
<%def name="render_vue_template_form()">
|
||||
% if form is not Undefined:
|
||||
${form.render_vue_template(buttons=capture(self.render_form_buttons))}
|
||||
% endif
|
||||
</%def>
|
||||
|
||||
<%def name="render_form_buttons()"></%def>
|
||||
|
|
Loading…
Reference in a new issue