1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
|
{% import "forms.html" as forms %}
<!DOCTYPE html>
<html class="h-100">
<head>
<title>{{ _("Account manager") }}{% block title %}{% endblock %}</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel=stylesheet type=text/css href="{{ url_for("static", filename='css/main.css') }}">
<script src="{{ url_for("static", filename="js/jquery-3.1.1.min.js") }}"></script>
<script src="{{ url_for("static", filename="js/ihatemoney.js") }}"></script>
<script src="{{ url_for("static", filename="js/tether.min.js") }}"></script>
<script src="{{ url_for("static", filename="js/popper.min.js") }}"></script>
<script src="{{ url_for("static", filename="js/bootstrap.min.js") }}"></script>
{% block head %}{% endblock %}
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
setTimeout(function(){
$(".flash").fadeOut("slow", function () {
$(".flash").remove();
});
}, 4000);
$('.dropdown-toggle').dropdown();
$('[data-toggle="tooltip"]').tooltip();
{% block js %}{% endblock %}
});
</script>
</head>
<body class="d-flex flex-column h-100">
<nav class="navbar navbar-expand-lg fixed-top navbar-dark bg-dark">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarToggler" aria-controls="navbarToggler" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<h1><a class="navbar-brand" href="{{ url_for("main.home") }}">#! money?</a></h1>
{% if g.project %}
<ul class="navbar-nav mr-auto">
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" id="navbarProjectsLinks" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<strong class="text-white">{{ g.project.name }}</strong>
<b class="caret"></b>
</a>
<ul class="dropdown-menu" aria-labelledby="navbarProjectsLinks">
<li>
<a class="dropdown-item" href="{{ url_for("main.create_project") }}">
<i class="icon plus">{{ static_include("images/plus.svg") | safe }}</i>
{{ _("Start a new project") }}
</a>
</li>
{% if (session['projects'] | length) > 1 %}
<li class="dropdown-divider"></li>
<li class="dropdown-header">{{ _('Other projects :') }}</li>
{% for id, name in session['projects'] %}
{% if id != g.project.id %}
<li><a class="dropdown-item" href="{{ url_for("main.list_bills", project_id=id) }}">{{ _("switch to") }} {{ name }}</a></li>
{% endif %}
{% endfor %}
{% endif %}
</ul>
</li>
</ul>
{% endif %}
<div class="collapse navbar-collapse" id="navbarToggler">
<ul class="navbar-nav ml-auto mr-auto">
{% if g.project %}
{% block navbar %}
<li class="nav-item{% if current_view == 'list_bills' %} active{% endif %}"><a class="nav-link" href="{{ url_for("main.list_bills") }}">{{ _("Bills") }}</a></li>
<li class="nav-item{% if current_view == 'settle_bill' %} active{% endif %}"><a class="nav-link" href="{{ url_for("main.settle_bill") }}">{{ _("Settle") }}</a></li>
<li class="nav-item{% if current_view == 'statistics' %} active{% endif %}"><a class="nav-link" href="{{ url_for("main.statistics") }}">{{ _("Statistics") }}</a></li>
<li class="nav-item{% if current_view == 'edit_project' %} active{% endif %}""><a class="nav-link" href="{{ url_for("main.edit_project") }}">{{ _("Settings") }}</a></li>
{% endblock %}
{% endif %}
</ul>
<ul class="navbar-nav ml-auto">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" id="langMenuButton">
<i class="icon globe-europe">{{ static_include("images/globe.svg") | safe }}</i>
{% if g.lang %}
{{ locale_from_iso(g.lang).display_name | capitalize }}
{% else %}
{{ _('Languages') }}
{% endif %}
<b class="caret"></b>
</a>
<div class="dropdown-menu" aria-labelledby="langMenuButton">
<h6 class="dropdown-header">{{ _('Languages') }}</h6>
{% for lang in config['SUPPORTED_LANGUAGES'] %}
{% if g.lang != lang %}
<a class="dropdown-item" href="{{ url_for("main.change_lang", lang=lang)}}">{{ locale_from_iso(lang).display_name | capitalize }}</a>
{% endif %}
{% endfor %}
</div>
</li>
{% if (session['projects'] | length) > 0 or session['is_admin'] %}
<li class="nav-item">
<a class="nav-link" href="{{ url_for("main.exit") }}">{{ _("Logout") }}</a>
</li>
{% endif %}
</ul>
</div>
</nav>
<div class="container-fluid flex-shrink-0">
{% block body %}
<main class="content offset-1 col-10">
{% block content %}{% endblock %}
</main>
{% endblock %}
</div>
<div class="messages">
{% for message in get_flashed_messages() %}
<div class="flash alert alert-success">{{ message }}</div>
{% endfor %}
</div>
{% block footer %}
<footer class="footer mt-auto py-3">
<div class="footer-limiter">
<div class="footer-right">
<a target="_blank" rel="noopener" n data-toggle="tooltip" data-placement="top" title="{{ _('Code') }}" href="https://github.com/spiral-project/ihatemoney">
<i class="icon github">{{ static_include("images/github.svg") | safe }}</i>
</a>
<a target="_blank" rel="noopener" n data-toggle="tooltip" data-placement="top" title="{{ _('Mobile Application') }}" href="https://gitlab.com/eneiluj/moneybuster">
<i class="icon mobile">{{ static_include("images/mobile-alt.svg") | safe }}</i>
</a>
<a target="_blank" rel="noopener" n data-toggle="tooltip" data-placement="top" title="{{ _('Documentation') }}" href="https://ihatemoney.readthedocs.io/en/latest/">
<i class="icon book">{{ static_include("images/book.svg") | safe }}</i>
</a>
{% if g.show_admin_dashboard_link %}
<a target="_blank" rel="noopener" n data-toggle="tooltip" data-placement="top" title="{{ _('Administation Dashboard') }}" href="{{ url_for("main.dashboard") }}">
<i class="icon admin">{{ static_include("images/cog.svg") | safe }}</i>
</a>
{% endif %}
</div>
<div class="footer-left">
<p>
<a href="https://github.com/spiral-project/ihatemoney">{{ _("\"I hate money\" is a free software") }}</a><span class="d-none d-sm-inline"></span>,
{{ _("you can contribute and improve it!") }}</span>
</p>
</div>
</div>
</footer>
{% endblock %}
</body>
</html>
|