Tarea #62 link a la foto
This commit is contained in:
parent
595cbfbed6
commit
48f0554a6a
|
@ -5,3 +5,4 @@ import './validation';
|
|||
import './acl';
|
||||
import './on-error-src';
|
||||
import './zoom-image';
|
||||
import './visible-by';
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
import ngModule from '../module';
|
||||
|
||||
function vnVisibleBy(aclService) {
|
||||
return {
|
||||
restrict: 'A',
|
||||
priority: -1,
|
||||
link: function($scope, $element, $attrs) {
|
||||
let acls = $attrs.vnVisibleBy.split(',');
|
||||
if (!aclService.aclPermission(acls)) {
|
||||
$element[0].style.visibility = 'hidden';
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
vnVisibleBy.$inject = ['aclService'];
|
||||
|
||||
ngModule.directive('vnVisibleBy', vnVisibleBy);
|
|
@ -79,17 +79,6 @@
|
|||
"description": "Botanical",
|
||||
"icon": "folder"
|
||||
}
|
||||
},{
|
||||
"url" : "/picture",
|
||||
"state": "item.card.picture",
|
||||
"component": "vn-item-picture",
|
||||
"params": {
|
||||
"item": "$ctrl.item"
|
||||
},
|
||||
"menu": {
|
||||
"description": "Picture",
|
||||
"icon": "folder"
|
||||
}
|
||||
},{
|
||||
"url" : "/barcode",
|
||||
"state": "item.card.barcode",
|
||||
|
|
|
@ -3,10 +3,14 @@
|
|||
<vn-auto class="descriptor-header pointer" ui-sref="item.index">
|
||||
<img ng-src="/static/images/icon_item.png"/>
|
||||
</vn-auto>
|
||||
<vn-auto pad-medium text-center>
|
||||
<vn-auto style="position: relative" pad-medium text-center>
|
||||
<img
|
||||
ng-src="http://verdnatura.es/vn-image-data/catalog/200x200/{{$ctrl.item.image}}"
|
||||
zoom-image="http://verdnatura.es/vn-image-data/catalog/900x900/{{$ctrl.item.image}}" on-error-src/>
|
||||
ng-src="http://verdnatura.es/vn-image-data/catalog/200x200/{{::$ctrl.item.image}}"
|
||||
zoom-image="http://verdnatura.es/vn-image-data/catalog/900x900/{{::$ctrl.item.image}}" on-error-src/>
|
||||
<a href="https://www.verdnatura.es/#!form=admin/items&filter={{::$ctrl.item.id}}"><vn-float-button icon="edit"
|
||||
style="position: absolute; bottom: 1em; right: 1em;"
|
||||
vn-visible-by="administrative"></vn-float-button>
|
||||
</a>
|
||||
</vn-auto>
|
||||
<vn-auto pad-medium>
|
||||
<div><span translate>Id</span>: <b>{{$ctrl.item.id}}</b></div>
|
||||
|
|
|
@ -11,6 +11,5 @@ import './tags/item-tags';
|
|||
import './history/item-history';
|
||||
import './niche/item-niche';
|
||||
import './botanical/item-botanical';
|
||||
import './picture/item-picture';
|
||||
import './barcode/item-barcode';
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@ Item history: Historial del artículo
|
|||
Item tags: Tags del artículo
|
||||
Niche: Nicho
|
||||
Picture: Foto
|
||||
Item pictures: Fotos del artículo
|
||||
Barcode: Código barras
|
||||
Item barcode: Código de barras del artículo
|
||||
Changed by: Cambiado por
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
<vn-card>
|
||||
<vn-vertical pad-large>
|
||||
<vn-title>Item pictures</vn-title>
|
||||
</vn-vertical>
|
||||
</vn-card>
|
|
@ -1,5 +0,0 @@
|
|||
import ngModule from '../module';
|
||||
|
||||
ngModule.component('vnItemPicture', {
|
||||
template: require('./item-picture.html')
|
||||
});
|
Loading…
Reference in New Issue