accountant-ui/src/html/index.html

88 lines
3.8 KiB
HTML
Raw Normal View History

2013-01-07 18:42:02 +01:00
<!DOCTYPE html>
<html lang="fr">
<head>
<title>Entries</title>
<!-- Bootstrap -->
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="datepicker/css/datepicker.css" rel="stylesheet" media="screen">
</head>
<body>
<div class="container-fluid">
<div class="row-fluid">
<div class="span12">
<!--Body content-->
<h1>Entries</h1>
<div id="message-placeholder"></div>
<p><select data-bind="options: accounts, optionsText: 'name', value: account"></select></p>
<p>Current sold: <span data-bind="text: currentSold, css: {'text-error': currentSold() < 0 }"></span><br />
Future sold: <span data-bind="text: futureSold, css: {'text-error': futureSold() < 0 }"></span></br />
Pointed sold: <span data-bind="text: pointedSold, css: {'text-error': pointedSold() < 0 }"></span></p>
<p><a class="btn btn-primary" data-bind="click: $root.add" href="#" title="Add entry"><i class="icon-plus"></i> Add entry</a></p>
<p><select class="span1" data-bind="options: years, value: year"></select><select class="span1" data-bind="options: months, value: month"></select></p>
<table class="table table-striped table-condensed table-hover">
<thead>
<tr>
<th style="width: 100px">Value date</th>
<th style="width: 100px">Op. date</th>
<th>Label</th>
<th style="width: 50px">Value</th>
<th style="width: 50px">Sold</th>
<th style="width: 50px">Pointed sold</th>
<th style="width: 60px">Actions</th>
</tr>
</thead>
<tbody data-bind="template:{name: templateToUse, foreach: entries}">
</tbody>
</table>
</div>
</div>
</div>
<script id="itemsTmpl" type="text/html">
<tr data-bind="css: { 'error': sold() < 0 }">
<td data-bind="date: value_date"></td>
<td data-bind="date: operation_date"></td>
<td data-bind="text: label"></td>
<td data-bind="text: value, css: {'text-error': value() < 0 }"></td>
<td data-bind="text: sold, css: {'text-error': sold() < 0 }"></td>
<td data-bind="text: pointedSold, css: {'text-error': pointedSold() < 0 }"></td>
<td class="buttons">
<a class="btn btn-mini" data-bind="click: $root.edit" href="#" title="edit"><i class="icon-edit"></i></a>
<a class="btn btn-mini" data-bind="click: $root.remove" href="#" title="remove"><i class="icon-trash"></i></a>
</td>
</tr>
</script>
<script id="editTmpl" type="text/html">
<tr data-bind="css: { 'error': sold() < 0 }">
<td><input type="text" class="input-small" data-bind="dateValue: value_date" data-date-format="yyyy-mm-dd" id="value_date"/></td>
<td><input type="text" class="input-small" data-bind="dateValue: operation_date" data-date-format="yyyy-mm-dd" id="operation_date"/></td>
<td><input type="text" class="input-xxlarge" data-bind="value: label"/></td>
<td><input type="text" class="input-mini" data-bind="value: value"/></td>
<td data-bind="text: sold"></td>
<td data-bind="text: pointedSold"></td>
<td class="buttons">
<a class="btn btn-mini btn-success" data-bind="click: $root.save" href="#" title="save"><i class="icon-ok"></i></a>
<a class="btn btn-mini" data-bind="click: $root.cancel" href="#" title="cancel"><i class="icon-ban-circle"></i></a>
</td>
</tr>
</script>
<script src="jquery.js"></script>
<script src="bootstrap/js/bootstrap.min.js"></script>
<script src="datepicker/js/bootstrap-datepicker.js"></script>
<script src="knockout.js"></script>
<script src="js/entries.js"></script>
</body>
</html>