Commit fc10311c0f8642454e0b3d044e927d05e7d31872
Exists in
master
and in
5 other branches
conflit
Showing
16 changed files
with
229 additions
and
177 deletions
Show diff stats
core/forms.py
... | ... | @@ -75,4 +75,5 @@ class RegisterUserForm(forms.ModelForm): |
75 | 75 | class Meta: |
76 | 76 | model = User |
77 | 77 | # exclude = ['is_staff', 'is_active'] |
78 | - fields = ['username', 'name', 'email', 'city', 'state', 'gender', 'cpf', 'birth_date', 'phone', 'image'] | |
79 | 78 | \ No newline at end of file |
79 | + fields = ['username', 'name', 'email', 'city', 'state', 'gender', 'cpf', 'birth_date', 'phone', 'image', 'titration', | |
80 | + 'year_titration', 'institution', 'curriculum',] | |
80 | 81 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,26 @@ |
1 | +# -*- coding: utf-8 -*- | |
2 | +# Generated by Django 1.10 on 2016-11-01 17:57 | |
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 | + ('core', '0002_auto_20161024_1559'), | |
12 | + ] | |
13 | + | |
14 | + operations = [ | |
15 | + migrations.AddField( | |
16 | + model_name='log', | |
17 | + name='component', | |
18 | + field=models.TextField(default='', verbose_name='Component (Module / App)'), | |
19 | + preserve_default=False, | |
20 | + ), | |
21 | + migrations.AddField( | |
22 | + model_name='log', | |
23 | + name='context', | |
24 | + field=models.TextField(blank=True, verbose_name='Context'), | |
25 | + ), | |
26 | + ] | ... | ... |
core/models.py
... | ... | @@ -101,10 +101,15 @@ class Notification(models.Model): |
101 | 101 | return self.message |
102 | 102 | |
103 | 103 | class Log(models.Model): |
104 | - datetime = models.DateTimeField(_("Date and Time of action"), auto_now_add = True) | |
105 | - user = models.ForeignKey(User, verbose_name = _('Actor')) | |
104 | + component = models.TextField(_('Component (Module / App)')) | |
105 | + context = models.TextField(_('Context'), blank = True) | |
106 | 106 | action_resource = models.ForeignKey(Action_Resource, verbose_name = _('Action_Resource')) |
107 | + user = models.ForeignKey(User, verbose_name = _('Actor')) | |
108 | + datetime = models.DateTimeField(_("Date and Time of action"), auto_now_add = True) | |
107 | 109 | |
108 | 110 | class Meta: |
109 | 111 | verbose_name = _('Log') |
110 | 112 | verbose_name_plural = _('Logs') |
113 | + | |
114 | + def __str__(self): | |
115 | + return self.message | ... | ... |
core/static/css/base/amadeus.css
... | ... | @@ -18,7 +18,10 @@ |
18 | 18 | overflow: auto; |
19 | 19 | width: 300px; |
20 | 20 | } |
21 | - | |
21 | +#NavBarSearch{ | |
22 | + position: absolute; | |
23 | + left: 30%; | |
24 | + } | |
22 | 25 | .user-notification-img{ |
23 | 26 | width:40%; |
24 | 27 | } |
... | ... | @@ -408,7 +411,6 @@ ul, li { |
408 | 411 | .dropdown-menu .pull-right { |
409 | 412 | right: 0; |
410 | 413 | } |
411 | - .editation{display: none} | |
412 | 414 | .moreAccordion{ padding-left: 0px; padding-right: 0px;} |
413 | 415 | .moreAccordion div button{ padding-left: 0px; padding-right: 0px;} |
414 | 416 | .cards-content{ padding-left: 0px; padding-right: 0px; } |
... | ... | @@ -421,4 +423,4 @@ ul, li { |
421 | 423 | /* Menu link remove radius */ |
422 | 424 | .nav-pills > li > a { |
423 | 425 | border-radius: 0px; |
424 | -} | |
425 | 426 | \ No newline at end of file |
427 | +} | ... | ... |
core/templates/base.html
... | ... | @@ -20,7 +20,7 @@ |
20 | 20 | |
21 | 21 | <!-- Bootstrap and themes (material) --> |
22 | 22 | <link rel="stylesheet" type="text/css" href="{% static 'bootstrap-3.3.7/css/bootstrap.css' %}"> |
23 | - <link rel="stylesheet" type="text/css" href="{% static 'material/css/bootstrap-material-design.css' %}"> | |
23 | + | |
24 | 24 | <link rel="stylesheet" type="text/css" href="{% static 'material/css/bootstrap-material-design.min.css' %}"> |
25 | 25 | <link rel="stylesheet" type="text/css" href="{% static 'material/css/ripples.css' %}"> |
26 | 26 | <link rel="stylesheet" type="text/css" href="{% static 'material/css/ripples.min.css' %}"> |
... | ... | @@ -72,6 +72,19 @@ |
72 | 72 | <a class="navbar-brand" href="{% url 'app:index' %}"><img class="logo" src="{% static 'img/topo-amadeus-white.png' %}" alt="Logo"/></a> |
73 | 73 | </div> |
74 | 74 | <div class="navbar-collapse collapse navbar-responsive-collapse"> |
75 | + <div class="col-md-5 cards-content" id= 'NavBarSearch'> | |
76 | + <form id="SearchForm" action="#" method="get" accept-charset="utf-8"> | |
77 | + <div class="input-group"> | |
78 | + <div class="form-group is-empty" > | |
79 | + <input type="text" class="form-control" placeholder="{% trans 'Search Files (.pdf, others) and/or activities' %}" name="search"></div> | |
80 | + <span class="input-group-btn input-group-sm"> | |
81 | + <button type="submit" class="btn btn-fab btn-fab-mini"> | |
82 | + <i class="fa fa-search" aria-hidden="true"></i> | |
83 | + </button> | |
84 | + </span> | |
85 | + </div> | |
86 | + </form> | |
87 | + </div> | |
75 | 88 | <ul class="nav navbar-nav navbar-right notifications"> |
76 | 89 | <li class="" data-toggle="tooltip" data-placement="bottom" title data-original-title="notifications"> |
77 | 90 | <a class="dropdown-toggle" data-toggle="dropdown"> <span id="notification-count" class="badge notification-count">{{notifications.count}}</span><i class="fa fa-bell" aria-hidden="true"></i></a> | ... | ... |
core/templates/guest.html
... | ... | @@ -3,6 +3,7 @@ |
3 | 3 | |
4 | 4 | {% load i18n custom_filters %} |
5 | 5 | {% load static i18n %} |
6 | +{% load pagination %} | |
6 | 7 | |
7 | 8 | <html> |
8 | 9 | <head> |
... | ... | @@ -159,6 +160,7 @@ |
159 | 160 | </div> |
160 | 161 | {% endfor %} |
161 | 162 | |
163 | + {% pagination request paginator page_obj %} | |
162 | 164 | {% endblock %} |
163 | 165 | </div> |
164 | 166 | </div> | ... | ... |
core/templates/register_user.html
... | ... | @@ -38,57 +38,70 @@ |
38 | 38 | {% csrf_token %} |
39 | 39 | <legend>{% trans 'User Register' %}</legend> |
40 | 40 | {% for field in form %} |
41 | - <div class="form-group is-empy{% if form.has_error %} has-error {% endif %} is-fileinput"> | |
42 | - {% if field.field.required %} | |
43 | - <label for="{{ field.auto_id }}" class="col-md-4 control-label">{{ field.label }}<span>*</span></label> | |
44 | - {% else %} | |
45 | - <label for="{{ field.auto_id }}" class="col-md-4 control-label">{{ field.label }}</label> | |
46 | - {% endif %} | |
47 | - <div class="col-md-8"> | |
48 | - {% if field.auto_id == 'id_birth_date' %} | |
49 | - {% render_field field class='form-control input-sm date-picker' %} | |
50 | - | |
51 | - <span id="helpBlock" class="help-block">{{ field.help_text }}</span> | |
52 | - {% elif field.auto_id == 'id_image' %} | |
53 | - {% render_field field class='form-control input-sm' %} | |
54 | - <div class="input-group"> | |
55 | - <input type="text" readonly="" class="form-control" placeholder="Choose your photo..."> | |
56 | - <span class="input-group-btn input-group-sm"> | |
57 | - <button type="button" class="btn btn-fab btn-fab-mini"> | |
58 | - <i class="material-icons">attach_file</i> | |
59 | - </button> | |
60 | - </span> | |
61 | - </div> | |
62 | - {% elif field.auto_id == 'id_cpf' %} | |
63 | - {% render_field field class='form-control' onkeypress='campoNumerico(this,event); formatarCpf(this,event);' %} | |
64 | - | |
65 | - {% elif field.auto_id == 'id_phone' %} | |
66 | - {% render_field field class='form-control' onkeypress='campoNumerico(this,event); formatarTelefone(this,event);' %} | |
41 | + <div class="form-group is-empty {% if form.has_error %} has-error {% endif %} is-fileinput"> | |
42 | + {% if field.field.required %} | |
43 | + <label for="{{ field.auto_id }}" class="col-md-2 control-label">{{ field.label }}<span>*</span></label> | |
67 | 44 | {% else %} |
68 | - {% render_field field class='form-control' %} | |
69 | - <span id="helpBlock" class="help-block">{{ field.help_text }}</span> | |
45 | + <label for="{{ field.auto_id }}" class="col-md-2 control-label">{{ field.label }}</label> | |
46 | + {% endif %} | |
47 | + <div class="col-md-10"> | |
48 | + {% if field.auto_id == 'id_birth_date' %} | |
49 | + {% render_field field class='form-control input-sm date-picker' %} | |
50 | + | |
51 | + <span id="helpBlock" class="help-block">{{ field.help_text }}</span> | |
52 | + {% elif field.auto_id == 'id_image' %} | |
53 | + {% render_field field class='form-control input-sm' %} | |
54 | + <div class="input-group"> | |
55 | + <input type="text" readonly="" class="form-control" placeholder="Choose your photo..."> | |
56 | + <span class="input-group-btn input-group-sm"> | |
57 | + <button type="button" class="btn btn-fab btn-fab-mini"> | |
58 | + <i class="material-icons">attach_file</i> | |
59 | + </button> | |
60 | + </span> | |
61 | + </div> | |
62 | + {% elif field.auto_id == 'id_curriculum' %} | |
63 | + {% render_field field class='form-control input-sm' %} | |
64 | + <div class="input-group"> | |
65 | + <input type="text" readonly="" class="form-control" placeholder="{% trans 'Chose your file ...' %}"> | |
66 | + <span class="input-group-btn input-group-sm"> | |
67 | + <button type="button" class="btn btn-fab btn-fab-mini"> | |
68 | + <i class="material-icons">attach_file</i> | |
69 | + </button> | |
70 | + </span> | |
71 | + </div> | |
72 | + {% elif field.auto_id == 'id_cpf' %} | |
73 | + {% render_field field class='form-control' onkeypress='campoNumerico(this,event); formatarCpf(this,event);' %} | |
74 | + | |
75 | + {% elif field.auto_id == 'id_year_titration' %} | |
76 | + {% render_field field class='form-control' onkeypress='campoNumerico(this,event);' %} | |
77 | + | |
78 | + {% elif field.auto_id == 'id_phone' %} | |
79 | + {% render_field field class='form-control' onkeypress='campoNumerico(this,event); formatarTelefone(this,event);' %} | |
80 | + {% else %} | |
81 | + {% render_field field class='form-control' %} | |
82 | + <span id="helpBlock" class="help-block">{{ field.help_text }}</span> | |
83 | + {% endif %} | |
84 | + </div> | |
85 | + | |
86 | + {% if field.errors %} | |
87 | + <div class="alert alert-danger alert-dismissible col-md-offset-1 col-md-10 col-sm-offset-1 col-sm-10 col-xs-offset-1 col-xs-10" role="alert"> | |
88 | + <button type="button" class="close" data-dismiss="alert" aria-label="Close"> | |
89 | + <span aria-hidden="true">×</span> | |
90 | + </button> | |
91 | + <ul> | |
92 | + {% for error in field.errors %} | |
93 | + <li>{{ error }}</li> | |
94 | + {% endfor %} | |
95 | + </ul> | |
96 | + </div> | |
70 | 97 | {% endif %} |
71 | 98 | </div> |
72 | - | |
73 | - {% if field.errors %} | |
74 | - <div class="alert alert-danger alert-dismissible col-md-offset-4 col-md-8" role="alert"> | |
75 | - <button type="button" class="close" data-dismiss="alert" aria-label="Close"> | |
76 | - <span aria-hidden="true">×</span> | |
77 | - </button> | |
78 | - <ul> | |
79 | - {% for error in field.errors %} | |
80 | - <li>{{ error }}</li> | |
81 | - {% endfor %} | |
82 | - </ul> | |
83 | - </div> | |
84 | - {% endif %} | |
85 | - </div> | |
86 | 99 | {% endfor %} |
87 | - <div class="col-md-offset-4 col-md-2 col-sm-2 col-xs-2"> | |
88 | - <input type="submit" value="{% trans 'Save' %}" class="btn btn-sm btn-success" /> | |
100 | + <div class="col-md-offset-2 col-md-6 col-sm-offset-2 col-sm-6 col-xs-6 col-xs-offset-2 col-xs-6"> | |
101 | + <input type="submit" value="{% trans 'Save' %}" class="btn btn-raised btn-primary" /> | |
89 | 102 | </div> |
90 | - <div class="col-md-offset-3 col-md-2 col-sm-2 col-xs-2"> | |
91 | - <a href="{% url 'core:home' %}" class="btn btn-sm btn-success" >{% trans 'Cancel' %}</a> | |
103 | + <div class=" col-md-4 col-sm-4 col-xs-4"> | |
104 | + <a href="{% url 'core:home' %}" class=" btn btn-danger btn-raised" >{% trans 'Cancel' %}</a> | |
92 | 105 | </div> |
93 | 106 | |
94 | 107 | </form> | ... | ... |
core/urls.py
... | ... | @@ -11,7 +11,7 @@ urlpatterns = [ |
11 | 11 | url(r'^logout/$', auth_views.logout, {'next_page': 'core:home'}, name='logout'), |
12 | 12 | url(r'^notification/([0-9]+)/$', views.processNotification, name='notification_read'), |
13 | 13 | url(r'^getNotifications/$', views.getNotifications, name='getNotifications'), |
14 | - url(r'^guest/$', views.guest, name='guest'), | |
14 | + url(r'^guest/$', views.GuestView.as_view(), name='guest'), | |
15 | 15 | |
16 | 16 | #Reset Password |
17 | 17 | ... | ... |
core/views.py
... | ... | @@ -6,7 +6,7 @@ from .decorators import log_decorator |
6 | 6 | from django.contrib import messages |
7 | 7 | from django.shortcuts import render, redirect |
8 | 8 | from django.template.loader import render_to_string |
9 | -from django.views.generic import CreateView, UpdateView | |
9 | +from django.views.generic import CreateView, UpdateView, ListView | |
10 | 10 | from django.http import HttpResponse, JsonResponse |
11 | 11 | from django.core.mail import send_mail,BadHeaderError |
12 | 12 | from django.conf import settings |
... | ... | @@ -120,9 +120,18 @@ def getNotifications(request): |
120 | 120 | data['amountGotten'] = amountGotten |
121 | 121 | return JsonResponse(data) |
122 | 122 | |
123 | -def guest (request): | |
124 | - context = { | |
125 | - 'courses': Course.objects.filter(public=True), | |
126 | - 'categories': CourseCategory.objects.all(), | |
127 | - } | |
128 | - return render(request, 'guest.html', context) | |
129 | 123 | \ No newline at end of file |
124 | + | |
125 | +class GuestView (ListView): | |
126 | + | |
127 | + template_name = 'guest.html' | |
128 | + context_object_name = 'courses' | |
129 | + paginate_by = 10 | |
130 | + | |
131 | + def get_queryset(self): | |
132 | + return Course.objects.filter(public=True) | |
133 | + | |
134 | + | |
135 | + def get_context_data (self, **kwargs): | |
136 | + context = super(GuestView, self).get_context_data(**kwargs) | |
137 | + context['categories'] = CourseCategory.objects.all() | |
138 | + return context | ... | ... |
courses/static/js/topic_editation_presentation.js
1 | +$(document).ready(function(){ | |
2 | + $(".editation").css('display','none'); | |
3 | +}); | |
1 | 4 | function show_editation(id_topic){ |
2 | - $("#presentation_"+ id_topic).css('display','none'); | |
3 | - $("#editation_"+ id_topic).css('display','block'); | |
4 | -} | |
5 | + $(".presentation_"+ id_topic).css('display','none'); | |
6 | + $(".editation_"+ id_topic).css('display','block'); | |
7 | +}; | |
8 | + function show_presentation(id_topic){ | |
9 | + $(".editation_"+ id_topic).css('display','none'); | |
10 | + $(".presentation_"+ id_topic).css('display','block'); | |
11 | +}; | |
12 | + | |
5 | 13 | |
6 | -function show_presentation(id_topic){ | |
7 | - $("#editation_"+ id_topic).css('display','none'); | |
8 | - $("#presentation_"+ id_topic).css('display','block'); | |
9 | -} | |
10 | 14 | \ No newline at end of file | ... | ... |
courses/templates/course/create.html
1 | -{% extends 'course/view.html' %} | |
1 | +{% extends 'home.html' %} | |
2 | 2 | |
3 | 3 | {% load static i18n %} |
4 | 4 | {% load widget_tweaks %} |
... | ... | @@ -19,7 +19,7 @@ |
19 | 19 | <div class="form-group {% if form.has_error %} has-error {% endif %} is-fileinput"> |
20 | 20 | <label for="{{ field.auto_id }}">{{ field.label }}</label> |
21 | 21 | {% if field.auto_id == 'id_init_register_date' or field.auto_id == 'id_end_register_date' or field.auto_id == 'id_init_date' or field.auto_id == 'id_end_date'%} |
22 | - <input type="date" class="form-control"name="{{field.name}}" value="{% if field.value.year %}{{field.value|date:'Y-m-d'}}{% else %}{{field.value}}{% endif %}" min="{{now|date:'Y-m-d'}}"> | |
22 | + <input type="text" class="form-control date-picker" name="{{field.name}}" value="{{field.value|date:'SHORT_DATE_FORMAT'}}" min="{{now|date:'Y-m-d'}}"> | |
23 | 23 | {% elif field.auto_id == 'id_image' %} |
24 | 24 | {% render_field field class='form-control' %} |
25 | 25 | <div class="input-group"> | ... | ... |
courses/templates/subject/create.html
... | ... | @@ -11,8 +11,11 @@ |
11 | 11 | {% for field in form %} |
12 | 12 | <div class="form-group {% if field.errors %} has-error{% endif %}"> |
13 | 13 | <label for="{{ field.auto_id }}" class="control-label label-static"> {{ field.label }}</label> |
14 | - | |
15 | - {% render_field field class='form-control' placeholder=field.label%} | |
14 | + {% if field.auto_id == 'id_init_date' or field.auto_id == 'id_end_date'%} | |
15 | + <input type="text" class="form-control date-picker" name="{{field.name}}" value="{{field.value|date:'SHORT_DATE_FORMAT'}}" min="{{now|date:'SHORT_DATE_FORMAT'}}"> | |
16 | + {% else %} | |
17 | + {% render_field field class='form-control' placeholder=field.label%} | |
18 | + {% endif %} | |
16 | 19 | <span class="help-block">{{ field.help_text }}</span> |
17 | 20 | </div> |
18 | 21 | {% endfor %} |
... | ... | @@ -22,4 +25,12 @@ |
22 | 25 | </form> |
23 | 26 | </div> |
24 | 27 | </div> |
28 | + | |
29 | + <script type="text/javascript"> | |
30 | + var locale = navigator.language || navigator.userLanguage; | |
31 | + | |
32 | + $('.date-picker').datepicker({ | |
33 | + language: locale, | |
34 | + }); | |
35 | + </script> | |
25 | 36 | {% endblock content %} | ... | ... |
courses/templates/subject/form_view_student.html
... | ... | @@ -32,32 +32,14 @@ |
32 | 32 | </p> |
33 | 33 | |
34 | 34 | </div> |
35 | - <div class="row"> | |
36 | - <div class="col-xs-6 col-md-6"> | |
37 | - <div class="resource_inline"> | |
38 | - <h4>{% trans 'Material' %}</h4> | |
39 | - </div> | |
40 | - <ul> | |
41 | - {% list_topic_file request topic %} | |
42 | - {% list_topic_link request topic%} | |
43 | - </ul> | |
44 | - </div> | |
45 | - <div class="col-xs-4 col-md-4"> | |
46 | - <div class="resource_inline"> | |
47 | - <h4>{% trans 'Activities' %}</h4> | |
48 | - </div> | |
49 | - <ul> | |
50 | - {% list_topic_poll request topic %} | |
51 | - {% list_topic_foruns request topic %} | |
52 | - </ul> | |
53 | - </div> | |
54 | - </div> | |
55 | 35 | </div> |
56 | 36 | </div> |
57 | 37 | </div> |
38 | + | |
58 | 39 | </div> |
40 | + | |
59 | 41 | {% professor_subject topic.subject user as professor_links %} |
60 | - {% if professor_links %} | |
42 | + {% if professor_links%} | |
61 | 43 | {% include "links/create_link.html" %} |
62 | 44 | {% include "links/delete_link.html" %} |
63 | 45 | {% endif %} | ... | ... |
courses/templates/subject/form_view_teacher.html
... | ... | @@ -41,106 +41,73 @@ |
41 | 41 | </div> |
42 | 42 | <div class="panel-collapse collapseTopic-{{topic.slug}} topic_{{ topic.id }} collapse in" role="tabpanel" aria-labelledby="heading_{{topic.id}}" aria-expanded="true" aria-hidden="false"> |
43 | 43 | <div class="panel-body"> |
44 | - <div class="presentation" id="presentation_{{topic.slug}}"> | |
44 | + <div class="presentation_{{topic.slug}}"> | |
45 | 45 | <p> |
46 | 46 | <i> |
47 | 47 | {{topic.description|linebreaks}} |
48 | 48 | </i> |
49 | 49 | </p> |
50 | - <div class="row"> | |
51 | - <div class="col-xs-6 col-md-6"> | |
52 | - <div class="resource_inline"> | |
53 | - <h4>{% trans 'Material' %}</h4> | |
54 | - </div> | |
55 | - <div class="resource_inline"> | |
56 | - <div class="dropdown"> | |
57 | - <a href="#" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-plus-circle fa-lg" aria-hidden="true"></i></a> | |
58 | - <ul class="dropdown-menu" aria-labelledby="dLabel"> | |
59 | - <li><a href="javascript:get_modal_link('{% url 'course:links:create_link' topic.slug %}', '#createLinksModal','#divModalLink') ">{% trans 'Create a Link' %}</a></li> | |
60 | - <li><a href="javascript:get_modal_file('{% url 'course:file:create_file' topic.slug %}', '#fileModal', '#divModalFile')">{% trans "Create a file" %}</a></li> | |
61 | - </ul> | |
62 | - </div> | |
50 | + </div> | |
51 | + <div class="form-group editation editation_{{topic.slug}}"> | |
52 | + <label class="control-label" for="focusedInput2">{% trans 'Name Topic' %}</label> | |
53 | + <input type="text" class="form-control" value="{{topic}}"> | |
54 | + </div> | |
55 | + <div class="form-group editation editation_{{topic.slug}}"> | |
56 | + <label class="control-label" for="focusedInput2">{% trans 'Description' %}</label> | |
57 | + <textarea class="form-control" rows="3" id="textArea">{{topic.description}}</textarea> | |
58 | + </div> | |
59 | + <div class="row"> | |
60 | + <div class="col-xs-6 col-md-6"> | |
61 | + <div class="resource_inline"> | |
62 | + <h4>{% trans 'Material' %}</h4> | |
63 | + </div> | |
64 | + <div class="resource_inline"> | |
65 | + <div class="dropdown"> | |
66 | + <a href="#" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-plus-circle fa-lg" aria-hidden="true"></i></a> | |
67 | + <ul class="dropdown-menu" aria-labelledby="dLabel"> | |
68 | + <li><a href="javascript:get_modal_link('{% url 'course:links:create_link' topic.slug %}', '#createLinksModal','#divModalLink') ">{% trans 'Create a Link' %}</a></li> | |
69 | + <li><a href="javascript:get_modal_file('{% url 'course:file:create_file' topic.slug %}', '#fileModal', '#divModalFile')">{% trans "Create a file" %}</a></li> | |
70 | + </ul> | |
63 | 71 | </div> |
72 | + </div> | |
73 | + <div class="presentation_{{topic.slug}}"> | |
64 | 74 | <ul> |
65 | 75 | {% list_topic_file request topic %} |
66 | 76 | {% list_topic_link request topic%} |
67 | 77 | </ul> |
68 | 78 | </div> |
69 | - <div class="col-xs-4 col-md-4"> | |
70 | - <div class="resource_inline"> | |
71 | - <h4>{% trans 'Activities' %}</h4> | |
72 | - </div> | |
73 | - <div class="resource_inline"> | |
74 | - <div class="dropdown"> | |
75 | - <a href="#" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-plus-circle fa-lg" aria-hidden="true"></i></a> | |
76 | - <ul class="dropdown-menu" aria-labelledby="dLabel"> | |
77 | - <li><a href="javascript:createForum('{% url 'course:forum:create' %}', '{{ topic.id }}')">{% trans 'Create Forum' %}</a></li> | |
78 | - <li><a href="javascript:modal.get('{% url 'course:poll:create_poll' topic.slug%}','#poll','#modal_poll');">{% trans 'Create Poll' %}</a></li> | |
79 | - </ul> | |
80 | - </div> | |
81 | - </div> | |
82 | - <ul> | |
83 | - {% list_topic_poll request topic %} | |
84 | - {% list_topic_foruns request topic %} | |
85 | - </ul> | |
86 | - </div> | |
87 | - </div> | |
88 | - </div><!--EndPresentation--> | |
89 | - <div class="editation topic_{{ topic.id }}" id="editation_{{topic.slug}}"> | |
90 | - <div class="form-group"> | |
91 | - <label class="control-label" for="focusedInput2">{% trans 'Name Topic' %}</label> | |
92 | - <input type="text" class="form-control" value="{{topic}}"> | |
93 | - </div> | |
94 | - <div class="form-group"> | |
95 | - <label class="control-label" for="focusedInput2">{% trans 'Description' %}</label> | |
96 | - <textarea class="form-control" rows="3" id="textArea">{{topic.description}}</textarea> | |
97 | - </div> | |
98 | - <div class="row"> | |
99 | - <div class=" col-xs-6 col-md-4"> | |
100 | - <div class="resource_inline"> | |
101 | - <h4>{% trans 'Material' %}</h4> | |
102 | - </div> | |
103 | - <div class="resource_inline"> | |
104 | - <div class="dropdown"> | |
105 | - <a href="#" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-plus-circle fa-lg" aria-hidden="true"></i></a> | |
106 | - <ul class="dropdown-menu" aria-labelledby="dLabel"> | |
107 | - <li><a href="javascript:get_modal_link('{% url 'course:links:create_link' topic.slug %}', '#createLinksModal','#divModalLink') ">{% trans 'Create a Link' %}</a></li> | |
108 | - <li><a href="javascript:get_modal_file('{% url 'course:file:create_file' topic.slug %}', '#fileModal', '#divModalFile')">{% trans "Create a file" %}</a></li> | |
109 | - </ul> | |
110 | - </div> | |
111 | - </div> | |
79 | + <div class="editation editation_{{topic.slug}}"> | |
112 | 80 | <ul> |
113 | 81 | {% list_topic_file_edit request topic %} |
114 | 82 | {% list_topic_link_edit request topic%} |
115 | 83 | </ul> |
116 | 84 | </div> |
117 | - <div class="col-xs-4 col-md-offset-1 col-md-4"> | |
118 | - <div class="resource_inline"> | |
119 | - <h4>{% trans 'Activities' %}</h4> | |
120 | - </div> | |
121 | - <div class="resource_inline"> | |
122 | - <div class="dropdown"> | |
123 | - <a href="#" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-plus-circle fa-lg" aria-hidden="true"></i></a> | |
124 | - <ul class="dropdown-menu" aria-labelledby="dLabel"> | |
125 | - <li><a href="javascript:createForum('{% url 'course:forum:create' %}', '{{ topic.id }}')">{% trans 'Create Forum' %}</a></li> | |
126 | - <li><a href="javascript:modal.get('{% url 'course:poll:create_poll' topic.slug%}','#poll','#modal_poll');">{% trans 'Create Poll' %}</a></li> | |
127 | - </ul> | |
128 | - </div> | |
85 | + </div> | |
86 | + <div class="col-xs-4 col-md-4"> | |
87 | + <div class="resource_inline"> | |
88 | + <h4>{% trans 'Activities' %}</h4> | |
89 | + </div> | |
90 | + <div class="resource_inline"> | |
91 | + <div class="dropdown"> | |
92 | + <a href="#" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-plus-circle fa-lg" aria-hidden="true"></i></a> | |
93 | + <ul class="dropdown-menu" aria-labelledby="dLabel"> | |
94 | + <li><a href="javascript:createForum('{% url 'course:forum:create' %}', '{{ topic.id }}')">{% trans 'Create Forum' %}</a></li> | |
95 | + <li><a href="javascript:modal.get('{% url 'course:poll:create_poll' topic.slug%}','#poll','#modal_poll');">{% trans 'Create Poll' %}</a></li> | |
96 | + </ul> | |
129 | 97 | </div> |
130 | - <ul> | |
131 | - {% list_topic_poll request topic %} | |
132 | - {% list_topic_foruns request topic %} | |
133 | - </ul> | |
134 | 98 | </div> |
99 | + <ul> | |
100 | + {% list_topic_poll request topic %} | |
101 | + {% list_topic_foruns request topic %} | |
102 | + </ul> | |
135 | 103 | </div> |
136 | - <div class="form-group"> | |
137 | - <div class="col-md-10"> | |
138 | - <a href="javascript:show_presentation('{{topic.slug}}')" class="btn btn-raised btn-default">{% trans 'Cancel' %}</a> | |
139 | - <a href="javascript:show_presentation('{{topic.slug}}')" class="btn btn-raised btn-primary">{% trans 'Submit' %}</a> | |
140 | - </div> | |
104 | + </div> | |
105 | + <div class="form-group editation editation_{{topic.slug}}"> | |
106 | + <div class="col-md-10"> | |
107 | + <a href="javascript:show_presentation('{{topic.slug}}')" class="btn btn-raised btn-default">{% trans 'Cancel' %}</a> | |
108 | + <a href="javascript:show_presentation('{{topic.slug}}')" class="btn btn-raised btn-primary">{% trans 'Submit' %}</a> | |
141 | 109 | </div> |
142 | - </div><!--EndEditation--> | |
143 | - | |
110 | + </div> | |
144 | 111 | </div> |
145 | 112 | </div> |
146 | 113 | </div> | ... | ... |
courses/templates/subject/update.html
... | ... | @@ -12,7 +12,11 @@ |
12 | 12 | <div class="form-group {% if field.errors %} has-error{% endif %}"> |
13 | 13 | <label for="{{ field.auto_id }}" class="control-label label-static"> {{ field.label }}</label> |
14 | 14 | |
15 | - {% render_field field class='form-control' placeholder=field.label%} | |
15 | + {% if field.auto_id == 'id_init_date' or field.auto_id == 'id_end_date'%} | |
16 | + <input type="text" class="form-control date-picker" name="{{field.name}}" value="{{field.value|date:'SHORT_DATE_FORMAT'}}" min="{{now|date:'SHORT_DATE_FORMAT'}}"> | |
17 | + {% else %} | |
18 | + {% render_field field class='form-control' placeholder=field.label%} | |
19 | + {% endif %} | |
16 | 20 | <span class="help-block">{{ field.help_text }}</span> |
17 | 21 | </div> |
18 | 22 | {% endfor %} |
... | ... | @@ -22,4 +26,12 @@ |
22 | 26 | </form> |
23 | 27 | </div> |
24 | 28 | </div> |
29 | + | |
30 | + <script type="text/javascript"> | |
31 | + var locale = navigator.language || navigator.userLanguage; | |
32 | + | |
33 | + $('.date-picker').datepicker({ | |
34 | + language: locale, | |
35 | + }); | |
36 | + </script> | |
25 | 37 | {% endblock content %} | ... | ... |
users/templates/users/profile.html
... | ... | @@ -59,7 +59,12 @@ |
59 | 59 | <tbody> |
60 | 60 | <tr> |
61 | 61 | <td>{% trans "Status" %}:</td> |
62 | - <td></td> | |
62 | + {% if user %} | |
63 | + <td> {% trans "Online" %}</td> | |
64 | + {% else %} | |
65 | + <td> {% trans "OffLine" %}</td> | |
66 | + {% endif %} | |
67 | + | |
63 | 68 | </tr> |
64 | 69 | <tr> |
65 | 70 | <td>{% trans "Name" %}:</td> |
... | ... | @@ -96,7 +101,7 @@ |
96 | 101 | <td>{{user.cpf}}</td> |
97 | 102 | |
98 | 103 | {% else %} |
99 | - <td>{% trans "doesn't posssess CPF" %}</td> | |
104 | + <td>{% trans "doesn't possess CPF" %}</td> | |
100 | 105 | {% endif %} |
101 | 106 | |
102 | 107 | </tr> |
... | ... | @@ -105,7 +110,7 @@ |
105 | 110 | {% if user.phone %} |
106 | 111 | <td>{{user.phone}}</td> |
107 | 112 | {% else %} |
108 | - <td>{% trans "doesn't posssess Phone" %}</td> | |
113 | + <td>{% trans "doesn't possess Phone" %}</td> | |
109 | 114 | {% endif %} |
110 | 115 | |
111 | 116 | </tr> | ... | ... |