Commit 4747a612586c30a75082134fb3755c172e91d669

Authored by Felipe Henrique de Almeida Bormann
2 parents 4ed161c7 37a92b0f

Merge branch 'refactoring' of https://github.com/amadeusproject/amadeuslms into refactoring

amadeus/context_processors.py 0 → 100644
... ... @@ -0,0 +1,10 @@
  1 +from themes.models import Themes
  2 +
  3 +def theme(request):
  4 + context = {}
  5 +
  6 + theme = Themes.objects.get(id = 1)
  7 +
  8 + context['theme'] = theme
  9 +
  10 + return context
0 11 \ No newline at end of file
... ...
amadeus/settings.py
... ... @@ -92,6 +92,7 @@ TEMPLATES = [
92 92 'django.template.context_processors.request',
93 93 'django.contrib.auth.context_processors.auth',
94 94 'django.contrib.messages.context_processors.messages',
  95 + 'amadeus.context_processors.theme',
95 96 ],
96 97 },
97 98 },
... ...
amadeus/static/css/base/amadeus.css
  1 +ul, li {
  2 + list-style-type: none;
  3 + text-decoration: none;
  4 +}
  5 +
1 6 .pagination > li > a, .pagination > li > span {
2 7 padding: 0px 8px;
3 8 }
... ... @@ -34,10 +39,9 @@
34 39 width: 70%;
35 40 }
36 41  
37   -.my-subjects-title{
  42 +.my-subjects-title {
38 43 font-family: Roboto;
39   - font-size: 18px;
40   - color: #26A69A;
  44 + font-size: 18px;
41 45 }
42 46  
43 47 /* initial page ends */
... ... @@ -48,27 +52,13 @@
48 52 padding-left: 0px;
49 53 }
50 54  
51   -#sidebar-menu .item{
  55 +#sidebar-menu .item {
52 56 font-size: 3vw;
53   - background-color: #26A69A;
54   - color: white;
55 57 width: 80%;
56 58 margin: 10px 0px 10px 10px;
57 59 text-align: center;
58 60 }
59 61  
60   -#sidebar-menu .item a{
61   - color: white;
62   -}
63   -
64   -#sidebar-menu > .subjects_menu_active {
65   - background-color: #00695C;
66   -}
67   -
68   -#sidebar-menu > .item:hover{
69   - background-color: #00695C;
70   -}
71   -
72 62 #subjects-link{
73 63 margin-top: 0px !important;
74 64 }
... ... @@ -76,21 +66,9 @@
76 66 #sidebar-menu-div{
77 67 padding-right: 10px;
78 68 }
79   -
80   -
81   -
82 69 /* side bar menu ends*/
83 70  
84 71 /* category app starts */
85   -
86   -.panel-invisible{
87   - background-color: #BDBDBD !important;
88   - color: #F5F5F5;
89   -}
90   -
91   -.category-panel > .panel-heading {
92   - background-color: #0277BD !important;
93   -}
94 72 .category-panel > .panel-heading, .subject-panel > .panel-heading, .special-panel > .panel-heading {
95 73 padding: 2px 0px;
96 74 }
... ... @@ -99,10 +77,6 @@
99 77 padding: 2px 0px;
100 78 }
101 79  
102   -.subject-panel > .panel-heading {
103   - background-color: #039BE5 !important;
104   -}
105   -
106 80 .subject-group {
107 81 margin-left: 20px;
108 82 }
... ... @@ -129,84 +103,58 @@
129 103 float: none;
130 104 }
131 105  
132   -.category-header i{
133   - color: white;
  106 +.category-header i {
134 107 font-size: 20px;
135 108 float: right;
136 109 }
137 110  
138   -.category-header i:hover{
139   - color: #90CAF9;
140   -}
141   -
142   -
143   -.category-header .dropdown-menu i {
144   - color: inherit;
145   -}
146   -
147 111 .cat-selector {
148 112 margin: 0;
149 113 top: -2px;
150 114 }
151 115  
152   -#create-category{
153   - margin-left: 20%;
154   - margin-bottom: 1%;
155   - border: none;
156   - background-color: #66BB6A;
157   - color: #FFFFFF;
158   - width: 60%;
159   - height: 40px;
160   - font-size: 15px;
  116 +#create-category {
  117 + margin-left: 20%;
  118 + margin-bottom: 1%;
  119 + border: none;
  120 + width: 60%;
  121 + height: 40px;
  122 + font-size: 15px;
161 123 }
162 124  
163   -.category-panel-content{
164   - padding:10px;
165   - background: #F5F5F5;
  125 +.category-panel-content {
  126 + padding:10px;
166 127 }
167 128  
168   -
169   -
170 129 .core-subjects-options{
171   - padding: 0px;
  130 + padding: 0px;
172 131 }
173 132  
174   -
175 133 #core-subjects-options-div{
176 134 width: 100%;
177 135 margin-bottom: 10px;
178 136 height: 50px;
179 137 }
180 138  
181   -.core-subjects-options li{
  139 +.core-subjects-options li {
182 140 float:left;
183 141 padding: 10px;
184 142 padding-bottom: 8px;
185   - background-color: #FFFFFF;
186 143 margin: 1px;
187 144 border-bottom: 5px;
188 145 border-bottom-style: solid;
189   - border-bottom-color: #D2D2D2;
190   - color: #A0A0A0;
191   -}
192   -
193   -.core-subjects-options li.active{
194   - color: inherit;
195   - border-bottom-color: #00695C;
196 146 }
197 147  
198 148 #delete-category-footer{
199   - border-top:none !important;
  149 + border-top:none !important;
200 150 }
201 151  
202 152 .erase-button{
203   - float:left;
  153 + float:left;
204 154 }
205 155  
206   -.create-subject-btn{
  156 +.create-subject-btn {
207 157 width: 100%;
208   - background-color: #26A69A;
209   - color: white;
210 158 border: 0px;
211 159 margin-bottom: 10px;
212 160 }
... ... @@ -221,31 +169,26 @@
221 169 }
222 170  
223 171 #coordinators_accordion .panel-heading, #professors_accordion .panel-heading {
224   - background: #FFFFFF;
225 172 border: none;
226 173 }
227 174  
228 175 #coordinators_accordion .panel-collapse, #professors_accordion .panel-collapse {
229 176 padding: 10px;
230 177 }
231   -
232 178 /* category app ends */
233 179  
234 180 .clearfix{
235   - clear: both;
  181 + clear: both;
236 182 }
237 183  
238 184 .mg-b-5m{
239   - margin-bottom: 5em;
  185 + margin-bottom: 5em;
240 186 }
241 187  
242 188 /* NavBar Top */
243 189 .navbar-brand {
244 190 height: 50px !important;
245 191 }
246   -.navbar-brand:hover {
247   - background: #00695C !important;
248   -}
249 192  
250 193 .navbar .navbar-form {
251 194 margin-top: 10px;
... ... @@ -262,11 +205,6 @@
262 205 font-weight: normal;
263 206 padding-left: 10px;
264 207 font-size: 20px;
265   - color: white;
266   -}
267   -
268   -.navbar-nav li.open {
269   - background: #00695C;
270 208 }
271 209  
272 210 .navbar-nav li > a {
... ... @@ -275,21 +213,11 @@
275 213 padding-left: 20px;
276 214 max-height: 50px;
277 215 }
278   -.navbar-nav li > a:hover {
279   - background: #00695C !important;
280   -}
281   -
282   -.navbar-nav li.settings_menu_active {
283   - background: #00695C
284   -}
285 216  
286 217 .submenu {
287 218 -webkit-padding-start: 0px;
288 219 }
289 220  
290   -.top-search {
291   - color: #F5F5F5;
292   -}
293 221 .top-search::-webkit-input-placeholder {
294 222 font-style: italic;
295 223 }
... ... @@ -302,48 +230,24 @@
302 230 .top-search:-moz-placeholder {
303 231 font-style: italic;
304 232 }
305   -
306   -#btn-search:hover {
307   - background: #00695C;
308   -}
309 233 /* End NavBar Top */
310 234  
311 235 /* Dropdown menu Topbar */
312   -.dropdown-menu {
313   - background: #F5F5F5;
314   -}
315   -
316 236 .dropdown-menu li > a {
317   - background: #F5F5F5;
318 237 font-family: Roboto;
319 238 font-size: 16px;
320   - color: #333333;
321   -}
322   -.dropdown-menu li > a:hover {
323   - background: #EEEEEE !important;
324 239 }
325 240  
326 241 #system_accordion {
327 242 margin-bottom: 0px;
328 243 }
329 244  
330   -#system_accordion > .panel > .panel-heading {
331   - background: #F5F5F5;
332   -}
333   -#system_accordion > .panel > .panel-heading:hover {
334   - background: #EEEEEE;
335   -}
336   -
337 245 #system_accordion > .panel > .panel-heading > a > .panel-title {
338 246 font-weight: normal;
339   - color: #333333;
340   -}
341   -#system_accordion > .panel > .panel-heading > a > .panel-title:hover {
342   - color: #009688;
343 247 }
  248 +
