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
|
{% extends 'base.html' %}
{% import "macros.html" as macros %}
{% block nav_scopes %}active{% endblock %}
{% block container %}
<form id="scopesForm">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
</form>
{{ super() }}
</form>
{% endblock %}
{% block sidebar %}
{{ macros.scopes_tree_collapse(scopes, sidebar_state, 'scopes') }}
{% endblock %}
{% block commands %}
{% if current_user.is_authenticated %}
{% if not current_user.target_is_disabled('CLIENT') %}
<div class="dropdown btn">
<button class="btn btn-secondary btn-light dropdown-toggle {% block nav_client %}{% endblock %}" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-expanded="false">
{{ _('Client') }}
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
{% if current_user.get_permission('CLIENT', 'ADD') %}
<input class="btn btn-light dropdown-item {% block nav_client_add %}{% endblock %}" type="submit" value="{{ _('Add client') }}"
form="scopesForm" formaction="{{ url_for('action_client_add') }}" formmethod="get">
{% endif %}
<input class="btn btn-light dropdown-item {% block nav_client_update %}{% endblock %}" type="submit" value="{{ _('Update client') }}"
form="scopesForm" formaction="{{ url_for('action_client_update') }}" formmethod="get">
{% if current_user.get_permission('CLIENT', 'UPDATE') %}
<input class="btn btn-light dropdown-item {% block nav_client_move %}{% endblock %}" type="submit" value="{{ _('Move client') }}"
form="scopesForm" formaction="{{ url_for('action_client_move') }}" formmethod="get">
{% endif %}
{% if current_user.get_permission('CLIENT', 'ADD') %}
<input class="btn btn-light dropdown-item {% block nav_clients_import %}{% endblock %}" type="submit" value="{{ _('Import clients') }}"
form="scopesForm" formaction="{{ url_for('action_clients_import_get') }}" formmethod="get">
{% endif %}
{% if current_user.get_permission('CLIENT', 'DELETE') %}
<input class="btn btn-light dropdown-item {% block nav_client_delete %}{% endblock %}" type="submit" value="{{ _('Delete client') }}"
form="scopesForm" formaction="{{ url_for('action_client_delete') }}" formmethod="get">
{% endif %}
</div>
</div>
{% endif %}
<div class="dropdown btn">
<button class="btn btn-secondary btn-light dropdown-toggle {% block nav_room %}{% endblock %}" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-expanded="false">
{{ _('Room') }}
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
{% if current_user.get_permission('ROOM', 'ADD') %}
<input class="btn btn-light dropdown-item {% block nav_room_add %}{% endblock %}" type="submit" value="{{ _('Add room') }}"
form="scopesForm" formaction="{{ url_for('action_room_add') }}" formmethod="get">
{% endif %}
{% if current_user.get_permission('ROOM', 'UPDATE') %}
<input class="btn btn-light dropdown-item {% block nav_room_update %}{% endblock %}" type="submit" value="{{ _('Update room') }}"
form="scopesForm" formaction="{{ url_for('action_room_update') }}" formmethod="get">
{% endif %}
{% if current_user.get_permission('ROOM', 'DELETE') %}
<input class="btn btn-light dropdown-item {% block nav_room_delete %}{% endblock %}" type="submit" value="{{ _('Delete room') }}"
form="scopesForm" formaction="{{ url_for('action_room_delete') }}" formmethod="get">
{% endif %}
<input class="btn btn-light dropdown-item {% block nav_room_info %}{% endblock %}" type="submit" value="{{ _('Room details') }}"
form="scopesForm" formaction="{{ url_for('action_room_info') }}" formmethod="get">
</div>
</div>
<div class="dropdown btn">
<button class="btn btn-secondary btn-light dropdown-toggle {% block nav_center %}{% endblock %}" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-expanded="false">
{{ _('Center') }}
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
{% if current_user.get_permission('CENTER', 'ADD') %}
<input class="btn btn-light dropdown-item {% block nav_center_add %}{% endblock %}" type="submit" value="{{ _('Add center') }}"
form="scopesForm" formaction="{{ url_for('action_center_add') }}" formmethod="get">
{% endif %}
{% if current_user.get_permission('CENTER', 'UPDATE') %}
<input class="btn btn-light dropdown-item {% block nav_center_update %}{% endblock %}" type="submit" value="{{ _('Update center') }}"
form="scopesForm" formaction="{{ url_for('action_center_update') }}" formmethod="get">
{% endif %}
{% if current_user.get_permission('CENTER', 'DELETE') %}
<input class="btn btn-light dropdown-item {% block nav_center_delete %}{% endblock %}" type="submit" value="{{ _('Delete center') }}"
form="scopesForm" formaction="{{ url_for('action_center_delete') }}" formmethod="get">
{% endif %}
<input class="btn btn-light dropdown-item {% block nav_center_info %}{% endblock %}" type="submit" value="{{ _('Center details') }}"
form="scopesForm" formaction="{{ url_for('action_center_info') }}" formmethod="get">
</div>
</div>
{% if not current_user.target_is_disabled('FOLDER') %}
<div class="dropdown btn">
<button class="btn btn-secondary btn-light dropdown-toggle {% block nav_folder %}{% endblock %}" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-expanded="false">
{{ _('Folder') }}
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
{% if current_user.get_permission('FOLDER', 'ADD') %}
<input class="btn btn-light dropdown-item {% block nav_folder_add %}{% endblock %}" type="submit" value="{{ _('Add folder') }}"
form="scopesForm" formaction="{{ url_for('action_folder_add') }}" formmethod="get">
{% endif %}
{% if current_user.get_permission('FOLDER', 'UPDATE') %}
<input class="btn btn-light dropdown-item {% block nav_folder_update %}{% endblock %}" type="submit" value="{{ _('Update folder') }}"
form="scopesForm" formaction="{{ url_for('action_folder_update') }}" formmethod="get">
{% endif %}
{% if current_user.get_permission('FOLDER', 'DELETE') %}
<input class="btn btn-light dropdown-item {% block nav_folder_delete %}{% endblock %}" type="submit" value="{{ _('Delete folder') }}"
form="scopesForm" formaction="{{ url_for('action_folder_delete') }}" formmethod="get">
{% endif %}
</div>
</div>
{% endif %}
{% endif %}
{% if btn_back %}
<button class="btn btn-danger ml-3" type="button" id="backButton" onclick="history.back()">
{{ _("Back") }}
</button>
{% endif %}
{% endblock %}
{% block content %}
{{ macros.selected_clients() }}
{% endblock %}
|