0
1
Fork 0

Tags beta v2

This commit is contained in:
Juan 2018-03-27 16:35:53 +02:00
parent 73b2750b8a
commit 3b14d419d6
7 changed files with 47 additions and 43 deletions

View File

@ -34,7 +34,7 @@ Lower price: Preu més baix
Higher price: Preu més alt Higher price: Preu més alt
Lower size: Mida més petita Lower size: Mida més petita
Higher size: Mida més gran Higher size: Mida més gran
', %.0d Units': ', %.0d Unitats' '%.0d Units': ', %.0d Unitats'
from: des de from: des de
from %.2d€: des de %.2d€ from %.2d€: des de %.2d€
AddToBasket: Afegir article AddToBasket: Afegir article

View File

@ -34,7 +34,7 @@ Lower price: Lower price
Higher price: Higher price Higher price: Higher price
Lower size: Lower size Lower size: Lower size
Higher size: Higher size Higher size: Higher size
', %.0d Units': ', %.0d Units' '%.0d Units': '%.0d Units'
from: from from: from
from %.2d€: from %.2d€ from %.2d€: from %.2d€
AddToBasket: Add to basket AddToBasket: Add to basket

View File

@ -34,7 +34,7 @@ Higher price: Precio más alto
Lower size: Medida más pequeña Lower size: Medida más pequeña
Higher size: Medida más grande Higher size: Medida más grande
Relevancy: Relevancia Relevancy: Relevancia
', %.0d Units': ', %.0d Unidades' '%.0d Units': ', %.0d Unidades'
from: desde from: desde
from %.2d€: desde %.2d€ from %.2d€: desde %.2d€
AddToBasket: Añadir artículo AddToBasket: Añadir artículo

View File

@ -34,7 +34,7 @@ Lower price: Prix le plus bas
Higher price: Prix le plus élevé Higher price: Prix le plus élevé
Lower size: Taille le plus bas Lower size: Taille le plus bas
Higher size: Taille le plus élevé Higher size: Taille le plus élevé
', %.0d Units': ', %.0d Unités' '%.0d Units': ', %.0d Unités'
from: pour from: pour
from %.2d€: pour %.2d€ from %.2d€: pour %.2d€
AddToBasket: Ajouter article AddToBasket: Ajouter article

View File

@ -34,7 +34,7 @@ Lower price: Menor preço
Higher price: Maior preço Higher price: Maior preço
Lower size: Tamanho menor Lower size: Tamanho menor
Higher size: Tamanho maior Higher size: Tamanho maior
', %.0d Units': ', %.0d Unidades' '%.0d Units': ', %.0d Unidades'
from: desde from: desde
from %.2d€: desde %.2d€ from %.2d€: desde %.2d€
AddToBasket: Adicionar à Cesta AddToBasket: Adicionar à Cesta

View File

