Some aesthetic improvements for vendor catalog batch

hopefully they're improvements...
This commit is contained in:
Lance Edgar 2022-01-07 15:03:56 -06:00
parent f89dc88c0e
commit ab61778d35
5 changed files with 124 additions and 17 deletions

View file

@ -351,6 +351,58 @@
</div>
</%def>
<%def name="render_row_grid_tools()">
${parent.render_row_grid_tools()}
% if use_buefy and master.rows_bulk_deletable and not batch.executed and master.has_perm('delete_rows'):
<b-button type="is-danger"
@click="deleteResultsInit()"
icon-pack="fas"
icon-left="trash">
Delete Results
</b-button>
<b-modal has-modal-card
:active.sync="deleteResultsShowDialog">
<div class="modal-card">
<header class="modal-card-head">
<p class="modal-card-title">Delete Results</p>
</header>
<section class="modal-card-body">
<p class="block">
This batch has
<span class="has-text-weight-bold">${batch.rowcount}</span>
total rows.
</p>
<p class="block">
Your current filters have returned
<span class="has-text-weight-bold">{{ total }}</span>
results.
</p>
<p class="block">
Would you like to
<span class="has-text-danger has-text-weight-bold">
delete all {{ total }}
</span>
results?
</p>
</section>
<footer class="modal-card-foot">
<b-button @click="deleteResultsShowDialog = false">
Cancel
</b-button>
<once-button type="is-danger"
tag="a" href="${url('{}.delete_rows'.format(route_prefix), uuid=batch.uuid)}"
icon-left="trash"
text="Delete Results">
</once-button>
</footer>
</div>
</b-modal>
% endif
</%def>
<%def name="modify_this_page_vars()">
${parent.modify_this_page_vars()}
<script type="text/javascript">
@ -395,6 +447,17 @@
}
% endif
% if master.rows_bulk_deletable and not batch.executed and master.has_perm('delete_rows'):
${rows_grid.component_studly}Data.deleteResultsShowDialog = false
${rows_grid.component_studly}.methods.deleteResultsInit = function() {
this.deleteResultsShowDialog = true
}
% endif
</script>
</%def>