list items with images
This commit is contained in:
parent
55691b4cc9
commit
5bc375d324
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"module": "item",
|
||||
"name": "Items",
|
||||
"icon": "/static/images/icon_item.svg",
|
||||
"icon": "/static/images/icon_item.png",
|
||||
"routes": [
|
||||
{
|
||||
"url": "/item",
|
||||
|
@ -17,6 +17,10 @@
|
|||
"url": "/create",
|
||||
"state": "item.create",
|
||||
"component": "vn-item-create"
|
||||
}, {
|
||||
"url": "/data",
|
||||
"state": "item.data",
|
||||
"component": "vn-item-data"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
<a ui-sref="item.data({ id: {{$ctrl.item.id}} })" pad-medium border-solid-bottom>
|
||||
<vn-horizontal>
|
||||
<vn-auto margin-medium-right ng-if="$ctrl.item.image">
|
||||
<img ng-src="http://verdnatura.es/vn-image-data/catalog/200x200/{{$ctrl.item.image}}" />
|
||||
</vn-auto>
|
||||
<vn-one>
|
||||
<div class="vn-item-name">{{$ctrl.item.name}}</div>
|
||||
<div><span translate>Id</span>: <b>{{$ctrl.item.id}}</b></div>
|
||||
<div><span translate>Category</span>: <b>{{$ctrl.item.category}}</b></div>
|
||||
<div><span translate>Description</span>: <b>{{$ctrl.item.description}}</b></div>
|
||||
<div><span translate>Size</span>: <b>{{$ctrl.item.size}}</b></div>
|
||||
</vn-one>
|
||||
</vn-horizontal>
|
||||
</a>
|
|
@ -0,0 +1,8 @@
|
|||
import ngModule from '../module';
|
||||
|
||||
ngModule.component('vnItemProduct', {
|
||||
template: require('./item-product.html'),
|
||||
bindings: {
|
||||
item: '<'
|
||||
}
|
||||
});
|
|
@ -1,4 +1,6 @@
|
|||
import ngModule from '../module';
|
||||
import './item-product';
|
||||
import './style.css';
|
||||
|
||||
class ItemList {
|
||||
constructor() {
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
vn-item-product {
|
||||
display: block;
|
||||
}
|
||||
vn-item-product a {
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
}
|
||||
vn-item-product a:hover {
|
||||
color: white;
|
||||
background-color: #424242;
|
||||
}
|
||||
|
||||
.vn-item-product-name {
|
||||
font-family: vn-font-bold;
|
||||
}
|
|
@ -6,7 +6,7 @@ module.exports = Self => {
|
|||
where: {},
|
||||
skip: (params.page - 1) * params.size,
|
||||
limit: params.size,
|
||||
order: params.order || 'name ASC'/* ,
|
||||
order: params.order || 'relevancy DESC'/* ,
|
||||
include: {
|
||||
relation: "greugeType",
|
||||
scope: {
|
||||
|
|
|
@ -30,6 +30,15 @@
|
|||
},
|
||||
"isBargain": {
|
||||
"type": "Boolean"
|
||||
},
|
||||
"comment": {
|
||||
"type": "String"
|
||||
},
|
||||
"relevancy": {
|
||||
"type": "Number"
|
||||
},
|
||||
"image": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
|
@ -1,37 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 35 35" style="enable-background:new 0 0 35 35;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#FFFFFF;stroke:#000000;stroke-width:0.6259;stroke-miterlimit:10;}
|
||||
.st1{fill:none;stroke:#000000;stroke-width:0.6259;stroke-miterlimit:10;}
|
||||
.st2{stroke:#000000;stroke-width:0.6259;stroke-miterlimit:10;}
|
||||
.st3{fill:none;stroke:#000000;stroke-width:1.8778;stroke-miterlimit:10;}
|
||||
</style>
|
||||
<g>
|
||||
<g>
|
||||
<path d="M7.8,18.1v4.5L8,22.8v-4.5L7.8,18.1z M8.2,18.3v4.5l0.1,0L8.2,18.3L8.2,18.3z"/>
|
||||
<path d="M8.4,18.5V23l0.1,0L8.4,18.5L8.4,18.5z M8.7,18.6v4.5l0.2,0.1v-4.5L8.7,18.6z"/>
|
||||
<path d="M9,18.8v4.5l0.3,0.2V19L9,18.8z M9.4,19v4.5l0.1,0L9.4,19L9.4,19z"/>
|
||||
<path d="M9.6,19.1v4.5l0.1,0L9.6,19.1L9.6,19.1z M9.9,19.4v4.5l0.2,0.1v-4.5L9.9,19.4z"/>
|
||||
<path d="M10.2,19.5V24l0.2,0.1v-4.5L10.2,19.5z M10.7,19.8v4.5l0.1,0L10.7,19.8L10.7,19.8z"/>
|
||||
<path d="M10.8,19.9v4.5l0.1,0L10.8,19.9L10.8,19.9z M11,20v4.5l0.3,0.2v-4.5L11,20z"/>
|
||||
<path d="M11.5,20.2v4.5l0.3,0.1v-4.5L11.5,20.2z M11.8,20.4V25l0.2,0.1v-4.5L11.8,20.4z"/>
|
||||
<path d="M12.1,20.6v4.5l0.2,0.1v-4.5L12.1,20.6z M12.4,20.7v4.5l0.3,0.1v-4.5L12.4,20.7z"/>
|
||||
<path d="M12.9,21.1v4.5l0.1,0L12.9,21.1L12.9,21.1z M13.1,21.2v4.5l0.2,0.1v-4.5L13.1,21.2z"/>
|
||||
<path d="M13.4,21.4v4.5l0.2,0.1v-4.5L13.4,21.4z M13.8,21.6v4.5l0.1,0L13.8,21.6L13.8,21.6z"/>
|
||||
<path d="M14.1,21.8v4.5l0.2,0.1v-4.5L14.1,21.8z M14.4,21.9v4.5l0.1,0L14.4,21.9L14.4,21.9z"/>
|
||||
<path d="M14.7,22.1v4.5l0.2,0.1v-4.5L14.7,22.1z M15,22.3v4.5l0.1,0L15,22.3L15,22.3z"/>
|
||||
<path d="M15.3,22.4V27l0.2,0.1v-4.5L15.3,22.4z M15.6,22.7v4.5l0.1,0L15.6,22.7L15.6,22.7z"/>
|
||||
</g>
|
||||
<path class="st0" d="M17.5,4L5.8,10.8v13.5L17.5,31l11.7-6.7V10.8L17.5,4z M29,24.1l-11.5,6.6L6,24.1V10.9l11.5-6.6L29,10.9V24.1z"
|
||||
/>
|
||||
<path class="st1" d="M8.7,12.5"/>
|
||||
<line class="st0" x1="6" y1="10.9" x2="17.5" y2="17.5"/>
|
||||
<polygon class="st2" points="23,14.3 11.5,7.6 12.6,7 24.1,13.6 "/>
|
||||
<line class="st1" x1="17.5" y1="17.5" x2="28.9" y2="10.9"/>
|
||||
<path class="st3" d="M20.1,19.7"/>
|
||||
<line class="st1" x1="17.5" y1="30.7" x2="17.5" y2="17.5"/>
|
||||
<polygon class="st2" points="22.9,17.7 23.9,17.1 23.9,13.6 22.9,13.6 "/>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 2.4 KiB |
Loading…
Reference in New Issue