@ -246,6 +246,17 @@
margin-top: 1em; margin-top: 1em;
font-size: .9em; font-size: .9em;
} }
.item-card .tags
{
font-size: .9em;
color: #777;
margin: 0;
padding-top: .5em;
}
.item-card .tags p
{
margin: 0;
}
.item-card .lots-grid .item-card .lots-grid
{ {
border-top: 1px solid #DDD; border-top: 1px solid #DDD;

View File

@ -53,16 +53,16 @@
result-index="2" result-index="2"
on-status-changed="onItemsChange"> on-status-changed="onItemsChange">
CREATE TEMPORARY TABLE tmp.bionic_calc CREATE TEMPORARY TABLE tmp.bionic_calc
(INDEX (item_id)) (INDEX (item_id))
ENGINE=MEMORY ENGINE = MEMORY
SELECT i.id item_id SELECT i.id item_id
FROM vn.item i FROM vn.item i
JOIN vn.itemType t ON t.id = i.typeFk JOIN vn.itemType t ON t.id = i.typeFk
WHERE #filter; WHERE #filter;
CALL bionic_calc (); CALL bionic_calc;
SELECT i.id itemFk, i.description, b.available, b.price, SELECT i.id itemFk, i.description, b.available, b.price,
b.producer, i.image, i.name item, i.category, i.size, b.producer, i.image, i.name item, i.category, i.size,
IF(i.stems > 1, i.stems, NULL) stems, c.name color, IF(i.stems > 1, i.stems, NULL) stems, c.name color, o.name origin,
t.tag1, t.val1, t.tag2, t.val2, t.tag3, t.val3 t.tag1, t.val1, t.tag2, t.val2, t.tag3, t.val3
FROM tmp.bionic_item b FROM tmp.bionic_item b
JOIN vn.item i ON i.id = b.item_id JOIN vn.item i ON i.id = b.item_id
@ -139,7 +139,9 @@
</p> </p>
<p class="color"> <p class="color">
<htk-text form="item" column="tag3"/> <htk-text form="item" column="val3"/> <htk-text form="item" column="tag3"/> <htk-text form="item" column="val3"/>
<htk-text form="item" column="stems" format="_, %.0d Units"/> </p>
<p class="color">
<htk-text form="item" column="stems" format="_%.0d Units"/>
</p> </p>
<div class="aval-price"> <div class="aval-price">
<htk-text form="item" column="available"/> <htk-text form="item" column="available"/>
@ -231,12 +233,11 @@
param="color"> param="color">
<db-model property="model" auto-load="false" result-index="1"> <db-model property="model" auto-load="false" result-index="1">
CALL item_available (); CALL item_available ();
SELECT DISTINCT k.id, l.name SELECT DISTINCT l.id, l.name
FROM vn.item i FROM vn.item i
JOIN vn.itemType t ON t.id = i.typeFk JOIN vn.itemType t ON t.id = i.typeFk
JOIN tmp.item_available a ON a.item_id = i.id JOIN tmp.item_available a ON a.item_id = i.id
JOIN vn.ink k ON k.id = i.inkFk JOIN vn.inkL10n l ON l.id = i.inkFk
JOIN vn.inkL10n l ON l.id = i.id
WHERE #filter WHERE #filter
ORDER BY name ORDER BY name
</db-model> </db-model>
@ -399,38 +400,30 @@
@<htk-text form="card" column="itemFk"/> @<htk-text form="card" column="itemFk"/>
</p> </p>
<p> <p>
<t>Size</t> <htk-text form="card" column="size"/>, <htk-text form="card" column="stems" format="_%.0d Units"/>
<t>Category</t> <htk-text form="card" column="category"/>
</p>
<p>
<t>Color</t> <htk-text form="card" column="color"/>
<htk-text form="card" column="stems" format="_, %.0d Units"/>
</p>
<p>
<t>Origin</t> <htk-text form="card-extend" column="origin"/>
</p> </p>
</div> </div>
<p class="desc"> <p class="desc">
<htk-text form="card-extend" column="description" id="desc"/> <htk-text form="card-extend" column="description" id="desc"/>
</p> </p>
<htk-repeater show-status="false" form-id="tag" class="tags">
<db-model
property="model"
batch="card-batch"
on-status-changed-after="onCardLoad">
SELECT l.name, it.value
FROM vn.itemTag it
JOIN vn.tag t ON t.id = it.tagFk
JOIN vn.tagL10n l ON l.id = t.id
WHERE it.itemFk = #item
</db-model>
<custom>
<p>
<htk-text form="tag" column="name"/> <htk-text form="tag" column="value"/>
</p>
</custom>
</htk-repeater>
</div> </div>
<htk-repeater show-status="false">
<db-model
property="model"
batch="card-batch"
on-status-changed-after="onCardLoad">
SELECT l.name, it.value
FROM vn.itemTag it
JOIN vn.tag t ON t.id = it.tagFk
JOIN vn.tagL10n l ON l.id = t.id
WHERE it.itemFk = #item
</db-model>
<custom>
<p>
<htk-text form="form" column="name"/> <htk-text form="form" column="value"/>
</p>
</custom>
</htk-repeater>
<htk-grid class="lots-grid" show-header="false"> <htk-grid class="lots-grid" show-header="false">
<db-model <db-model
id="item-lots" id="item-lots"