salix/modules/item/front/index/index.html

50 lines
1.7 KiB
HTML

<vn-crud-model
vn-id="model"
url="/item/api/Items/filter"
limit="8"
order="isActive DESC, name, id"
data="items"
auto-load="false">
</vn-crud-model>
<div margin-medium>
<div class="vn-list">
<vn-card pad-medium-h>
<vn-searchbar
panel="vn-item-search-panel"
model="model"
expr-builder="$ctrl.exprBuilder(param, value)"
param-builder="$ctrl.paramBuilder(param, value)"
vn-focus>
</vn-searchbar>
</vn-card>
<vn-card margin-medium-v>
<vn-item-product
ng-repeat="item in items track by item.id"
item="::item">
</vn-item-product>
<vn-empty-rows class="vn-list-item" style="text-align: center"
ng-if="model.data.length === 0" translate>
No results
</vn-empty-rows>
<vn-empty-rows class="vn-list-item" style="text-align: center"
ng-if="model.data === null" translate>
Enter a new search
</vn-empty-rows>
</vn-card>
<vn-pagination model="model"></vn-pagination>
</div>
</div>
<a ui-sref="item.create" vn-tooltip="New item" vn-bind="+" fixed-bottom-right>
<vn-float-button icon="add"></vn-float-button>
</a>
<vn-dialog vn-id="preview" class="dialog-summary">
<tpl-body>
<vn-item-summary item="$ctrl.itemSelected"></vn-item-summary>
</tpl-body>
</vn-dialog>
<vn-confirm
vn-id="clone"
on-response="$ctrl.onCloneAccept(response)"
question="Do you want to clone this item?"
message="All it's properties will be copied">
</vn-confirm>