Commit 9727e86cb16c1ab45eebbee151b7e872119bc35d
Exists in
master
and in
2 other branches
Merge branch 'refactoring' of https://github.com/amadeusproject/amadeuslms into refactoring
Showing
25 changed files
with
997 additions
and
43 deletions
Show diff stats
amadeus/permissions.py
@@ -15,7 +15,7 @@ def has_category_permissions(user, category): | @@ -15,7 +15,7 @@ def has_category_permissions(user, category): | ||
15 | if user.is_staff: | 15 | if user.is_staff: |
16 | return True | 16 | return True |
17 | 17 | ||
18 | - if category.coordinators.filter(id = user.id).exists(): | 18 | + if category and category.coordinators.filter(id = user.id).exists(): |
19 | return True | 19 | return True |
20 | 20 | ||
21 | return False | 21 | return False |
@@ -27,13 +27,13 @@ def has_category_permissions(user, category): | @@ -27,13 +27,13 @@ def has_category_permissions(user, category): | ||
27 | - Create Topic inside Subject | 27 | - Create Topic inside Subject |
28 | """ | 28 | """ |
29 | def has_subject_permissions(user, subject): | 29 | def has_subject_permissions(user, subject): |
30 | - if user.is_staff: | 30 | + if user and user.is_staff: |
31 | return True | 31 | return True |
32 | 32 | ||
33 | - if subject.professor.filter(id = user.id).exists(): | 33 | + if subject.professor and subject.professor.filter(id = user.id).exists(): |
34 | return True | 34 | return True |
35 | 35 | ||
36 | - if subject.category.coordinators.filter(id = user.id).exists(): | 36 | + if subject.category and subject.category.coordinators.filter(id = user.id).exists(): |
37 | return True | 37 | return True |
38 | 38 | ||
39 | return False | 39 | return False |
@@ -46,7 +46,7 @@ def has_subject_view_permissions(user, subject): | @@ -46,7 +46,7 @@ def has_subject_view_permissions(user, subject): | ||
46 | if has_subject_permissions(user, subject): | 46 | if has_subject_permissions(user, subject): |
47 | return True | 47 | return True |
48 | 48 | ||
49 | - if subject.students.filter(id = user.id).exists(): | 49 | + if subject and subject.students.filter(id = user.id).exists(): |
50 | return True | 50 | return True |
51 | 51 | ||
52 | return False | 52 | return False |
amadeus/settings.py
@@ -232,8 +232,8 @@ MEDIA_URL = '/uploads/' | @@ -232,8 +232,8 @@ MEDIA_URL = '/uploads/' | ||
232 | 232 | ||
233 | 233 | ||
234 | # Users | 234 | # Users |
235 | -LOGIN_REDIRECT_URL = 'app:index' | ||
236 | -LOGIN_URL = 'core:home' | 235 | +LOGIN_REDIRECT_URL = 'subjects:home' |
236 | +LOGIN_URL = 'users:login' | ||
237 | AUTH_USER_MODEL = 'users.User' | 237 | AUTH_USER_MODEL = 'users.User' |
238 | 238 | ||
239 | AUTHENTICATION_BACKENDS = [ | 239 | AUTHENTICATION_BACKENDS = [ |
amadeus/static/css/.sass-cache/a7f87b90919294b62ab4f8079e31dcda8f485534/green.sassc
No preview for this file type
amadeus/static/css/base/amadeus.css
@@ -1620,6 +1620,27 @@ div.dataTables_wrapper div.dataTables_paginate { | @@ -1620,6 +1620,27 @@ div.dataTables_wrapper div.dataTables_paginate { | ||
1620 | margin-bottom: 10px; | 1620 | margin-bottom: 10px; |
1621 | } | 1621 | } |
1622 | 1622 | ||
1623 | +.backup_container { | ||
1624 | + padding: 0 30px; | ||
1625 | +} | ||
1626 | + | ||
1627 | +.backup_container .backup_item { | ||
1628 | + display: inline; | ||
1629 | + margin-left: 10px; | ||
1630 | +} | ||
1631 | + | ||
1632 | +.backup_container .resources_list { | ||
1633 | + display: none; | ||
1634 | + margin-left: 30px; | ||
1635 | +} | ||
1636 | + | ||
1637 | +.backup_container .more_items { | ||
1638 | + padding: 2px 5px; | ||
1639 | + border-radius: 2px; | ||
1640 | + position: relative; | ||
1641 | + top: -2px; | ||
1642 | +} | ||
1643 | + | ||
1623 | @-moz-document url-prefix() { | 1644 | @-moz-document url-prefix() { |
1624 | .talk_body .checkbox input[type="checkbox"] { | 1645 | .talk_body .checkbox input[type="checkbox"] { |
1625 | display: none; | 1646 | display: none; |
@@ -0,0 +1,573 @@ | @@ -0,0 +1,573 @@ | ||
1 | +body .container .jumbotron-inverse, body .container .well-inverse, body .container-fluid .jumbotron-inverse, body .container-fluid .well-inverse { | ||
2 | + background-color: white; } | ||
3 | + | ||
4 | +a, a:focus, a:hover { | ||
5 | + color: #0e1111; } | ||
6 | + | ||
7 | +.radio input[type=radio]:checked ~ .check, label.radio-inline input[type=radio]:checked ~ .check { | ||
8 | + background-color: #0e1111; } | ||
9 | + | ||
10 | +.radio input[type=radio]:checked ~ .circle, label.radio-inline input[type=radio]:checked ~ .circle { | ||
11 | + border-color: #0e1111; } | ||
12 | + | ||
13 | +.pagination > .active > a, .pagination > .active > span, .pagination > .active > a:hover, .pagination > .active > span:hover, .pagination > .active > a:focus, .pagination > .active > span:focus { | ||
14 | + color: #fff; | ||
15 | + background-color: #0e1111; | ||
16 | + border-color: #0e1111; } | ||
17 | + | ||
18 | +.navbar, .navbar.navbar-default { | ||
19 | + background-color: #0e1111; | ||
20 | + color: rgba(255, 255, 255, 0.84); } | ||
21 | + | ||
22 | +.notify_badge { | ||
23 | + background-color: #FF0000 !important; } | ||
24 | + | ||
25 | +.bottom-menu { | ||
26 | + background: #0e1111; } | ||
27 | + | ||
28 | +#btn-search:hover { | ||
29 | + background: #232b2b; } | ||
30 | + | ||
31 | +/* FORM Fields */ | ||
32 | +.form-group.is-focused label, .form-group.is-focused label.control-label { | ||
33 | + color: #0e1111; } | ||
34 | + | ||
35 | +.form-group.is-focused .form-control { | ||
36 | + outline: 0; | ||
37 | + background-image: -webkit-gradient(linear, left top, left bottom, from(#474b4b), to(#474b4b)), -webkit-gradient(linear, left top, left bottom, from(#D2D2D2), to(#D2D2D2)); | ||
38 | + background-image: -webkit-linear-gradient(#474b4b, #474b4b), -webkit-linear-gradient(#D2D2D2, #D2D2D2); | ||
39 | + background-image: -o-linear-gradient(#474b4b, #474b4b), -o-linear-gradient(#D2D2D2, #D2D2D2); | ||
40 | + background-image: linear-gradient(#474b4b, #474b4b), linear-gradient(#D2D2D2, #D2D2D2); | ||
41 | + -webkit-background-size: 100% 2px, 100% 1px; | ||
42 | + background-size: 100% 2px, 100% 1px; | ||
43 | + -webkit-box-shadow: none; | ||
44 | + box-shadow: none; | ||
45 | + -webkit-transition-duration: 0.3s; | ||
46 | + -o-transition-duration: 0.3s; | ||
47 | + transition-duration: 0.3s; } | ||
48 | + | ||
49 | +.form-control, .form-group .form-control { | ||
50 | + border: 0; | ||
51 | + background-image: -webkit-gradient(linear, left top, left bottom, from(#474b4b), to(#474b4b)), -webkit-gradient(linear, left top, left bottom, from(#D2D2D2), to(#D2D2D2)); | ||
52 | + background-image: -webkit-linear-gradient(#474b4b, #474b4b), -webkit-linear-gradient(#D2D2D2, #D2D2D2); | ||
53 | + background-image: -o-linear-gradient(#474b4b, #474b4b), -o-linear-gradient(#D2D2D2, #D2D2D2); | ||
54 | + background-image: linear-gradient(#474b4b, #474b4b), linear-gradient(#D2D2D2, #D2D2D2); | ||
55 | + -webkit-background-size: 0 2px, 100% 1px; | ||
56 | + background-size: 0 2px, 100% 1px; | ||
57 | + background-repeat: no-repeat; | ||
58 | + background-position: center bottom, center -webkit-calc(100% - 1px); | ||
59 | + background-position: center bottom, center calc(100% - 1px); | ||
60 | + background-color: transparent; | ||
61 | + -webkit-transition: background 0s ease-out; | ||
62 | + -o-transition: background 0s ease-out; | ||
63 | + transition: background 0s ease-out; | ||
64 | + float: none; | ||
65 | + -webkit-box-shadow: none; | ||
66 | + box-shadow: none; | ||
67 | + border-radius: 0; } | ||
68 | + | ||
69 | +/* */ | ||
70 | +.btn.btn-sucess.btn-raised { | ||
71 | + color: #FFFFFF; | ||
72 | + background-color: #0e1111 !important; } | ||
73 | + | ||
74 | +button.btn.btn-sucess.btn-raised { | ||
75 | + color: #FFFFFF; | ||
76 | + background-color: #0e1111 !important; } | ||
77 | + | ||
78 | +a.btn.btn-sm.btn-success.btn-raised { | ||
79 | + color: #FFFFFF; | ||
80 | + background-color: #0e1111 !important; } | ||
81 | + | ||
82 | +.alert.alert-success { | ||
83 | + background-color: #474b4b; | ||
84 | + color: #FFFFFF; } | ||
85 | + | ||
86 | +.btn-group-raised .btn.btn-success, | ||
87 | +.btn-group-raised .input-group-btn .btn.btn-success, | ||
88 | +.btn.btn-fab.btn-success, .btn.btn-raised.btn-success, | ||
89 | +.input-group-btn .btn.btn-fab.btn-success, | ||
90 | +.input-group-btn .btn.btn-raised.btn-success { | ||
91 | + color: #FFFFFF; | ||
92 | + background-color: #0e1111 !important; } | ||
93 | + | ||
94 | +.btn-group-raised .btn.btn-success :hover, | ||
95 | +.btn-group-raised .input-group-btn .btn.btn-success :hover, | ||
96 | +.btn.btn-fab.btn-success, .btn.btn-raised.btn-success:hover, | ||
97 | +.input-group-btn .btn.btn-fab.btn-success:hover, | ||
98 | +.input-group-btn .btn.btn-raised.btn-success:hover { | ||
99 | + color: #FFFFFF; | ||
100 | + background-color: #474b4b !important; } | ||
101 | + | ||
102 | +/* PAGINATION BOTTOM */ | ||
103 | +.pagination > li > a, .pagination > li > span { | ||
104 | + color: #0e1111; } | ||
105 | + | ||
106 | +.pagination > li > a:hover, .pagination > li > span:hover { | ||
107 | + color: #474b4b; } | ||
108 | + | ||
109 | +/* language selector */ | ||
110 | +.language-selector .dropdown-menu > .active > a { | ||
111 | + background: #EEEEEE; | ||
112 | + color: #0e1111; } | ||
113 | + | ||
114 | +.language-selector .dropdown-menu > .active > a:hover { | ||
115 | + color: #0e1111; } | ||
116 | + | ||
117 | +/* Sidebar menu in every page */ | ||
118 | +#sidebar-menu .item { | ||
119 | + background-color: #0e1111; | ||
120 | + color: white; } | ||
121 | + | ||
122 | +#sidebar-menu .item a { | ||
123 | + color: white; } | ||
124 | + | ||
125 | +#sidebar-menu > .subjects_menu_active { | ||
126 | + background-color: #474b4b; } | ||
127 | + | ||
128 | +#sidebar-menu > .item:hover { | ||
129 | + background-color: #474b4b; } | ||
130 | + | ||
131 | +/* === SUBJECT APP === */ | ||
132 | +/* home */ | ||
133 | +.users-cloud .small a { | ||
134 | + color: #232b2b; } | ||
135 | + | ||
136 | +.users-cloud .big a { | ||
137 | + color: #0e1111; } | ||
138 | + | ||
139 | +.users-cloud .medium a { | ||
140 | + color: gray; } | ||
141 | + | ||
142 | +.users-cloud .tiny a { | ||
143 | + color: #5e6262; } | ||
144 | + | ||
145 | +.my-subjects-title { | ||
146 | + color: #3b444b; } | ||
147 | + | ||
148 | +.panel-invisible { | ||
149 | + background-color: #BDBDBD !important; | ||
150 | + color: #F5F5F5; } | ||
151 | + | ||
152 | +.category-panel > .panel-heading { | ||
153 | + background-color: #232b2b !important; } | ||
154 | + | ||
155 | +.category-panel .category-header .category-card-items i { | ||
156 | + color: #3b444b; } | ||
157 | + | ||
158 | +.category-panel .category-header .category-card-items i:hover { | ||
159 | + color: #FFFFFF; } | ||
160 | + | ||
161 | +.subject-panel > .panel-heading { | ||
162 | + background-color: #353839 !important; } | ||
163 | + | ||
164 | +.subject-panel .category-header .category-card-items i { | ||
165 | + color: #3b444b; } | ||
166 | + | ||
167 | +.subject-panel .category-header .category-card-items i:hover { | ||
168 | + color: #FFFFFF; } | ||
169 | + | ||
170 | +.resource-link { | ||
171 | + color: #000000 !important; } | ||
172 | + | ||
173 | +/* subscribe.html */ | ||
174 | +.modal-header { | ||
175 | + border-bottom: 1px solid #414a4c !important; } | ||
176 | + | ||
177 | +.modal-footer { | ||
178 | + border-top: 1px solid #414a4c !important; } | ||
179 | + | ||
180 | +/* subject_card.html */ | ||
181 | +.access-subject { | ||
182 | + background-color: #2eb82e !important; | ||
183 | + color: white; } | ||
184 | + | ||
185 | +/* Groups App */ | ||
186 | +.group-panel > .panel-heading { | ||
187 | + background-color: #FFFFFF !important; } | ||
188 | + | ||
189 | +.group-panel .panel-title, .group-panel .category-header i, .group-panel .category-course-link { | ||
190 | + color: #000000 !important; } | ||
191 | + | ||
192 | +.group-panel-body { | ||
193 | + background: #FFFFFF !important; | ||
194 | + border-top: 1px solid #CCCCCC; } | ||
195 | + | ||
196 | +/* === Resources Common (ex: PDF, WebPage) App === */ | ||
197 | +.topic-panel > .panel-heading { | ||
198 | + background-color: #5e6262 !important; } | ||
199 | + | ||
200 | +.topic-panel .category-header .category-card-items i, .topic-panel-invisible .category-header .category-card-items i { | ||
201 | + color: #3b444b; } | ||
202 | + | ||
203 | +.topic-panel .category-header .category-card-items i:hover, .topic-panel-invisible .category-header .category-card-items i:hover { | ||
204 | + color: #FFFFFF; } | ||
205 | + | ||
206 | +.topic-panel > .category-panel-content, .topic-panel-invisible > .category-panel-content { | ||
207 | + background: #FFFFFF; } | ||
208 | + | ||
209 | +.topic-panel-invisible > .panel-heading { | ||
210 | + background-color: #BDBDBD !important; | ||
211 | + color: #F5F5F5; } | ||
212 | + | ||
213 | +.pendencies-content { | ||
214 | + background: #FFFFFF; } | ||
215 | + | ||
216 | +.pendencies-content .core-subjects-options li { | ||
217 | + background: #F5F5F5; } | ||
218 | + | ||
219 | +.category-header i { | ||
220 | + color: white; } | ||
221 | + | ||
222 | +.category-header i:hover { | ||
223 | + color: #90CAF9; } | ||
224 | + | ||
225 | +.category-header .dropdown-menu i { | ||
226 | + color: inherit !important; } | ||
227 | + | ||
228 | +#create-category { | ||
229 | + background-color: #0e1111; | ||
230 | + color: #FFFFFF; } | ||
231 | + | ||
232 | +.category-panel-content { | ||
233 | + background: #F5F5F5; } | ||
234 | + | ||
235 | +.core-subjects-options li { | ||
236 | + background-color: #FFFFFF; | ||
237 | + border-bottom-color: #414a4c; | ||
238 | + color: #414a4c; } | ||
239 | + | ||
240 | +.core-subjects-options li.active { | ||
241 | + color: inherit; | ||
242 | + border-bottom-color: #0e1111; } | ||
243 | + | ||
244 | +.create-subject-btn { | ||
245 | + background-color: #3b444b; | ||
246 | + color: white; } | ||
247 | + | ||
248 | +#coordinators_accordion .panel-heading, #professors_accordion .panel-heading { | ||
249 | + background: #FFFFFF; } | ||
250 | + | ||
251 | +/* === Amadeus APP === */ | ||
252 | +.navbar-brand:hover { | ||
253 | + background: #232b2b !important; } | ||
254 | + | ||
255 | +.navbar .project_name { | ||
256 | + color: white; } | ||
257 | + | ||
258 | +.navbar-nav li.open { | ||
259 | + background: #474b4b; } | ||
260 | + | ||
261 | +.navbar-nav li > a:hover { | ||
262 | + background: #474b4b !important; } | ||
263 | + | ||
264 | +.navbar-nav li.settings_menu_active { | ||
265 | + background: #474b4b; } | ||
266 | + | ||
267 | +.top-search { | ||
268 | + color: #F5F5F5; } | ||
269 | + | ||
270 | +.dropdown-menu { | ||
271 | + background: #F5F5F5; } | ||
272 | + | ||
273 | +.dropdown-menu li > a { | ||
274 | + background: #F5F5F5; | ||
275 | + color: #333333; } | ||
276 | + | ||
277 | +.dropdown-menu li > a:hover { | ||
278 | + background: #0e1111 !important; | ||
279 | + color: #FFFFFF !important; } | ||
280 | + | ||
281 | +.navbar .dropdown-menu .active > a, .navbar.navbar-default .dropdown-menu .active > a { | ||
282 | + background-color: #0e1111 !important; } | ||
283 | + | ||
284 | +.navbar .dropdown-menu .active > a:hover, .navbar.navbar-default .dropdown-menu .active > a:hover { | ||
285 | + background-color: #474b4b; } | ||
286 | + | ||
287 | +#system_accordion > .panel > .panel-heading { | ||
288 | + background: #F5F5F5; } | ||
289 | + | ||
290 | +#system_accordion > .panel > .panel-heading:hover { | ||
291 | + background: #EEEEEE; } | ||
292 | + | ||
293 | +#system_accordion > .panel > .panel-heading > a > .panel-title { | ||
294 | + color: #333333; } | ||
295 | + | ||
296 | +#system_accordion > .panel > .panel-heading > a > .panel-title:hover { | ||
297 | + color: #0e1111; } | ||
298 | + | ||
299 | +#system_accordion > .panel > .panel-heading > a:hover { | ||
300 | + color: #0e1111; } | ||
301 | + | ||
302 | +#system_menu { | ||
303 | + background: #F5F5F5; } | ||
304 | + | ||
305 | +#horizontal-line { | ||
306 | + background-color: black; } | ||
307 | + | ||
308 | +.breadcrumb > li > span.divider { | ||
309 | + color: #3b444b; } | ||
310 | + | ||
311 | +.breadcrumb > li > a { | ||
312 | + color: #3b444b; } | ||
313 | + | ||
314 | +.breadcrumb > li { | ||
315 | + color: #BDBDBD; } | ||
316 | + | ||
317 | +/*Because we use an outer a tag */ | ||
318 | +.panel-title { | ||
319 | + color: rgba(255, 255, 255, 0.84); } | ||
320 | + | ||
321 | +.category-header > h4.panel-title span { | ||
322 | + color: #FFFFFF; } | ||
323 | + | ||
324 | +.accordion { | ||
325 | + background: white; } | ||
326 | + | ||
327 | +.accordion_list { | ||
328 | + background: #F5F5F5; } | ||
329 | + | ||
330 | +.outside-title { | ||
331 | + color: #0e1111; } | ||
332 | + | ||
333 | +.titleTopic a h4, .titleTopic h4 { | ||
334 | + color: white; } | ||
335 | + | ||
336 | +.Topic-detail a h4 { | ||
337 | + color: black; } | ||
338 | + | ||
339 | +.cards-detail .panel .panel-heading h4 { | ||
340 | + color: black; } | ||
341 | + | ||
342 | +.data_register_course p { | ||
343 | + color: grey; } | ||
344 | + | ||
345 | +.category-course-link { | ||
346 | + color: #FFFFFF !important; } | ||
347 | + | ||
348 | +.profile_function { | ||
349 | + border-bottom: 1px solid #D2D2D2; } | ||
350 | + | ||
351 | +.mobile-menu .item { | ||
352 | + color: #FFFFFF; | ||
353 | + background: #0e1111; } | ||
354 | + | ||
355 | +.mobile-menu .item a { | ||
356 | + color: white; } | ||
357 | + | ||
358 | +.mobile-menu > .subjects_menu_active { | ||
359 | + background-color: #0e1111; } | ||
360 | + | ||
361 | +.mobile-menu > .item:hover { | ||
362 | + background-color: #474b4b; } | ||
363 | + | ||
364 | +.page_selector h4 { | ||
365 | + border-bottom: 1px solid #e5e5e5; } | ||
366 | + | ||
367 | +.subscribe-subject { | ||
368 | + background-color: #33cc33 !important; | ||
369 | + color: white; } | ||
370 | + | ||
371 | +.filedrag { | ||
372 | + color: #555; | ||
373 | + border: 2px dashed #555; } | ||
374 | + | ||
375 | +.footer { | ||
376 | + color: #FFFFFF; | ||
377 | + background: #3b444b; } | ||
378 | + | ||
379 | +.no-subjects { | ||
380 | + color: #999999; } | ||
381 | + | ||
382 | +.holder a.jp-disabled, a.jp-disabled:hover { | ||
383 | + background: none !important; | ||
384 | + color: #bbb !important; } | ||
385 | + | ||
386 | +.holder a.jp-current, a.jp-current:hover { | ||
387 | + background: none; } | ||
388 | + | ||
389 | +.holder a, .holder span { | ||
390 | + border: 1px solid #ddd; | ||
391 | + color: #337ab7; } | ||
392 | + | ||
393 | +.holder a:hover { | ||
394 | + color: #23527c; | ||
395 | + background-color: #eee; | ||
396 | + border-color: #ddd; } | ||
397 | + | ||
398 | +.holder a.jp-current, a.jp-current:hover { | ||
399 | + background: #039BE5; | ||
400 | + color: #FFFFFF; | ||
401 | + border-color: #039BE5; } | ||
402 | + | ||
403 | +/* Pendencies Form */ | ||
404 | +.notifies { | ||
405 | + border: 1px solid #EEEEEE; } | ||
406 | + | ||
407 | +.bootstrap-datetimepicker-widget { | ||
408 | + background-color: #fff; } | ||
409 | + | ||
410 | +.notifies a.delete-row { | ||
411 | + -webkit-box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12); | ||
412 | + box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12); | ||
413 | + background-color: #EEE; | ||
414 | + color: rgba(0, 0, 0, 0.87); } | ||
415 | + | ||
416 | +a.add-row { | ||
417 | + -webkit-box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12); | ||
418 | + box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12); | ||
419 | + background-color: #59b75c; | ||
420 | + color: rgba(255, 255, 255, 0.84); } | ||
421 | + | ||
422 | +/* Resource list on topic templates */ | ||
423 | +.resource_list > .list-group-item { | ||
424 | + background-color: #fff; | ||
425 | + border: 1px solid #ddd; } | ||
426 | + | ||
427 | +.resource_list > .disabled { | ||
428 | + background-color: #eee; } | ||
429 | + | ||
430 | +.resource_list > .disabled:hover { | ||
431 | + background-color: #eee !important; } | ||
432 | + | ||
433 | +.resource_list > .disabled a.resource_link { | ||
434 | + color: #BDBDBD; } | ||
435 | + | ||
436 | +.resource_list > .list-group-item:hover { | ||
437 | + background: #F5F5F5; } | ||
438 | + | ||
439 | +.resource_list > .list-group-item:last-child { | ||
440 | + border-bottom: 1px solid #ddd !important; } | ||
441 | + | ||
442 | +.resource_list .category-card-items i { | ||
443 | + color: #e5e5e5; } | ||
444 | + | ||
445 | +.resource_list .category-card-items i:hover { | ||
446 | + color: #7f7f7f; } | ||
447 | + | ||
448 | +.resource_list .category-card-items .dropdown-menu i { | ||
449 | + color: #333; } | ||
450 | + | ||
451 | +.resource_list a { | ||
452 | + color: inherit; } | ||
453 | + | ||
454 | +.resource_list .btn-group button:active, .resource_list .btn-group button:focus, .resource_list .btn-group button:hover { | ||
455 | + background-color: initial !important; } | ||
456 | + | ||
457 | +#search-results-title { | ||
458 | + color: #BDBDBD; } | ||
459 | + | ||
460 | +.no-subscribe-btn { | ||
461 | + background-color: #BDBDBD !important; | ||
462 | + color: #F5F5F5 !important; } | ||
463 | + | ||
464 | +.pendency { | ||
465 | + border-color: #CCCCCC; } | ||
466 | + | ||
467 | +.pendency .breadcrumb { | ||
468 | + background-color: #FFFFFF; } | ||
469 | + | ||
470 | +.pendency .meta { | ||
471 | + color: #FF0000; } | ||
472 | + | ||
473 | +.alert-low, .alert-medium { | ||
474 | + background-color: #FFA500; | ||
475 | + color: #FFFFFF; } | ||
476 | + | ||
477 | +.no_button:hover, .no_button:focus, .no_button:active { | ||
478 | + background-color: initial !important; } | ||
479 | + | ||
480 | +.popover { | ||
481 | + background: #FFF; | ||
482 | + color: #333; } | ||
483 | + | ||
484 | +.mural .post_make { | ||
485 | + background: #FFFFFF; } | ||
486 | + | ||
487 | +.mural .post_make .user-img, .post .post-img, .post .post-comment .user-img div, .comment .comment-img div { | ||
488 | + background: #CCCCCC; } | ||
489 | + | ||
490 | +.mural .post_make .post-field div { | ||
491 | + border-color: #CCCCCC; } | ||
492 | + | ||
493 | +.mural .post_make .post-field h4 { | ||
494 | + color: #CCCCCC; } | ||
495 | + | ||
496 | +.post_action i, .post .post-user .user-action i, .comment .comment-user .user-action i { | ||
497 | + color: #232b2b; } | ||
498 | + | ||
499 | +.post .post-user, .comment .comment-user, .marked_user { | ||
500 | + color: #3b444b; } | ||
501 | + | ||
502 | +.post .post-user .user-action { | ||
503 | + color: #BBBBBB; } | ||
504 | + | ||
505 | +.post .time { | ||
506 | + color: #ABABAB; } | ||
507 | + | ||
508 | +.post .post-comment { | ||
509 | + border-top-color: #888888; | ||
510 | + background: #e5e5e5; } | ||
511 | + | ||
512 | +.post .post-comment .comment-field div { | ||
513 | + border-color: #888888; | ||
514 | + background: #FFFFFF; } | ||
515 | + | ||
516 | +.comment-section { | ||
517 | + background: #F5F5F5; | ||
518 | + border-top-color: #AAAAAA; } | ||
519 | + | ||
520 | +.comment .comment-user .user-action { | ||
521 | + color: #999999; } | ||
522 | + | ||
523 | +.comment-time { | ||
524 | + color: #9A9A9A; } | ||
525 | + | ||
526 | +.btn_unfav { | ||
527 | + color: #FF0000 !important; } | ||
528 | + | ||
529 | +.btn_fav { | ||
530 | + color: #BBBBBB !important; } | ||
531 | + | ||
532 | +.post-filter { | ||
533 | + background: #F5F5F5; } | ||
534 | + | ||
535 | +.post-filter h4 { | ||
536 | + color: #3b444b; } | ||
537 | + | ||
538 | +.post-filter label { | ||
539 | + color: #333333; } | ||
540 | + | ||
541 | +.post-filter i { | ||
542 | + color: #FF0000; } | ||
543 | + | ||
544 | +.suggestions { | ||
545 | + background: #FFFFFF; } | ||
546 | + | ||
547 | +.mural-category { | ||
548 | + background: #EEE; } | ||
549 | + | ||
550 | +.btn:not(.btn-raised):not(.btn-link):focus, .btn:not(.btn-raised):not(.btn-link):hover, .input-group-btn .btn:not(.btn-raised):not(.btn-link):focus, .input-group-btn .btn:not(.btn-raised):not(.btn-link):hover { | ||
551 | + background-color: initial; } | ||
552 | + | ||
553 | +#participants, .participants-list { | ||
554 | + background-color: #FFFFFF; } | ||
555 | + | ||
556 | +#participants { | ||
557 | + box-shadow: -1px 1px 8px #000000; } | ||
558 | + | ||
559 | +#participants i { | ||
560 | + color: #000000; } | ||
561 | + | ||
562 | +.participants-list { | ||
563 | + box-shadow: -1px 2px 1px #000000; } | ||
564 | + | ||
565 | +@media(max-width: 768px) { | ||
566 | + .navbar .navbar-nav .dropdown .dropdown-menu li > a { | ||
567 | + color: #FFFFFF !important; | ||
568 | + background-color: #0e1111; } | ||
569 | + | ||
570 | + .navbar .navbar-nav .dropdown .dropdown-menu li > a:hover { | ||
571 | + backgroun-color: #474b4b !important; } } | ||
572 | + | ||
573 | +/*# sourceMappingURL=black.css.map */ |
amadeus/static/css/themes/green.css
@@ -535,6 +535,16 @@ a.add-row { | @@ -535,6 +535,16 @@ a.add-row { | ||
535 | #analytics-panel { | 535 | #analytics-panel { |
536 | background-color: #0277BD !important; } | 536 | background-color: #0277BD !important; } |
537 | 537 | ||
538 | +.backup_container .more_items { | ||
539 | + background: #009688; | ||
540 | + color: #FFFFFF; } | ||
541 | + | ||
542 | +.backup_container .backup_item label, .backup_container .resources_list label { | ||
543 | + color: #333333; } | ||
544 | + | ||
545 | +.semi-check { | ||
546 | + border-color: #009688 !important; } | ||
547 | + | ||
538 | @media(max-width: 768px) { | 548 | @media(max-width: 768px) { |
539 | .navbar .navbar-nav .dropdown .dropdown-menu li > a { | 549 | .navbar .navbar-nav .dropdown .dropdown-menu li > a { |
540 | color: #333333 !important; } | 550 | color: #333333 !important; } |
amadeus/static/css/themes/green.css.map
1 | { | 1 | { |
2 | "version": 3, | 2 | "version": 3, |
3 | -"mappings": "AAOA,gJAAgJ;EAC5I,gBAAgB,EAAE,KAAK;;AAG3B,mBAAmB;EACf,KAAK,EAXO,OAAO;;AAcvB,gGAA4F;EACxF,gBAAgB,EAfJ,OAAO;;AAkBvB,kGAA8F;EAC1F,YAAY,EAnBA,OAAO;;AAsBvB,iMAAiM;EAC7L,KAAK,EAAE,IAAI;E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ClB,gBAAgB,EAvoBJ,OAAO;;AA0oBvB,mHAAmH;EAC/G,gBAAgB,EAAE,OAAO;;AAE7B,6GAA6G;EACzG,gBAAgB,EAAE,OAAO;;AAE7B,mBAAmB;EACf,gBAAgB,EAAE,OAAO;EACzB,gBAAgB,EAAE,OAAO;;AAE7B,eAAe;EACX,gBAAgB,EAAE,kBAAkB;;AAExC,yBAAyB;EACrB,gBAAgB,EAAE,OAAO;;AAE7B,4CAA4C;EACxC,gBAAgB,EA1pBZ,OAAO;EA2pBX,YAAY,EAAE,OAAO;;AAEzB,cAAc;EACV,KAAK,EAAE,IAAI;;AAEf,aAAa;EACT,gBAAgB,EAAE,OAAO;;AAE7B,yCAAyC;EACrC,KAAK,EAAE,IAAI;;AAEf,aAAa;EACT,KAAK,EAvqBD,OAAO;EAwqBX,gBAAgB,EAAE,OAAO;;AAE7B,0BAA0B;EACtB,UAAU,EAAE,IAAI;;AAEpB,iCAAiC;EAC7B,gBAAgB,EA9qBZ,OAAO;;AAgrBf,aAAa;EACT,UAAU,EAAE,oBAAoB;;AAEpC,eAAe;EACX,KAAK,EAAE,OAAO;;AAElB,kBAAkB;EACd,UAAU,EAAE,oBAAoB;;AAEpC,qCAAqC;EACjC,gBAAgB,EAAE,OAAO;;AAE7B,gBAAgB;EACZ,gBAAgB,EAAE,kBAAkB;;AAExC,6BAA6B;EACzB,UAAU,EAnsBE,OAAO;EAosBnB,KAAK,EAjsBD,OAAO;;AAmsBf,6EAA6E;EACzE,KAAK,EAAE,OAAO;;AAElB,WAAW;EACP,YAAY,EAAE,kBAAyB;;;EAGvC,mDAAmD;IAC/C,KAAK,EAAE,kBAAkB;;EAE7B,yDAAyD;IACrD,KAAK,EAAE,kBAAyB", |
4 | "sources": ["green.sass"], | 4 | "sources": ["green.sass"], |
5 | "names": [], | 5 | "names": [], |
6 | "file": "green.css" | 6 | "file": "green.css" |
amadeus/static/css/themes/green.sass
@@ -705,6 +705,16 @@ a.add-row | @@ -705,6 +705,16 @@ a.add-row | ||
705 | #analytics-panel | 705 | #analytics-panel |
706 | background-color: #0277BD !important | 706 | background-color: #0277BD !important |
707 | 707 | ||
708 | +.backup_container .more_items | ||
709 | + background: $primary-color | ||
710 | + color: $white | ||
711 | + | ||
712 | +.backup_container .backup_item label, .backup_container .resources_list label | ||
713 | + color: #333333 | ||
714 | + | ||
715 | +.semi-check | ||
716 | + border-color: $primary-color !important | ||
717 | + | ||
708 | @media(max-width: 768px) | 718 | @media(max-width: 768px) |
709 | .navbar .navbar-nav .dropdown .dropdown-menu li > a | 719 | .navbar .navbar-nav .dropdown .dropdown-menu li > a |
710 | color: #333333 !important | 720 | color: #333333 !important |
@@ -0,0 +1 @@ | @@ -0,0 +1 @@ | ||
1 | +[{"model": "topics.topic", "pk": 30, "fields": {"name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "subject": 459, "order": 1, "create_date": "2017-01-17T18:36:32.918Z", "last_update": "2017-01-17T21:48:07.630Z"}}, {"model": "topics.topic", "pk": 32, "fields": {"name": "Now Invisble", "slug": "now-invisble", "description": "<p>TIme to</p>", "repository": false, "visible": true, "subject": 459, "order": 2, "create_date": "2017-01-17T18:44:24.976Z", "last_update": "2017-03-08T01:28:52.845Z"}}][{"model": "topics.resource", "pk": 1, "fields": {"_my_subclass": "webpage", "name": "Revenge", "slug": "revenge", "brief_description": "<p>Here Comes</p>", "show_window": false, "all_students": false, "visible": true, "order": 1, "topic": 30, "create_date": "2017-01-20T22:42:16.126Z", "last_update": "2017-01-30T18:39:30.100Z", "students": [178, 181], "groups": [], "tags": [44, 45]}}, {"model": "topics.resource", "pk": 14, "fields": {"_my_subclass": "webpage", "name": "Care", "slug": "care", "brief_description": "<p>One last minute</p>", "show_window": true, "all_students": false, "visible": true, "order": 2, "topic": 30, "create_date": "2017-01-23T17:59:10.053Z", "last_update": "2017-01-24T21:53:17.119Z", "students": [], "groups": [], "tags": [58, 59]}}, {"model": "topics.resource", "pk": 41, "fields": {"_my_subclass": "filelink", "name": "Secret", "slug": "secret", "brief_description": "<p>Do we create a modern myth?</p>", "show_window": true, "all_students": true, "visible": false, "order": 3, "topic": 32, "create_date": "2017-01-24T21:55:44.193Z", "last_update": "2017-01-24T21:55:44.330Z", "students": [], "groups": [], "tags": [93, 94]}}, {"model": "topics.resource", "pk": 3, "fields": {"_my_subclass": "webpage", "name": "Teste 2", "slug": "teste-2", "brief_description": "<p>Here Comes</p>", "show_window": true, "all_students": false, "visible": true, "order": 3, "topic": 30, "create_date": "2017-01-23T17:17:28.416Z", "last_update": "2017-01-24T21:53:17.131Z", "students": [178, 181], "groups": [], "tags": [44, 45]}}, {"model": "topics.resource", "pk": 40, "fields": {"_my_subclass": "filelink", "name": "Alive", "slug": "alive", "brief_description": "<p>Nothern lights</p><p>I'm still</p>", "show_window": true, "all_students": true, "visible": true, "order": 4, "topic": 30, "create_date": "2017-01-24T21:52:58.028Z", "last_update": "2017-01-30T18:33:25.804Z", "students": [], "groups": [], "tags": [91, 92]}}, {"model": "topics.resource", "pk": 42, "fields": {"_my_subclass": "webpage", "name": "History goes", "slug": "history-goes", "brief_description": "<p>How</p>", "show_window": false, "all_students": false, "visible": false, "order": 4, "topic": 32, "create_date": "2017-01-24T21:57:13.600Z", "last_update": "2017-01-24T21:57:13.812Z", "students": [178], "groups": [], "tags": [95]}}, {"model": "topics.resource", "pk": 4, "fields": {"_my_subclass": "webpage", "name": "Have", "slug": "have", "brief_description": "<p>Save me</p>", "show_window": true, "all_students": false, "visible": true, "order": 5, "topic": 30, "create_date": "2017-01-23T17:31:58.957Z", "last_update": "2017-01-24T21:53:17.155Z", "students": [179, 178], "groups": [], "tags": [46, 47]}}, {"model": "topics.resource", "pk": 21, "fields": {"_my_subclass": "webpage", "name": "Each small candle", "slug": "each-small-candle", "brief_description": "<p>Uhuh</p>", "show_window": false, "all_students": false, "visible": true, "order": 6, "topic": 30, "create_date": "2017-01-24T03:16:17.180Z", "last_update": "2017-01-24T21:53:17.164Z", "students": [177, 179], "groups": [], "tags": [71, 72]}}, {"model": "topics.resource", "pk": 5, "fields": {"_my_subclass": "webpage", "name": "Lose you", "slug": "lose-you", "brief_description": "<p>Save me</p>", "show_window": true, "all_students": false, "visible": true, "order": 7, "topic": 30, "create_date": "2017-01-23T17:34:29.313Z", "last_update": "2017-01-24T21:53:17.175Z", "students": [179, 178], "groups": [], "tags": [46, 47]}}, {"model": "topics.resource", "pk": 16, "fields": {"_my_subclass": "webpage", "name": "Sing", "slug": "sing", "brief_description": "<p>Talking about</p>", "show_window": false, "all_students": false, "visible": false, "order": 8, "topic": 30, "create_date": "2017-01-23T22:10:39.437Z", "last_update": "2017-01-24T21:53:17.197Z", "students": [177, 178], "groups": [], "tags": [62, 63]}}, {"model": "topics.resource", "pk": 49, "fields": {"_my_subclass": "webpage", "name": "Testes", "slug": "testes", "brief_description": "<p>asd</p>", "show_window": false, "all_students": false, "visible": true, "order": 9, "topic": 30, "create_date": "2017-01-30T18:38:25.741Z", "last_update": "2017-01-30T18:38:25.878Z", "students": [179], "groups": [], "tags": [99]}}, {"model": "topics.resource", "pk": 50, "fields": {"_my_subclass": "webpage", "name": "Yellow", "slug": "yellow", "brief_description": "<p>Vber</p>", "show_window": false, "all_students": false, "visible": true, "order": 10, "topic": 30, "create_date": "2017-01-30T18:39:04.914Z", "last_update": "2017-01-30T18:39:05.212Z", "students": [180], "groups": [], "tags": [99]}}, {"model": "topics.resource", "pk": 51, "fields": {"_my_subclass": "ytvideo", "name": "System", "slug": "system", "brief_description": "<p>Gotta</p>", "show_window": true, "all_students": true, "visible": true, "order": 11, "topic": 30, "create_date": "2017-02-01T21:03:21.123Z", "last_update": "2017-02-02T23:08:32.570Z", "students": [], "groups": [], "tags": [103, 104]}}, {"model": "topics.resource", "pk": 53, "fields": {"_my_subclass": "link", "name": "Sorry", "slug": "sorry", "brief_description": "<p>Hellor</p>", "show_window": false, "all_students": true, "visible": true, "order": 12, "topic": 30, "create_date": "2017-02-02T18:59:06.159Z", "last_update": "2017-02-02T18:59:06.270Z", "students": [], "groups": [], "tags": [106]}}, {"model": "topics.resource", "pk": 56, "fields": {"_my_subclass": "pdffile", "name": "Legend", "slug": "legend", "brief_description": "", "show_window": false, "all_students": true, "visible": true, "order": 13, "topic": 30, "create_date": "2017-02-09T18:29:12.935Z", "last_update": "2017-02-09T18:29:13.410Z", "students": [], "groups": [], "tags": [99]}}, {"model": "topics.resource", "pk": 57, "fields": {"_my_subclass": "link", "name": "Unravel", "slug": "unravel", "brief_description": "<p>Co asseru</p>", "show_window": true, "all_students": true, "visible": true, "order": 14, "topic": 30, "create_date": "2017-02-12T04:18:39.836Z", "last_update": "2017-02-12T04:18:40.083Z", "students": [], "groups": [], "tags": [109]}}, {"model": "topics.resource", "pk": 58, "fields": {"_my_subclass": "webpage", "name": "Berry the castle", "slug": "berry-the-castle", "brief_description": "", "show_window": false, "all_students": true, "visible": true, "order": 15, "topic": 30, "create_date": "2017-02-23T15:22:21.044Z", "last_update": "2017-02-23T15:22:21.371Z", "students": [], "groups": [], "tags": [112]}}, {"model": "topics.resource", "pk": 59, "fields": {"_my_subclass": "webpage", "name": "What you get", "slug": "what-you-get", "brief_description": "<p>To me</p>", "show_window": false, "all_students": true, "visible": true, "order": 16, "topic": 30, "create_date": "2017-02-23T15:23:56.414Z", "last_update": "2017-02-23T15:23:56.482Z", "students": [], "groups": [], "tags": [109]}}, {"model": "topics.resource", "pk": 66, "fields": {"_my_subclass": "webpage", "name": "Last Stand", "slug": "last-stand", "brief_description": "<p>For the grace of the might of the Lord </p>", "show_window": false, "all_students": true, "visible": true, "order": 17, "topic": 30, "create_date": "2017-02-24T20:31:26.650Z", "last_update": "2017-02-24T20:31:26.778Z", "students": [], "groups": [], "tags": [116]}}, {"model": "topics.resource", "pk": 68, "fields": {"_my_subclass": "webpage", "name": "Angels calling", "slug": "angels-calling", "brief_description": "<p>Falling</p>", "show_window": false, "all_students": true, "visible": true, "order": 18, "topic": 30, "create_date": "2017-02-24T20:47:51.687Z", "last_update": "2017-02-25T01:35:19.427Z", "students": [], "groups": [], "tags": [118]}}, {"model": "topics.resource", "pk": 70, "fields": {"_my_subclass": "goals", "name": "Snuff", "slug": "snuff", "brief_description": "<p>Deserve to have you</p>", "show_window": false, "all_students": true, "visible": true, "order": 19, "topic": 30, "create_date": "2017-03-01T19:07:07.980Z", "last_update": "2017-03-03T01:16:22.746Z", "students": [], "groups": [], "tags": [121, 122]}}, {"model": "topics.resource", "pk": 73, "fields": {"_my_subclass": "filelink", "name": "Lies", "slug": "lies", "brief_description": "", "show_window": false, "all_students": false, "visible": true, "order": 20, "topic": 30, "create_date": "2017-04-26T03:03:38.089Z", "last_update": "2017-04-26T03:03:38.531Z", "students": [], "groups": [], "tags": [125]}}] | ||
0 | \ No newline at end of file | 2 | \ No newline at end of file |
chat/templates/chat/subject_view.html
@@ -38,6 +38,7 @@ | @@ -38,6 +38,7 @@ | ||
38 | {% endif %} | 38 | {% endif %} |
39 | <li><a href="{% url 'subjects:update' subject.slug %}"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i>{% trans 'Edit' %}</a></li> | 39 | <li><a href="{% url 'subjects:update' subject.slug %}"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i>{% trans 'Edit' %}</a></li> |
40 | <li><a href="{% url 'groups:index' subject.slug %}"><i class="fa fa-group fa-fw" aria-hidden="true"></i>{% trans 'Groups' %}</a></li> | 40 | <li><a href="{% url 'groups:index' subject.slug %}"><i class="fa fa-group fa-fw" aria-hidden="true"></i>{% trans 'Groups' %}</a></li> |
41 | + <li><a href="{% url 'subjects:backup' subject.slug %}"><i class="fa fa-database fa-fw" aria-hidden="true"></i>{% trans 'Backup' %}</a></li> | ||
41 | <li><a href="javascript:delete_subject.get('{% url 'subjects:delete' subject.slug %}?view=index','#subject','#modal_subject')"><i class="fa fa-trash fa-fw" aria-hidden="true"></i> {% trans 'Remove' %}</a></li> | 42 | <li><a href="javascript:delete_subject.get('{% url 'subjects:delete' subject.slug %}?view=index','#subject','#modal_subject')"><i class="fa fa-trash fa-fw" aria-hidden="true"></i> {% trans 'Remove' %}</a></li> |
42 | </ul> | 43 | </ul> |
43 | {% endif %} | 44 | {% endif %} |
chat/templates/chat/subject_view_participants.html
@@ -42,6 +42,7 @@ | @@ -42,6 +42,7 @@ | ||
42 | {% endif %} | 42 | {% endif %} |
43 | <li><a href="{% url 'subjects:update' subject.slug %}"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i>{% trans 'Edit' %}</a></li> | 43 | <li><a href="{% url 'subjects:update' subject.slug %}"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i>{% trans 'Edit' %}</a></li> |
44 | <li><a href="{% url 'groups:index' subject.slug %}"><i class="fa fa-group fa-fw" aria-hidden="true"></i>{% trans 'Groups' %}</a></li> | 44 | <li><a href="{% url 'groups:index' subject.slug %}"><i class="fa fa-group fa-fw" aria-hidden="true"></i>{% trans 'Groups' %}</a></li> |
45 | + <li><a href="{% url 'subjects:backup' subject.slug %}"><i class="fa fa-database fa-fw" aria-hidden="true"></i>{% trans 'Backup' %}</a></li> | ||
45 | <li><a href="javascript:delete_subject.get('{% url 'subjects:delete' subject.slug %}?view=index','#subject','#modal_subject')"><i class="fa fa-trash fa-fw" aria-hidden="true"></i> {% trans 'Remove' %}</a></li> | 46 | <li><a href="javascript:delete_subject.get('{% url 'subjects:delete' subject.slug %}?view=index','#subject','#modal_subject')"><i class="fa fa-trash fa-fw" aria-hidden="true"></i> {% trans 'Remove' %}</a></li> |
46 | </ul> | 47 | </ul> |
47 | {% endif %} | 48 | {% endif %} |
mural/templates/mural/subject_view.html
@@ -38,6 +38,7 @@ | @@ -38,6 +38,7 @@ | ||
38 | {% endif %} | 38 | {% endif %} |
39 | <li><a href="{% url 'subjects:update' subject.slug %}"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i>{% trans 'Edit' %}</a></li> | 39 | <li><a href="{% url 'subjects:update' subject.slug %}"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i>{% trans 'Edit' %}</a></li> |
40 | <li><a href="{% url 'groups:index' subject.slug %}"><i class="fa fa-group fa-fw" aria-hidden="true"></i>{% trans 'Groups' %}</a></li> | 40 | <li><a href="{% url 'groups:index' subject.slug %}"><i class="fa fa-group fa-fw" aria-hidden="true"></i>{% trans 'Groups' %}</a></li> |
41 | + <li><a href="{% url 'subjects:backup' subject.slug %}"><i class="fa fa-database fa-fw" aria-hidden="true"></i>{% trans 'Backup' %}</a></li> | ||
41 | <li><a href="javascript:delete_subject.get('{% url 'subjects:delete' subject.slug %}?view=index','#subject','#modal_subject')"><i class="fa fa-trash fa-fw" aria-hidden="true"></i> {% trans 'Remove' %}</a></li> | 42 | <li><a href="javascript:delete_subject.get('{% url 'subjects:delete' subject.slug %}?view=index','#subject','#modal_subject')"><i class="fa fa-trash fa-fw" aria-hidden="true"></i> {% trans 'Remove' %}</a></li> |
42 | </ul> | 43 | </ul> |
43 | {% endif %} | 44 | {% endif %} |
@@ -0,0 +1,45 @@ | @@ -0,0 +1,45 @@ | ||
1 | +from django.test import TestCase, Client, override_settings | ||
2 | +from django.core.urlresolvers import resolve | ||
3 | +from reports.views import ReportView | ||
4 | +from subjects.models import Subject | ||
5 | +from users.models import User | ||
6 | + | ||
7 | +from datetime import datetime | ||
8 | + | ||
9 | +class ReportTest(TestCase): | ||
10 | + | ||
11 | + def setUp(self): | ||
12 | + self.c = Client() | ||
13 | + self.student = User.objects.create(username = "student01", email= "student01@amadeus.br", password="amadeus") | ||
14 | + if self.c.login(email="student01@amadeus.br", password="amadeus"): | ||
15 | + print("student01 logged in") | ||
16 | + | ||
17 | + self.subject = Subject.objects.create(name="subject", visible= True, init_date= datetime.now(), end_date= datetime.now(), | ||
18 | + subscribe_begin = datetime.now(), subscribe_end= datetime.now() ) | ||
19 | + | ||
20 | + self.invisible_subject = Subject.objects.create(name="subject invisible", visible= False, init_date= datetime.now(), end_date= datetime.now(), | ||
21 | + subscribe_begin = datetime.now(), subscribe_end= datetime.now() ) | ||
22 | + self.subject.students.add(self.student) | ||
23 | + self.professor = User.objects.create(username= "professor01", email= "professor01@amadeus.br", password="amadeus") | ||
24 | + self.subject.professor.add(self.professor) | ||
25 | + | ||
26 | + | ||
27 | + """ | ||
28 | + check if it's still possible to create a report | ||
29 | + """ | ||
30 | + @override_settings(STATICFILES_STORAGE = None) # added decorator because of Whitenoise error | ||
31 | + def test_access_report_create_view(self): | ||
32 | + self.c.logout() #to logout student of setup | ||
33 | + self.c.login(email="professor01@amadeus.br", password="amadeus") #use professor of subject as logged in | ||
34 | + response = self.c.get('/subjects/report/create/interactions/?subject_id='+ str(self.subject.id), follow = True) | ||
35 | + self.assertEqual(response.status_code, 200) | ||
36 | + | ||
37 | + @override_settings(STATICFILES_STORAGE = None) # added decorator | ||
38 | + def test_restrict_acess_to_student_report_view(self): | ||
39 | + """ | ||
40 | + test when an student from the subject tries to access the subject analytics report builder, it will redirect | ||
41 | + """ | ||
42 | + report_view = self.c.get('/subjects/report/create/interactions/?subject_id='+ str(self.subject.id)) | ||
43 | + | ||
44 | + self.assertEqual(report_view.url, "/subjects/home/") | ||
45 | + | ||
0 | \ No newline at end of file | 46 | \ No newline at end of file |
reports/views.py
@@ -24,11 +24,26 @@ import math | @@ -24,11 +24,26 @@ import math | ||
24 | from io import BytesIO | 24 | from io import BytesIO |
25 | import os | 25 | import os |
26 | import copy | 26 | import copy |
27 | +from django.shortcuts import render, get_object_or_404, redirect | ||
28 | + | ||
29 | +from amadeus.permissions import has_category_permissions, has_subject_permissions | ||
27 | 30 | ||
28 | class ReportView(LoginRequiredMixin, generic.FormView): | 31 | class ReportView(LoginRequiredMixin, generic.FormView): |
29 | template_name = "reports/create.html" | 32 | template_name = "reports/create.html" |
30 | form_class = CreateInteractionReportForm | 33 | form_class = CreateInteractionReportForm |
31 | 34 | ||
35 | + | ||
36 | + def dispatch(self, request, *args, **kwargs): | ||
37 | + params = self.request.GET | ||
38 | + subject = Subject.objects.get(id=params['subject_id']) | ||
39 | + | ||
40 | + if not has_subject_permissions(request.user, subject): | ||
41 | + return redirect(reverse_lazy('subjects:home')) | ||
42 | + | ||
43 | + | ||
44 | + | ||
45 | + return super(ReportView, self).dispatch(request, *args, **kwargs) | ||
46 | + | ||
32 | def get_initial(self): | 47 | def get_initial(self): |
33 | """ | 48 | """ |
34 | Returns the initial data to use for forms on this view. | 49 | Returns the initial data to use for forms on this view. |
@@ -0,0 +1,163 @@ | @@ -0,0 +1,163 @@ | ||
1 | +{% extends 'categories/home.html' %} | ||
2 | + | ||
3 | +{% load static i18n pagination permissions_tags subject_counter chat_tags %} | ||
4 | +{% load django_bootstrap_breadcrumbs %} | ||
5 | + | ||
6 | +{% block javascript%} | ||
7 | + {{ block.super }} | ||
8 | + <script type="text/javascript" src="{% static 'subjects/js/modal_subject.js' %}"></script> | ||
9 | +{% endblock%} | ||
10 | + | ||
11 | +{% block breadcrumbs %} | ||
12 | + {{ block.super }} | ||
13 | + {% breadcrumb subject.category 'subjects:cat_view' subject.category.slug %} | ||
14 | + {% breadcrumb subject 'subjects:view' subject.slug %} | ||
15 | + | ||
16 | + {% trans "Backup" as bread %} | ||
17 | + {% breadcrumb bread 'subjects:backup' subject.slug %} | ||
18 | +{% endblock %} | ||
19 | + | ||
20 | +{% block content %} | ||
21 | + {% if messages %} | ||
22 | + {% for message in messages %} | ||
23 | + <div class="alert alert-{{ message.tags }} alert-dismissible" role="alert"> | ||
24 | + <button type="button" class="close" data-dismiss="alert" aria-label="Close"> | ||
25 | + <span aria-hidden="true">×</span> | ||
26 | + </button> | ||
27 | + <p>{{ message }}</p> | ||
28 | + </div> | ||
29 | + {% endfor %} | ||
30 | + {% endif %} | ||
31 | + | ||
32 | + {% subject_permissions request.user subject as has_subject_permissions %} | ||
33 | + | ||
34 | + {% if subject.visible %} | ||
35 | + <div class="panel panel-info subject-panel" id="subject_{{subject.slug}}"> | ||
36 | + <div class="panel-heading"> | ||
37 | + {% elif has_subject_permissions %} | ||
38 | + <div class="panel panel-info subject-panel-invisible" id="subject_{{subject.slug}}"> | ||
39 | + <div class="panel-heading panel-invisible"> | ||
40 | + {% endif %} | ||
41 | + <div class="row"> | ||
42 | + <div class="col-md-12 category-header"> | ||
43 | + <h4 class="panel-title" style="margin-top: 10px; margin-bottom: 8px"> | ||
44 | + <span>{{ subject.name }} / {% trans "Backup" %}</span> | ||
45 | + </h4> | ||
46 | + | ||
47 | + <div class="col-md-5 pull-right category-card-items"> | ||
48 | + {% if request.user in subject.professor.all or request.user in subject.category.coordinators.all or request.user.is_staff %} | ||
49 | + <a href="" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | ||
50 | + <i class="fa fa-ellipsis-v" aria-hidden="true"></i> | ||
51 | + </a> | ||
52 | + <ul class="dropdown-menu pull-right" aria-labelledby="moreActions"> | ||
53 | + {% if request.user not in subject.professor.all %} | ||
54 | + <li><a href="{% url 'subjects:replicate' subject.slug %}"><i class="fa fa-files-o fa-fw" aria-hidden="true"></i>{% trans 'Replicate' %}</a></li> | ||
55 | + {% endif %} | ||
56 | + <li><a href="{% url 'subjects:update' subject.slug %}"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i>{% trans 'Edit' %}</a></li> | ||
57 | + <li><a href="{% url 'groups:index' subject.slug %}"><i class="fa fa-group fa-fw" aria-hidden="true"></i>{% trans 'Groups' %}</a></li> | ||
58 | + <li><a href="{% url 'subjects:backup' subject.slug %}"><i class="fa fa-database fa-fw" aria-hidden="true"></i>{% trans 'Backup' %}</a></li> | ||
59 | + <li><a href="javascript:delete_subject.get('{% url 'subjects:delete' subject.slug %}?view=index','#subject','#modal_subject')"><i class="fa fa-trash fa-fw" aria-hidden="true"></i> {% trans 'Remove' %}</a></li> | ||
60 | + </ul> | ||
61 | + {% endif %} | ||
62 | + </div> | ||
63 | + </div> | ||
64 | + </div> | ||
65 | + </div> | ||
66 | + <div id="{{subject.slug}}" class="panel-collapse in collapse category-panel-content" style="position: relative"> | ||
67 | + <h5>{% trans "Please select below the topics and resources which you want to backup:" %}</h5> | ||
68 | + | ||
69 | + <div class="backup_container"> | ||
70 | + <form id="bkp_form" method="post" action="{% url 'subjects:do_backup' %}" enctype="multipart/form-data"> | ||
71 | + {% csrf_token %} | ||
72 | + | ||
73 | + {% for topic in topics %} | ||
74 | + <div class="topic item"> | ||
75 | + <span class="more_items"><i class="fa fa-plus"></i></span> | ||
76 | + <div class="checkbox backup_item"> | ||
77 | + <label> | ||
78 | + <input type="checkbox" class="topics_check" /> {{ topic }} | ||
79 | + </label> | ||
80 | + </div> | ||
81 | + <div class="resources_list"> | ||
82 | + {% for resource in topic.resource_topic.all %} | ||
83 | + <div class="checkbox"> | ||
84 | + <label> | ||
85 | + <input type="checkbox" class="resources_check" name="resource[]" value="{{ resource.id }}" /> {{ resource }} | ||
86 | + </label> | ||
87 | + </div> | ||
88 | + {% endfor %} | ||
89 | + </div> | ||
90 | + </div> | ||
91 | + {% endfor %} | ||
92 | + | ||
93 | + <div class="row text-center"> | ||
94 | + <input type="submit" value="{% trans 'Backup' %}" class="btn btn-success btn-raised" /> | ||
95 | + </div> | ||
96 | + </form> | ||
97 | + </div> | ||
98 | + </div> | ||
99 | + </div> | ||
100 | + | ||
101 | + <script type="text/javascript"> | ||
102 | + $(document).ready(function () { | ||
103 | + $(".more_items").click(function () { | ||
104 | + var icon = $(this).find('i'), | ||
105 | + resources = $(this).parent().find(".resources_list"); | ||
106 | + | ||
107 | + if (icon.hasClass("fa-plus")) { | ||
108 | + icon.addClass("fa-minus"); | ||
109 | + icon.removeClass("fa-plus"); | ||
110 | + resources.show(); | ||
111 | + } else { | ||
112 | + icon.removeClass("fa-minus"); | ||
113 | + icon.addClass("fa-plus"); | ||
114 | + resources.hide(); | ||
115 | + } | ||
116 | + }); | ||
117 | + | ||
118 | + $(".resources_check").on('click', function () { | ||
119 | + var container = $(this).parent().parent().parent().parent(), | ||
120 | + resource_list = $(this).parent().parent().parent(), | ||
121 | + topic_check = container.find(".topics_check"), | ||
122 | + topic_checkbox = topic_check.parent().find(".check"); | ||
123 | + | ||
124 | + if ($(this).is(':checked')) { | ||
125 | + topic_checkbox.addClass("semi-check"); | ||
126 | + } else { | ||
127 | + var checked = resource_list.find(".resources_check:checked"); | ||
128 | + | ||
129 | + if (checked.length == 0) { | ||
130 | + topic_checkbox.removeClass("semi-check"); | ||
131 | + } | ||
132 | + } | ||
133 | + }); | ||
134 | + | ||
135 | + $(".topics_check").on('click', function () { | ||
136 | + var container = $(this).parent().parent().parent(), | ||
137 | + resource_list = container.find(".resources_list"), | ||
138 | + resources = resource_list.find(".resources_check"), | ||
139 | + topic_checkbox = $(this).parent().find(".check"), | ||
140 | + is_checked = $(this).is(':checked'); | ||
141 | + | ||
142 | + resources.each(function () { | ||
143 | + this.checked = is_checked; | ||
144 | + }); | ||
145 | + | ||
146 | + if (!is_checked) { | ||
147 | + var checked = resource_list.find(".resources_check:checked"); | ||
148 | + | ||
149 | + if (checked.length == 0) { | ||
150 | + topic_checkbox.removeClass("semi-check"); | ||
151 | + } | ||
152 | + } | ||
153 | + }); | ||
154 | + }); | ||
155 | + | ||
156 | + // $("#bkp_form").submit(function () { | ||
157 | + // setTimeout(function() { | ||
158 | + // // Should be triggered after download started | ||
159 | + // document.location.href="{% url 'subjects:view' subject.slug %}"; | ||
160 | + // }, 3000); | ||
161 | + // }); | ||
162 | + </script> | ||
163 | +{% endblock content %} |
subjects/templates/subjects/subject_card.html
@@ -30,6 +30,7 @@ | @@ -30,6 +30,7 @@ | ||
30 | {% endif %} | 30 | {% endif %} |
31 | <li><a href="{% url 'subjects:update' subject.slug %}"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i>{% trans 'Edit' %}</a></li> | 31 | <li><a href="{% url 'subjects:update' subject.slug %}"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i>{% trans 'Edit' %}</a></li> |
32 | <li><a href="{% url 'groups:index' subject.slug %}"><i class="fa fa-group fa-fw" aria-hidden="true"></i>{% trans 'Groups' %}</a></li> | 32 | <li><a href="{% url 'groups:index' subject.slug %}"><i class="fa fa-group fa-fw" aria-hidden="true"></i>{% trans 'Groups' %}</a></li> |
33 | + <li><a href="{% url 'subjects:backup' subject.slug %}"><i class="fa fa-database fa-fw" aria-hidden="true"></i>{% trans 'Backup' %}</a></li> | ||
33 | <li><a href="javascript:delete_subject.get('{% url 'subjects:delete' subject.slug %}?view=index','#subject','#modal_subject')"><i class="fa fa-trash fa-fw" aria-hidden="true"></i> {% trans 'Remove' %}</a></li> | 34 | <li><a href="javascript:delete_subject.get('{% url 'subjects:delete' subject.slug %}?view=index','#subject','#modal_subject')"><i class="fa fa-trash fa-fw" aria-hidden="true"></i> {% trans 'Remove' %}</a></li> |
34 | </ul> | 35 | </ul> |
35 | {% endif %} | 36 | {% endif %} |
subjects/templates/subjects/view.html
@@ -52,6 +52,7 @@ | @@ -52,6 +52,7 @@ | ||
52 | {% endif %} | 52 | {% endif %} |
53 | <li><a href="{% url 'subjects:update' subject.slug %}"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i>{% trans 'Edit' %}</a></li> | 53 | <li><a href="{% url 'subjects:update' subject.slug %}"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i>{% trans 'Edit' %}</a></li> |
54 | <li><a href="{% url 'groups:index' subject.slug %}"><i class="fa fa-group fa-fw" aria-hidden="true"></i>{% trans 'Groups' %}</a></li> | 54 | <li><a href="{% url 'groups:index' subject.slug %}"><i class="fa fa-group fa-fw" aria-hidden="true"></i>{% trans 'Groups' %}</a></li> |
55 | + <li><a href="{% url 'subjects:backup' subject.slug %}"><i class="fa fa-database fa-fw" aria-hidden="true"></i>{% trans 'Backup' %}</a></li> | ||
55 | <li><a href="javascript:delete_subject.get('{% url 'subjects:delete' subject.slug %}?view=index','#subject','#modal_subject')"><i class="fa fa-trash fa-fw" aria-hidden="true"></i> {% trans 'Remove' %}</a></li> | 56 | <li><a href="javascript:delete_subject.get('{% url 'subjects:delete' subject.slug %}?view=index','#subject','#modal_subject')"><i class="fa fa-trash fa-fw" aria-hidden="true"></i> {% trans 'Remove' %}</a></li> |
56 | </ul> | 57 | </ul> |
57 | {% endif %} | 58 | {% endif %} |
subjects/urls.py
@@ -9,6 +9,8 @@ urlpatterns = [ | @@ -9,6 +9,8 @@ urlpatterns = [ | ||
9 | url(r'^replicate/(?P<subject_slug>[\w_-]+)/$', views.SubjectCreateView.as_view(), name='replicate'), | 9 | url(r'^replicate/(?P<subject_slug>[\w_-]+)/$', views.SubjectCreateView.as_view(), name='replicate'), |
10 | url(r'^update/(?P<slug>[\w_-]+)/$', views.SubjectUpdateView.as_view(), name='update'), | 10 | url(r'^update/(?P<slug>[\w_-]+)/$', views.SubjectUpdateView.as_view(), name='update'), |
11 | url(r'^delete/(?P<slug>[\w_-]+)/$', views.SubjectDeleteView.as_view(), name='delete'), | 11 | url(r'^delete/(?P<slug>[\w_-]+)/$', views.SubjectDeleteView.as_view(), name='delete'), |
12 | + url(r'^backup/(?P<slug>[\w_-]+)/$', views.Backup.as_view(), name='backup'), | ||
13 | + url(r'^do_backup/$', views.realize_backup, name='do_backup'), | ||
12 | url(r'^view/(?P<slug>[\w_-]+)/$', views.SubjectDetailView.as_view(), name='view'), | 14 | url(r'^view/(?P<slug>[\w_-]+)/$', views.SubjectDetailView.as_view(), name='view'), |
13 | url(r'^view/(?P<slug>[\w_-]+)/(?P<topic_slug>[\w_-]+)/$', views.SubjectDetailView.as_view(), name='topic_view'), | 15 | url(r'^view/(?P<slug>[\w_-]+)/(?P<topic_slug>[\w_-]+)/$', views.SubjectDetailView.as_view(), name='topic_view'), |
14 | url(r'^subscribe/(?P<slug>[\w_-]+)/$', views.SubjectSubscribeView.as_view(), name='subscribe'), | 16 | url(r'^subscribe/(?P<slug>[\w_-]+)/$', views.SubjectSubscribeView.as_view(), name='subscribe'), |
subjects/views.py
1 | - | ||
2 | from django.shortcuts import render, get_object_or_404, redirect | 1 | from django.shortcuts import render, get_object_or_404, redirect |
3 | from django.views.generic import ListView, CreateView, DeleteView, UpdateView, TemplateView, DetailView | 2 | from django.views.generic import ListView, CreateView, DeleteView, UpdateView, TemplateView, DetailView |
4 | from categories.models import Category | 3 | from categories.models import Category |
@@ -34,6 +33,13 @@ from users.models import User | @@ -34,6 +33,13 @@ from users.models import User | ||
34 | from topics.models import Topic, Resource | 33 | from topics.models import Topic, Resource |
35 | from news.models import News | 34 | from news.models import News |
36 | 35 | ||
36 | +import os | ||
37 | +import zipfile | ||
38 | +from io import BytesIO | ||
39 | +from itertools import chain | ||
40 | +from django.core import serializers | ||
41 | +from django.contrib.admin.utils import NestedObjects | ||
42 | + | ||
37 | from amadeus.permissions import has_category_permissions, has_subject_permissions, has_subject_view_permissions, has_resource_permissions | 43 | from amadeus.permissions import has_category_permissions, has_subject_permissions, has_subject_view_permissions, has_resource_permissions |
38 | 44 | ||
39 | class HomeView(LoginRequiredMixin, ListView): | 45 | class HomeView(LoginRequiredMixin, ListView): |
@@ -716,3 +722,91 @@ def most_acessed_subjects(request): | @@ -716,3 +722,91 @@ def most_acessed_subjects(request): | ||
716 | subjects = subjects[:30] | 722 | subjects = subjects[:30] |
717 | 723 | ||
718 | return JsonResponse(subjects, safe=False) | 724 | return JsonResponse(subjects, safe=False) |
725 | + | ||
726 | +""" BACKUP / RESTORE SECTION """ | ||
727 | +class Backup(LoginRequiredMixin, ListView): | ||
728 | + login_url = reverse_lazy("users:login") | ||
729 | + redirect_field_name = 'next' | ||
730 | + | ||
731 | + template_name = 'subjects/backup.html' | ||
732 | + model = Subject | ||
733 | + context_object_name = 'topics' | ||
734 | + | ||
735 | + def dispatch(self, request, *args, **kwargs): | ||
736 | + subject = get_object_or_404(Subject, slug = kwargs.get('slug', '')) | ||
737 | + | ||
738 | + if not has_subject_permissions(request.user, subject): | ||
739 | + return redirect(reverse_lazy('subjects:home')) | ||
740 | + | ||
741 | + return super(Backup, self).dispatch(request, *args, **kwargs) | ||
742 | + | ||
743 | + def get_queryset(self): | ||
744 | + slug = self.kwargs.get('slug') | ||
745 | + topics = Topic.objects.filter(subject__slug = slug) | ||
746 | + | ||
747 | + return topics | ||
748 | + | ||
749 | + def get_context_data(self, **kwargs): | ||
750 | + context = super(Backup, self).get_context_data(**kwargs) | ||
751 | + | ||
752 | + subject = get_object_or_404(Subject, slug = self.kwargs.get('slug', '')) | ||
753 | + | ||
754 | + context['title'] = _('%s - Backup')%(str(subject)) | ||
755 | + context['subject'] = subject | ||
756 | + | ||
757 | + return context | ||
758 | + | ||
759 | +@login_required | ||
760 | +def realize_backup(request): | ||
761 | + #collector = NestedObjects(using="default") # database name | ||
762 | + #collector.collect(list(Resource.objects.filter(visible = True))) | ||
763 | + resources_ids = request.POST.getlist("resource[]") | ||
764 | + | ||
765 | + resource_files_subdir = "files" | ||
766 | + zip_filename = "backup.zip" | ||
767 | + | ||
768 | + s = BytesIO() | ||
769 | + | ||
770 | + zf = zipfile.ZipFile(s, "w", compression = zipfile.ZIP_DEFLATED) | ||
771 | + | ||
772 | + resources = Resource.objects.filter(id__in = resources_ids) | ||
773 | + | ||
774 | + for resource in resources: | ||
775 | + if resource._my_subclass == "filelink": | ||
776 | + fdir, fname = os.path.split(resource.filelink.file_content.path) | ||
777 | + zip_path = os.path.join(resource_files_subdir, fname) | ||
778 | + | ||
779 | + # Add file, at correct path | ||
780 | + zf.write(resource.filelink.file_content.path, zip_path) | ||
781 | + elif resource._my_subclass == "pdffile": | ||
782 | + fdir, fname = os.path.split(resource.pdffile.file.path) | ||
783 | + zip_path = os.path.join(resource_files_subdir, fname) | ||
784 | + | ||
785 | + # Add file, at correct path | ||
786 | + zf.write(resource.pdffile.file.path, zip_path) | ||
787 | + | ||
788 | + topics = Topic.objects.filter(resource_topic__id__in = resources_ids).distinct() | ||
789 | + | ||
790 | + file = open("backup.json", "w") | ||
791 | + | ||
792 | + json_serializer = serializers.get_serializer('json')() | ||
793 | + json_serializer.serialize(topics, stream = file) | ||
794 | + json_serializer.serialize(resources, stream = file) | ||
795 | + | ||
796 | + file.close() | ||
797 | + | ||
798 | + fdir, fname = os.path.split("backup.json") | ||
799 | + zip_path = os.path.join("", fname) | ||
800 | + | ||
801 | + # Add file, at correct path | ||
802 | + zf.write("backup.json", zip_path) | ||
803 | + | ||
804 | + zf.close() | ||
805 | + | ||
806 | + # Grab ZIP file from in-memory, make response with correct MIME-type | ||
807 | + resp = HttpResponse(s.getvalue(), content_type = "application/x-zip-compressed") | ||
808 | + # ..and correct content-disposition | ||
809 | + resp['Content-Disposition'] = 'attachment; filename=%s' % zip_filename | ||
810 | + resp['Content-Length'] = s.tell() | ||
811 | + | ||
812 | + return resp | ||
719 | \ No newline at end of file | 813 | \ No newline at end of file |
themes/models.py
@@ -5,7 +5,7 @@ from django.contrib.staticfiles.templatetags.staticfiles import static | @@ -5,7 +5,7 @@ from django.contrib.staticfiles.templatetags.staticfiles import static | ||
5 | 5 | ||
6 | def validate_img_extension(value): | 6 | def validate_img_extension(value): |
7 | valid_formats = ['image/jpeg','image/x-citrix-jpeg','image/png','image/x-citrix-png','image/x-png'] | 7 | valid_formats = ['image/jpeg','image/x-citrix-jpeg','image/png','image/x-citrix-png','image/x-png'] |
8 | - | 8 | + |
9 | if hasattr(value.file, 'content_type'): | 9 | if hasattr(value.file, 'content_type'): |
10 | if not value.file.content_type in valid_formats: | 10 | if not value.file.content_type in valid_formats: |
11 | raise ValidationError(_('File not supported.')) | 11 | raise ValidationError(_('File not supported.')) |
@@ -16,7 +16,7 @@ class Themes(models.Model): | @@ -16,7 +16,7 @@ class Themes(models.Model): | ||
16 | small_logo = models.ImageField(verbose_name = _("Small Logo"), blank = True, null = True, upload_to = 'themes/', validators = [validate_img_extension]) | 16 | small_logo = models.ImageField(verbose_name = _("Small Logo"), blank = True, null = True, upload_to = 'themes/', validators = [validate_img_extension]) |
17 | large_logo = models.ImageField(verbose_name = _("Large Logo"), blank = True, null = True, upload_to = 'themes/', validators = [validate_img_extension]) | 17 | large_logo = models.ImageField(verbose_name = _("Large Logo"), blank = True, null = True, upload_to = 'themes/', validators = [validate_img_extension]) |
18 | footer_note = models.TextField(_("Footer Note"), blank = True) | 18 | footer_note = models.TextField(_("Footer Note"), blank = True) |
19 | - css_style = models.CharField(_("Css Style"), max_length = 50, default = "green", choices = (("green", _('Green')), ("red", _('Red')), ("black", _('Black')))) | 19 | + css_style = models.CharField(_("Css Style"), max_length = 50, default = "green", choices = (("green", _('Green')),("contrast",_('Contrast')),("red", _('Red')), ("black", _('Black')))) |
20 | 20 | ||
21 | class Meta: | 21 | class Meta: |
22 | verbose_name = _("Theme") | 22 | verbose_name = _("Theme") |
@@ -30,7 +30,7 @@ class Themes(models.Model): | @@ -30,7 +30,7 @@ class Themes(models.Model): | ||
30 | if self.favicon and hasattr(self.favicon, 'url'): | 30 | if self.favicon and hasattr(self.favicon, 'url'): |
31 | if path.exists(self.favicon.path): | 31 | if path.exists(self.favicon.path): |
32 | return self.favicon.url | 32 | return self.favicon.url |
33 | - | 33 | + |
34 | return static('img/favicon_amadeus.png') | 34 | return static('img/favicon_amadeus.png') |
35 | 35 | ||
36 | @property | 36 | @property |
@@ -38,7 +38,7 @@ class Themes(models.Model): | @@ -38,7 +38,7 @@ class Themes(models.Model): | ||
38 | if self.small_logo and hasattr(self.small_logo, 'url'): | 38 | if self.small_logo and hasattr(self.small_logo, 'url'): |
39 | if path.exists(self.small_logo.path): | 39 | if path.exists(self.small_logo.path): |
40 | return self.small_logo.url | 40 | return self.small_logo.url |
41 | - | 41 | + |
42 | return static('img/logo_pequena_amadeus.png') | 42 | return static('img/logo_pequena_amadeus.png') |
43 | 43 | ||
44 | @property | 44 | @property |
@@ -46,5 +46,5 @@ class Themes(models.Model): | @@ -46,5 +46,5 @@ class Themes(models.Model): | ||
46 | if self.large_logo and hasattr(self.large_logo, 'url'): | 46 | if self.large_logo and hasattr(self.large_logo, 'url'): |
47 | if path.exists(self.large_logo.path): | 47 | if path.exists(self.large_logo.path): |
48 | return self.large_logo.url | 48 | return self.large_logo.url |
49 | - | ||
50 | - return static('img/logo_grande_amadeus.png') | ||
51 | \ No newline at end of file | 49 | \ No newline at end of file |
50 | + | ||
51 | + return static('img/logo_grande_amadeus.png') |
themes/templates/themes/css_update.html
@@ -29,6 +29,10 @@ | @@ -29,6 +29,10 @@ | ||
29 | <br clear="all" /> | 29 | <br clear="all" /> |
30 | 30 | ||
31 | {% for radio in field %} | 31 | {% for radio in field %} |
32 | + {% if radio.choice_value == 'contrast' %} | ||
33 | + | ||
34 | + {% else %} | ||
35 | + | ||
32 | <label for="{{ radio.id_for_label }}" class="row text-center"> | 36 | <label for="{{ radio.id_for_label }}" class="row text-center"> |
33 | <div class="col-lg-offset-2 col-md-offset-2 col-sm-offset-2 col-lg-2 col-md-2 col-sm-2 col-xs-3 text-left"> | 37 | <div class="col-lg-offset-2 col-md-offset-2 col-sm-offset-2 col-lg-2 col-md-2 col-sm-2 col-xs-3 text-left"> |
34 | <span class="radio"> | 38 | <span class="radio"> |
@@ -47,6 +51,8 @@ | @@ -47,6 +51,8 @@ | ||
47 | </div> | 51 | </div> |
48 | </label> | 52 | </label> |
49 | <br clear="all" /> | 53 | <br clear="all" /> |
54 | + {% endif %} | ||
55 | + | ||
50 | {% endfor %} | 56 | {% endfor %} |
51 | </div> | 57 | </div> |
52 | 58 |
themes/urls.py
@@ -5,4 +5,5 @@ urlpatterns = [ | @@ -5,4 +5,5 @@ urlpatterns = [ | ||
5 | url(r'^$', views.IndexView.as_view(), name = 'manage'), | 5 | url(r'^$', views.IndexView.as_view(), name = 'manage'), |
6 | url(r'^basic_elements$', views.BasicElementsSettings.as_view(), name = 'basic'), | 6 | url(r'^basic_elements$', views.BasicElementsSettings.as_view(), name = 'basic'), |
7 | url(r'^css_selector$', views.CSSStyleSettings.as_view(), name = 'css'), | 7 | url(r'^css_selector$', views.CSSStyleSettings.as_view(), name = 'css'), |
8 | -] | ||
9 | \ No newline at end of file | 8 | \ No newline at end of file |
9 | + url(r'^contrast$',views.Contrast, name = 'contrast'), | ||
10 | +] |
themes/views.py
@@ -3,6 +3,8 @@ from django.shortcuts import render | @@ -3,6 +3,8 @@ from django.shortcuts import render | ||
3 | from django.contrib import messages | 3 | from django.contrib import messages |
4 | from django.core.urlresolvers import reverse, reverse_lazy | 4 | from django.core.urlresolvers import reverse, reverse_lazy |
5 | from django.utils.translation import ugettext_lazy as _ | 5 | from django.utils.translation import ugettext_lazy as _ |
6 | +from django.http import HttpResponse, JsonResponse, HttpResponseRedirect | ||
7 | +from django.shortcuts import redirect | ||
6 | 8 | ||
7 | from braces import views as braces_mixins | 9 | from braces import views as braces_mixins |
8 | 10 | ||
@@ -77,3 +79,16 @@ class CSSStyleSettings(braces_mixins.LoginRequiredMixin, braces_mixins.Staffuser | @@ -77,3 +79,16 @@ class CSSStyleSettings(braces_mixins.LoginRequiredMixin, braces_mixins.Staffuser | ||
77 | context['settings_menu_active'] = "settings_menu_active" | 79 | context['settings_menu_active'] = "settings_menu_active" |
78 | 80 | ||
79 | return context | 81 | return context |
82 | + | ||
83 | +def Contrast(request): | ||
84 | + theme = Themes.objects.get(id = 1) | ||
85 | + | ||
86 | + if theme.css_style == 'contrast': | ||
87 | + theme.css_style = 'green' | ||
88 | + else: | ||
89 | + theme.css_style = 'contrast' | ||
90 | + theme.save() | ||
91 | + | ||
92 | + caminho = request.META.get('HTTP_REFERER') | ||
93 | + | ||
94 | + return HttpResponseRedirect(caminho) |
users/templates/users/login.html
@@ -31,7 +31,7 @@ | @@ -31,7 +31,7 @@ | ||
31 | </div> | 31 | </div> |
32 | {% endfor %} | 32 | {% endfor %} |
33 | {% endif %} | 33 | {% endif %} |
34 | - | 34 | + |
35 | <div class="card"> | 35 | <div class="card"> |
36 | <div class="card-block"> | 36 | <div class="card-block"> |
37 | <div class="row"> | 37 | <div class="row"> |
@@ -39,7 +39,7 @@ | @@ -39,7 +39,7 @@ | ||
39 | <h2 class="outside-title"><strong> {% trans 'Sign in with your account to continue' %} </strong></h2> | 39 | <h2 class="outside-title"><strong> {% trans 'Sign in with your account to continue' %} </strong></h2> |
40 | </div> | 40 | </div> |
41 | </div> | 41 | </div> |
42 | - | 42 | + |
43 | <form id="form-login" method="post" action=""> | 43 | <form id="form-login" method="post" action=""> |
44 | {% csrf_token %} | 44 | {% csrf_token %} |
45 | <div class="col-lg-10 col-md-10 col-sm-10 col-lg-offset-1 col-md-offset-1 col-sm-offset-1"> | 45 | <div class="col-lg-10 col-md-10 col-sm-10 col-lg-offset-1 col-md-offset-1 col-sm-offset-1"> |
@@ -52,10 +52,10 @@ | @@ -52,10 +52,10 @@ | ||
52 | <input form="form-login" for="inputSmall" type="password" name="password" class="form-control" id="inputPassword" placeholder="{% trans 'Password' %}"> | 52 | <input form="form-login" for="inputSmall" type="password" name="password" class="form-control" id="inputPassword" placeholder="{% trans 'Password' %}"> |
53 | </div> | 53 | </div> |
54 | </div> | 54 | </div> |
55 | - | 55 | + |
56 | </form> | 56 | </form> |
57 | - | ||
58 | - | 57 | + |
58 | + | ||
59 | <div class="row"> | 59 | <div class="row"> |
60 | <div class="col-lg-10 col-md-10 col-sm-10 col-lg-offset-1 col-md-offset-1 col-sm-offset-1"> | 60 | <div class="col-lg-10 col-md-10 col-sm-10 col-lg-offset-1 col-md-offset-1 col-sm-offset-1"> |
61 | {% if not deny_register %} | 61 | {% if not deny_register %} |
@@ -74,23 +74,23 @@ | @@ -74,23 +74,23 @@ | ||
74 | </div> | 74 | </div> |
75 | <div class="row"> | 75 | <div class="row"> |
76 | 76 | ||
77 | - | 77 | + |
78 | {% if not deny_register %} | 78 | {% if not deny_register %} |
79 | <div class="col-sm-offset-1 col-md-10 col-lg-10 col-sm-10 col-xs-12"> | 79 | <div class="col-sm-offset-1 col-md-10 col-lg-10 col-sm-10 col-xs-12"> |
80 | <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 text-right forgotPassword"> | 80 | <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 text-right forgotPassword"> |
81 | <a class="pull-right" href="{% url 'users:forgot_pass' %}">{% trans 'Forgot your password?' %}</a> | 81 | <a class="pull-right" href="{% url 'users:forgot_pass' %}">{% trans 'Forgot your password?' %}</a> |
82 | - <li class="dropdown language-selector pull-right "> | 82 | + <li class="dropdown language-selector pull-right " style="margin-top:1px;margin-right:10px;"> |
83 | {% get_current_language as LANGUAGE_CODE %} | 83 | {% get_current_language as LANGUAGE_CODE %} |
84 | <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-close-others="true"> | 84 | <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-close-others="true"> |
85 | 85 | ||
86 | - {% with 'img/'|add:LANGUAGE_CODE|add:'.png' as image_static %} | ||
87 | - <img src="{% static image_static %}" /> | ||
88 | - {% endwith %} | ||
89 | - | 86 | + |
87 | + <span >[{{LANGUAGE_CODE}}] </span> | ||
88 | + | ||
90 | </a> | 89 | </a> |
90 | + <a href="{% url 'themes:contrast'%}" style="margin-left:10px;"><i class="glyphicon glyphicon-adjust"></i></a> | ||
91 | <ul class="dropdown-menu"> | 91 | <ul class="dropdown-menu"> |
92 | 92 | ||
93 | - | 93 | + |
94 | {% get_available_languages as LANGUAGES %} | 94 | {% get_available_languages as LANGUAGES %} |
95 | {% get_language_info_list for LANGUAGES as languages %} | 95 | {% get_language_info_list for LANGUAGES as languages %} |
96 | {% for language in languages %} | 96 | {% for language in languages %} |
@@ -99,13 +99,10 @@ | @@ -99,13 +99,10 @@ | ||
99 | class="active" | 99 | class="active" |
100 | {% endif %}> | 100 | {% endif %}> |
101 | <a class="language-item" value-lang="{{language.code}}"> | 101 | <a class="language-item" value-lang="{{language.code}}"> |
102 | - {% with 'img/'|add:language.code|add:'.png' as image_static %} | ||
103 | - <img src="{% static image_static %}" /> | ||
104 | - {% endwith %} | ||
105 | <span>{{language.code}}</span> | 102 | <span>{{language.code}}</span> |
106 | </a> | 103 | </a> |
107 | </li> | 104 | </li> |
108 | - | 105 | + |
109 | {% endfor %} | 106 | {% endfor %} |
110 | </ul> | 107 | </ul> |
111 | </li> | 108 | </li> |
@@ -116,15 +113,14 @@ | @@ -116,15 +113,14 @@ | ||
116 | <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 text-center forgotPassword"> | 113 | <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 text-center forgotPassword"> |
117 | <a href="{% url 'users:forgot_pass' %}">{% trans 'Forgot your password?' %}</a> | 114 | <a href="{% url 'users:forgot_pass' %}">{% trans 'Forgot your password?' %}</a> |
118 | 115 | ||
119 | - <li class="dropdown language-selector pull-right "> | 116 | + <li class="dropdown language-selector pull-right " style="margin-top:1px;margin-right:10px;"> |
120 | {% get_current_language as LANGUAGE_CODE %} | 117 | {% get_current_language as LANGUAGE_CODE %} |
121 | <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-close-others="true"> | 118 | <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-close-others="true"> |
122 | 119 | ||
123 | - {% with 'img/'|add:LANGUAGE_CODE|add:'.png' as image_static %} | ||
124 | - <img src="{% static image_static %}" /> | ||
125 | - {% endwith %} | ||
126 | - | 120 | + <span>[{{LANGUAGE_CODE}}] </span> |
121 | + | ||
127 | </a> | 122 | </a> |
123 | + <a href="{% url 'themes:contrast'%}" style="margin-left:10px;"><i class="glyphicon glyphicon-adjust"></i></a> | ||
128 | <ul class="dropdown-menu"> | 124 | <ul class="dropdown-menu"> |
129 | {% get_available_languages as LANGUAGES %} | 125 | {% get_available_languages as LANGUAGES %} |
130 | {% get_language_info_list for LANGUAGES as languages %} | 126 | {% get_language_info_list for LANGUAGES as languages %} |
@@ -134,13 +130,10 @@ | @@ -134,13 +130,10 @@ | ||
134 | class="active" | 130 | class="active" |
135 | {% endif %}> | 131 | {% endif %}> |
136 | <a class="language-item" value-lang="{{language.code}}"> | 132 | <a class="language-item" value-lang="{{language.code}}"> |
137 | - {% with 'img/'|add:language.code|add:'.png' as image_static %} | ||
138 | - <img src="{% static image_static %}" /> | ||
139 | - {% endwith %} | ||
140 | <span>{{language.code}}</span> | 133 | <span>{{language.code}}</span> |
141 | </a> | 134 | </a> |
142 | </li> | 135 | </li> |
143 | - | 136 | + |
144 | {% endfor %} | 137 | {% endfor %} |
145 | </ul> | 138 | </ul> |
146 | </li> | 139 | </li> |
@@ -153,7 +146,7 @@ | @@ -153,7 +146,7 @@ | ||
153 | </div> | 146 | </div> |
154 | </div> | 147 | </div> |
155 | 148 | ||
156 | - | 149 | + |
157 | {% endblock%} | 150 | {% endblock%} |
158 | 151 | ||
159 | {% block footer %} | 152 | {% block footer %} |
@@ -171,4 +164,4 @@ | @@ -171,4 +164,4 @@ | ||
171 | {% endblock %} | 164 | {% endblock %} |
172 | 165 | ||
173 | {% block bottommenu %} | 166 | {% block bottommenu %} |
174 | -{% endblock %} | ||
175 | \ No newline at end of file | 167 | \ No newline at end of file |
168 | +{% endblock %} |