accountant-ui/frontend/templates/index.html

167 lines
6.4 KiB
HTML
Raw Normal View History

{#
2013-02-08 13:07:27 +01:00
This file is part of Accountant.
Accountant is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Foobar is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with Accountant. If not, see <http://www.gnu.org/licenses/>.
#}
{% extends "layout.html" %}
{% block body %}
2013-12-06 20:36:26 +01:00
<div ng-controller="EntryController">
<!-- Chart row -->
2013-12-06 20:36:26 +01:00
<div class="row">
<!-- Sold evolution chart placeholder -->
2013-12-06 20:36:26 +01:00
<div class="col-md-7">
<svg id="entries-chart-placeholder" style="stroke-width: 1px"/>
</div>
2013-01-07 18:42:02 +01:00
<!-- Expense category piechart -->
2013-12-06 20:36:26 +01:00
<div class="col-md-3">
<svg id="expense-categories-chart-placeholder" style='height:300px'/>
</div>
2013-12-03 20:23:37 +01:00
<!-- Balance -->
2013-12-06 20:36:26 +01:00
<div class="col-md-2">
<div class="row">
2013-12-03 20:23:37 +01:00
<table class="table">
<tr><td>Dépenses&nbsp;:</td><td>[[accountStatus.expenses]]</td></tr>
<tr><td>Recettes&nbsp;:</td><td>[[accountStatus.revenues]]</td></tr>
<tr><td>Balance&nbsp;:</td><td><span ng-class="entryValueClass(accountStatus.balance)">[[accountStatus.balance]]</span></td></tr>
</table>
</div>
</div>
</div>
<!-- Row with entry table -->
2013-12-06 20:36:26 +01:00
<div class="row">
<table class="table table-condensed table-hover">
<!-- Head of the table containing column headers and size -->
<thead>
<tr>
<th style="width: 100px">Date d'op.</th>
<th>Libell&eacute; de l'op&eacute;ration</th>
<th style="width: 50px">Montant</th>
<th style="width: 50px">Solde</th>
<th style="width: 100px">Cat&eacute;gorie</th>
2013-12-06 20:36:26 +01:00
<th style="width: 80px">Actions</th>
</tr>
</thead>
<!-- Body of the table containing the entries -->
<tbody>
<tr id="entry_[[entry.id]]" class="form-inline" ng-class="entryRowClass(entry)" ng-repeat="entry in entries">
<td>
<small>
2013-12-06 20:36:26 +01:00
<input ng-show="isEditing(entry)" type="text" class="form-control input-sm" ng-model="entry.operation_date" data-date-format="yyyy-mm-dd" bs-datepicker/>
<span ng-show="isDisplaying(entry)">[[entry.operation_date]]</span>
</small>
</td>
2013-12-06 20:36:26 +01:00
<td>
<small>
2013-12-06 20:36:26 +01:00
<input ng-show="isEditing(entry)" type="text" class="form-control input-sm" ng-model="entry.label"/>
<span ng-show="isDisplaying(entry)">[[entry.label]]</span>
</small>
</td>
2013-12-06 20:36:26 +01:00
<td>
<small>
2013-12-06 20:36:26 +01:00
<input ng-show="isEditing(entry)" type="text" class="form-control input-sm" ng-model="entry.value"/>
<span ng-show="isDisplaying(entry)">[[entry.value]]</span>
</small>
</td>
2013-12-06 20:36:26 +01:00
<td ng-class="entryValueClass(entry.sold)">
<small>
[[entry.sold]]
</small>
</td>
2013-12-06 20:36:26 +01:00
<td>
<small>
2013-12-06 20:36:26 +01:00
<!--<input ng-show="isEditing(entry)" type="text" class="form-control input-sm" ng-model="entry.category" bs-typeahead="categories"/>-->
<input ng-show="isEditing(entry)" type="text" class="form-control input-sm" ng-model="entry.category"/>
<span ng-show="isDisplaying(entry)">[[entry.category]]</span>
</small>
</td>
2013-12-06 20:36:26 +01:00
<td>
<div class="btn-group" ng-show="isEditing(entry)">
2013-12-06 20:36:26 +01:00
<button type="button" class="btn btn-xs btn-success" ng-click="saveEntry(entry)" title="Save">
<span ng-class="iconSaveClass(entry)"></span>
</button>
<button type="button" class="btn btn-xs btn-default" ng-click="cancelEditEntry(entry)" title="Cancel">
<span ng-class="iconCancelClass(entry)"></span>
</button>
<button type="button" class="btn btn-xs btn-default" ng-click="pointEntry(entry)" ng-class="pointedEntryClass(entry)" title="point">
<span class="fa fa-check"></span>
</button>
</div>
2013-12-06 20:36:26 +01:00
<div class="btn-group" ng-show="isDisplaying(entry) && isSaved(entry)">
2013-12-06 20:36:26 +01:00
<button class="btn btn-xs btn-default" ng-click="editEntry(entry)" title="edit">
<span class="fa fa-pencil-square-o"></span>
</button>
2013-12-09 10:38:17 +01:00
<button class="btn btn-xs btn-default" ng-click="removeEntry(entry)" title="remove">
2013-12-06 20:36:26 +01:00
<span class="fa fa-trash-o"></span>
</button>
<button class="btn btn-xs btn-default" ng-click="pointEntry(entry)" ng-class="pointedEntryClass(entry)" title="point">
<span class="fa fa-check"></span>
</button>
</div>
2013-12-06 20:36:26 +01:00
<div class="btn-group" ng-show="isDisplaying(entry) && !isSaved(entry)">
2013-12-06 20:36:26 +01:00
<button class="btn btn-xs btn-success" ng-click="saveEntry(entry)" title="Save">
<span ng-class="iconSaveClass(entry)"></span>
</button>
<button class="btn btn-xs btn-default" ng-click="editEntry(entry)" title="edit">
<span class="fa fa-pencil-square-o"></span>
</button>
<button class="btn btn-xs btn-default" ng-click="pointEntry(entry)" ng-class="pointedEntryClass(entry)" title="point">
<span class="fa fa-check"></span>
</button>
2013-01-08 18:50:47 +01:00
</div>
</td>
</tr>
</tbody>
</table>
</div>
2013-12-06 20:36:26 +01:00
{% include "remove_entry.html" %}
</div>
{% endblock %}
{% block footer %}
<!-- Navbar with the months of the selected account -->
2013-12-06 20:36:26 +01:00
<div class="navbar navbar-default navbar-fixed-bottom" role="navigation" ng-controller="MonthController">
<ul class="nav navbar-nav">
<li ng-repeat="month in months" ng-class="monthClass(month)"><a href="#" ng-click="selectMonth(month)">[[month.year]]-[[month.month]]</a></li>
</ul>
</div>
{% endblock %}
2013-12-06 20:36:26 +01:00
<!-- Custom Javascript library for entries -->
{% block js %}
2013-12-03 21:34:40 +01:00
<script type="text/javascript" src="{{ url_for('frontend.static', filename='js/months.js') }}"></script>
<script type="text/javascript" src="{{ url_for('frontend.static', filename='js/accounts.js') }}"></script>
<script type="text/javascript" src="{{ url_for('frontend.static', filename='js/entries.js') }}"></script>
{% endblock %}
2013-01-07 18:42:02 +01:00