344 249 #system_accordion > .panel > .panel-heading > a:hover {
345 250 text-decoration: none;
346   - color: #009688;
347 251 }
348 252 #system_accordion > .panel > .panel-heading > a:focus {
349 253 text-decoration: none;
... ... @@ -354,10 +258,6 @@
354 258 padding-bottom: 0px;
355 259 }
356 260  
357   -#system_menu {
358   - background: #F5F5F5;
359   -}
360   -
361 261 .submenu a {
362 262 font-family: Roboto;
363 263 font-weight: normal;
... ... @@ -371,29 +271,34 @@
371 271 /* End Dropdown menu Topbar */
372 272  
373 273 /* Modal */
374   -.modal-header {min-height: 60px; border-bottom: 1px solid #E6E7E8 !important; padding-bottom: 15px !important;}
375   -.modal-footer {text-align: right; padding-top: 5px !important; border-top: 1px solid #E6E7E8 !important;}
  274 +.modal-header {
  275 + min-height: 60px;
  276 + padding-bottom: 15px !important;
  277 +}
  278 +.modal-footer {
  279 + text-align: right;
  280 + padding-top: 5px !important;
  281 +}
376 282  
377 283 /* HEADER */
378 284 #notification-dropdown{
379   - max-height: 500%;
380   - overflow: auto;
381   - width: 300px;
  285 + max-height: 500%;
  286 + overflow: auto;
  287 + width: 300px;
382 288 }
383 289 #NavBarSearch{
384 290 position: absolute;
385 291 left: 30%;
386   - }
  292 +}
387 293 #btn-search{
388   - margin-bottom: 0px;
389   - }
  294 + margin-bottom: 0px;
  295 +}
390 296 .user-notification-img{
391   - width:40%;
  297 + width:40%;
392 298 }
393 299  
394 300 #horizontal-line{
395   - height:2px;
396   - background-color: black;
  301 + height:2px;
