Commit f116c31699b6011ac7243afbb0ba7cbdb0fdf21c
Exists in
master
and in
5 other branches
resolve #15
Showing
13 changed files
with
276 additions
and
152 deletions
Show diff stats
app/locale/pt_BR/LC_MESSAGES/django.po
@@ -8,7 +8,7 @@ msgid "" | @@ -8,7 +8,7 @@ msgid "" | ||
8 | msgstr "" | 8 | msgstr "" |
9 | "Project-Id-Version: PACKAGE VERSION\n" | 9 | "Project-Id-Version: PACKAGE VERSION\n" |
10 | "Report-Msgid-Bugs-To: \n" | 10 | "Report-Msgid-Bugs-To: \n" |
11 | -"POT-Creation-Date: 2016-09-01 22:44-0300\n" | 11 | +"POT-Creation-Date: 2016-09-02 17:13-0300\n" |
12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
14 | "Language-Team: LANGUAGE <LL@li.org>\n" | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" |
@@ -18,113 +18,66 @@ msgstr "" | @@ -18,113 +18,66 @@ msgstr "" | ||
18 | "Content-Transfer-Encoding: 8bit\n" | 18 | "Content-Transfer-Encoding: 8bit\n" |
19 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" | 19 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" |
20 | 20 | ||
21 | -#: app/templates/app/base.html:10 | ||
22 | -msgid "The Project" | ||
23 | -msgstr "" | ||
24 | - | ||
25 | -#: app/templates/app/base.html:11 | ||
26 | -msgid "CCTE Group" | ||
27 | -msgstr "" | ||
28 | - | ||
29 | -#: app/templates/app/base.html:14 | ||
30 | -msgid "Hi" | ||
31 | -msgstr "" | ||
32 | - | ||
33 | -#: app/templates/app/base.html:16 | ||
34 | -msgid "See Profile" | ||
35 | -msgstr "" | ||
36 | - | ||
37 | -#: app/templates/app/base.html:17 | ||
38 | -msgid "Settings" | ||
39 | -msgstr "" | ||
40 | - | ||
41 | -#: app/templates/app/base.html:18 | ||
42 | -msgid "Logout" | ||
43 | -msgstr "" | ||
44 | - | ||
45 | -#: app/templates/app/index.html:6 | ||
46 | -msgid "You have:" | ||
47 | -msgstr "" | ||
48 | - | ||
49 | -#: app/templates/app/index.html:10 | ||
50 | -msgid "Pending Tasks" | ||
51 | -msgstr "" | ||
52 | - | ||
53 | -#: app/templates/app/index.html:14 | ||
54 | -msgid "Users Online" | ||
55 | -msgstr "" | ||
56 | - | ||
57 | -#: app/templates/app/index.html:20 | ||
58 | -msgid "You can:" | ||
59 | -msgstr "" | ||
60 | - | ||
61 | -#: app/templates/app/index.html:24 app/templates/home_app.html:26 | 21 | +#: app/templates/app/index.html:24 app/templates/home_professor.html:23 |
62 | msgid "Create Course" | 22 | msgid "Create Course" |
63 | msgstr "Criar Curso" | 23 | msgstr "Criar Curso" |
64 | 24 | ||
65 | -#: app/templates/app/index.html:29 | ||
66 | -msgid "Manage Users" | ||
67 | -msgstr "" | ||
68 | - | ||
69 | -#: app/templates/app/index.html:33 | ||
70 | -msgid "Manage Courses" | ||
71 | -msgstr "" | ||
72 | - | ||
73 | -#: app/templates/app/index.html:37 | ||
74 | -msgid "Gerenciar Categorias" | ||
75 | -msgstr "" | ||
76 | - | ||
77 | -#: app/templates/app/index.html:45 | ||
78 | -msgid "Your course(s):" | ||
79 | -msgstr "" | ||
80 | - | ||
81 | -#: app/templates/app/index.html:46 | ||
82 | -msgid "No courses subscribed yet" | ||
83 | -msgstr "" | ||
84 | - | ||
85 | -#: app/templates/app/index.html:56 | ||
86 | -msgid "Search course:" | ||
87 | -msgstr "" | ||
88 | - | ||
89 | -#: app/templates/app/index.html:62 | ||
90 | -msgid "Search" | ||
91 | -msgstr "" | ||
92 | - | ||
93 | -#: app/templates/app/index.html:67 | ||
94 | -msgid "Most popular keywords:" | ||
95 | -msgstr "" | ||
96 | - | ||
97 | -#: app/templates/home_app.html:14 | 25 | +#: app/templates/home_professor.html:9 app/templates/home_student.html:9 |
98 | msgid "Home" | 26 | msgid "Home" |
99 | msgstr "Início" | 27 | msgstr "Início" |
100 | 28 | ||
101 | -#: app/templates/home_app.html:22 | 29 | +#: app/templates/home_professor.html:18 app/templates/home_student.html:18 |
30 | +msgid "Menu" | ||
31 | +msgstr "Menu" | ||
32 | + | ||
33 | +#: app/templates/home_professor.html:22 | ||
102 | msgid "Pending tasks" | 34 | msgid "Pending tasks" |
103 | msgstr "Tarefas Pendentes" | 35 | msgstr "Tarefas Pendentes" |
104 | 36 | ||
105 | -#: app/templates/home_app.html:23 | ||
106 | -msgid "Users Online (1)" | ||
107 | -msgstr "Pessoas Online (1)" | ||
108 | - | ||
109 | -#: app/templates/home_app.html:24 | ||
110 | -msgid "Course" | ||
111 | -msgstr "Curso" | ||
112 | - | ||
113 | -#: app/templates/home_app.html:27 | 37 | +#: app/templates/home_professor.html:24 |
114 | msgid "Manage Course" | 38 | msgid "Manage Course" |
115 | msgstr "Gerenciar Curso" | 39 | msgstr "Gerenciar Curso" |
116 | 40 | ||
117 | -#: app/templates/home_app.html:35 | 41 | +#: app/templates/home_professor.html:31 |
118 | msgid "Courses" | 42 | msgid "Courses" |
119 | msgstr "Cursos" | 43 | msgstr "Cursos" |
120 | 44 | ||
121 | -#: app/templates/home_app.html:51 | 45 | +#: app/templates/home_professor.html:40 |
46 | +msgid "Students:" | ||
47 | +msgstr "Alunos" | ||
48 | + | ||
49 | +#: app/templates/home_professor.html:41 | ||
50 | +msgid "Beginning:" | ||
51 | +msgstr "Começo" | ||
52 | + | ||
53 | +#: app/templates/home_professor.html:42 | ||
54 | +msgid "End:" | ||
55 | +msgstr "Fim" | ||
56 | + | ||
57 | +#: app/templates/home_professor.html:48 | ||
122 | msgid "You didn't create any course yet." | 58 | msgid "You didn't create any course yet." |
123 | msgstr "Você não criou nenhum curso ainda." | 59 | msgstr "Você não criou nenhum curso ainda." |
124 | 60 | ||
125 | -#: app/templates/home_app.html:59 | 61 | +#: app/templates/home_professor.html:54 app/templates/home_student.html:60 |
126 | msgid "Goals" | 62 | msgid "Goals" |
127 | msgstr "Metas" | 63 | msgstr "Metas" |
128 | 64 | ||
129 | -#~ msgid "Amadeus" | ||
130 | -#~ msgstr "Amadeus" | 65 | +#: app/templates/home_student.html:22 |
66 | +msgid "Profile" | ||
67 | +msgstr "Perfil" | ||
68 | + | ||
69 | +#: app/templates/home_student.html:23 | ||
70 | +msgid "My Courses" | ||
71 | +msgstr "Meus Cursos" | ||
72 | + | ||
73 | +#: app/templates/home_student.html:24 | ||
74 | +msgid "Google accounts" | ||
75 | +msgstr "Contas do Google" | ||
76 | + | ||
77 | +#: app/templates/home_student.html:31 | ||
78 | +msgid "Notifications" | ||
79 | +msgstr "Notificações" | ||
80 | + | ||
81 | +#: app/templates/home_student.html:63 | ||
82 | +msgid "Favorites" | ||
83 | +msgstr "Favoritos" |
@@ -0,0 +1,56 @@ | @@ -0,0 +1,56 @@ | ||
1 | +{% extends 'base.html' %} | ||
2 | + | ||
3 | +{% load i18n %} | ||
4 | + | ||
5 | +{% block breadcrumbs %} | ||
6 | + <div class="row"> | ||
7 | + <div class="col-md-12"> | ||
8 | + <ul class="breadcrumb"> | ||
9 | + <li><a href="{% url 'core:index' %}">{% trans 'Home' %}</a></li> | ||
10 | + </ul> | ||
11 | + </div> | ||
12 | + </div> | ||
13 | +{% endblock %} | ||
14 | + | ||
15 | +{% block sidebar %} | ||
16 | + <div class="panel panel-primary navigation"> | ||
17 | + <div class="panel-heading"> | ||
18 | + <h5>{% trans 'Menu' %}</h5> | ||
19 | + </div> | ||
20 | + <div class="panel-body"> | ||
21 | + <ul class="nav nav-pills nav-stacked"> | ||
22 | + <li><a href="javascript:void(0)">{% trans 'Pending tasks' %}</a></li> | ||
23 | + <li><a href="{% url 'course:create' %}">{% trans 'Create Course' %}</a></li> | ||
24 | + <li><a href="{% url 'course:manage' %}">{% trans 'Manage Course' %}</a></li> | ||
25 | + </ul> | ||
26 | + </div> | ||
27 | + </div> | ||
28 | +{% endblock %} | ||
29 | + | ||
30 | +{% block content %} | ||
31 | + <h3>{% trans 'Courses' %}</h3> | ||
32 | + {% if courses|length > 0 %} | ||
33 | + {% for course in courses %} | ||
34 | + <div class="panel panel-default courseHome"> | ||
35 | + <div class="panel-body"> | ||
36 | + <p>{{ course }}</p> | ||
37 | + </div> | ||
38 | + <div class="panel-footer"> | ||
39 | + <ul> | ||
40 | + <li>{% trans 'Students:' %} 5</li> | ||
41 | + <li>{% trans 'Beginning:' %} {{ course.init_date }}</li> | ||
42 | + <li>{% trans 'End:' %} {{ course.end_date }}</li> | ||
43 | + </ul> | ||
44 | + </div> | ||
45 | + </div> | ||
46 | + {% endfor %} | ||
47 | + {% else %} | ||
48 | + <p>{% trans "You didn't create any course yet." %}</p> | ||
49 | + {% endif %} | ||
50 | +{% endblock %} | ||
51 | + | ||
52 | +{% block rightbar %} | ||
53 | + <div class="well well-lg goal"> | ||
54 | + {% trans 'Goals' %} | ||
55 | + </div> | ||
56 | +{% endblock rightbar %} |
@@ -0,0 +1,65 @@ | @@ -0,0 +1,65 @@ | ||
1 | +{% extends 'base.html' %} | ||
2 | + | ||
3 | +{% load i18n %} | ||
4 | + | ||
5 | +{% block breadcrumbs %} | ||
6 | + <div class="row"> | ||
7 | + <div class="col-md-12"> | ||
8 | + <ul class="breadcrumb"> | ||
9 | + <li><a href="{% url 'core:index' %}">{% trans 'Home' %}</a></li> | ||
10 | + </ul> | ||
11 | + </div> | ||
12 | + </div> | ||
13 | +{% endblock %} | ||
14 | + | ||
15 | +{% block sidebar %} | ||
16 | + <div class="panel panel-primary navigation"> | ||
17 | + <div class="panel-heading"> | ||
18 | + <h5>{% trans 'Menu' %}</h5> | ||
19 | + </div> | ||
20 | + <div class="panel-body"> | ||
21 | + <ul class="nav nav-pills nav-stacked"> | ||
22 | + <li><a href="{% url 'users:profile' %}">{% trans 'Profile' %}</a></li> | ||
23 | + <li><a href="javascript:void(0)">{% trans 'My Courses' %}</a></li> | ||
24 | + <li><a href="javascript:void(0)">{% trans 'Google accounts' %}</a></li> | ||
25 | + </ul> | ||
26 | + </div> | ||
27 | + </div> | ||
28 | +{% endblock %} | ||
29 | + | ||
30 | +{% block content %} | ||
31 | + <h3>{% trans 'Notifications' %}</h3> | ||
32 | + <div class="panel panel-default"> | ||
33 | + <div class="panel-body"> | ||
34 | + His course has notified a new activity! | ||
35 | + </div> | ||
36 | + <div class="panel-footer"> | ||
37 | + Go | ||
38 | + </div> | ||
39 | + </div> | ||
40 | + <div class="panel panel-default"> | ||
41 | + <div class="panel-body"> | ||
42 | + His teacher has notified a new material! | ||
43 | + </div> | ||
44 | + <div class="panel-footer"> | ||
45 | + Go | ||
46 | + </div> | ||
47 | + </div> | ||
48 | + <div class="panel panel-default"> | ||
49 | + <div class="panel-body"> | ||
50 | + You have a new guardian! | ||
51 | + </div> | ||
52 | + <div class="panel-footer"> | ||
53 | + Go | ||
54 | + </div> | ||
55 | + </div> | ||
56 | +{% endblock %} | ||
57 | + | ||
58 | +{% block rightbar %} | ||
59 | + <div class="well well-lg goal"> | ||
60 | + {% trans 'Goals' %} | ||
61 | + </div> | ||
62 | + <div class="well well-lg favorites"> | ||
63 | + {% trans 'Favorites' %} | ||
64 | + </div> | ||
65 | +{% endblock rightbar %} |
app/urls.py
@@ -3,5 +3,5 @@ from django.conf.urls import url, include | @@ -3,5 +3,5 @@ from django.conf.urls import url, include | ||
3 | from . import views | 3 | from . import views |
4 | 4 | ||
5 | urlpatterns = [ | 5 | urlpatterns = [ |
6 | - url(r'^$', views.index, name='index'), | 6 | + url(r'^$', views.AppIndex.as_view(), name='index'), |
7 | ] | 7 | ] |
app/views.py
1 | from django.shortcuts import render | 1 | from django.shortcuts import render |
2 | -from django.contrib.auth.decorators import login_required | 2 | +from django.views.generic import TemplateView |
3 | +from django.contrib.auth.mixins import LoginRequiredMixin | ||
3 | 4 | ||
4 | from courses.models import Course | 5 | from courses.models import Course |
5 | 6 | ||
6 | -@login_required | ||
7 | -def index(request): | ||
8 | - context = {} | 7 | +class AppIndex(LoginRequiredMixin, TemplateView): |
8 | + template_name = "home_professor.html" | ||
9 | 9 | ||
10 | - context['courses'] = Course.objects.filter(user = request.user) | 10 | + def render_to_response(self, context, **response_kwargs): |
11 | + context = {} | ||
11 | 12 | ||
12 | - return render(request, "home_app.html", context) | 13 | + if self.request.user.type_profile == 2: |
14 | + template = "home_student.html" | ||
15 | + context['courses'] = Course.objects.filter(user = self.request.user) | ||
16 | + else: | ||
17 | + template = self.get_template_names() | ||
18 | + context['courses'] = Course.objects.filter(user = self.request.user) | ||
19 | + | ||
20 | + context['title'] = 'Amadeus' | ||
21 | + | ||
22 | + return self.response_class(request = self.request, template = template, context = context, using = self.template_engine, **response_kwargs) | ||
13 | \ No newline at end of file | 23 | \ No newline at end of file |
core/locale/pt_BR/LC_MESSAGES/django.po
@@ -8,7 +8,7 @@ msgid "" | @@ -8,7 +8,7 @@ msgid "" | ||
8 | msgstr "" | 8 | msgstr "" |
9 | "Project-Id-Version: PACKAGE VERSION\n" | 9 | "Project-Id-Version: PACKAGE VERSION\n" |
10 | "Report-Msgid-Bugs-To: \n" | 10 | "Report-Msgid-Bugs-To: \n" |
11 | -"POT-Creation-Date: 2016-09-01 22:44-0300\n" | 11 | +"POT-Creation-Date: 2016-09-02 17:13-0300\n" |
12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
14 | "Language-Team: LANGUAGE <LL@li.org>\n" | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" |
@@ -18,22 +18,6 @@ msgstr "" | @@ -18,22 +18,6 @@ msgstr "" | ||
18 | "Content-Transfer-Encoding: 8bit\n" | 18 | "Content-Transfer-Encoding: 8bit\n" |
19 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" | 19 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" |
20 | 20 | ||
21 | -#: core/templates/base.html:43 | ||
22 | -msgid "Amadeus" | ||
23 | -msgstr "" | ||
24 | - | ||
25 | -#: core/templates/index.html:29 | ||
26 | -msgid "Entrar" | ||
27 | -msgstr "" | ||
28 | - | ||
29 | -#: core/templates/index.html:41 | ||
30 | -msgid "Search course:" | ||
31 | -msgstr "" | ||
32 | - | ||
33 | -#: core/templates/index.html:47 | ||
34 | -msgid "Search" | ||
35 | -msgstr "" | ||
36 | - | ||
37 | -#: core/templates/index.html:52 | ||
38 | -msgid "Most popular keywords:" | ||
39 | -msgstr "" | 21 | +#: core/templates/base.html:56 |
22 | +msgid "Log out" | ||
23 | +msgstr "Sair" |
@@ -0,0 +1,41 @@ | @@ -0,0 +1,41 @@ | ||
1 | +.navigation{ | ||
2 | + margin: 10% 10% 5% 5%; | ||
3 | +} | ||
4 | +.breadcrumb{ | ||
5 | + margin-bottom: 5px; | ||
6 | +} | ||
7 | +.courseHome{ | ||
8 | + text-align: center; | ||
9 | +} | ||
10 | +.courseHome ul{ | ||
11 | + list-style-type: none; | ||
12 | + margin: 0; | ||
13 | + padding: 0; | ||
14 | + overflow: hidden; | ||
15 | + margin-left: 2%; | ||
16 | +} | ||
17 | +.courseHome ul li{ | ||
18 | + display:inline; | ||
19 | + text-align: center; | ||
20 | + padding: 16px; | ||
21 | +} | ||
22 | +.goal{ | ||
23 | + margin: 0%; | ||
24 | + margin-top: 10%; | ||
25 | + padding-bottom: 200px; | ||
26 | +} | ||
27 | +.favorites{ | ||
28 | + margin: 0%; | ||
29 | + margin-top: 20%; | ||
30 | + padding-bottom: 200px; | ||
31 | +} | ||
32 | +.panel-info{ | ||
33 | + padding-bottom: 50px; | ||
34 | +} | ||
35 | +h3{ | ||
36 | + text-align: center; | ||
37 | +} | ||
38 | +h5{ | ||
39 | + text-align: center; | ||
40 | +} | ||
41 | + |
core/templates/base.html
@@ -11,9 +11,15 @@ | @@ -11,9 +11,15 @@ | ||
11 | <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:300,400,500,700" type="text/css"> | 11 | <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:300,400,500,700" type="text/css"> |
12 | <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> | 12 | <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> |
13 | 13 | ||
14 | - <link href="{% static 'bootstrap-3.3.7/css/bootstrap.min.css' %}" rel="stylesheet" type="text/css" /> | 14 | + <link rel="stylesheet" type="text/css" href="{% static 'bootstrap-3.3.7/css/bootstrap.min.css' %}" /> |
15 | <link rel="stylesheet" type="text/css" href="{% static 'material/css/bootstrap-material-design.min.css' %}"> | 15 | <link rel="stylesheet" type="text/css" href="{% static 'material/css/bootstrap-material-design.min.css' %}"> |
16 | <link rel="stylesheet" type="text/css" href="{% static 'material/css/ripples.min.css' %}"> | 16 | <link rel="stylesheet" type="text/css" href="{% static 'material/css/ripples.min.css' %}"> |
17 | + <link rel="stylesheet" type="text/css" href="{% static 'font-awesome-4.6.3/css/font-awesome.min.css' %}"> | ||
18 | + <link rel="stylesheet" type="text/css" href="{% static 'css/base/header.css' %}"> | ||
19 | + <link rel="stylesheet" type="text/css" href="{% static 'css/base/amadeus.css' %}"> | ||
20 | + <script> | ||
21 | + $.material.init(); | ||
22 | + </script> | ||
17 | <!--CSS block for specific-app ones --> | 23 | <!--CSS block for specific-app ones --> |
18 | {% block style %} | 24 | {% block style %} |
19 | {% endblock %} | 25 | {% endblock %} |
@@ -31,28 +37,36 @@ | @@ -31,28 +37,36 @@ | ||
31 | </head> | 37 | </head> |
32 | <body> | 38 | <body> |
33 | {% block nav %} | 39 | {% block nav %} |
34 | - <div class="bs-component"> | ||
35 | - <div class="navbar navbar-default"> | ||
36 | - <div class="container-fluid"> | ||
37 | - <div class="navbar-header"> | ||
38 | - <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse"> | ||
39 | - <span class="icon-bar"></span> | ||
40 | - <span class="icon-bar"></span> | ||
41 | - <span class="icon-bar"></span> | ||
42 | - </button> | ||
43 | - <a class="navbar-brand" href="{% url 'app:index' %}"><h3>{% trans 'Amadeus' %}</h3></a> | ||
44 | - </div> | ||
45 | - </div> | ||
46 | - </div> | ||
47 | - </div> | 40 | + <div class="row"> |
41 | + <div class="navbar navbar-default"> | ||
42 | + <div class="container-fluid"> | ||
43 | + <div class="navbar-header"> | ||
44 | + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse"> | ||
45 | + <span class="icon-bar"></span> | ||
46 | + <span class="icon-bar"></span> | ||
47 | + <span class="icon-bar"></span> | ||
48 | + </button> | ||
49 | + <a class="navbar-brand" href="javascript:void(0)"><img class="logo" src="{% static 'img/topo-amadeus.png' %}" alt="Logo"/></a> | ||
50 | + </div> | ||
51 | + <div class="navbar-collapse collapse navbar-responsive-collapse"> | ||
52 | + <ul class="nav navbar-nav navbar-right notifications"> | ||
53 | + <li> <a href="#"><i class="fa fa-bell-o" aria-hidden="true"></i></a> </li> | ||
54 | + <li> <a href="#"><i class="fa fa-comments" aria-hidden="true"></i></a> </li> | ||
55 | + <li> <a href="{% url 'users:profile' %}">{{ user }}</a></li> | ||
56 | + <li> <a href="{% url 'core:logout' %}">{% trans 'Log out' %}</a></li> | ||
57 | + </ul> | ||
58 | + </div> | ||
59 | + </div> | ||
60 | + </div> | ||
61 | + </div> | ||
48 | {% endblock %} | 62 | {% endblock %} |
49 | 63 | ||
50 | - <div class="container-fluid"> | 64 | + <div class="container"> |
51 | {% block breadcrumbs %} | 65 | {% block breadcrumbs %} |
52 | 66 | ||
53 | {% endblock %} | 67 | {% endblock %} |
54 | <div class="row"> | 68 | <div class="row"> |
55 | - <div class="col-md-2 col-sm-2"> | 69 | + <div class="col-md-3 col-sm-3"> |
56 | {% block sidebar %} | 70 | {% block sidebar %} |
57 | 71 | ||
58 | {% endblock %} | 72 | {% endblock %} |
@@ -62,7 +76,7 @@ | @@ -62,7 +76,7 @@ | ||
62 | 76 | ||
63 | {% endblock %} | 77 | {% endblock %} |
64 | </div> | 78 | </div> |
65 | - <div class="col-md-4 col-sm-4"> | 79 | + <div class="col-md-3 col-sm-3"> |
66 | {% block rightbar %} | 80 | {% block rightbar %} |
67 | 81 | ||
68 | {% endblock rightbar %} | 82 | {% endblock rightbar %} |
core/templates/index.html
@@ -28,13 +28,13 @@ | @@ -28,13 +28,13 @@ | ||
28 | 28 | ||
29 | {% block content %} | 29 | {% block content %} |
30 | <div class="row logo-row"> | 30 | <div class="row logo-row"> |
31 | - <div class="col-lg-offset-4 col-lg-8"> | 31 | + <div class="col-lg-offset-2 col-lg-9"> |
32 | <img src="..." class="img-responsive center-block " alt="logo amadeus"> | 32 | <img src="..." class="img-responsive center-block " alt="logo amadeus"> |
33 | </div> | 33 | </div> |
34 | </div> | 34 | </div> |
35 | 35 | ||
36 | <div class="row "> | 36 | <div class="row "> |
37 | - <div class="col-lg-8 col-lg-offset-4"> | 37 | + <div class="col-lg-9 col-lg-offset-2"> |
38 | <div class="card"> | 38 | <div class="card"> |
39 | <div class="card-content"> | 39 | <div class="card-content"> |
40 | 40 | ||
@@ -78,7 +78,7 @@ | @@ -78,7 +78,7 @@ | ||
78 | </div> | 78 | </div> |
79 | </div> | 79 | </div> |
80 | <div class="row"> | 80 | <div class="row"> |
81 | - <div class="col-lg-offset-4 col-lg-8"> | 81 | + <div class="col-lg-offset-2 col-lg-9"> |
82 | <button class="btn btn-raised btn-primary btn-lg btn-block" formaction="{% url 'users:create' %}">Sign Up </button> | 82 | <button class="btn btn-raised btn-primary btn-lg btn-block" formaction="{% url 'users:create' %}">Sign Up </button> |
83 | 83 | ||
84 | </div> | 84 | </div> |
core/templates/remember_password.html
@@ -3,12 +3,12 @@ | @@ -3,12 +3,12 @@ | ||
3 | {% block content %} | 3 | {% block content %} |
4 | 4 | ||
5 | <div class="row logo-row"> | 5 | <div class="row logo-row"> |
6 | - <div class="col-lg-offset-4 col-lg-8"> | 6 | + <div class="col-lg-offset-2 col-lg-9"> |
7 | <img src="..." class="img-responsive center-block " alt="logo amadeus"> | 7 | <img src="..." class="img-responsive center-block " alt="logo amadeus"> |
8 | </div> | 8 | </div> |
9 | </div> | 9 | </div> |
10 | <div class="row "> | 10 | <div class="row "> |
11 | - <div class="col-lg-8 col-lg-offset-4"> | 11 | + <div class="col-lg-9 col-lg-offset-2"> |
12 | <div class="card"> | 12 | <div class="card"> |
13 | <div class="card-content"> | 13 | <div class="card-content"> |
14 | 14 |
courses/locale/pt_BR/LC_MESSAGES/django.po
@@ -8,7 +8,7 @@ msgid "" | @@ -8,7 +8,7 @@ msgid "" | ||
8 | msgstr "" | 8 | msgstr "" |
9 | "Project-Id-Version: PACKAGE VERSION\n" | 9 | "Project-Id-Version: PACKAGE VERSION\n" |
10 | "Report-Msgid-Bugs-To: \n" | 10 | "Report-Msgid-Bugs-To: \n" |
11 | -"POT-Creation-Date: 2016-09-01 22:44-0300\n" | 11 | +"POT-Creation-Date: 2016-09-02 17:13-0300\n" |
12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
14 | "Language-Team: LANGUAGE <LL@li.org>\n" | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" |
users/locale/pt_BR/LC_MESSAGES/django.po
@@ -8,7 +8,7 @@ msgid "" | @@ -8,7 +8,7 @@ msgid "" | ||
8 | msgstr "" | 8 | msgstr "" |
9 | "Project-Id-Version: PACKAGE VERSION\n" | 9 | "Project-Id-Version: PACKAGE VERSION\n" |
10 | "Report-Msgid-Bugs-To: \n" | 10 | "Report-Msgid-Bugs-To: \n" |
11 | -"POT-Creation-Date: 2016-09-01 22:44-0300\n" | 11 | +"POT-Creation-Date: 2016-09-02 17:13-0300\n" |
12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
14 | "Language-Team: LANGUAGE <LL@li.org>\n" | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" |
@@ -114,6 +114,11 @@ msgstr "" | @@ -114,6 +114,11 @@ msgstr "" | ||
114 | msgid "Users" | 114 | msgid "Users" |
115 | msgstr "" | 115 | msgstr "" |
116 | 116 | ||
117 | +#: users/templates/list_users.html:8 users/templates/list_users.html:15 | ||
118 | +#: users/templates/users/index.html:8 | ||
119 | +msgid "Manage Users" | ||
120 | +msgstr "Gerenciar Usuários" | ||
121 | + | ||
117 | #: users/templates/list_users.html:14 users/templates/users/create.html:8 | 122 | #: users/templates/list_users.html:14 users/templates/users/create.html:8 |
118 | #: users/templates/users/edit_profile.html:8 users/templates/users/index.html:7 | 123 | #: users/templates/users/edit_profile.html:8 users/templates/users/index.html:7 |
119 | #: users/templates/users/profile.html:8 users/templates/users/update.html:8 | 124 | #: users/templates/users/profile.html:8 users/templates/users/update.html:8 |
@@ -121,10 +126,6 @@ msgstr "" | @@ -121,10 +126,6 @@ msgstr "" | ||
121 | msgid "Home" | 126 | msgid "Home" |
122 | msgstr "Início" | 127 | msgstr "Início" |
123 | 128 | ||
124 | -#: users/templates/list_users.html:15 users/templates/users/index.html:8 | ||
125 | -msgid "Manage Users" | ||
126 | -msgstr "Gerenciar Usuários" | ||
127 | - | ||
128 | #: users/templates/list_users.html:23 | 129 | #: users/templates/list_users.html:23 |
129 | msgid "Add user" | 130 | msgid "Add user" |
130 | msgstr "Adicionar usuário" | 131 | msgstr "Adicionar usuário" |
users/views.py
@@ -12,7 +12,7 @@ from .forms import UserForm, ProfileForm | @@ -12,7 +12,7 @@ from .forms import UserForm, ProfileForm | ||
12 | class UsersListView(HasRoleMixin, LoginRequiredMixin, generic.ListView): | 12 | class UsersListView(HasRoleMixin, LoginRequiredMixin, generic.ListView): |
13 | 13 | ||
14 | allowed_roles = ['system_admin'] | 14 | allowed_roles = ['system_admin'] |
15 | - login_url = '/' | 15 | + login_url = reverse_lazy("core:home") |
16 | redirect_field_name = 'next' | 16 | redirect_field_name = 'next' |
17 | template_name = 'list_users.html' | 17 | template_name = 'list_users.html' |
18 | context_object_name = 'users' | 18 | context_object_name = 'users' |
@@ -25,7 +25,7 @@ class UsersListView(HasRoleMixin, LoginRequiredMixin, generic.ListView): | @@ -25,7 +25,7 @@ class UsersListView(HasRoleMixin, LoginRequiredMixin, generic.ListView): | ||
25 | class Create(HasRoleMixin, LoginRequiredMixin, generic.edit.CreateView): | 25 | class Create(HasRoleMixin, LoginRequiredMixin, generic.edit.CreateView): |
26 | 26 | ||
27 | allowed_roles = ['system_admin'] | 27 | allowed_roles = ['system_admin'] |
28 | - login_url = '/' | 28 | + login_url = reverse_lazy("core:home") |
29 | redirect_field_name = 'next' | 29 | redirect_field_name = 'next' |
30 | template_name = 'users/create.html' | 30 | template_name = 'users/create.html' |
31 | form_class = UserForm | 31 | form_class = UserForm |
@@ -51,7 +51,7 @@ class Create(HasRoleMixin, LoginRequiredMixin, generic.edit.CreateView): | @@ -51,7 +51,7 @@ class Create(HasRoleMixin, LoginRequiredMixin, generic.edit.CreateView): | ||
51 | class Update(HasRoleMixin, LoginRequiredMixin, generic.UpdateView): | 51 | class Update(HasRoleMixin, LoginRequiredMixin, generic.UpdateView): |
52 | 52 | ||
53 | allowed_roles = ['system_admin'] | 53 | allowed_roles = ['system_admin'] |
54 | - login_url = '/' | 54 | + login_url = reverse_lazy("core:home") |
55 | redirect_field_name = 'next' | 55 | redirect_field_name = 'next' |
56 | template_name = 'users/update.html' | 56 | template_name = 'users/update.html' |
57 | slug_field = 'username' | 57 | slug_field = 'username' |
@@ -79,7 +79,7 @@ class Update(HasRoleMixin, LoginRequiredMixin, generic.UpdateView): | @@ -79,7 +79,7 @@ class Update(HasRoleMixin, LoginRequiredMixin, generic.UpdateView): | ||
79 | 79 | ||
80 | class View(LoginRequiredMixin, generic.DetailView): | 80 | class View(LoginRequiredMixin, generic.DetailView): |
81 | 81 | ||
82 | - login_url = '/' | 82 | + login_url = reverse_lazy("core:home") |
83 | redirect_field_name = 'next' | 83 | redirect_field_name = 'next' |
84 | model = User | 84 | model = User |
85 | context_object_name = 'acc' | 85 | context_object_name = 'acc' |
@@ -89,7 +89,7 @@ class View(LoginRequiredMixin, generic.DetailView): | @@ -89,7 +89,7 @@ class View(LoginRequiredMixin, generic.DetailView): | ||
89 | 89 | ||
90 | class Profile(LoginRequiredMixin, generic.DetailView): | 90 | class Profile(LoginRequiredMixin, generic.DetailView): |
91 | 91 | ||
92 | - login_url = '/' | 92 | + login_url = reverse_lazy("core:home") |
93 | redirect_field_name = 'next' | 93 | redirect_field_name = 'next' |
94 | context_object_name = 'user' | 94 | context_object_name = 'user' |
95 | template_name = 'users/profile.html' | 95 | template_name = 'users/profile.html' |
@@ -100,7 +100,7 @@ class Profile(LoginRequiredMixin, generic.DetailView): | @@ -100,7 +100,7 @@ class Profile(LoginRequiredMixin, generic.DetailView): | ||
100 | 100 | ||
101 | class EditProfile(LoginRequiredMixin, generic.UpdateView): | 101 | class EditProfile(LoginRequiredMixin, generic.UpdateView): |
102 | 102 | ||
103 | - login_url = '/' | 103 | + login_url = reverse_lazy("core:home") |
104 | redirect_field_name = 'next' | 104 | redirect_field_name = 'next' |
105 | template_name = 'users/edit_profile.html' | 105 | template_name = 'users/edit_profile.html' |
106 | form_class = UserForm | 106 | form_class = UserForm |