75 lines
1.6 KiB
XML
75 lines
1.6 KiB
XML
<vn>
|
|
<vn-group>
|
|
<db-form id="user-form">
|
|
<db-model property="model" id="user-model" updatable="true">
|
|
<custom>
|
|
SELECT id, defaultAddressFk
|
|
FROM myClient c
|
|
</custom>
|
|
</db-model>
|
|
</db-form>
|
|
<db-model id="addresses" updatable="true">
|
|
<custom>
|
|
SELECT a.id, a.nickname, p.name province, a.postalCode,
|
|
a.city, a.street, a.isActive, c.country
|
|
FROM myAddress a
|
|
LEFT JOIN vn.province p ON p.id = a.provinceFk
|
|
JOIN vn.country c ON c.id = p.countryFk
|
|
WHERE a.isActive
|
|
</custom>
|
|
</db-model>
|
|
</vn-group>
|
|
<div id="title">
|
|
<h1><t>Addresses</t></h1>
|
|
</div>
|
|
<div id="actions">
|
|
<htk-bar-button
|
|
icon="add"
|
|
tip="_AddAddress"
|
|
on-click="onAddAddressClick"/>
|
|
</div>
|
|
<div id="form" class="address-list">
|
|
<div class="box">
|
|
<htk-radio-group
|
|
id="default-address"
|
|
column="defaultAddressFk"
|
|
form="user-form"/>
|
|
<htk-repeater model="addresses" form-id="iter">
|
|
<custom>
|
|
<div class="address">
|
|
<div class="actions">
|
|
<htk-radio
|
|
form="iter"
|
|
column="id"
|
|
radio-group="default-address"
|
|
tip="_SetAsDefault"/>
|
|
<htk-button
|
|
form="iter"
|
|
column="id"
|
|
tip="_RemoveAddress"
|
|
icon="delete"
|
|
on-click="onRemoveAddressClick"/>
|
|
<htk-button
|
|
form="iter"
|
|
column="id"
|
|
tip="_EditAddress"
|
|
icon="edit"
|
|
on-click="onEditAddressClick"/>
|
|
</div>
|
|
<p class="important">
|
|
<htk-text form="iter" column="nickname"/>
|
|
</p>
|
|
<p>
|
|
<htk-text form="iter" column="street"/>
|
|
</p>
|
|
<p>
|
|
<htk-text form="iter" column="postalCode"/>,
|
|
<htk-text form="iter" column="city"/>
|
|
</p>
|
|
</div>
|
|
</custom>
|
|
</htk-repeater>
|
|
</div>
|
|
</div>
|
|
</vn>
|