item module only accessible by developers

This commit is contained in:
Daniel Herrero 2018-01-25 14:14:58 +01:00
parent 84e15ae80c
commit 64b3d3107d
6 changed files with 40 additions and 8 deletions

View File

@ -13,7 +13,8 @@
{
"url": "/list",
"state": "item.index",
"component": "vn-item-list"
"component": "vn-item-list",
"acl": ["developer"]
}, {
"url": "/create",
"state": "item.create",

View File

@ -1,12 +1,7 @@
<vn-main-block>
<vn-horizontal>
<vn-auto class="left-block">
<vn-card margin-medium-v>
<a class="item-product-link pad-large text-center" ui-sref="item.index">
<b>{{$ctrl.item.name}}</b>
<img ng-src="http://verdnatura.es/vn-image-data/catalog/200x200/{{$ctrl.item.image}}" />
</a>
</vn-card>
<vn-item-descriptor item="$ctrl.item"></vn-item-descriptor>
<vn-left-menu></vn-left-menu>
</vn-auto>
<vn-one>

View File

@ -0,0 +1,27 @@
<vn-card margin-medium-v>
<vn-vertical>
<vn-auto class="descriptor-header pointer" ui-sref="clients">
<img ng-src="/static/images/icon_item.png"/>
</vn-auto>
<vn-auto>
<vn-horizontal>
<vn-one>
</vn-one>
<vn-auto>
<img ng-src="http://verdnatura.es/vn-image-data/catalog/200x200/{{$ctrl.item.image}}" on-error-src/>
</vn-auto>
<vn-one>
</vn-one>
</vn-horizontal>
</vn-auto>
</vn-vertical>
</vn-card>
<!-- <vn-card margin-medium-v>
<a class="item-product-link pad-large text-center" ui-sref="item.index">
<vn-auto class="descriptor-header pointer" ui-sref="clients">
<i class="material-icons">person</i>
</vn-auto>
</a>
</vn-card> -->

View File

@ -0,0 +1,8 @@
import ngModule from '../module';
ngModule.component('vnItemDescriptor', {
template: require('./item-descriptor.html'),
bindings: {
item: '<'
}
});

View File

@ -4,6 +4,7 @@ import './list/list';
import './filter-panel/filter-panel';
import './create/item-create';
import './card/item-card';
import './descriptor/item-descriptor';
import './data/item-data';
import './tags/item-tags';
import './history/item-history';

View File

@ -1,7 +1,7 @@
<vn-horizontal pad-medium border-solid-bottom>
<vn-auto margin-medium-right ng-if="$ctrl.item.image">
<img ng-src="http://verdnatura.es/vn-image-data/catalog/200x200/{{$ctrl.item.image}}" />
<img ng-src="http://verdnatura.es/vn-image-data/catalog/200x200/{{$ctrl.item.image}}" on-error-src/>
</vn-auto>
<vn-one>
<div><span translate>Id</span>: <b>{{$ctrl.item.id}}</b></div>