Remove support for Buefy 0.8
only Buefy 0.9 and greater are supported now
This commit is contained in:
parent
5f7fa33eb2
commit
8410419717
20 changed files with 1057 additions and 1625 deletions
|
@ -20,71 +20,60 @@
|
|||
% endif
|
||||
>
|
||||
|
||||
% if buefy_0_8:
|
||||
<template slot-scope="props">
|
||||
% endif
|
||||
% for i, column in enumerate(grid_columns):
|
||||
<b-table-column field="${column['field']}"
|
||||
% if not empty_labels:
|
||||
label="${column['label']}"
|
||||
% elif i > 0:
|
||||
label=" "
|
||||
% endif
|
||||
% if not buefy_0_8:
|
||||
v-slot="props"
|
||||
% endif
|
||||
${'sortable' if column['sortable'] else ''}>
|
||||
% if empty_labels and i == 0:
|
||||
<template slot="header" slot-scope="{ column }"></template>
|
||||
% endif
|
||||
% if grid.is_linked(column['field']):
|
||||
<a :href="props.row._action_url_view"
|
||||
v-html="props.row.${column['field']}"
|
||||
% if view_click_handler:
|
||||
@click.prevent="${view_click_handler}"
|
||||
% endif
|
||||
>
|
||||
% for i, column in enumerate(grid_columns):
|
||||
<b-table-column field="${column['field']}"
|
||||
% if not empty_labels:
|
||||
label="${column['label']}"
|
||||
% elif i > 0:
|
||||
label=" "
|
||||
% endif
|
||||
v-slot="props"
|
||||
${'sortable' if column['sortable'] else ''}>
|
||||
% if empty_labels and i == 0:
|
||||
<template slot="header" slot-scope="{ column }"></template>
|
||||
% endif
|
||||
% if grid.is_linked(column['field']):
|
||||
<a :href="props.row._action_url_view"
|
||||
v-html="props.row.${column['field']}"
|
||||
% if view_click_handler:
|
||||
@click.prevent="${view_click_handler}"
|
||||
% endif
|
||||
>
|
||||
</a>
|
||||
% elif grid.has_click_handler(column['field']):
|
||||
<span>
|
||||
<a href="#"
|
||||
@click.prevent="${grid.click_handlers[column['field']]}"
|
||||
v-html="props.row.${column['field']}">
|
||||
</a>
|
||||
% elif grid.has_click_handler(column['field']):
|
||||
<span>
|
||||
<a href="#"
|
||||
@click.prevent="${grid.click_handlers[column['field']]}"
|
||||
v-html="props.row.${column['field']}">
|
||||
</a>
|
||||
</span>
|
||||
% else:
|
||||
<span v-html="props.row.${column['field']}"></span>
|
||||
% endif
|
||||
</b-table-column>
|
||||
% endfor
|
||||
</span>
|
||||
% else:
|
||||
<span v-html="props.row.${column['field']}"></span>
|
||||
% endif
|
||||
</b-table-column>
|
||||
% endfor
|
||||
|
||||
% if grid.main_actions or grid.more_actions:
|
||||
<b-table-column field="actions"
|
||||
label="Actions"
|
||||
% if not buefy_0_8:
|
||||
v-slot="props"
|
||||
% endif
|
||||
>
|
||||
% 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
|
||||
>
|
||||
<i class="fas fa-${action.icon}"></i>
|
||||
${action.label}
|
||||
</a>
|
||||
|
||||
% endfor
|
||||
</b-table-column>
|
||||
% endif
|
||||
% if buefy_0_8:
|
||||
</template>
|
||||
% if grid.main_actions or grid.more_actions:
|
||||
<b-table-column field="actions"
|
||||
label="Actions"
|
||||
v-slot="props">
|
||||
% 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
|
||||
>
|
||||
<i class="fas fa-${action.icon}"></i>
|
||||
${action.label}
|
||||
</a>
|
||||
|
||||
% endfor
|
||||
</b-table-column>
|
||||
% endif
|
||||
|
||||
<template slot="empty">
|
||||
|
|
|
@ -218,60 +218,49 @@
|
|||
:hoverable="true"
|
||||
:narrowed="true">
|
||||
|
||||
% if buefy_0_8:
|
||||
<template slot-scope="props">
|
||||
% endif
|
||||
% for column in grid_columns:
|
||||
<b-table-column field="${column['field']}"
|
||||
label="${column['label']}"
|
||||
% if not buefy_0_8:
|
||||
v-slot="props"
|
||||
% endif
|
||||
:sortable="${json.dumps(column['sortable'])}"
|
||||
% if grid.is_searchable(column['field']):
|
||||
searchable
|
||||
% endif
|
||||
cell-class="c_${column['field']}"
|
||||
% if grid.has_click_handler(column['field']):
|
||||
@click.native="${grid.click_handlers[column['field']]}"
|
||||
% endif
|
||||
:visible="${json.dumps(column['visible'])}">
|
||||
% if column['field'] in grid.raw_renderers:
|
||||
${grid.raw_renderers[column['field']]()}
|
||||
% elif grid.is_linked(column['field']):
|
||||
<a :href="props.row._action_url_view" v-html="props.row.${column['field']}"></a>
|
||||
% else:
|
||||
<span v-html="props.row.${column['field']}"></span>
|
||||
% endif
|
||||
</b-table-column>
|
||||
% endfor
|
||||
% for column in grid_columns:
|
||||
<b-table-column field="${column['field']}"
|
||||
label="${column['label']}"
|
||||
v-slot="props"
|
||||
:sortable="${json.dumps(column['sortable'])}"
|
||||
% if grid.is_searchable(column['field']):
|
||||
searchable
|
||||
% endif
|
||||
cell-class="c_${column['field']}"
|
||||
% if grid.has_click_handler(column['field']):
|
||||
@click.native="${grid.click_handlers[column['field']]}"
|
||||
% endif
|
||||
:visible="${json.dumps(column['visible'])}">
|
||||
% if column['field'] in grid.raw_renderers:
|
||||
${grid.raw_renderers[column['field']]()}
|
||||
% elif grid.is_linked(column['field']):
|
||||
<a :href="props.row._action_url_view" v-html="props.row.${column['field']}"></a>
|
||||
% else:
|
||||
<span v-html="props.row.${column['field']}"></span>
|
||||
% endif
|
||||
</b-table-column>
|
||||
% endfor
|
||||
|
||||
% if grid.main_actions or grid.more_actions:
|
||||
<b-table-column field="actions"
|
||||
label="Actions"
|
||||
% if not buefy_0_8:
|
||||
v-slot="props"
|
||||
% endif
|
||||
>
|
||||
## TODO: we do not currently differentiate for "main vs. more"
|
||||
## here, but ideally we would tuck "more" away in a drawer etc.
|
||||
% for action in grid.main_actions + grid.more_actions:
|
||||
<a v-if="props.row._action_url_${action.key}"
|
||||
:href="props.row._action_url_${action.key}"
|
||||
class="grid-action${' has-text-danger' if action.key == 'delete' else ''} ${action.link_class or ''}"
|
||||
% if action.click_handler:
|
||||
@click.prevent="${action.click_handler}"
|
||||
% endif
|
||||
>
|
||||
${action.render_icon()|n}
|
||||
${action.render_label()|n}
|
||||
</a>
|
||||
|
||||
% endfor
|
||||
</b-table-column>
|
||||
% endif
|
||||
% if buefy_0_8:
|
||||
</template>
|
||||
% if grid.main_actions or grid.more_actions:
|
||||
<b-table-column field="actions"
|
||||
label="Actions"
|
||||
v-slot="props">
|
||||
## TODO: we do not currently differentiate for "main vs. more"
|
||||
## here, but ideally we would tuck "more" away in a drawer etc.
|
||||
% for action in grid.main_actions + grid.more_actions:
|
||||
<a v-if="props.row._action_url_${action.key}"
|
||||
:href="props.row._action_url_${action.key}"
|
||||
class="grid-action${' has-text-danger' if action.key == 'delete' else ''} ${action.link_class or ''}"
|
||||
% if action.click_handler:
|
||||
@click.prevent="${action.click_handler}"
|
||||
% endif
|
||||
>
|
||||
${action.render_icon()|n}
|
||||
${action.render_label()|n}
|
||||
</a>
|
||||
|
||||
% endfor
|
||||
</b-table-column>
|
||||
% endif
|
||||
|
||||
<template #empty>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue