base.html
17.4 KB
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
<!DOCTYPE html>
{% load static i18n django_bootstrap_breadcrumbs %}
{% get_current_language as LANGUAGE_CODE %}
<html>
<head>
<title>{{ title }} | {{ theme.title }}</title>
<!-- jQuery & jQuery UI -->
<script type="text/javascript" src="{% static 'js/jquery-3.1.0.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/jquery-ui.js' %}"></script>
<meta http-equiv="Cache-Control" content="no-cache, no-store" />
<link href="{{ theme.favicon_url }}" rel="shortcut icon" />
<!-- Roboto font -->
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:300,400,500,700" type="text/css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!-- Bootstrap and themes (material) -->
<link rel="stylesheet" type="text/css" href="{% static 'bootstrap-3.3.7/css/bootstrap.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'material/css/bootstrap-material-design.min.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'material/css/ripples.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'material/css/ripples.min.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'css/bootstrap-datetimepicker.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'css/alertifyjs/alertify.min.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'css/alertifyjs/themes/bootstrap.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'css/jPages.css' %}">
<script type="text/javascript" src="{% static 'bootstrap-3.3.7/js/bootstrap.min.js' %}"></script>
<!--<script type="text/javascript" src="{% static 'js/bootstrap-acessibility2.min.js' %}"></script>-->
<script type="text/javascript" src="{% static 'material/js/material.min.js' %}"></script>
<script type="text/javascript" src="{% static 'material/js/ripples.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/moment-with-locales.js' %}"></script>
<script type="text/javascript" src="{% static 'js/bootstrap-datetimepicker.js' %}"></script>
<script type="text/javascript" src="{% static 'js/alertify.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/jscookie.js' %}"></script>
<script type="text/javascript" src="{% static 'js/jPages.js' %}"></script>
<script type="text/javascript" src="{% static "js/d3.min.js" %}"></script>
<!-- Font awesome -->
<link rel="stylesheet" type="text/css" href="{% static 'font-awesome-4.6.3/css/font-awesome.min.css' %}">
<!-- Custom styles -->
<link rel="stylesheet" type="text/css" href="{% static 'css/base/amadeus_responsive.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'css/base/amadeus.css' %}">
{% block style %}
{% endblock %}
{% block javascript %}
{% endblock %}
<!-- Summernote -->
<script src="{% static 'summernote/summernote.js' %}" type="text/javascript"></script>
<link href="{% static 'summernote/summernote.css' %}" type="text/css" rel="stylesheet" />
{% with 'css/themes/'|add:theme.css_style|add:'.css' as theme_selected %}
<link rel="stylesheet" type="text/css" href="{% static theme_selected %}">
{% endwith %}
</head>
<body data-lang="{{ LANGUAGE_CODE }}">
{% block nav %}
<div class="navbar navbar-default">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{% url 'subjects:home' %}">
<img class="logo pull-left" src="{{ theme.small_logo_url }}" alt="Logo" />
<span class="pull-right project_name">{{ theme.title }}</span>
</a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">
<div class="col-md-7 col-md-offset-1 col-sm-6 col-sm-offset-1 col-lg-7 col-lg-offset-1 text-center">
<form id="SearchForm" action="{% url 'subjects:search' %}" method="get" accept-charset="utf-8" class="navbar-form">
<div class="input-group">
<div class="form-group is-empty" >
<input type="text" class="form-control top-search" placeholder="{% trans 'Search for subjects and resources' %}" name="search">
</div>
<span class="input-group-btn input-group-sm">
<button type="submit" class="btn btn-primary" id="btn-search">
<i class="fa fa-search" aria-hidden="true" style="color:white; font-size:20px"></i>
</button>
</span>
</div>
</form>
</div>
<ul class="nav navbar-nav navbar-right notifications">
<li class="dropdown language-selector-on-header {{ settings_menu_active }}" title data-original-title="{% trans 'Language Selector' %}">
<a href="#" class="dropdown-toggle title" data-toggle="dropdown" data-close-others="true">
<i class="fa fa-cog hidden-xs" aria-hidden="true"></i>
<span class="visible-xs-inline">{% trans 'Language Selector' %}</span>
{% with 'img/'|add:LANGUAGE_CODE|add:'.png' as image_static %}
<img src="{% static image_static %}" />
{% endwith %}
</a>
<a href="#" class="dropdown-toggle no-title" data-toggle="dropdown" data-close-others="true">
{% with 'img/'|add:LANGUAGE_CODE|add:'.png' as image_static %}
<img src="{% static image_static %}" />
{% endwith %}
</a>
<ul class="dropdown-menu">
{% get_available_languages as LANGUAGES %}
{% get_language_info_list for LANGUAGES as languages %}
{% for language in languages %}
<li {% if language.code == LANGUAGE_CODE %}
class="active"
{% endif %}>
<a class="language-item" value-lang="{{language.code}}">
{% with 'img/'|add:language.code|add:'.png' as image_static %}
<img src="{% static image_static %}" />
{% endwith %}
<span>{{language.code}}</span>
</a>
</li>
{% endfor %}
</ul>
</li>
<li id="profile-menu" class="dropdown" data-toggle="tooltip" data-placement="bottom" title data-original-title="{{ user }}">
<a href="" data-toggle="dropdown" class="dropdown-toggle profile">
<img src="{{ user.image_url }}" class="hidden-xs" style="width:50px;height:50px" />
<span class="visible-xs-inline">{{ user }}</span>
</a>
<ul class="dropdown-menu" role="menu">
<li><a href="{% url 'users:profile' %}">{% trans 'Profile' %}</a></li>
<li><a href="{% url 'users:edit_profile' %}">{% trans 'Edit Profile' %}</a></li>
<li><a href="{% url 'users:change_pass' %}">{% trans 'Change Password' %}</a></li>
<li><a href="{% url 'users:remove_acc' %}">{% trans 'Delete Account' %}</a></li>
<li><a href="{% url 'users:logout' %}">{% trans 'Logout' %}</a></li>
</ul>
</li>
{% if user.is_staff %}
<li id="staff-menu" class="dropdown {{ settings_menu_active }}" title data-original-title="{% trans 'settings' %}">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-cog hidden-xs" aria-hidden="true"></i>
<span class="visible-xs-inline">{% trans 'Settings' %}</span>
</a>
<ul class="dropdown-menu" role="menu">
<li><a href="{% url 'users:manage' %}">{% trans 'Manage Users' %}</a></li>
<li><a href="{% url 'categories:index' %}">{% trans 'Manage Categories' %}</a></li>
<li class="dropdown-accordion" data-accordion="#system_accordion">
<div class="panel-group" id="system_accordion">
<div class="panel panel-default">
<div class="panel-heading">
<a href="#system_menu" data-toggle="collapse" data-parent="#system_accordion">
<h4 class="panel-title">
{% trans 'System' %}
</h4>
</a>
</div>
<div class="panel-collapse collapse" id="system_menu">
<div class="panel-body">
<ul class="submenu">
<li><a href="{% url 'mailsender:update' %}">{% trans 'Mail Sender' %}</a></li>
<li><a href="{% url 'security:update' %}">{% trans 'Security' %}</a></li>
<li><a href="{% url 'themes:manage' %}">{% trans 'Theme' %}</a></li>
</ul>
</div>
</div>
</div>
</div>
</li>
</ul>
</li>
{% endif %}
</ul>
</div>
</div>
{% endblock %}
<div class="container-fluid">
<div class="row">
<div id="sidebar-menu-div" class="col-md-1 col-lg-1 hidden-xs hidden-sm">
{% block sidebar %}
<ul id="sidebar-menu">
<li class="item {{ subjects_menu_active }}" id="subjects-link" data-toggle="tooltip" data-placement="right" title="{% trans "Subjects" %}">
<a href="{% url 'subjects:index' %}">
<i class="fa fa-graduation-cap" aria-hidden="true"></i>
</a>
</li>
<li class="item {{ mural_menu_active }} action_icon" data-toggle="tooltip" data-placement="right" title="{% trans "Mural" %}">
<a href="{% url 'mural:manage_general' %}">
<i class="fa fa-list" aria-hidden="true" ></i>
<span class="badge notify_badge mural_badge" {% if mural_notifications_count == 0 %} style="display:none" {% endif %}>{% if mural_notifications_count > 99 %} +99 {% else %} {{ mural_notifications_count }} {% endif %}</span>
</a>
</li>
<li class="item {{ chat_menu_active }} action_icon" data-toggle="tooltip" data-placement="right" title="{% trans "Messages" %}">
<a href="{% url 'chat:manage_general' %}">
<i class="fa fa-envelope-o" aria-hidden="true"></i>
<span class="badge notify_badge chat_badge" {% if chat_notifications_count == 0 %} style="display:none" {% endif %}>{% if chat_notifications_count > 99 %} +99 {% else %} {{ chat_notifications_count }} {% endif %}</span>
</a>
</li>
<li class="item {{ pendencies_menu_active }} action_icon" data-toggle="tooltip" data-placement="right" title="{% trans "Pendencies" %}">
<a href="{% url 'notifications:manage' %}">
<i class="fa fa-exclamation-triangle" aria-hidden="true"></i>
{% if notifications_count > 0 %}
<span class="badge notify_badge">{% if notifications_count > 99 %} +99 {% else %} {{ notifications_count }} {% endif %}</span>
{% endif %}
</a>
</li>
<li class="item" data-toggle="tooltip" data-placement="right" title="{% trans "Analytics" %}">
<i class="fa fa-bar-chart" aria-hidden="true"></i>
</li>
</ul>
{% endblock %}
</div>
<div class="col-xs-12 col-sm-12 col-md-11 col-lg-11">
{% block breadcrumbs %}
{% breadcrumb 'Home' 'home' %}
{% endblock %}
{% block render_breadcrumbs %}
{% render_breadcrumbs %}
{% endblock %}
</div>
<div class="col-xs-12 col-sm-12 col-md-11 col-lg-11">
{% block content %}
{% endblock %}
</div>
</div>
</div>
{% block footer %}
{% endblock %}
{% block bottommenu %}
<div class="clearfix visible-xs visible-sm"></div>
<div class="bottom-menu visible-xs visible-sm">
<div class="row">
<div class="col-sm-12 col-xs-12 text-center">
<ul class="mobile-menu">
<li class="item {{ subjects_menu_active }}" data-toggle="tooltip" data-placement="top" title="{% trans "Subjects" %}">
<a href="{% url 'subjects:index' %}">
<i class="fa fa-graduation-cap" aria-hidden="true"></i>
</a>
</li>
<li class="item {{ mural_menu_active }} action_icon" data-toggle="tooltip" data-placement="top" title="{% trans "Mural" %}">
<a href="{% url 'mural:manage_general' %}">
<i class="fa fa-list" aria-hidden="true" ></i>
<span class="badge notify_badge mural_badge" {% if mural_notifications_count == 0 %} style="display:none" {% endif %}>{% if mural_notifications_count > 99 %} +99 {% else %} {{ mural_notifications_count }} {% endif %}</span>
</a>
</li>
<li class="item {{ chat_menu_active }} action_icon" data-toggle="tooltip" data-placement="top" title="{% trans "Messages" %}">
<a href="{% url 'chat:manage_general' %}">
<i class="fa fa-envelope-o" aria-hidden="true"></i>
<span class="badge notify_badge chat_badge" {% if chat_notifications_count == 0 %} style="display:none" {% endif %}>{% if chat_notifications_count > 99 %} +99 {% else %} {{ chat_notifications_count }} {% endif %}</span>
</a>
</li>
<li class="item {{ pendencies_menu_active }} action_icon" data-toggle="tooltip" data-placement="top" title="{% trans "Pendencies" %}">
<a href="{% url 'notifications:manage' %}">
<i class="fa fa-exclamation-triangle" aria-hidden="true"></i>
{% if notifications_count > 0 %}
<span class="badge notify_badge">{% if notifications_count > 99 %} +99 {% else %} {{ notifications_count }} {% endif %}</span>
{% endif %}
</a>
</li>
<li class="item" data-toggle="tooltip" data-placement="top" title="{% trans "Analytics" %}">
<i class="fa fa-bar-chart" aria-hid{% get_current_language as LANGUAGE_CODE %}den="true"></i>
</li>
</ul>
</div>
</div>
</div>
{% endblock %}
{% include 'session_security/all.html' %}
<!-- Init material Bootstrap -->
<script type="text/javascript">$.material.init()</script>
<script src="{% static 'js/main.js' %}"></script>
<script src="{% static 'js/socket.js' %}"></script>
<!-- Language selector code -->
<script>
$(".language-item").click(function(event) {
change_language.post("{% url 'set_language' %}", {'language': $(this)[0].attributes[1].value, next: "{% url 'users:login' %}", csrfmiddlewaretoken: '{{ csrf_token }}' } );
});
</script>
</body>
</html>