2013-07-28 23:25:51 +02:00
|
|
|
{#
|
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/>.
|
2013-07-28 23:25:51 +02:00
|
|
|
#}
|
|
|
|
{% extends "layout.html" %}
|
|
|
|
{% block body %}
|
2013-12-06 20:36:26 +01:00
|
|
|
<div ng-controller="EntryController">
|
2013-07-28 23:25:51 +02:00
|
|
|
<!-- Chart row -->
|
2013-12-06 20:36:26 +01:00
|
|
|
<div class="row">
|
2013-07-28 23:25:51 +02:00
|
|
|
<!-- 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"/>
|
2013-07-28 23:25:51 +02:00
|
|
|
</div>
|
2013-01-07 18:42:02 +01:00
|
|
|
|
2013-07-28 23:25:51 +02: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'/>
|
2013-07-28 23:25:51 +02:00
|
|
|
</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 :</td><td>[[accountStatus.expenses]]</td></tr>
|
|
|
|
<tr><td>Recettes :</td><td>[[accountStatus.revenues]]</td></tr>
|
|
|
|
<tr><td>Balance :</td><td><span ng-class="entryValueClass(accountStatus.balance)">[[accountStatus.balance]]</span></td></tr>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
2013-07-28 23:25:51 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Row with entry table -->
|
2013-12-06 20:36:26 +01:00
|
|
|
<div class="row">
|
|
|
|
<table class="table table-condensed table-hover">
|
2013-07-28 23:25:51 +02:00
|
|
|
<!-- Head of the table containing column headers and size -->
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th style="width: 100px">Date d'op.</th>
|
|
|
|
<th>Libellé de l'opération</th>
|
|
|
|
<th style="width: 50px">Montant</th>
|
|
|
|
<th style="width: 50px">Solde</th>
|
|
|
|
<th style="width: 100px">Catégorie</th>
|
2013-12-06 20:36:26 +01:00
|
|
|
<th style="width: 80px">Actions</th>
|
2013-07-28 23:25:51 +02:00
|
|
|
</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/>
|
2013-07-28 23:25:51 +02:00
|
|
|
<span ng-show="isDisplaying(entry)">[[entry.operation_date]]</span>
|
|
|
|
</small>
|
|
|
|
</td>
|
2013-12-06 20:36:26 +01:00
|
|
|
|
2013-07-28 23:25:51 +02: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"/>
|
2013-07-28 23:25:51 +02:00
|
|
|
<span ng-show="isDisplaying(entry)">[[entry.label]]</span>
|
|
|
|
</small>
|
|
|
|
</td>
|
2013-12-06 20:36:26 +01:00
|
|
|
|
2013-07-28 23:25:51 +02: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"/>
|
2013-07-28 23:25:51 +02:00
|
|
|
<span ng-show="isDisplaying(entry)">[[entry.value]]</span>
|
|
|
|
</small>
|
|
|
|
</td>
|
2013-12-06 20:36:26 +01:00
|
|
|
|
2013-07-28 23:25:51 +02:00
|
|
|
<td ng-class="entryValueClass(entry.sold)">
|
|
|
|
<small>
|
|
|
|
[[entry.sold]]
|
|
|
|
</small>
|
|
|
|
</td>
|
2013-12-06 20:36:26 +01:00
|
|
|
|
2013-07-28 23:25:51 +02: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"/>
|
2013-07-28 23:25:51 +02:00
|
|
|
<span ng-show="isDisplaying(entry)">[[entry.category]]</span>
|
|
|
|
</small>
|
|
|
|
</td>
|
2013-12-06 20:36:26 +01:00
|
|
|
|
2013-07-28 23:25:51 +02: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>
|
2013-01-12 22:11:48 +01:00
|
|
|
</div>
|
2013-12-06 20:36:26 +01:00
|
|
|
|
2013-07-28 23:25:51 +02: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>
|
2013-01-12 22:11:48 +01:00
|
|
|
</div>
|
2013-12-06 20:36:26 +01:00
|
|
|
|
2013-07-28 23:25:51 +02: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>
|
2013-07-28 23:25:51 +02:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
2013-12-06 20:36:26 +01:00
|
|
|
|
|
|
|
{% include "remove_entry.html" %}
|
|
|
|
|
|
|
|
</div>
|
2013-07-28 23:25:51 +02:00
|
|
|
{% endblock %}
|
|
|
|
|
2013-08-07 17:49:15 +02:00
|
|
|
{% 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>
|
2013-08-07 17:49:15 +02:00
|
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|
|
|
2013-12-06 20:36:26 +01:00
|
|
|
|
2013-07-28 23:25:51 +02: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>
|
2013-07-28 23:25:51 +02:00
|
|
|
{% endblock %}
|
2013-01-07 18:42:02 +01:00
|
|
|
|