Refactor several "field grids" per Buefy theme

e.g. the Users field when viewing a Role, and Vendor Sources panel
when viewing a Product
This commit is contained in:
Lance Edgar 2021-09-25 18:54:33 -04:00
parent 9fe1d4c596
commit 3ece3303db
9 changed files with 299 additions and 17 deletions

View file

@ -15,6 +15,9 @@
% if loading is not Undefined and loading:
:loading="${loading}"
% endif
% if grid.default_sortkey:
:default-sort="['${grid.default_sortkey}', '${grid.default_sortdir}']"
% endif
>
<template slot-scope="props">
@ -47,7 +50,11 @@
<b-table-column field="actions" label="Actions">
% for action in grid.main_actions:
<a :href="props.row._action_url_${action.key}"
% if action.link_class:
class="${action.link_class}"
% else:
class="grid-action${' has-text-danger' if action.key == 'delete' else ''}"
% endif
% if action.click_handler:
@click.prevent="${action.click_handler}"
% endif