147 lines
6.2 KiB
HTML
147 lines
6.2 KiB
HTML
{#
|
|
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/>.
|
|
#}
|
|
<!DOCTYPE html>
|
|
<html lang="fr" ng-app="$strap">
|
|
<head>
|
|
<!-- Title -->
|
|
<title>Entries</title>
|
|
|
|
<!-- Awesome fonts -->
|
|
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
|
|
|
|
<!-- Bootstrap CSS -->
|
|
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
|
|
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap-theme.min.css" rel="stylesheet">
|
|
|
|
<!-- Bootstrap datepicker plugin CSS -->
|
|
<link href="//cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.1.3/css/bootstrap-datepicker.min.css" rel="stylesheet">
|
|
|
|
<!-- NVD3 CSS -->
|
|
<link href="//cdnjs.cloudflare.com/ajax/libs/nvd3/1.1.13-beta/nv.d3.css" rel="stylesheet">
|
|
|
|
<!-- Pines Notify JQuery plugin -->
|
|
<link href="{{ url_for('frontend.static', filename='third-party/pines-notify/jquery.pnotify.default.css') }}" rel="stylesheet">
|
|
|
|
<!-- main css -->
|
|
<link href="{{ url_for('frontend.static', filename='css/main.css') }}" rel="stylesheet">
|
|
</head>
|
|
|
|
<body style="padding-bottom: 50px; padding-top: 70px">
|
|
<div class="navbar navbar-fixed-top navbar-inverse" role="navigation" ng-controller="AccountController">
|
|
<div class="navbar-header">
|
|
<a class="navbar-brand" href="/"> Accountant</a>
|
|
</div>
|
|
|
|
<!-- Navbar with accounts and menu -->
|
|
<ul class="nav navbar-nav">
|
|
<li class="{% if request.path == '/index.html' %}active{% endif %}"><a href="index.html">Opérations</a></li>
|
|
<li class="{% if request.path == '/scheduler.html' %}active{% endif %}"><a href="scheduler.html">Planification</a></li>
|
|
|
|
<li class="divider-vertical"></li>
|
|
|
|
<!-- Account list -->
|
|
<li class="dropdown">
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">[[account.name]] (<span ng-class="valueClass(account, account.current)">[[account.current]]</span> / <span ng-class="valueClass(account, account.pointed)">[[account.pointed]]</span>)<b class="caret"></b></a>
|
|
<ul class="dropdown-menu">
|
|
<li class="dropdown-submenu" ng-class="accountClass(account)" ng-repeat="account in accounts">
|
|
<a ng-click="selectAccount(account)" href="#">[[account.name]](<span ng-class="valueClass(account, account.current)">[[account.current]]</span> / <span ng-class="valueClass(account, account.pointed)">[[account.pointed]]</span>)
|
|
<ul class="dropdown-menu">
|
|
<li><a href="#" ng-click="editAccount(account)" bs-modal="'{{ url_for('frontend.static', filename='templates/account_edit.html') }}'">Modifier</a></li>
|
|
<li><a href="#" bs-modal="'{{ url_for('frontend.static', filename='templates/account_remove.html') }}'">Supprimer</a></li>
|
|
</ul>
|
|
</a>
|
|
</li>
|
|
|
|
<li class="divider"></li>
|
|
|
|
<!-- New account button -->
|
|
<li><a bs-modal="'{{ url_for('frontend.static', filename='templates/account_new.html') }}'" href="#">Ajouter un compte</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul><!-- nav -->
|
|
</div>
|
|
</div>
|
|
|
|
<div class="container">
|
|
<div class="row">
|
|
{% block body %}{% endblock %}
|
|
</div>
|
|
</div>
|
|
|
|
{% block footer %}{% endblock %}
|
|
<!-- JQuery Javascript library -->
|
|
<script type="text/javascript" src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
|
|
|
|
<!-- Bootstrap Javascript library -->
|
|
<script type="text/javascript" src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
|
|
|
|
<!-- Bootstrap datepicker module -->
|
|
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.0.2/js/bootstrap-datepicker.min.js"></script>
|
|
|
|
<!-- Angular Javascript library -->
|
|
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.3/angular.min.js"></script>
|
|
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/angular-strap/0.7.4/angular-strap.js"></script>
|
|
|
|
<!-- D3 Plotting framework -->
|
|
<script type="text/javascript" src="//d3js.org/d3.v3.min.js"></script>
|
|
|
|
<!-- NVD3 framework -->
|
|
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/nvd3/1.1.13-beta/nv.d3.js"></script>
|
|
|
|
<!-- Pines Notify JQuery plugin -->
|
|
<script type="text/javascript" src="{{ url_for('frontend.static', filename='third-party/pines-notify/jquery.pnotify.min.js') }}"></script>
|
|
|
|
<!-- Custom Javascript library for entries -->
|
|
{% block js %}{% endblock %}
|
|
|
|
<script type="text/javascript">
|
|
angular.module('$strap').config(function($interpolateProvider, $httpProvider) {
|
|
$interpolateProvider.startSymbol('[[');
|
|
$interpolateProvider.endSymbol(']]');
|
|
|
|
$httpProvider.responseInterceptors.push(['$rootScope', '$q', function(scope, $q) {
|
|
function success(response) {
|
|
console.debug(response)
|
|
if(response.data.ok == false) {
|
|
return $q.reject(response)
|
|
}
|
|
// TODO Intercept validation error.
|
|
return response;
|
|
}
|
|
|
|
function error(response) {
|
|
// TODO Intercept Authentication Required error
|
|
$.pnotify({
|
|
type: "error",
|
|
title: response.data.title,
|
|
text: response.data.text,
|
|
width: 300
|
|
})
|
|
|
|
return $q.reject(response);
|
|
}
|
|
|
|
return function(promise) {
|
|
return promise.then(success, error);
|
|
}
|
|
}]);
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|
|
|