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

86 lines
2.9 KiB
HTML

<vn-descriptor-content
module="item"
description="$ctrl.item.name">
<slot-menu>
<vn-item
ng-click="regularize.show()"
name="regularizeStock"
translate>
Regularize stock
</vn-item>
</slot-menu>
<slot-before>
<div style="position: relative" text-center>
<img
ng-src="{{::$root.imagePath}}/catalog/200x200/{{$ctrl.item.image}}"
zoom-image="{{::$root.imagePath}}/catalog/1600x900/{{$ctrl.item.image}}"
on-error-src
/>
<a href="//verdnatura.es/#!form=admin/items&filter={{$ctrl.item.id}}" target="_blank">
<vn-float-button
icon="edit"
style="position: absolute; margin: 1em; bottom: 0; right: 0;"
vn-visible-by="marketing, buyer">
</vn-float-button>
</a>
</div>
<vn-horizontal class="item-state">
<vn-one>
<p translate>Visible</p>
<p>{{$ctrl.visible | dashIfEmpty}}</p>
</vn-one>
<vn-one>
<p translate>Available</p>
<p>{{$ctrl.available | dashIfEmpty}}</p>
</vn-one>
</vn-horizontal>
</slot-before>
<slot-body>
<div class="attributes">
<vn-label-value
label="Buyer"
value="{{$ctrl.item.itemType.worker.user.nickname}}">
</vn-label-value>
<vn-label-value
ng-repeat="tag in $ctrl.item.tags | limitTo:4"
label="{{tag.tag.name}}"
value="{{tag.value}}">
</vn-label-value>
</div>
<div class="icons">
<vn-icon
vn-tooltip="Item inactive"
icon="icon-unavailable"
ng-class="{bright: $ctrl.item.isActive == false}">
</vn-icon>
</div>
<div class="quicklinks">
<div ng-transclude="btnOne"></div>
<div ng-transclude="btnTwo"></div>
<div ng-transclude="btnThree"></div>
</div>
</slot-body>
</vn-descriptor-content>
<vn-dialog
vn-id="regularize"
on-open="$ctrl.warehouseFk = $ctrl.vnConfig.warehouseFk"
on-close="$ctrl.clearRegularizeDialog()"
on-accept="$ctrl.saveRegularize()"
message="Regularize stock">
<tpl-body>
<vn-textfield
label="Type the visible quantity"
ng-model="$ctrl.quantity"
vn-focus>
</vn-textfield>
<vn-autocomplete
label="Warehouse"
ng-model="$ctrl.warehouseFk"
url="Warehouses">
</vn-autocomplete>
</tpl-body>
<tpl-buttons>
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
<button response="accept" translate>Save</button>
</tpl-buttons>
</vn-dialog>