Formatting, refactoring…

This commit is contained in:
Alexis Lahouze 2015-07-10 11:51:43 +02:00
parent b5e78e5389
commit 6eb135f0b3

View File

@ -14,6 +14,7 @@
You should have received a copy of the GNU Affero General Public License
along with Accountant. If not, see <http://www.gnu.org/licenses/>.
#}
{# vim: set tw=80 ts=2 sw=2 sts=2: #}
<!DOCTYPE html>
<html lang="fr" ng-app="accountantApp">
<head>
@ -25,52 +26,71 @@
<!-- main css -->
<link href="{{ url_for('frontend.static', filename='css/main.css') }}" rel="stylesheet">
<!-- Vendor javascripts. -->
<script type="text/javascript" src="{{ url_for('frontend.static', filename="build/js/vendor.js") }}"></script>
</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="/">&nbsp;Accountant</a>
</div>
<!-- Navbar -->
<nav class="navbar navbar-fixed-top navbar-inverse" ng-controller="AccountController">
<div class="container-fluid">
<!-- Brand -->
<div class="navbar-header">
<a class="navbar-brand" href="/">&nbsp;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>
<!-- Menu and accounts -->
<ul class="nav navbar-nav">
<!-- Entries -->
<li class="{% if request.path == '/entries' %}active{% endif %}">
<a href="entries">Opérations</a>
</li>
<!-- Scheduler -->
<li class="{% if request.path == '/scheduler' %}active{% endif %}">
<a href="scheduler">Planification</a>
</li>
<!-- Accounts -->
<li class="{% if request.path == '/accounts' %}active{% endif %}">
<a href="accounts">Comptes</a>
</li>
<!-- Divider between menu and accounts -->
<li class="divider-vertical"></li>
<!-- Account list -->
<!-- Account selection -->
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">[[account.name]]&nbsp;(<span ng-class="valueClass(account, account.current)">[[account.current]]</span>&nbsp;/&nbsp;<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>&nbsp;/&nbsp;<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>
<a href="#" class="dropdown-toggle" data-toggle="dropdown"
role="button" aria-haspopup="true" aria-expanded="false">
[[selectedAccount.name]]&nbsp;(<span
ng-class="valueClass(selectedAccount, selectedAccount.current)">[[selectedAccount.current]]</span>&nbsp;/&nbsp;<span
ng-class="valueClass(selectedAccount,
selectedAccount.pointed)">[[selectedAccount.pointed]]</span>)
<span class="caret"></span>
</a>
<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 class="dropdown-menu">
<li 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>&nbsp;/&nbsp;<span
ng-class="valueClass(account,
account.pointed)">[[account.pointed]]</span>)</a>
</li>
</ul>
</li>
</ul><!-- nav -->
</div>
</div>
</nav>
<div class="container">
<div class="row">
{% block body %}{% endblock %}
</div>
<div class="container-fluid">
{% block body %}{% endblock %}
</div>
<script type="text/javascript" src="{{ url_for('frontend.static', filename="build/js/vendor.js") }}"></script>
<!-- Custom Javascript library for entries -->
<script type="text/javascript" src="{{ url_for('frontend.static', filename='build/js/app.js') }}"></script>
</body>