397 302 }
398 303  
399 304 .navbar .dropdown-menu li>a, .navbar.navbar-default .dropdown-menu li>a {
... ... @@ -402,8 +307,6 @@
402 307 }
403 308  
404 309 /* HEADER */
405   -
406   -
407 310 .logoLogin{
408 311 padding-bottom: 1%;
409 312 width: 15%;
... ... @@ -418,18 +321,6 @@
418 321 margin-bottom: 5px;
419 322 font-style: italic;
420 323 }
421   -
422   -.breadcrumb > li > span.divider {
423   - color: #26A69A;
424   -}
425   -
426   -.breadcrumb > li > a{
427   - color: #26A69A;
428   -}
429   -
430   -.breadcrumb > li {
431   - color: #BDBDBD;
432   -}
433 324 /* End Breadcrumbs */
434 325  
435 326 .courseHome{
... ... @@ -468,227 +359,24 @@
468 359 text-align: right;
469 360 }
470 361 #img {
471   -
472 362 display: block;
473 363 margin: auto;
474 364 width: 50%;
475   -
476 365 }
477   -ul {
478   - list-style-type:none
479   -}
480   -
481   -
482   -/*CSS TIMELINE*/
483   -
484   -.panel-title{ /*Because we use an outer a tag*/
485   - color: rgba(255,255,255,.84);
486   -}
487   -
488   -.bubble {
489   - width: 100%;
490   - padding: .5em 1em;
491   - line-height: 1.4em;
492   - padding: 20px;
493   - background-color: #ecf0f1;
494   - position: relative;
495   - -webkit-border-radius: 8px;
496   - -moz-border-radius: 8px;
497   - -ms-border-radius: 8px;
498   - -o-border-radius: 8px;
499   - border-radius: 8px;
500   - text-align: left;
501   - display: inline-block; }
502   - .bubble:hover > .over-bubble {
503   - opacity: 1; }
504   -
505   -.bubble-container {
506   - width: 75%;
507   - display: block;
508   - position: relative;
509   - padding-left: 20px;
510   - vertical-align: top;
511   - display: inline-block; }
512   -
513   -.arrow {
514   - content: '';
515   - display: block;
516   - position: absolute;
517   - left: 12px;
518   - bottom: 25%;
519   - height: 0;
520   - width: 0;
521   - border-top: 20px solid transparent;
522   - border-bottom: 20px solid transparent;
523   - border-right: 20px solid #ecf0f1; }
524   -
525   -.timeline {
526   - width: 560px;
527   - display: block;
528   - margin: auto;
529   - background-color: #dde1e2;
530   - padding-bottom: 2em;
531   - -webkit-box-shadow: #bdc3c7 0 5px 5px;
532   - -moz-box-shadow: #bdc3c7 0 5px 5px;
533   - box-shadow: #bdc3c7 0 5px 5px;
534   - -moz-border-radius-bottomleft: 8px;
535   - -webkit-border-bottom-left-radius: 8px;
536   - border-bottom-left-radius: 8px;
537   - -moz-border-radius-bottomright: 8px;
538   - -webkit-border-bottom-right-radius: 8px;
539   - border-bottom-right-radius: 8px;
540   - margin-bottom: 2em; }
541   - .timeline li {
542   - padding: 1em 0; }
543   - .timeline li.not_read {
544   - background-color: #d3d7d8; }
545   -
546   -.avatar {
547   - width: 18%;
548   - display: inline-block;
549   - vertical-align: top;
550   - position: relative;
551   - overflow: hidden;
552   - margin-left: 2%; }
553   - .avatar img {
554   - width: 100%;
555   - -webkit-border-radius: 50%;
556   - -moz-border-radius: 50%;
557   - -ms-border-radius: 50%;
558   - -o-border-radius: 50%;
559   - border-radius: 50%;
560   - border: 5px solid #ecf0f1;
561   - position: relative; }
562   -
563   -
564   -
565   -.first {
566   - width: 560px;
567   - display: block;
568   - margin: auto;
569   - background-color: #3498db;
570   - text-shadow: #2084c7 1px 1px 0;
571   - padding: 1em 0 !important;
572   - color: white;
573   - text-align: center;
574   - margin-top: 1em;
575   - font-family: "Lato";
576   - font-size: 1.6em;
577   - -moz-border-radius-topleft: 8px;
578   - -webkit-border-top-left-radius: 8px;
579   - border-top-left-radius: 8px;
580   - -moz-border-radius-topright: 8px;
581   - -webkit-border-top-right-radius: 8px;
582   - border-top-right-radius: 8px;
583   - position: relative; }
584   -
585   -
586   -.over-bubble {
587   - line-height: 1.4em;
588   - padding-top: 10%;
589   - background-color: rgba(236, 240, 241, 0.8);
590   - position: relative;
591   - -webkit-border-radius: 8px;
592   - -moz-border-radius: 8px;
593   - -ms-border-radius: 8px;
594   - -o-border-radius: 8px;
595   - border-radius: 8px;
596   - text-align: center;
597   - display: inline-block;
598   - position: absolute !important;
599   - height: 100%;
600   - width: 100%;
601   - opacity: 0;
602   - top: 0;
603   - left: 0;
604   - z-index: 999;
605   - -webkit-transition-property: all;
606   - -moz-transition-property: all;
607   - -o-transition-property: all;
608   - transition-property: all;
609   - -webkit-transition-duration: 0.3s;
610   - -moz-transition-duration: 0.3s;
611   - -o-transition-duration: 0.3s;
612   - transition-duration: 0.3s;
613   - -webkit-transition-timing-function: ease-in;
614   - -moz-transition-timing-function: ease-in;
615   - -o-transition-timing-function: ease-in;
616   - transition-timing-function: ease-in;
617   - font-size: 2.8em;
618   - text-shadow: white 1px 1px 0; }
619   -
620   -.action {
621   - margin-right: .3em;
622   - -webkit-transition-property: all;
623   - -moz-transition-property: all;
624   - -o-transition-property: all;
625   - transition-property: all;
626   - -webkit-transition-duration: 0.2s;
627   - -moz-transition-duration: 0.2s;
628   - -o-transition-duration: 0.2s;
629   - transition-duration: 0.2s;
630   - -webkit-transition-timing-function: ease-in;
631   - -moz-transition-timing-function: ease-in;
632   - -o-transition-timing-function: ease-in;
633   - transition-timing-function: ease-in; }
634   -
635   -
636   -
637   -.icon-more-horiz {margin-top: 0px; margin-bottom: 0px; padding-left: 0px;}
638   -
639   -.retweet {
640   - position: absolute;
641   - opacity: 1;
642   - top: 0;
643   - right: 1em;
644   - display: block;
645   - background-color: #16a085;
646   - padding: 4px;
647   - -moz-border-radius-bottomleft: 5px;
648   - -webkit-border-bottom-left-radius: 5px;
649   - border-bottom-left-radius: 5px;
650   - -moz-border-radius-bottomright: 5px;
651   - -webkit-border-bottom-right-radius: 5px;
652   - border-bottom-right-radius: 5px; }
653   - .retweet .icon-retweet {
654   - color: white;
655   - margin: auto;
656   - width: 100%;
657   - display: block;
658   - font-size: 1.2em; }
659   -
660   -/*CSS NOTIFICACIONS*/
661   -
662   -.alert_list{font-size: 11px; color:grey}
663   -li.alert_li {
664   - font-size: 11px;
665   - color:grey;
666   - padding:10px 0px 2px 0px;
667   - border-bottom: thin solid #c0c0c0;
668   -}
669   -li.alert_li:hover{background-color:#eee}
670   -.turn_off_alert{float:right;margin-bottom :1px}
671   -a.alert_message{color : grey}
672   -a.alert_message:hover{color : grey}
673 366  
674 367 .breadcrumb .divider{
675   - display: none;
  368 + display: none;
676 369 }
677 370  
678 371 /*Logo register user*/
679 372 #logo{
680   - max-width: 40%;
681   - margin-top: 1em;
682   - margin-bottom: 1em;
  373 + max-width: 40%;
  374 + margin-top: 1em;
  375 + margin-bottom: 1em;
683 376 }
684 377 /*====================== ========*/
685   -
686   -.accordion {
687   - background: white;
688   -}
689 378 .accordion_list {
690 379 padding-left: 4px;
691   - background: #F5F5F5;
692 380 }
693 381  
694 382 .container-fluid {
... ... @@ -696,62 +384,11 @@ a.alert_message:hover{color : grey}
696 384 padding-right: 40px;
697 385 }
698 386  
699   -body .container .jumbotron-inverse, body .container .well-inverse, body .container-fluid .jumbotron-inverse, body .container-fluid .well-inverse {
700   - background-color: white;
701   -}
702   -.forum_collapse {
703   - color: #000;
704   -}
705   -.forum_collapse:hover, .forum_collapse:focus {
706   - text-decoration: none;
707   - color: #000;
708   -}
709   -
710   -/*TIMELINE CLASSES BEGIN */
711   -.resource_inline{
712   - display: inline-block;
713   -}
714   -
715   -.imgTimeLine{
716   - width: 100%;
717   - height: auto;
718   - padding-top: 10px;
719   -}
720   -.timeLine div .col-md-11{
721   - padding-left: 0px;
722   -}
723   -.timeLine div .col-md-11 i{
724   - padding-right: 5px;
725   -}
726   -
727   -/*TIMELINE CLASSES END*/
728   -
729   -.notification-count {
730   - background-color: #FF0000;
731   -}
732   -
733   -.img-list-user{
734   - width: 150px;
735   - height: 150px;
736   -}
737   -
738   -.datepicker{z-index:9999 !important}
739   -
740   -ul, li {
741   - list-style-type: none !important;
742   - text-decoration: none !important;
743   -}
744   -
745 387 .icon_edit_remove{
746   - float: right;
  388 + float: right;
747 389 }
748 390  
749   -
750 391 /* core/index.html classes*/
751   -.outside-title {
752   - color: #43a251;
753   -}
754   -
755 392 .logo-login{
756 393 margin-top: 15px;
757 394 margin-bottom: 15px;
... ... @@ -777,87 +414,78 @@ ul, li {
777 414 /* core/register_user.html classes*/
778 415  
779 416 .block-register-inline{
780   - float: left;
781   - display: inline-block;
  417 + float: left;
  418 + display: inline-block;
782 419 }
783 420  
784 421 /* core/reset_password.html classes*/
785 422 .send-reset-email{
786   - float: right;
787   -}
788   -
789   -/* forum post loaded */
790   -@-webkit-keyframes loaded {
791   - 0% {
792   - background-color: Yellow;
793   - opacity: 0.2;
794   - }
795   - 22% {
796   - background-color: Yellow;
797   - opacity: 0.3;
798   - }
799   - 77% {
800   - background-color: Yellow;
801   - opacity: 0.6;
802   - }
803   - 100% {
804   - background-color: White;
805   - }
806   -}
807   -
808   -.loaded {
809   - -webkit-animation-name: loaded;
810   - -webkit-animation-duration: 900ms;
811   - -webkit-animation-iteration-count: 3;
812   - -webkit-animation-timing-function: ease-in-out;
  423 + float: right;
813 424 }
  425 +
814 426 /* Icon Topic */
815 427 .divMoreActions {
816   - text-align: right; height: 30px; float: right;
817   - width: 3%;
  428 + text-align: right;
  429 + height: 30px;
  430 + float: right;
  431 + width: 3%;
818 432 }
819 433  
820 434 .divMoreActions > .btn-group {
821   - margin: 0px !important;
  435 + margin: 0px !important;
822 436 }
823 437  
824 438 .moreAccordion {
825   - height: 30px;
  439 + height: 30px;
  440 +}
  441 +
  442 +.moreAccordion button {
  443 + margin-bottom: 0px;
  444 + margin-top: 8px;
  445 +}
  446 +
  447 +.titleTopic {
  448 + padding-top: 10px;
  449 + padding-bottom: 10px;
  450 +}
  451 +
  452 +.titleTopic a:hover{
  453 + text-decoration: none;
826 454 }
827   -/*.divMoreActions div button {padding-left: 10px; padding-right: 10px; padding-bottom: 10px; margin-bottom: 4px; height: 31px;}*/
828 455  
829   -.moreAccordion button{margin-bottom: 0px; margin-top: 8px;}
830   -.titleTopic {padding-top: 10px; padding-bottom: 10px;}
831   -.titleTopic a h4, .titleTopic h4{color: white;}
832   -.titleTopic a:hover{text-decoration: none;}
833   -.Topic-detail a h4{color: black;}
834   -/* .titleTopic a h4 {margin-top: 0px; color: black; cursor:pointer;}*/
835 456 .dropdown-menu .pull-right {
836 457 right: 0;
837   - }
  458 +}
  459 +
838 460 .cards-content{
839   - padding-left: 0px; padding-right: 0px;
840   - font-family: Roboto;
841   - font-size: 18px;
  461 + padding-left: 0px;
  462 + padding-right: 0px;
  463 + font-family: Roboto;
  464 + font-size: 18px;
  465 +}
  466 +.cards-detail {
  467 + margin-left: 4%;
  468 +}
  469 +
  470 +.course, .subject, .topic {
  471 + padding-top: 0px;
  472 + padding-bottom: 0px;
  473 +}
  474 +.course-detail {
  475 + padding-top: 10px;
  476 + padding-bottom: 10px;
842 477 }
843   -.cards-detail{margin-left: 4%;}
844   -.cards-detail .panel .panel-heading{/*background-color:;*/}
845   -.cards-detail .panel .panel-heading h4{color:black;}
846   -.course, .subject, .topic{ padding-top: 0px; padding-bottom: 0px; }
847   -.course-detail{padding-top: 10px; padding-bottom: 10px;}
848 478  
849 479 .course-card{
850   - margin-bottom: 0.4% !important;
  480 + margin-bottom: 0.4% !important;
851 481 }
852 482  
853 483 .course-card-group{
854   - margin-bottom: 1%;
  484 + margin-bottom: 1%;
855 485 }
856   -.data_register_course p{ color: grey; }
857 486  
858   -.category-course-link{
  487 +.category-course-link {
859 488 font-size: 16px;
860   - color: #FFFFFF !important;
861 489 font-family: Roboto;
862 490 font-weight: normal;
863 491 }
... ... @@ -868,31 +496,30 @@ ul, li {
868 496  
869 497 /* Menu link remove radius */
870 498 .nav-pills > li > a {
871   - border-radius: 0px;
  499 + border-radius: 0px;
872 500 }
873 501  
874 502 .float-button{
875   - float: right;
876   - position: fixed;
877   - bottom: 5%;
878   - right: 5%;
879   - font-size: 20px;
  503 + float: right;
  504 + position: fixed;
  505 + bottom: 5%;
  506 + right: 5%;
  507 + font-size: 20px;
880 508 }
881 509  
882 510 /* === Amadeus settings*/
883 511 #panel2 .form-group{
884   - margin: 0;
  512 + margin: 0;
885 513 }
886 514  
887 515 #panel2 .col-md-2, #panel2 .col-md-10{
888   - padding-left: 0;
  516 + padding-left: 0;
889 517 }
890 518  
891 519 /* Profile */
892 520 .profile_function {
893 521 padding-bottom: 7px;
894 522 font-size: 16px;
895   - border-bottom: 1px solid #D2D2D2;
896 523 }
897 524 /* End Profile */
898 525  
... ... @@ -903,13 +530,11 @@ ul, li {
903 530  
904 531 .bottom-menu {
905 532 position: fixed;
906   - bottom: 0px;
907   - background: #F5F5F5;
  533 + bottom: 0px;
908 534 width: 100%;
909 535 padding: 0px 30px;
910 536 z-index: 999;
911 537 height: 50px;
912   - background: #26A69A;
913 538 }
914 539  
915 540 .mobile-menu {
... ... @@ -921,65 +546,61 @@ ul, li {
921 546 }
922 547  
923 548 .mobile-menu .item {
924   - color: #FFFFFF;
925   - background: #26A69A;
926 549 padding-top: 3px;
927 550 text-align: center;
928 551 height: 50px;
929 552 width: 55px;
930 553 font-size: 35px;
931 554 }
932   -
933   -.mobile-menu .item a{
934   - color: white;
935   -}
936   -
937   -.mobile-menu > .subjects_menu_active {
938   - background-color: #00695C;
939   -}
940   -
941   -.mobile-menu > .item:hover{
942   - background-color: #00695C;
943   -}
944 555 /* End Bottom Menu */
945 556  
946   -
947   -
948 557 /* subjects app starts*/
949   -
950   -.access-subject{
951   - background-color: #2eb82e !important;
952   - color: white;
953   - border: none;
  558 +.access-subject {
  559 + border: none;
954 560 }
955 561  
956   -.subscribe-subject{
957   - background-color: #33cc33 !important;
958   - color:white;
959   - border:none;
  562 +.subscribe-subject {
  563 + border:none;
960 564 }
961   -
962   -
963 565 /* subjects app ends */
964 566  
965 567 /* Themes */
966 568 .page_selector h4 {
967 569 margin-bottom: 20px;
968   - border-bottom: 1px solid #e5e5e5;
969 570 }
970 571 .page_selector:hover, .page_selector:focus {
971 572 text-decoration: none;
972 573 }
973 574  
974   -.filedrag{
  575 +.filedrag {
975 576 display: none;
976 577 font-weight: bold;
977 578 text-align: center;
978 579 padding: 1em 0;
979 580 margin: 1em 0;
980   - color: #555;
981   - border: 2px dashed #555;
982 581 border-radius: 7px;
983 582 cursor: pointer;
984 583 }
985   -/* End Themes */
986 584 \ No newline at end of file
  585 +
  586 +.theme_img {
  587 + width: 100%;
  588 +}
  589 +/* End Themes */
  590 +
  591 +.footer {
  592 + position: relative;
  593 + bottom: 0px;
  594 + padding: 30px 30px;
  595 + width: 100%;
  596 + margin-top: 15px;
  597 + font-family: Roboto;
  598 + font-size: 16px;
  599 +}
  600 +.footer p {
  601 + margin: 0px;
  602 +}
  603 +
  604 +.form-group input[type=file] {
  605 + margin-top: 20px;
  606 + height: initial;
  607 +}
987 608 \ No newline at end of file
... ...
amadeus/static/css/themes/black.css 0 → 100644
... ... @@ -0,0 +1,270 @@
  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 +
  5 +a, a:focus, a:hover {
  6 + color: #444444;
  7 +}
  8 +
  9 +.radio input[type=radio]:checked~.check, label.radio-inline input[type=radio]:checked~.check {
  10 + background-color: #444444;
  11 +}
  12 +
  13 +.radio input[type=radio]:checked~.circle, label.radio-inline input[type=radio]:checked~.circle {
  14 + border-color: #444444;
  15 +}
  16 +
  17 +.pagination > .active > a, .pagination > .active > span, .pagination > .active > a:hover, .pagination > .active > span:hover, .pagination > .active > a:focus, .pagination > .active > span:focus {
  18 + color: #fff;
  19 + background-color: #337ab7;
  20 + border-color: #337ab7;
  21 +}
  22 +
  23 +.navbar, .navbar.navbar-default {
  24 + background-color: #444444;
  25 + color: rgba(255,255,255,.84);
  26 +}
  27 +
  28 +.my-subjects-title {
  29 + color: #555555;
  30 +}
  31 +
  32 +#sidebar-menu .item {
  33 + background-color: #555555;
  34 + color: white;
  35 +}
  36 +
  37 +#sidebar-menu .item a{
  38 + color: white;
  39 +}
  40 +
  41 +#sidebar-menu > .subjects_menu_active {
  42 + background-color: #333333;
  43 +}
  44 +
  45 +#sidebar-menu > .item:hover{
  46 + background-color: #333333;
  47 +}
  48 +
  49 +.panel-invisible{
  50 + background-color: #BDBDBD !important;
  51 + color: #F5F5F5;
  52 +}
  53 +
  54 +.category-panel > .panel-heading {
  55 + background-color: #666666 !important;
  56 +}
  57 +
  58 +.subject-panel > .panel-heading {
  59 + background-color: #777777 !important;
  60 +}
  61 +
  62 +.category-header i {
  63 + color: white;
  64 +}
  65 +
  66 +.category-header i:hover{
  67 + color: #90CAF9;
  68 +}
  69 +
  70 +.category-header .dropdown-menu i {
  71 + color: inherit;
  72 +}
  73 +
  74 +#create-category {
  75 + background-color: #66BB6A;
  76 + color: #FFFFFF;
  77 +}
  78 +
  79 +.category-panel-content {
  80 + background: #F5F5F5;
  81 +}
  82 +
  83 +.core-subjects-options li {
  84 + background-color: #FFFFFF;
  85 + border-bottom-color: #D2D2D2;
  86 + color: #A0A0A0;
  87 +}
  88 +
  89 +.core-subjects-options li.active {
  90 + color: inherit;
  91 + border-bottom-color: #333333;
  92 +}
  93 +
  94 +.create-subject-btn {
  95 + background-color: #000000;
  96 + color: white;
  97 +}
  98 +
  99 +#coordinators_accordion .panel-heading, #professors_accordion .panel-heading {
  100 + background: #FFFFFF;
  101 +}
  102 +
  103 +.navbar-brand:hover {
  104 + background: #333333 !important;
  105 +}
  106 +
  107 +.navbar .project_name {
  108 + color: white;
  109 +}
  110 +
  111 +.navbar-nav li.open {
  112 + background: #333333;
  113 +}
  114 +
  115 +.navbar-nav li > a:hover {
  116 + background: #333333 !important;
  117 +}
  118 +
  119 +.navbar-nav li.settings_menu_active {
  120 + background: #333333
  121 +}
  122 +
  123 +.top-search {
  124 + color: #F5F5F5;
  125 +}
  126 +
  127 +#btn-search:hover {
  128 + background: #333333;
  129 +}
  130 +
  131 +.dropdown-menu {
  132 + background: #F5F5F5;
  133 +}
  134 +
  135 +.dropdown-menu li > a {
  136 + background: #F5F5F5;
  137 + color: #333333;
  138 +}
  139 +
  140 +.dropdown-menu li > a:hover {
  141 + background: #EEEEEE !important;
  142 +}
  143 +
  144 +#system_accordion > .panel > .panel-heading {
  145 + background: #F5F5F5;
  146 +}
  147 +
  148 +#system_accordion > .panel > .panel-heading:hover {
  149 + background: #EEEEEE;
  150 +}
  151 +
  152 +#system_accordion > .panel > .panel-heading > a > .panel-title {
  153 + color: #333333;
  154 +}
  155 +
  156 +#system_accordion > .panel > .panel-heading > a > .panel-title:hover {
  157 + color: #444444;
  158 +}
  159 +
  160 +#system_accordion > .panel > .panel-heading > a:hover {
  161 + color: #444444;
  162 +}
  163 +
  164 +#system_menu {
  165 + background: #F5F5F5;
  166 +}
  167 +
  168 +.modal-header {
  169 + border-bottom: 1px solid #E6E7E8 !important;
  170 +}
  171 +
  172 +.modal-footer {
  173 + border-top: 1px solid #E6E7E8 !important;
  174 +}
  175 +
  176 +#horizontal-line{
  177 + background-color: black;
  178 +}
  179 +
  180 +.breadcrumb > li > span.divider {
  181 + color: #000000;
  182 +}
  183 +
  184 +.breadcrumb > li > a{
  185 + color: #000000;
  186 +}
  187 +
  188 +.breadcrumb > li {
  189 + color: #BDBDBD;
  190 +}
  191 +
  192 +.panel-title{ /*Because we use an outer a tag*/
  193 + color: rgba(255,255,255,.84);
  194 +}
  195 +
  196 +.accordion {
  197 + background: white;
  198 +}
  199 +
  200 +.accordion_list {
  201 + background: #F5F5F5;
  202 +}
  203 +
  204 +.outside-title {
  205 + color: #43a251;
  206 +}
  207 +
  208 +.titleTopic a h4, .titleTopic h4 {
  209 + color: white;
  210 +}
  211 +
  212 +.Topic-detail a h4{
  213 + color: black;
  214 +}
  215 +
  216 +.cards-detail .panel .panel-heading h4 {
  217 + color:black;
  218 +}
  219 +
  220 +.data_register_course p {
  221 + color: grey;
  222 +}
  223 +
  224 +.category-course-link {
  225 + color: #FFFFFF !important;
  226 +}
  227 +
  228 +.profile_function {
  229 + border-bottom: 1px solid #D2D2D2;
  230 +}
  231 +
  232 +.bottom-menu {
  233 + background: #000000;
  234 +}
  235 +
  236 +.mobile-menu .item {
  237 + color: #FFFFFF;
  238 + background: #000000;
  239 +}
  240 +
  241 +.mobile-menu .item a {
  242 + color: white;
  243 +}
  244 +
  245 +.mobile-menu > .subjects_menu_active {
  246 + background-color: #333333;
  247 +}
  248 +
  249 +.mobile-menu > .item:hover{
  250 + background-color: #333333;
  251 +}
  252 +
  253 +.access-subject {
  254 + background-color: #2eb82e !important;
  255 + color: white;
  256 +}
  257 +
  258 +.page_selector h4 {
  259 + border-bottom: 1px solid #e5e5e5;
  260 +}
  261 +
  262 +.subscribe-subject {
  263 + background-color: #33cc33 !important;
  264 + color:white;
  265 +}
  266 +
  267 +.filedrag {
  268 + color: #555;
  269 + border: 2px dashed #555;
  270 +}
0 271 \ No newline at end of file
... ...
amadeus/static/css/themes/green.css 0 → 100644
... ... @@ -0,0 +1,275 @@
  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 +
  5 +a, a:focus, a:hover {
  6 + color: #009688;
  7 +}
  8 +
  9 +.radio input[type=radio]:checked~.check, label.radio-inline input[type=radio]:checked~.check {
  10 + background-color: #009688;
  11 +}
  12 +
  13 +.radio input[type=radio]:checked~.circle, label.radio-inline input[type=radio]:checked~.circle {
  14 + border-color: #009688;
  15 +}
  16 +
  17 +.pagination > .active > a, .pagination > .active > span, .pagination > .active > a:hover, .pagination > .active > span:hover, .pagination > .active > a:focus, .pagination > .active > span:focus {
  18 + color: #fff;
  19 + background-color: #337ab7;
  20 + border-color: #337ab7;
  21 +}
  22 +
  23 +.navbar, .navbar.navbar-default {
  24 + background-color: #009688;
  25 + color: rgba(255,255,255,.84);
  26 +}
  27 +
  28 +.my-subjects-title {
  29 + color: #26A69A;
  30 +}
  31 +
  32 +#sidebar-menu .item {
  33 + background-color: #26A69A;
  34 + color: white;
  35 +}
  36 +
  37 +#sidebar-menu .item a{
  38 + color: white;
  39 +}
  40 +
  41 +#sidebar-menu > .subjects_menu_active {
  42 + background-color: #00695C;
  43 +}
  44 +
  45 +#sidebar-menu > .item:hover{
  46 + background-color: #00695C;
  47 +}
  48 +
  49 +.panel-invisible{
  50 + background-color: #BDBDBD !important;
  51 + color: #F5F5F5;
  52 +}
  53 +
  54 +.category-panel > .panel-heading {
  55 + background-color: #0277BD !important;
  56 +}
  57 +
  58 +.subject-panel > .panel-heading {
  59 + background-color: #039BE5 !important;
  60 +}
  61 +
  62 +.category-header i {
  63 + color: white;
  64 +}
  65 +
  66 +.category-header i:hover{
  67 + color: #90CAF9;
  68 +}
  69 +
  70 +.category-header .dropdown-menu i {
  71 + color: inherit;
  72 +}
  73 +
  74 +#create-category {
  75 + background-color: #66BB6A;
  76 + color: #FFFFFF;
  77 +}
  78 +
  79 +.category-panel-content {
  80 + background: #F5F5F5;
  81 +}
  82 +
  83 +.core-subjects-options li {
  84 + background-color: #FFFFFF;
  85 + border-bottom-color: #D2D2D2;
  86 + color: #A0A0A0;
  87 +}
  88 +
  89 +.core-subjects-options li.active {
  90 + color: inherit;
  91 + border-bottom-color: #00695C;
  92 +}
  93 +
  94 +.create-subject-btn {
  95 + background-color: #26A69A;
  96 + color: white;
  97 +}
  98 +
  99 +#coordinators_accordion .panel-heading, #professors_accordion .panel-heading {
  100 + background: #FFFFFF;
  101 +}
  102 +
  103 +.navbar-brand:hover {
  104 + background: #00695C !important;
  105 +}
  106 +
  107 +.navbar .project_name {
  108 + color: white;
  109 +}
  110 +
  111 +.navbar-nav li.open {
  112 + background: #00695C;
  113 +}
  114 +
  115 +.navbar-nav li > a:hover {
  116 + background: #00695C !important;
  117 +}
  118 +
  119 +.navbar-nav li.settings_menu_active {
  120 + background: #00695C
  121 +}
  122 +
  123 +.top-search {
  124 + color: #F5F5F5;
  125 +}
  126 +
  127 +#btn-search:hover {
  128 + background: #00695C;
  129 +}
  130 +
  131 +.dropdown-menu {
  132 + background: #F5F5F5;
  133 +}
  134 +
  135 +.dropdown-menu li > a {
  136 + background: #F5F5F5;
  137 + color: #333333;
  138 +}
  139 +
  140 +.dropdown-menu li > a:hover {
  141 + background: #EEEEEE !important;
  142 +}
  143 +
  144 +#system_accordion > .panel > .panel-heading {
  145 + background: #F5F5F5;
  146 +}
  147 +
  148 +#system_accordion > .panel > .panel-heading:hover {
  149 + background: #EEEEEE;
  150 +}
  151 +
  152 +#system_accordion > .panel > .panel-heading > a > .panel-title {
  153 + color: #333333;
  154 +}
  155 +
  156 +#system_accordion > .panel > .panel-heading > a > .panel-title:hover {
  157 + color: #009688;
  158 +}
  159 +
  160 +#system_accordion > .panel > .panel-heading > a:hover {
  161 + color: #009688;
  162 +}
  163 +
  164 +#system_menu {
  165 + background: #F5F5F5;
  166 +}
  167 +
  168 +.modal-header {
  169 + border-bottom: 1px solid #E6E7E8 !important;
  170 +}
  171 +
  172 +.modal-footer {
  173 + border-top: 1px solid #E6E7E8 !important;
  174 +}
  175 +
  176 +#horizontal-line{
  177 + background-color: black;
  178 +}
  179 +
  180 +.breadcrumb > li > span.divider {
  181 + color: #26A69A;
  182 +}
  183 +
  184 +.breadcrumb > li > a{
  185 + color: #26A69A;
  186 +}
  187 +
  188 +.breadcrumb > li {
  189 + color: #BDBDBD;
  190 +}
  191 +
  192 +.panel-title{ /*Because we use an outer a tag*/
  193 + color: rgba(255,255,255,.84);
  194 +}
  195 +
  196 +.accordion {
  197 + background: white;
  198 +}
  199 +
  200 +.accordion_list {
  201 + background: #F5F5F5;
  202 +}
  203 +
  204 +.outside-title {
  205 + color: #43a251;
  206 +}
  207 +
  208 +.titleTopic a h4, .titleTopic h4 {
  209 + color: white;
  210 +}
  211 +
  212 +.Topic-detail a h4{
  213 + color: black;
  214 +}
  215 +
  216 +.cards-detail .panel .panel-heading h4 {
  217 + color:black;
  218 +}
  219 +
  220 +.data_register_course p {
  221 + color: grey;
  222 +}
  223 +
  224 +.category-course-link {
  225 + color: #FFFFFF !important;
  226 +}
  227 +
  228 +.profile_function {
  229 + border-bottom: 1px solid #D2D2D2;
  230 +}
  231 +
  232 +.bottom-menu {
  233 + background: #26A69A;
  234 +}
  235 +
  236 +.mobile-menu .item {
  237 + color: #FFFFFF;
  238 + background: #26A69A;
  239 +}
  240 +
  241 +.mobile-menu .item a {
  242 + color: white;
  243 +}
  244 +
  245 +.mobile-menu > .subjects_menu_active {
  246 + background-color: #00695C;
  247 +}
  248 +
  249 +.mobile-menu > .item:hover{
  250 + background-color: #00695C;
  251 +}
  252 +
  253 +.access-subject {
  254 + background-color: #2eb82e !important;
  255 + color: white;
  256 +}
  257 +
  258 +.page_selector h4 {
  259 + border-bottom: 1px solid #e5e5e5;
  260 +}
  261 +
  262 +.subscribe-subject {
  263 + background-color: #33cc33 !important;
  264 + color:white;
  265 +}
  266 +
  267 +.filedrag {
  268 + color: #555;
  269 + border: 2px dashed #555;
  270 +}
  271 +
  272 +.footer {
  273 + color: #FFFFFF;
  274 + background: #26A69A;
  275 +}
0 276 \ No newline at end of file
... ...
amadeus/static/css/themes/red.css 0 → 100644
... ... @@ -0,0 +1,270 @@
  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 +
  5 +a, a:focus, a:hover {
  6 + color: #7B241C;
  7 +}
  8 +
  9 +.radio input[type=radio]:checked~.check, label.radio-inline input[type=radio]:checked~.check {
  10 + background-color: #7B241C;
  11 +}
  12 +
  13 +.radio input[type=radio]:checked~.circle, label.radio-inline input[type=radio]:checked~.circle {
  14 + border-color: #7B241C;
  15 +}
  16 +
  17 +.pagination > .active > a, .pagination > .active > span, .pagination > .active > a:hover, .pagination > .active > span:hover, .pagination > .active > a:focus, .pagination > .active > span:focus {
  18 + color: #fff;
  19 + background-color: #337ab7;
  20 + border-color: #337ab7;
  21 +}
  22 +
  23 +.navbar, .navbar.navbar-default {
  24 + background-color: #7B241C;
  25 + color: rgba(255,255,255,.84);
  26 +}
  27 +
  28 +.my-subjects-title {
  29 + color: #B03A2E;
  30 +}
  31 +
  32 +#sidebar-menu .item {
  33 + background-color: #B03A2E;
  34 + color: white;
  35 +}
  36 +
  37 +#sidebar-menu .item a{
  38 + color: white;
  39 +}
  40 +
  41 +#sidebar-menu > .subjects_menu_active {
  42 + background-color: #641E16;
  43 +}
  44 +
  45 +#sidebar-menu > .item:hover{
  46 + background-color: #641E16;
  47 +}
  48 +
  49 +.panel-invisible{
  50 + background-color: #BDBDBD !important;
  51 + color: #F5F5F5;
  52 +}
  53 +
  54 +.category-panel > .panel-heading {
  55 + background-color: #666666 !important;
  56 +}
  57 +
  58 +.subject-panel > .panel-heading {
  59 + background-color: #777777 !important;
  60 +}
  61 +
  62 +.category-header i {
  63 + color: white;
  64 +}
  65 +
  66 +.category-header i:hover{
  67 + color: #90CAF9;
  68 +}
  69 +
  70 +.category-header .dropdown-menu i {
  71 + color: inherit;
  72 +}
  73 +
  74 +#create-category {
  75 + background-color: #66BB6A;
  76 + color: #FFFFFF;
  77 +}
  78 +
  79 +.category-panel-content {
  80 + background: #F5F5F5;
  81 +}
  82 +
  83 +.core-subjects-options li {
  84 + background-color: #FFFFFF;
  85 + border-bottom-color: #D2D2D2;
  86 + color: #A0A0A0;
  87 +}
  88 +
  89 +.core-subjects-options li.active {
  90 + color: inherit;
  91 + border-bottom-color: #641E16;
  92 +}
  93 +
  94 +.create-subject-btn {
  95 + background-color: #B03A2E;
  96 + color: white;
  97 +}
  98 +
  99 +#coordinators_accordion .panel-heading, #professors_accordion .panel-heading {
  100 + background: #FFFFFF;
  101 +}
  102 +
  103 +.navbar-brand:hover {
  104 + background: #641E16 !important;
  105 +}
  106 +
  107 +.navbar .project_name {
  108 + color: white;
  109 +}
  110 +
  111 +.navbar-nav li.open {
  112 + background: #641E16;
  113 +}
  114 +
  115 +.navbar-nav li > a:hover {
  116 + background: #641E16 !important;
  117 +}
  118 +
  119 +.navbar-nav li.settings_menu_active {
  120 + background: #641E16;
  121 +}
  122 +
  123 +.top-search {
  124 + color: #F5F5F5;
  125 +}
  126 +
  127 +#btn-search:hover {
  128 + background: #641E16;
  129 +}
  130 +
  131 +.dropdown-menu {
  132 + background: #F5F5F5;
  133 +}
  134 +
  135 +.dropdown-menu li > a {
  136 + background: #F5F5F5;
  137 + color: #333333;
  138 +}
  139 +
  140 +.dropdown-menu li > a:hover {
  141 + background: #EEEEEE !important;
  142 +}
  143 +
  144 +#system_accordion > .panel > .panel-heading {
  145 + background: #F5F5F5;
  146 +}
  147 +
  148 +#system_accordion > .panel > .panel-heading:hover {
  149 + background: #EEEEEE;
  150 +}
  151 +
  152 +#system_accordion > .panel > .panel-heading > a > .panel-title {
  153 + color: #333333;
  154 +}
  155 +
  156 +#system_accordion > .panel > .panel-heading > a > .panel-title:hover {
  157 + color: #7B241C;
  158 +}
  159 +
  160 +#system_accordion > .panel > .panel-heading > a:hover {
  161 + color: #7B241C;
  162 +}
  163 +
  164 +#system_menu {
  165 + background: #F5F5F5;
  166 +}
  167 +
  168 +.modal-header {
  169 + border-bottom: 1px solid #E6E7E8 !important;
  170 +}
  171 +
  172 +.modal-footer {
  173 + border-top: 1px solid #E6E7E8 !important;
  174 +}
  175 +
  176 +#horizontal-line{
  177 + background-color: black;
  178 +}
  179 +
  180 +.breadcrumb > li > span.divider {
  181 + color: #B03A2E;
  182 +}
  183 +
  184 +.breadcrumb > li > a{
  185 + color: #B03A2E;
  186 +}
  187 +
  188 +.breadcrumb > li {
  189 + color: #BDBDBD;
  190 +}
  191 +
  192 +.panel-title{ /*Because we use an outer a tag*/
  193 + color: rgba(255,255,255,.84);
  194 +}
  195 +
  196 +.accordion {
  197 + background: white;
  198 +}
  199 +
  200 +.accordion_list {
  201 + background: #F5F5F5;
  202 +}
  203 +
  204 +.outside-title {
  205 + color: #43a251;
  206 +}
  207 +
  208 +.titleTopic a h4, .titleTopic h4 {
  209 + color: white;
  210 +}
  211 +
  212 +.Topic-detail a h4{
  213 + color: black;
  214 +}
  215 +
  216 +.cards-detail .panel .panel-heading h4 {
  217 + color:black;
  218 +}
  219 +
  220 +.data_register_course p {
  221 + color: grey;
  222 +}
  223 +
  224 +.category-course-link {
  225 + color: #FFFFFF !important;
  226 +}
  227 +
  228 +.profile_function {
  229 + border-bottom: 1px solid #D2D2D2;
  230 +}
  231 +
  232 +.bottom-menu {
  233 + background: #B03A2E;
  234 +}
  235 +
  236 +.mobile-menu .item {
  237 + color: #FFFFFF;
  238 + background: #B03A2E;
  239 +}
  240 +
  241 +.mobile-menu .item a {
  242 + color: white;
  243 +}
  244 +
  245 +.mobile-menu > .subjects_menu_active {
  246 + background-color: #641E16;
  247 +}
  248 +
  249 +.mobile-menu > .item:hover{
  250 + background-color: #641E16;
  251 +}
  252 +
  253 +.access-subject {
  254 + background-color: #2eb82e !important;
  255 + color: white;
  256 +}
  257 +
  258 +.page_selector h4 {
  259 + border-bottom: 1px solid #e5e5e5;
  260 +}
  261 +
  262 +.subscribe-subject {
  263 + background-color: #33cc33 !important;
  264 + color:white;
  265 +}
  266 +
  267 +.filedrag {
  268 + color: #555;
  269 + border: 2px dashed #555;
  270 +}
0 271 \ No newline at end of file
... ...
amadeus/static/img/amadeus.png

105 KB

amadeus/static/img/favicon_amadeus.png 0 → 100755

47.7 KB

amadeus/static/img/logo_grande_amadeus.png 0 → 100755

105 KB

amadeus/static/img/logo_pequena_amadeus.png 0 → 100755

990 Bytes

amadeus/static/img/themes/black.png 0 → 100644

69 KB

amadeus/static/img/themes/green.png 0 → 100644

69.3 KB

amadeus/static/img/themes/red.png 0 → 100644

71.4 KB

amadeus/static/img/topo-amadeus-white.png

990 Bytes

amadeus/static/img/topo-amadeus.png

47.7 KB

amadeus/static/js/themes.js
... ... @@ -8,10 +8,12 @@ if (window.File && window.FileList && window.FileReader) {
8 8 function Init() {
9 9 var small = $("#id_small_logo"),
10 10 large = $("#id_large_logo"),
  11 + fav = $("#id_favicon"),
11 12 filedrag = $(".filedrag"),
12 13 common = $(".common-file-input");
13 14  
14 15 // file select
  16 + fav.on("change", FileSelectHandler);
15 17 small.on("change", FileSelectHandler);
16 18 large.on("change", FileSelectHandler);
17 19  
... ...
amadeus/templates/base.html
1 1 <!DOCTYPE html>
2 2  
3   -{% load static i18n %}
4   -{% load static i18n permission_tags django_bootstrap_breadcrumbs %}
  3 +{% load static i18n django_bootstrap_breadcrumbs %}
5 4 {% get_current_language as LANGUAGE_CODE %}
6 5  
7 6 <html>
8 7 <head>
9   - <title>{{ title }} | Amadeus</title>
  8 + <title>{{ title }} | {{ theme.title }}</title>
10 9  
11 10 <!-- jQuery & jQuery UI -->
12 11 <script type="text/javascript" src="{% static 'js/jquery-3.1.0.min.js' %}"></script>
13 12 <script type="text/javascript" src="{% static 'js/jquery-ui.js' %}"></script>
14 13  
15 14 <meta http-equiv="Cache-Control" content="no-cache, no-store" />
16   - <link href="{% static 'img/topo-amadeus.png' %}" rel="shortcut icon" />
  15 + <link href="{{ theme.favicon }}" rel="shortcut icon" />
17 16 <!-- Roboto font -->
18 17 <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:300,400,500,700" type="text/css">
19 18 <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
... ... @@ -47,6 +46,7 @@
47 46 <!-- Custom styles -->
48 47 <link rel="stylesheet" type="text/css" href="{% static 'css/base/amadeus_responsive.css' %}">
49 48 <link rel="stylesheet" type="text/css" href="{% static 'css/base/amadeus.css' %}">
  49 +
50 50  
51 51 <!--Javascript block for specific-app ones -->
52 52 <script src="{% static 'js/base/amadeus.js' %}"></script>
... ... @@ -59,6 +59,9 @@
59 59 <!-- Summernote -->
60 60 <script src="{% static 'summernote/summernote.js' %}" type="text/javascript"></script>
61 61 <link href="{% static 'summernote/summernote.css' %}" type="text/css" rel="stylesheet" />
  62 + {% with 'css/themes/'|add:theme.css_style|add:'.css' as theme_selected %}
  63 + <link rel="stylesheet" type="text/css" href="{% static theme_selected %}">
  64 + {% endwith %}
62 65  
63 66 </head>
64 67 <body>
... ... @@ -71,8 +74,8 @@
71 74 <span class="icon-bar"></span>
72 75 </button>
73 76 <a class="navbar-brand" href="{% url 'subjects:home' %}">
74   - <img class="logo pull-left" src="{% static 'img/topo-amadeus-white.png' %}" alt="Logo" />
75   - <span class="pull-right project_name">Projeto Amadeus</span>
  77 + <img class="logo pull-left" src="{{ theme.small_logo_url }}" alt="Logo" />
  78 + <span class="pull-right project_name">{{ theme.title }}</span>
76 79 </a>
77 80 </div>
78 81 <div class="navbar-collapse collapse navbar-responsive-collapse">
... ... @@ -184,6 +187,9 @@
184 187 </div>
185 188 </div>
186 189  
  190 + {% block footer %}
  191 + {% endblock %}
  192 +
187 193 {% block bottommenu %}
188 194 <div class="clearfix visible-xs visible-sm"></div>
189 195 <div class="bottom-menu visible-xs visible-sm">
... ...
mailsender/templates/mailsender/update.html
... ... @@ -16,6 +16,12 @@
16 16 <form method="post" action="" enctype="multipart/form-data">
17 17 {% csrf_token %}
18 18 <legend>{% trans 'General server settings' %}</legend>
  19 + <em>
  20 + {% trans 'If your email host is Gmail make sure to turn on the option "Allow less secure apps" in' %}:
  21 + <b><a href="https://www.google.com/settings/security/lesssecureapps">https://www.google.com/settings/security/lesssecureapps</a></b>
  22 + </em>
  23 + <br clear="all" />
  24 + <br clear="all" />
19 25 {% for field in form %}
20 26 {% if field.auto_id == 'id_username' %}
21 27 <br clear="all" />
... ...
security/migrations/0003_auto_20170112_1408.py 0 → 100644
... ... @@ -0,0 +1,20 @@
  1 +# -*- coding: utf-8 -*-
  2 +# Generated by Django 1.10 on 2017-01-12 17:08
  3 +from __future__ import unicode_literals
  4 +
  5 +from django.db import migrations, models
  6 +
  7 +
  8 +class Migration(migrations.Migration):
  9 +
  10 + dependencies = [
  11 + ('security', '0002_auto_20170110_1807'),
  12 + ]
  13 +
  14 + operations = [
  15 + migrations.AlterField(
  16 + model_name='security',
  17 + name='maintence',
  18 + field=models.BooleanField(default=False, verbose_name='Put system in maintenance mode'),
  19 + ),
  20 + ]
... ...
subjects/migrations/0012_auto_20170112_1408.py 0 → 100644
... ... @@ -0,0 +1,19 @@
  1 +# -*- coding: utf-8 -*-
  2 +# Generated by Django 1.10 on 2017-01-12 17:08
  3 +from __future__ import unicode_literals
  4 +
  5 +from django.db import migrations
  6 +
  7 +
  8 +class Migration(migrations.Migration):
  9 +
  10 + dependencies = [
  11 + ('subjects', '0011_auto_20170110_1446'),
  12 + ]
  13 +
  14 + operations = [
  15 + migrations.AlterModelOptions(
  16 + name='subject',
  17 + options={'ordering': ['name'], 'verbose_name': 'Subject', 'verbose_name_plural': 'Subjects'},
  18 + ),
  19 + ]
... ...
themes/forms.py
... ... @@ -4,10 +4,47 @@ from django import forms
4 4 from .models import Themes
5 5  
6 6 class BasicElemetsForm(forms.ModelForm):
  7 + MAX_UPLOAD_SIZE = 2*1024*1024
  8 +
  9 + def clean_favicon(self):
  10 + image = self.cleaned_data.get('favicon', False)
  11 +
  12 + if image:
  13 + if hasattr(image, '_size'):
  14 + if image._size > self.MAX_UPLOAD_SIZE:
  15 + self._errors['favicon'] = [_("The image is too large. It should have less than 2MB.")]
  16 +
  17 + return ValueError
  18 +
  19 + return image
  20 +
  21 + def clean_small_logo(self):
  22 + image = self.cleaned_data.get('small_logo', False)
  23 +
  24 + if image:
  25 + if hasattr(image, '_size'):
  26 + if image._size > self.MAX_UPLOAD_SIZE:
  27 + self._errors['small_logo'] = [_("The image is too large. It should have less than 2MB.")]
  28 +
  29 + return ValueError
  30 +
  31 + return image
  32 +
  33 + def clean_large_logo(self):
  34 + image = self.cleaned_data.get('large_logo', False)
  35 +
  36 + if image:
  37 + if hasattr(image, '_size'):
  38 + if image._size > self.MAX_UPLOAD_SIZE:
  39 + self._errors['large_logo'] = [_("The image is too large. It should have less than 2MB.")]
  40 +
  41 + return ValueError
  42 +
  43 + return image
7 44  
8 45 class Meta:
9 46 model = Themes
10   - fields = ['title', 'small_logo', 'large_logo', 'footer_note']
  47 + fields = ['title', 'favicon', 'small_logo', 'large_logo', 'footer_note']
11 48  
12 49 class CSSStyleForm(forms.ModelForm):
13 50  
... ...
themes/migrations/0003_auto_20170112_1408.py 0 → 100644
... ... @@ -0,0 +1,20 @@
  1 +# -*- coding: utf-8 -*-
  2 +# Generated by Django 1.10 on 2017-01-12 17:08
  3 +from __future__ import unicode_literals
  4 +
  5 +from django.db import migrations, models
  6 +
  7 +
  8 +class Migration(migrations.Migration):
  9 +
  10 + dependencies = [
  11 + ('themes', '0002_auto_20170110_1809'),
  12 + ]
  13 +
  14 + operations = [
  15 + migrations.AlterField(
  16 + model_name='themes',
  17 + name='css_style',
  18 + field=models.CharField(choices=[('green', 'Green'), ('red', 'Red'), ('black', 'Black')], default='green', max_length=50, verbose_name='Css Style'),
  19 + ),
  20 + ]
... ...
themes/migrations/0004_themes_favicon.py 0 → 100644
... ... @@ -0,0 +1,21 @@
  1 +# -*- coding: utf-8 -*-
  2 +# Generated by Django 1.10 on 2017-01-12 20:42
  3 +from __future__ import unicode_literals
  4 +
  5 +from django.db import migrations, models
  6 +import themes.models
  7 +
  8 +
  9 +class Migration(migrations.Migration):
  10 +
  11 + dependencies = [
  12 + ('themes', '0003_auto_20170112_1408'),
  13 + ]
  14 +
  15 + operations = [
  16 + migrations.AddField(
  17 + model_name='themes',
  18 + name='favicon',
  19 + field=models.ImageField(blank=True, default='favicon_amadeus.png', upload_to='themes/', validators=[themes.models.validate_img_extension], verbose_name='Favicon'),
  20 + ),
  21 + ]
... ...
themes/models.py
1 1 from django.db import models
2 2 from django.utils.translation import ugettext_lazy as _
  3 +from django.contrib.staticfiles.templatetags.staticfiles import static
3 4  
4 5 def validate_img_extension(value):
5 6 valid_formats = ['image/jpeg','image/x-citrix-jpeg','image/png','image/x-citrix-png','image/x-png']
... ... @@ -10,10 +11,11 @@ def validate_img_extension(value):
10 11  
11 12 class Themes(models.Model):
12 13 title = models.CharField(_("Title"), max_length = 200, default = "Projeto Amadeus")
  14 + favicon = models.ImageField(verbose_name = _("Favicon"), blank = True, upload_to = 'themes/', default = 'favicon_amadeus.png', validators = [validate_img_extension])
13 15 small_logo = models.ImageField(verbose_name = _("Small Logo"), blank = True, upload_to = 'themes/', default = 'logo_pequena_amadeus.png', validators = [validate_img_extension])
14 16 large_logo = models.ImageField(verbose_name = _("Large Logo"), blank = True, upload_to = 'themes/', default = 'logo_grande_amadeus.png', validators = [validate_img_extension])
15 17 footer_note = models.TextField(_("Footer Note"), blank = True)
16   - css_style = models.CharField(_("Css Style"), max_length = 50, default = "green")
  18 + css_style = models.CharField(_("Css Style"), max_length = 50, default = "green", choices = (("green", _('Green')), ("red", _('Red')), ("black", _('Black'))))
17 19  
18 20 class Meta:
19 21 verbose_name = _("Theme")
... ... @@ -21,3 +23,27 @@ class Themes(models.Model):
21 23  
22 24 def __str__(self):
23 25 return self.title
  26 +
  27 + @property
  28 + def favicon_url(self):
  29 + if self.favicon and hasattr(self.favicon, 'url'):
  30 + if self.favicon.url != 'favicon_amadeus.png':
  31 + return self.favicon.url
  32 +
  33 + return static('img/favicon_amadeus.png')
  34 +
  35 + @property
  36 + def small_logo_url(self):
  37 + if self.small_logo and hasattr(self.small_logo, 'url'):
  38 + if self.small_logo.url != 'logo_pequena_amadeus.png':
  39 + return self.small_logo.url
  40 +
  41 + return static('img/logo_pequena_amadeus.png')
  42 +
  43 + @property
  44 + def large_logo_url(self):
  45 + if self.large_logo and hasattr(self.large_logo, 'url'):
  46 + if self.large_logo.url != 'logo_grande_amadeus.png':
  47 + return self.large_logo.url
  48 +
  49 + return static('img/logo_grande_amadeus.png')
24 50 \ No newline at end of file
... ...
themes/templates/themes/basic_update.html
... ... @@ -19,14 +19,14 @@
19 19 {% csrf_token %}
20 20 {% for field in form %}
21 21 <div class="form-group{% if form.has_error %} has-error {% endif %} is-fileinput">
22   - {% if field.auto_id == 'id_small_logo' or field.auto_id == 'id_large_logo' %}
  22 + {% if field.auto_id == 'id_small_logo' or field.auto_id == 'id_large_logo' or field.auto_id == 'id_favicon' %}
23 23 {% if field.field.required %}
24 24 <label for="{{ field.auto_id }}">{{ field.label }} <span>*</span></label>
25 25 {% else %}
26 26 <label for="{{ field.auto_id }}">{{ field.label }}</label>
27 27 {% endif %}
28 28  
29   - {% render_field field class='form-control' %}
  29 + {% render_field field %}
30 30  
31 31 <div class="input-group common-file-input">
32 32 <input type="text" readonly="" class="form-control" placeholder="{% trans 'Choose your photo...' %}">
... ... @@ -36,7 +36,20 @@
36 36 </button>
37 37 </span>
38 38 </div>
39   - <div class="filedrag">{% trans 'Click or drop files here' %}</div>
  39 + <div class="filedrag">
  40 + {% trans 'Click or drop files here' %}<br />
  41 +
  42 + {% trans 'Recommended dimensions' %}:
  43 +
  44 + {% if field.auto_id == 'id_small_logo' %}
  45 + 927px x 955px <br />
  46 + <small>{% trans 'It is recommended to be a white image' %}</small>
  47 + {% elif field.auto_id == 'id_favicon' %}
  48 + 927px x 955px
  49 + {% else %}
  50 + 1286px x 955px
  51 + {% endif %}
  52 + </div>
40 53  
41 54 {% elif field.auto_id == 'id_footer_note' %}
42 55 {% if field.field.required %}
... ...
themes/templates/themes/css_update.html
... ... @@ -0,0 +1,78 @@
  1 +{% extends 'themes/index.html' %}
  2 +
  3 +{% load static i18n %}
  4 +{% load widget_tweaks %}
  5 +{% load django_bootstrap_breadcrumbs %}
  6 +
  7 +{% block breadcrumbs %}
  8 + {{ block.super }}
  9 + {% breadcrumb 'CSS Selector' 'themes:css' %}
  10 +{% endblock %}
  11 +
  12 +{% block content %}
  13 + <div class="card">
  14 + <div class="card-content">
  15 + <div class="card-body">
  16 + <a href="{% url 'themes:basic' %}" class="page_selector"><h4><i class="fa fa-angle-right"></i> {% trans 'Basic Elements' %}</h4></a>
  17 + <a href="{% url 'themes:css' %}" class="page_selector"><h4><i class="fa fa-angle-down"></i> {% trans 'CSS Selector' %}</h4></a>
  18 +
  19 + <form method="post" action="" enctype="multipart/form-data">
  20 + {% csrf_token %}
  21 + {% for field in form %}
  22 + <div class="form-group{% if form.has_error %} has-error {% endif %} is-fileinput">
  23 + {% if field.field.required %}
  24 + <label for="{{ field.auto_id }}">{{ field.label }} <span>*</span></label>
  25 + {% else %}
  26 + <label for="{{ field.auto_id }}">{{ field.label }}</label>
  27 + {% endif %}
  28 +
  29 + <br clear="all" />
  30 +
  31 + {% for radio in field %}
  32 + <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">
  34 + <span class="radio">
  35 + {{ radio }}
  36 + </span>
  37 + </div>
  38 + <div class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
  39 + {% with 'img/themes/'|add:radio.choice_value|add:'.png' as img_presentation %}
  40 + <img class="radio theme_img" src="{% static img_presentation %}" />
  41 + {% endwith %}
  42 + </div>
  43 + <div class="col-md-2 col-md-2 col-sm-2 col-xs-2">
  44 + {% with 'css/themes/'|add:radio.choice_value|add:'.css' as doc_presentation %}
  45 + <a class="radio" href="{% static doc_presentation %}" target="blank">{% trans 'Documentation' %}</a>
  46 + {% endwith %}
  47 + </div>
  48 + </label>
  49 + <br clear="all" />
  50 + {% endfor %}
  51 + </div>
  52 +
  53 + <span id="helpBlock" class="help-block">{{ field.help_text }}</span>
  54 + {% if field.errors %}
  55 + <div class="alert alert-danger alert-dismissible" role="alert">
  56 + <button type="button" class="close" data-dismiss="alert" aria-label="Close">
  57 + <span aria-hidden="true">&times;</span>
  58 + </button>
  59 + <ul>
  60 + {% for error in field.errors %}
  61 + <li>{{ error }}</li>
  62 + {% endfor %}
  63 + </ul>
  64 + </div>
  65 + {% endif %}
  66 + {% endfor %}
  67 + <div class="col-md-12 col-lg-12 col-sm-12 col-xs-12">
  68 + <div class="text-center">
  69 + <input type="submit" value="{% trans 'Save' %}" class="btn btn-raised btn-primary" />
  70 + </div>
  71 + </div>
  72 + </form>
  73 + </div>
  74 + </div>
  75 + </div>
  76 + <br clear="all" />
  77 + <br clear="all" />
  78 +{% endblock %}
0 79 \ No newline at end of file
... ...
users/templates/users/forgot_password.html
... ... @@ -15,7 +15,7 @@
15 15 {% block content %}
16 16 <div class="row">
17 17 <div class="col-lg-offset-1 col-md-offset-1">
18   - <img src="{% static 'img/amadeus.png' %}" class="img-responsive center-block logo-login logo-register" alt="logo amadeus">
  18 + <img src="{{ theme.large_logo_url }}" class="img-responsive center-block logo-login logo-register" alt="logo amadeus">
19 19 </div>
20 20 </div>
21 21  
... ...
users/templates/users/login.html
... ... @@ -15,7 +15,7 @@
15 15 {% block content %}
16 16 <div class="row">
17 17 <div class="col-lg-offset-1 col-md-offset-1">
18   - <img src="{% static 'img/amadeus.png' %}" class="img-responsive center-block logo-login " alt="logo amadeus">
  18 + <img src="{{ theme.large_logo_url }}" class="img-responsive center-block logo-login " alt="logo amadeus">
19 19 </div>
20 20 </div>
21 21  
... ... @@ -56,22 +56,34 @@
56 56 </form>
57 57 <div class="row">
58 58 <div class="col-lg-10 col-md-10 col-sm-10 col-lg-offset-1 col-md-offset-1 col-sm-offset-1">
59   - <div class="col-md-6 col-xs-6 col-sm-6 col-lg-6 text-center">
60   - <button type="submite" class="btn btn-success btn-raised btn-block" form="form-login" style="position: initial;"> {% trans 'Log in' %} </button>
61   - </div>
62 59 {% if not deny_register %}
63 60 <div class="col-md-6 col-xs-6 col-sm-6 col-lg-6 text-center">
  61 + <button type="submite" class="btn btn-success btn-raised btn-block" form="form-login" style="position: initial;"> {% trans 'Log in' %} </button>
  62 + </div>
  63 + <div class="col-md-6 col-xs-6 col-sm-6 col-lg-6 text-center">
64 64 <a class="btn btn-default btn-raised btn-block" href="{% url 'users:signup' %}" formaction="#" style="position: initial;">{% trans 'Sign Up' %}</a>
65 65 </div>
  66 + {% else %}
  67 + <div class="col-md-6 col-xs-6 col-sm-6 col-lg-6 col-lg-offset-3 col-md-offset-3 col-sm-offset-3 col-xs-offset-3 text-center">
  68 + <button type="submite" class="btn btn-success btn-raised btn-block" form="form-login" style="position: initial;"> {% trans 'Log in' %} </button>
  69 + </div>
66 70 {% endif %}
67 71 </div>
68 72 </div>
69 73 <div class="row">
70   - <div class="col-sm-offset-1 col-md-10 col-lg-10 col-sm-10 col-xs-12">
71   - <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 text-right forgotPassword">
72   - <a href="{% url 'users:forgot_pass' %}">{% trans 'Forgot your password?' %}</a>
  74 + {% if not deny_register %}
  75 + <div class="col-sm-offset-1 col-md-10 col-lg-10 col-sm-10 col-xs-12">
  76 + <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 text-right forgotPassword">
  77 + <a href="{% url 'users:forgot_pass' %}">{% trans 'Forgot your password?' %}</a>
  78 + </div>
73 79 </div>
74   - </div>
  80 + {% else %}
  81 + <div class="col-md-12 col-lg-12 col-sm-12 col-xs-12">
  82 + <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 text-center forgotPassword">
  83 + <a href="{% url 'users:forgot_pass' %}">{% trans 'Forgot your password?' %}</a>
  84 + </div>
  85 + </div>
  86 + {% endif %}
75 87 </div>
76 88 </div>
77 89 </div>
... ... @@ -79,5 +91,19 @@
79 91 </div>
80 92 {% endblock%}
81 93  
  94 +{% block footer %}
  95 + {% if theme.footer_note != '' and theme.footer_note != '<p><br></p>' %}
  96 + <div class="footer">
  97 + <div class="row">
  98 + <div class="col-md-12 text-center">
  99 + {% autoescape off %}
  100 + {{ theme.footer_note }}
  101 + {% endautoescape %}
  102 + </div>
  103 + </div>
  104 + </div>
  105 + {% endif %}
  106 +{% endblock %}
  107 +
82 108 {% block bottommenu %}
83 109 {% endblock %}
84 110 \ No newline at end of file
... ...
users/templates/users/new_password.html
... ... @@ -15,7 +15,7 @@
15 15 {% block content %}
16 16 <div class="row">
17 17 <div class="col-lg-offset-1 col-md-offset-1">
18   - <img src="{% static 'img/amadeus.png' %}" class="img-responsive center-block logo-login logo-register" alt="logo amadeus">
  18 + <img src="{{ theme.large_logo_url }}" class="img-responsive center-block logo-login logo-register" alt="logo amadeus">
19 19 </div>
20 20 </div>
21 21  
... ...
users/templates/users/register.html
... ... @@ -15,7 +15,7 @@
15 15 {% block content %}
16 16 <div class="row">
17 17 <div class="col-lg-offset-1 col-md-offset-1">
18   - <img src="{% static 'img/amadeus.png' %}" class="img-responsive center-block logo-login logo-register" alt="logo amadeus">
  18 + <img src="{{ theme.large_logo_url }}" class="img-responsive center-block logo-login logo-register" alt="logo amadeus">
19 19 </div>
20 20 </div>
21 21  
... ...
users/views.py
... ... @@ -22,6 +22,10 @@ from django.conf import settings
22 22 from django.utils.encoding import force_bytes
23 23 from django.utils.http import urlsafe_base64_encode, urlsafe_base64_decode
24 24 from django.template import loader
  25 +from django.core.mail import EmailMessage
  26 +from django.core.mail.backends.smtp import EmailBackend
  27 +
  28 +from mailsender.models import MailSender
25 29  
26 30 #API IMPORTS
27 31 from rest_framework import viewsets
... ... @@ -346,15 +350,32 @@ class ForgotPassword(generic.FormView):
346 350 'protocol': 'http',
347 351 }
348 352  
349   - subject_template_name='registration/password_reset_subject.txt'
  353 + subject_template_name = 'registration/password_reset_subject.txt'
350 354 email_template_name = 'recover_pass_email_template.html'
351 355  
352 356 subject = loader.render_to_string(subject_template_name, c)
353 357 # Email subject *must not* contain newlines
354 358 subject = ''.join(subject.splitlines())
355 359 email = loader.render_to_string(email_template_name, c)
356   -
357   - send_mail(subject, email, settings.DEFAULT_FROM_EMAIL , [user.email], fail_silently=False)
  360 +
  361 + mailsender = MailSender.objects.get(id = 1)
  362 +
  363 + if mailsender.hostname == "example.com":
  364 + send_mail(subject, email, settings.DEFAULT_FROM_EMAIL , [user.email], fail_silently=False)
  365 + else:
  366 + if mailsender.crypto == 3 or mailsender.crypto == 4:
  367 + tls = True
  368 + else:
  369 + tls = False
  370 +
  371 + backend = EmailBackend(
  372 + host = mailsender.hostname, port = mailsender.port, username = mailsender.username,
  373 + password = mailsender.password, use_tls = tls, fail_silently = False
  374 + )
  375 +
  376 + mail_msg = EmailMessage(subject = subject, body = email, from_email = settings.DEFAULT_FROM_EMAIL, to = [user.email], connection = backend)
  377 +
  378 + mail_msg.send()
358 379  
359 380 result = self.form_valid(form)
360 381 messages.success(request, _("Soon you'll receive an email with instructions to set your new password. If you don't receive it in 24 hours, please check your spam box."))
... ...