<vn>
<div id="title">
	<h1><t>NewsManagement</t></h1>
</div>
<div id="actions">
	<htk-bar-button
		icon="add"
		tip="_AddNew"
		on-click="onAddClick"/>
</div>
<div id="form" class="news">
	<div class="box">
		<htk-repeater form-id="iter">
			<db-model property="model" id="news-model" updatable="true">
				<custom>
					SELECT n.id, c.Cliente, priority, image, title
						FROM news n
						JOIN vn2008.Clientes c ON n.user_id = c.Id_Cliente
							ORDER BY priority, n.date_time DESC
				</custom>
			</db-model>
			<custom>
				<div class="item">
					<htk-button
						form="iter"
						column="id"
						tip="_EditNew"
						icon="edit"
						on-click="onEditClick"/>
					<htk-button
						form="iter"
						column="id"
						tip="_Remove"
						icon="delete"
						on-click="onDeleteClick"/>
					<htk-image
						form="iter"
						column="image"
						class="photo"
						directory="news"
						subdir="200x200"
						full-dir="full"
						editable="true"
						conn="conn"/>
					<p class="important">
						<htk-text form="iter" column="title"/>
					</p>
					<p>
						<htk-text form="iter" column="Cliente"/>
					</p>
					<p>
						<t>Priority</t> 
						<htk-text form="iter" column="priority"/>
					</p>
				</div>
			</custom>
		</htk-repeater>
	</div>
</div>
</vn>
