Commit 7d325869 authored by christianrhansen's avatar christianrhansen

DataTable: buttons and search bar above table: new positioning

parent b61cb4a5
Pipeline #11847 passed with stage
in 7 minutes and 52 seconds
<template lang="pug"> <template lang="pug">
q-table( div
v-if="cols.length > 0", // buttons and search bar above the table
dark, .row.gutter-md
ref="table", .col-3.col-sm-4.col-md-3
row-key="name", slot(name="top-buttons", slot-scope="props")
:data="rows", .col-9.col-sm-8.col-md-9
:columns="cols", q-search(v-model="filter", dark, icon="search")
:selection="selection",
:selected.sync="selected", q-table(
@request="request", v-if="cols.length > 0",
:loading="loading", dark,
:rows-per-page-options="rowsPerPage", ref="table",
:pagination.sync="pagination", row-key="name",
:hide-bottom="hideBottom", :data="rows",
:filter="filter", :columns="cols",
:title="tableTitle") :selection="selection",
template(slot="top-left", slot-scope="props") :selected.sync="selected",
slot(name="buttons-left") @request="request",
template(slot="top-right", slot-scope="props") :loading="loading",
q-search(v-model="filter", dark, icon="search") :rows-per-page-options="rowsPerPage",
q-td(slot="body-cell-title", slot-scope="props", :props="props") :pagination.sync="pagination",
router-link.primary(v-if="hasShow", :to="getViewLink(props.row._uuid)") :hide-bottom="hideBottom",
:filter="filter",
:title="tableTitle")
template(slot="top-left", slot-scope="props")
slot(name="buttons-left")
<!--template(slot="top-right", slot-scope="props")-->
<!--q-search(v-model="filter", dark, icon="search")-->
q-td(slot="body-cell-title", slot-scope="props", :props="props")
router-link.primary(v-if="hasShow", :to="getViewLink(props.row._uuid)")
promise-span(:value="props.value")
promise-span(v-if="!hasShow", :value="props.value")
q-td(slot="body-cell-tags", slot-scope="props", :props="props")
promise-span(:value="props.value") promise-span(:value="props.value")
promise-span(v-if="!hasShow", :value="props.value") q-td(slot="body-cell-actions", slot-scope="props", :props="props")
q-td(slot="body-cell-tags", slot-scope="props", :props="props") q-btn(v-for="btn in props.value", :key="btn.icon", "flat", size="sm", :icon="btn.icon",
promise-span(:value="props.value") @click="defaultClick(btn, props)") {{ $t(btn.title) }}
q-td(slot="body-cell-actions", slot-scope="props", :props="props")
q-btn(v-for="btn in props.value", :key="btn.icon", "flat", size="sm", :icon="btn.icon",
@click="defaultClick(btn, props)") {{ $t(btn.title) }}
</template> </template>
<script> <script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment