Commit 71559f2308153bfbff407b8c173a0a6cae270b1e
Committed by
GitHub
Exists in
master
and in
5 other branches
Merge pull request #239 from amadeusproject/dev
Update from Sprint VII
Showing
126 changed files
with
4604 additions
and
2296 deletions
Show diff stats
Too many changes.
To preserve performance only 100 of 126 files displayed.
amadeus/settings.py
amadeus/staticfiles/css/base/amadeus.css
... | ... | @@ -18,9 +18,6 @@ |
18 | 18 | padding-bottom: 1%; |
19 | 19 | width: 15%; |
20 | 20 | } |
21 | -.navigation{ | |
22 | - margin: 10% 10% 5% 5%; | |
23 | -} | |
24 | 21 | .breadcrumb{ |
25 | 22 | margin-bottom: 5px; |
26 | 23 | } |
... | ... | @@ -320,4 +317,4 @@ body .container .jumbotron-inverse, body .container .well-inverse, body .contain |
320 | 317 | |
321 | 318 | .notification-count { |
322 | 319 | background-color: #FF0000; |
323 | 320 | -} |
321 | +} | |
324 | 322 | \ No newline at end of file | ... | ... |
amadeus/uploads/ciencia-da-computacao/teorica/tipfef/Apresentacao_da_Cadidatura_a_Marketing_-_Matheus_Lins.pptx
0 → 100644
No preview for this file type
amadeus/uploads/ciencia-da-computacao/teorica/tipfef/Cartao_Outubro.pdf
0 → 100644
No preview for this file type
amadeus/uploads/sistemas-de-informacao/algoritmo/topico-1/Riachuelo_Outubro.pdf
0 → 100644
No preview for this file type
... | ... | @@ -0,0 +1,17 @@ |
1 | +from django import forms | |
2 | +from .models import EmailBackend | |
3 | +from django.utils.translation import ugettext_lazy as _ | |
4 | + | |
5 | +class EmailBackendForm(forms.ModelForm): | |
6 | + | |
7 | + class Meta: | |
8 | + model = EmailBackend | |
9 | + fields = ('description', 'host', 'port', 'username', 'password', 'safe_conection', 'default_from_email') | |
10 | + help_texts = { | |
11 | + 'host': _('A host name. Example: smtp.gmail.com'), | |
12 | + 'port': _('A port number'), | |
13 | + 'usermane': _('Your host username'), | |
14 | + 'password': _('Your host password'), | |
15 | + } | |
16 | + | |
17 | + | |
0 | 18 | \ No newline at end of file | ... | ... |
app/locale/he_il/LC_MESSAGES/django.po
... | ... | @@ -1,178 +0,0 @@ |
1 | -# SOME DESCRIPTIVE TITLE. | |
2 | -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER | |
3 | -# This file is distributed under the same license as the PACKAGE package. | |
4 | -# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | |
5 | -# | |
6 | -#, fuzzy | |
7 | -msgid "" | |
8 | -msgstr "" | |
9 | -"Project-Id-Version: PACKAGE VERSION\n" | |
10 | -"Report-Msgid-Bugs-To: \n" | |
11 | -"POT-Creation-Date: 2016-09-16 02:41-0300\n" | |
12 | -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | |
13 | -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | |
14 | -"Language-Team: LANGUAGE <LL@li.org>\n" | |
15 | -"Language: \n" | |
16 | -"MIME-Version: 1.0\n" | |
17 | -"Content-Type: text/plain; charset=UTF-8\n" | |
18 | -"Content-Transfer-Encoding: 8bit\n" | |
19 | - | |
20 | -#: app/templates/app/base.html:10 | |
21 | -msgid "The Project" | |
22 | -msgstr "" | |
23 | - | |
24 | -#: app/templates/app/base.html:11 | |
25 | -msgid "CCTE Group" | |
26 | -msgstr "" | |
27 | - | |
28 | -#: app/templates/app/base.html:14 | |
29 | -msgid "Hi" | |
30 | -msgstr "" | |
31 | - | |
32 | -#: app/templates/app/base.html:16 | |
33 | -msgid "See Profile" | |
34 | -msgstr "" | |
35 | - | |
36 | -#: app/templates/app/base.html:17 | |
37 | -msgid "Settings" | |
38 | -msgstr "" | |
39 | - | |
40 | -#: app/templates/app/base.html:18 | |
41 | -msgid "Logout" | |
42 | -msgstr "" | |
43 | - | |
44 | -#: app/templates/app/index.html:6 | |
45 | -msgid "You have:" | |
46 | -msgstr "" | |
47 | - | |
48 | -#: app/templates/app/index.html:10 app/templates/home.html:88 | |
49 | -msgid "Pending Tasks" | |
50 | -msgstr "" | |
51 | - | |
52 | -#: app/templates/app/index.html:14 | |
53 | -msgid "Users Online" | |
54 | -msgstr "" | |
55 | - | |
56 | -#: app/templates/app/index.html:20 | |
57 | -msgid "You can:" | |
58 | -msgstr "" | |
59 | - | |
60 | -#: app/templates/app/index.html:24 app/templates/home_professor.html:25 | |
61 | -msgid "Create Course" | |
62 | -msgstr "" | |
63 | - | |
64 | -#: app/templates/app/index.html:29 app/templates/home.html:93 | |
65 | -msgid "Manage Users" | |
66 | -msgstr "" | |
67 | - | |
68 | -#: app/templates/app/index.html:33 app/templates/home.html:96 | |
69 | -msgid "Manage Courses" | |
70 | -msgstr "" | |
71 | - | |
72 | -#: app/templates/app/index.html:37 | |
73 | -msgid "Gerenciar Categorias" | |
74 | -msgstr "" | |
75 | - | |
76 | -#: app/templates/app/index.html:45 | |
77 | -msgid "Your course(s):" | |
78 | -msgstr "" | |
79 | - | |
80 | -#: app/templates/app/index.html:46 | |
81 | -msgid "No courses subscribed yet" | |
82 | -msgstr "" | |
83 | - | |
84 | -#: app/templates/app/index.html:56 | |
85 | -msgid "Search course:" | |
86 | -msgstr "" | |
87 | - | |
88 | -#: app/templates/app/index.html:62 | |
89 | -msgid "Search" | |
90 | -msgstr "" | |
91 | - | |
92 | -#: app/templates/app/index.html:67 | |
93 | -msgid "Most popular keywords:" | |
94 | -msgstr "" | |
95 | - | |
96 | -#: app/templates/home.html:86 | |
97 | -msgid "Home" | |
98 | -msgstr "" | |
99 | - | |
100 | -#: app/templates/home.html:87 app/templates/home_student.html:25 | |
101 | -msgid "Profile" | |
102 | -msgstr "" | |
103 | - | |
104 | -#: app/templates/home.html:90 | |
105 | -msgid "My courses" | |
106 | -msgstr "" | |
107 | - | |
108 | -#: app/templates/home.html:105 app/templates/home_professor.html:33 | |
109 | -msgid "Courses" | |
110 | -msgstr "" | |
111 | - | |
112 | -#: app/templates/home.html:131 | |
113 | -msgid "No pending tasks at the moment." | |
114 | -msgstr "" | |
115 | - | |
116 | -#: app/templates/home_admin_content.html:10 | |
117 | -msgid "Students" | |
118 | -msgstr "" | |
119 | - | |
120 | -#: app/templates/home_admin_content.html:11 | |
121 | -msgid "Beginning" | |
122 | -msgstr "" | |
123 | - | |
124 | -#: app/templates/home_admin_content.html:12 | |
125 | -msgid "End" | |
126 | -msgstr "" | |
127 | - | |
128 | -#: app/templates/home_admin_content.html:15 | |
129 | -msgid "Edit" | |
130 | -msgstr "" | |
131 | - | |
132 | -#: app/templates/home_professor.html:20 app/templates/home_student.html:21 | |
133 | -msgid "Menu" | |
134 | -msgstr "" | |
135 | - | |
136 | -#: app/templates/home_professor.html:24 | |
137 | -msgid "Pending tasks" | |
138 | -msgstr "" | |
139 | - | |
140 | -#: app/templates/home_professor.html:26 | |
141 | -msgid "Manage Course" | |
142 | -msgstr "" | |
143 | - | |
144 | -#: app/templates/home_professor.html:43 | |
145 | -msgid "Students:" | |
146 | -msgstr "" | |
147 | - | |
148 | -#: app/templates/home_professor.html:44 | |
149 | -msgid "Beginning:" | |
150 | -msgstr "" | |
151 | - | |
152 | -#: app/templates/home_professor.html:45 | |
153 | -msgid "End:" | |
154 | -msgstr "" | |
155 | - | |
156 | -#: app/templates/home_professor.html:52 | |
157 | -msgid "You didn't create any course yet." | |
158 | -msgstr "" | |
159 | - | |
160 | -#: app/templates/home_professor.html:58 app/templates/home_student.html:73 | |
161 | -msgid "Goals" | |
162 | -msgstr "" | |
163 | - | |
164 | -#: app/templates/home_student.html:26 | |
165 | -msgid "My Courses" | |
166 | -msgstr "" | |
167 | - | |
168 | -#: app/templates/home_student.html:27 | |
169 | -msgid "Google accounts" | |
170 | -msgstr "" | |
171 | - | |
172 | -#: app/templates/home_student.html:34 | |
173 | -msgid "Notifications" | |
174 | -msgstr "" | |
175 | - | |
176 | -#: app/templates/home_student.html:76 | |
177 | -msgid "Favorites" | |
178 | -msgstr "" |
app/locale/pt_BR/LC_MESSAGES/django.po
... | ... | @@ -8,7 +8,7 @@ msgid "" |
8 | 8 | msgstr "" |
9 | 9 | "Project-Id-Version: PACKAGE VERSION\n" |
10 | 10 | "Report-Msgid-Bugs-To: \n" |
11 | -"POT-Creation-Date: 2016-09-07 00:13-0300\n" | |
11 | +"POT-Creation-Date: 2016-10-26 14:47-0300\n" | |
12 | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
13 | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
14 | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" |
... | ... | @@ -18,161 +18,198 @@ msgstr "" |
18 | 18 | "Content-Transfer-Encoding: 8bit\n" |
19 | 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 "" | |
21 | +#: app/templates/home.html:69 app/templates/home_professor.html:20 | |
22 | +#: app/templates/home_student.html:21 | |
23 | +msgid "Menu" | |
24 | +msgstr "Menu" | |
28 | 25 | |
29 | -#: app/templates/app/base.html:14 | |
30 | -msgid "Hi" | |
31 | -msgstr "" | |
26 | +#: app/templates/home.html:73 | |
27 | +msgid "Home" | |
28 | +msgstr "Início" | |
32 | 29 | |
33 | -#: app/templates/app/base.html:16 | |
34 | -#, fuzzy | |
35 | -#| msgid "Profile" | |
36 | -msgid "See Profile" | |
30 | +#: app/templates/home.html:74 app/templates/home_student.html:25 | |
31 | +msgid "Profile" | |
37 | 32 | msgstr "Perfil" |
38 | 33 | |
39 | -#: app/templates/app/base.html:17 | |
40 | -msgid "Settings" | |
41 | -msgstr "Configurações" | |
42 | - | |
43 | -#: app/templates/app/base.html:18 | |
44 | -msgid "Logout" | |
45 | -msgstr "Sair" | |
46 | - | |
47 | -#: app/templates/app/index.html:6 | |
48 | -msgid "You have:" | |
49 | -msgstr "" | |
50 | - | |
51 | -#: app/templates/app/index.html:10 | |
34 | +#: app/templates/home.html:76 | |
52 | 35 | #, fuzzy |
53 | -#| msgid "Pending tasks" | |
54 | -msgid "Pending Tasks" | |
55 | -msgstr "Tarefas Pendentes" | |
56 | - | |
57 | -#: app/templates/app/index.html:14 | |
58 | -msgid "Users Online" | |
59 | -msgstr "Usuários Online" | |
60 | - | |
61 | -#: app/templates/app/index.html:20 | |
62 | -msgid "You can:" | |
63 | -msgstr "" | |
36 | +#| msgid "My Courses" | |
37 | +msgid "My courses" | |
38 | +msgstr "Meus Cursos" | |
64 | 39 | |
65 | -#: app/templates/app/index.html:24 app/templates/home_app.html:26 | |
66 | -#: app/templates/home_professor.html:23 | |
67 | -msgid "Create Course" | |
68 | -msgstr "Criar Curso" | |
40 | +#: app/templates/home.html:78 app/templates/home_student.html:27 | |
41 | +#, fuzzy | |
42 | +#| msgid "Courses" | |
43 | +msgid "All Courses" | |
44 | +msgstr "Cursos" | |
69 | 45 | |
70 | -#: app/templates/app/index.html:29 | |
46 | +#: app/templates/home.html:80 | |
71 | 47 | #, fuzzy |
72 | 48 | #| msgid "Manage Course" |
73 | 49 | msgid "Manage Users" |
74 | -msgstr "Gerenciar Curso" | |
50 | +msgstr "Gerenciar Usuários" | |
75 | 51 | |
76 | -#: app/templates/app/index.html:33 | |
52 | +#: app/templates/home.html:84 | |
77 | 53 | #, fuzzy |
78 | 54 | #| msgid "Manage Course" |
79 | 55 | msgid "Manage Courses" |
80 | -msgstr "Gerenciar Curso" | |
81 | - | |
82 | -#: app/templates/app/index.html:37 | |
83 | -msgid "Gerenciar Categorias" | |
84 | -msgstr "" | |
85 | - | |
86 | -#: app/templates/app/index.html:45 | |
87 | -msgid "Your course(s):" | |
88 | -msgstr "" | |
56 | +msgstr "Gerenciar Cursos" | |
89 | 57 | |
90 | -#: app/templates/app/index.html:46 | |
91 | -msgid "No courses subscribed yet" | |
92 | -msgstr "" | |
58 | +#: app/templates/home.html:101 app/templates/home_professor.html:34 | |
59 | +msgid "Courses" | |
60 | +msgstr "Cursos" | |
93 | 61 | |
94 | -#: app/templates/app/index.html:56 | |
95 | -msgid "Search course:" | |
96 | -msgstr "" | |
62 | +#: app/templates/home_admin_content.html:10 | |
63 | +#, fuzzy | |
64 | +#| msgid "Students:" | |
65 | +msgid "Students" | |
66 | +msgstr "Alunos" | |
97 | 67 | |
98 | -#: app/templates/app/index.html:62 | |
99 | -msgid "Search" | |
100 | -msgstr "" | |
68 | +#: app/templates/home_admin_content.html:11 | |
69 | +#, fuzzy | |
70 | +#| msgid "Beginning:" | |
71 | +msgid "Beginning" | |
72 | +msgstr "Começo" | |
101 | 73 | |
102 | -#: app/templates/app/index.html:67 | |
103 | -msgid "Most popular keywords:" | |
104 | -msgstr "" | |
74 | +#: app/templates/home_admin_content.html:12 | |
75 | +#, fuzzy | |
76 | +#| msgid "End:" | |
77 | +msgid "End" | |
78 | +msgstr "Fim:" | |
105 | 79 | |
106 | -#: app/templates/home_app.html:14 app/templates/home_professor.html:9 | |
107 | -#: app/templates/home_student.html:9 | |
108 | -msgid "Home" | |
109 | -msgstr "Início" | |
80 | +#: app/templates/home_admin_content.html:15 | |
81 | +msgid "Edit" | |
82 | +msgstr "Editar" | |
110 | 83 | |
111 | -#: app/templates/home_app.html:22 app/templates/home_professor.html:22 | |
84 | +#: app/templates/home_professor.html:24 | |
112 | 85 | msgid "Pending tasks" |
113 | 86 | msgstr "Tarefas Pendentes" |
114 | 87 | |
115 | -#: app/templates/home_app.html:23 | |
116 | -#, fuzzy | |
117 | -#| msgid "Users Online" | |
118 | -msgid "Users Online (1)" | |
119 | -msgstr "Usuários Online" | |
120 | - | |
121 | -#: app/templates/home_app.html:24 | |
122 | -#, fuzzy | |
123 | -#| msgid "Courses" | |
124 | -msgid "Course" | |
125 | -msgstr "Cursos" | |
88 | +#: app/templates/home_professor.html:25 | |
89 | +msgid "Create Course" | |
90 | +msgstr "Criar Curso" | |
126 | 91 | |
127 | -#: app/templates/home_app.html:27 app/templates/home_professor.html:24 | |
92 | +#: app/templates/home_professor.html:26 | |
128 | 93 | msgid "Manage Course" |
129 | 94 | msgstr "Gerenciar Curso" |
130 | 95 | |
131 | -#: app/templates/home_app.html:35 app/templates/home_professor.html:31 | |
132 | -msgid "Courses" | |
133 | -msgstr "Cursos" | |
134 | - | |
135 | -#: app/templates/home_app.html:51 app/templates/home_professor.html:48 | |
136 | -msgid "You didn't create any course yet." | |
137 | -msgstr "Você não criou nenhum curso ainda." | |
138 | - | |
139 | -#: app/templates/home_app.html:59 app/templates/home_professor.html:54 | |
140 | -#: app/templates/home_student.html:60 | |
141 | -msgid "Goals" | |
142 | -msgstr "Metas" | |
143 | - | |
144 | -#: app/templates/home_professor.html:18 app/templates/home_student.html:18 | |
145 | -msgid "Menu" | |
146 | -msgstr "Menu" | |
147 | - | |
148 | -#: app/templates/home_professor.html:40 | |
96 | +#: app/templates/home_professor.html:44 | |
149 | 97 | msgid "Students:" |
150 | 98 | msgstr "Alunos" |
151 | 99 | |
152 | -#: app/templates/home_professor.html:41 | |
100 | +#: app/templates/home_professor.html:45 | |
153 | 101 | msgid "Beginning:" |
154 | 102 | msgstr "Começo" |
155 | 103 | |
156 | -#: app/templates/home_professor.html:42 | |
104 | +#: app/templates/home_professor.html:46 | |
157 | 105 | msgid "End:" |
158 | -msgstr "Fim" | |
106 | +msgstr "Fim:" | |
159 | 107 | |
160 | -#: app/templates/home_student.html:22 | |
161 | -msgid "Profile" | |
162 | -msgstr "Perfil" | |
108 | +#: app/templates/home_professor.html:53 | |
109 | +msgid "You didn't create any course yet." | |
110 | +msgstr "Você não criou nenhum curso ainda." | |
163 | 111 | |
164 | -#: app/templates/home_student.html:23 | |
112 | +#: app/templates/home_student.html:26 | |
165 | 113 | msgid "My Courses" |
166 | 114 | msgstr "Meus Cursos" |
167 | 115 | |
168 | -#: app/templates/home_student.html:24 | |
116 | +#: app/templates/home_student.html:28 | |
169 | 117 | msgid "Google accounts" |
170 | 118 | msgstr "Contas do Google" |
171 | 119 | |
172 | -#: app/templates/home_student.html:31 | |
120 | +#: app/templates/home_student.html:35 | |
173 | 121 | msgid "Notifications" |
174 | 122 | msgstr "Notificações" |
175 | 123 | |
176 | -#: app/templates/home_student.html:63 | |
177 | -msgid "Favorites" | |
178 | -msgstr "Favoritos" | |
124 | +#: app/templates/home_student.html:48 | |
125 | +msgid "His course has notified a new activity!" | |
126 | +msgstr "Seu curso tem uma nova atividade!" | |
127 | + | |
128 | +#: app/templates/home_student.html:51 app/templates/home_student.html:59 | |
129 | +#: app/templates/home_student.html:67 | |
130 | +msgid "Go" | |
131 | +msgstr "Ir" | |
132 | + | |
133 | +#: app/templates/home_student.html:56 | |
134 | +msgid "His teacher has notified a new material!" | |
135 | +msgstr "Seu professor adicionou um novo material!" | |
136 | + | |
137 | +#: app/templates/home_student.html:64 | |
138 | +msgid "You have a new guardian!" | |
139 | +msgstr "Você tem um novo tutor!" | |
140 | + | |
141 | +#: app/templates/home_teacher_student_content.html:14 | |
142 | +msgid "at" | |
143 | +msgstr "em" | |
144 | + | |
145 | +#: app/templates/home_teacher_student_content.html:15 | |
146 | +msgid "ago" | |
147 | +msgstr "atrás" | |
148 | + | |
149 | +#~ msgid "The Project" | |
150 | +#~ msgstr "O projeto" | |
151 | + | |
152 | +#~ msgid "CCTE Group" | |
153 | +#~ msgstr "Grupo CCTE" | |
154 | + | |
155 | +#~ msgid "Hi" | |
156 | +#~ msgstr "Olá" | |
157 | + | |
158 | +#, fuzzy | |
159 | +#~| msgid "Profile" | |
160 | +#~ msgid "See Profile" | |
161 | +#~ msgstr "Perfil" | |
162 | + | |
163 | +#~ msgid "Settings" | |
164 | +#~ msgstr "Configurações" | |
165 | + | |
166 | +#~ msgid "Logout" | |
167 | +#~ msgstr "Sair" | |
168 | + | |
169 | +#~ msgid "You have:" | |
170 | +#~ msgstr "Você tem:" | |
171 | + | |
172 | +#, fuzzy | |
173 | +#~| msgid "Pending tasks" | |
174 | +#~ msgid "Pending Tasks" | |
175 | +#~ msgstr "Tarefas Pendentes" | |
176 | + | |
177 | +#~ msgid "Users Online" | |
178 | +#~ msgstr "Usuários Online" | |
179 | + | |
180 | +#~ msgid "You can:" | |
181 | +#~ msgstr "Você pode:" | |
182 | + | |
183 | +#~ msgid "Manage Categories" | |
184 | +#~ msgstr "Gerenciar Categorias" | |
185 | + | |
186 | +#~ msgid "Your course(s):" | |
187 | +#~ msgstr "Seus cursos:" | |
188 | + | |
189 | +#~ msgid "No courses subscribed yet" | |
190 | +#~ msgstr "Nenhum curso inscrito ainda" | |
191 | + | |
192 | +#~ msgid "Search course:" | |
193 | +#~ msgstr "Pesquisar curso" | |
194 | + | |
195 | +#~ msgid "Search" | |
196 | +#~ msgstr "Pesquisar" | |
197 | + | |
198 | +#~ msgid "Most popular keywords:" | |
199 | +#~ msgstr "Palavras mais populares:" | |
200 | + | |
201 | +#, fuzzy | |
202 | +#~| msgid "Users Online" | |
203 | +#~ msgid "Users Online (1)" | |
204 | +#~ msgstr "Usuários Online" | |
205 | + | |
206 | +#, fuzzy | |
207 | +#~| msgid "Courses" | |
208 | +#~ msgid "Course" | |
209 | +#~ msgstr "Cursos" | |
210 | + | |
211 | +#~ msgid "Goals" | |
212 | +#~ msgstr "Metas" | |
213 | + | |
214 | +#~ msgid "Favorites" | |
215 | +#~ msgstr "Favoritos" | ... | ... |
app/models.py
1 | 1 | from django.db import models |
2 | - | |
2 | +from django.utils.translation import ugettext_lazy as _ | |
3 | 3 | # Create your models here. |
4 | + | |
5 | +class EmailBackend(models.Model): | |
6 | + | |
7 | + SAFE_CONECTIONS = ( | |
8 | + (0, _('No')), | |
9 | + (1, _('TLS, if available')), | |
10 | + (2, 'TLS'), | |
11 | + (3, 'SSL'), | |
12 | + | |
13 | + ) | |
14 | + description = models.CharField(_('Description'), max_length=100) | |
15 | + host = models.URLField(_('E-mail Host')) | |
16 | + port = models.CharField(_('Email Port'), max_length=4, blank=True) | |
17 | + username = models.CharField(_('Email host username'), max_length=30) | |
18 | + password = models.CharField(_('Email host password'), max_length=30, blank=True) | |
19 | + safe_conection = models.IntegerField(_('Use safe conection'), choices=SAFE_CONECTIONS, default=0) | |
20 | + default_from_email = models.EmailField(_('Default from email'), blank=True) | |
21 | + | |
22 | + class Meta: | |
23 | + verbose_name = _('Amadeus SMTP setting') | |
24 | + verbose_name_plural = _('Amadeus SMTP settings') | |
25 | + | |
26 | + def __str__(self): | |
27 | + return _('Custom email Backend') | ... | ... |
... | ... | @@ -0,0 +1,135 @@ |
1 | +{% extends "home.html" %} | |
2 | + | |
3 | +{% load static i18n django_bootstrap_breadcrumbs permission_tags %} | |
4 | + | |
5 | +{% block breadcrumbs %} | |
6 | + {{ block.super }} | |
7 | + {% breadcrumb 'Settings' 'app:settings' %} | |
8 | +{% endblock %} | |
9 | + | |
10 | +{% block content %} | |
11 | + <!-- Nav tabs --> | |
12 | + <ul class="nav nav-tabs md-pills pills-ins" role="tablist"> | |
13 | + <li class="nav-item"> | |
14 | + <a class="nav-link active" data-toggle="tab" href="#panel1" role="tab"><i class="fa fa-cog"></i> System</a> | |
15 | + </li> | |
16 | + <li class="nav-item"> | |
17 | + <a class="nav-link" data-toggle="tab" href="#panel2" role="tab"><i class="fa fa-envelope"></i> Mail Sender</a> | |
18 | + </li> | |
19 | + <li class="nav-item"> | |
20 | + <a class="nav-link" data-toggle="tab" href="#panel3" role="tab"><i class="fa fa-lock"></i> Security</a> | |
21 | + </li> | |
22 | + </ul> | |
23 | + | |
24 | + <!-- Tab panels --> | |
25 | + <div class="tab-content"> | |
26 | + <!--Panel 1--> | |
27 | + <div class="tab-pane fade in active" id="panel1" role="tabpanel"> | |
28 | + <div class="panel panel-default"> | |
29 | + <div class="panel-body"> | |
30 | + <h3><b>General</b></h3> | |
31 | + <div class="panel panel-default"> | |
32 | + <div class="panel-body"> | |
33 | + Content | |
34 | + <hr> | |
35 | + </div> | |
36 | + </div> | |
37 | + </div> | |
38 | + </div> | |
39 | + </div> | |
40 | + <!--/.Panel 1--> | |
41 | + | |
42 | + <!--Panel 2--> | |
43 | + <div class="tab-pane fade" id="panel2" role="tabpanel"> | |
44 | + <div class="panel panel-default"> | |
45 | + <div class="panel-body"> | |
46 | + <h3><b>Outgoing Server (SMTP)</b></h3> | |
47 | + <div class="panel panel-default"> | |
48 | + <div class="panel-body"> | |
49 | + <h4><b>Settings</b></b></h4> | |
50 | + <hr> | |
51 | + <div class="form-group label-floating"> | |
52 | + <label class="control-label" for="focusedInput1">Description</label> | |
53 | + <input class="form-control" id="focusedInput1" type="text"> | |
54 | + </div> | |
55 | + <div class="form-group label-floating"> | |
56 | + <label class="control-label" for="focusedInput1">Server</label> | |
57 | + <input class="form-control" id="focusedInput1" type="text"> | |
58 | + </div> | |
59 | + <div class="form-group label-floating"> | |
60 | + <label for="number" class="col-md_10 control-label">Port</label> | |
61 | + <div class="col-md-2"> | |
62 | + <input type="number" class="form-control" id="inputNumber"> | |
63 | + </div> | |
64 | + <div> | |
65 | + <label for="number">Deafault:</label> 25 | |
66 | + </div> | |
67 | + </div> | |
68 | + </div> | |
69 | + </div> | |
70 | + </div> | |
71 | + <div class="panel-body"> | |
72 | + <div class="panel panel-default"> | |
73 | + <div class="panel-body"> | |
74 | + <h4><b>Security and Authentication</b></h4> | |
75 | + <hr> | |
76 | + <div class="form-group label-floating"> | |
77 | + <label class="control-label" for="focusedInput1">User Name</label> | |
78 | + <input class="form-control" id="focusedInput1" type="text"> | |
79 | + </div> | |
80 | + <div class="form-group label-floating"> | |
81 | + <label class="control-label" for="focusedInput1">Password</label> | |
82 | + <input class="form-control" id="focusedInput1" type="password"> | |
83 | + </div> | |
84 | + <div class="form-group"> | |
85 | + <p><b>Use safe contection</b></p> | |
86 | + <div class="col-md-10"> | |
87 | + <div class="radio radio-primary"> | |
88 | + <label> | |
89 | + <input type="radio" name="optionsRadios" id="optionsRadios1" value="option1"> | |
90 | + No | |
91 | + </label> | |
92 | + <label> | |
93 | + <input type="radio" name="optionsRadios" id="optionsRadios2" value="option2"> | |
94 | + TSL, If available | |
95 | + </label> | |
96 | + <label> | |
97 | + <input type="radio" name="optionsRadios" id="optionsRadios3" value="option3"> | |
98 | + TSL | |
99 | + </label> | |
100 | + <label> | |
101 | + <input type="radio" name="optionsRadios" id="optionsRadios4" value="option4" checked=""> | |
102 | + SSL | |
103 | + </label> | |
104 | + </div> | |
105 | + </div> | |
106 | + </div> | |
107 | + </div> | |
108 | + </div> | |
109 | + <button type="button" class="btn btn-success btn-raised">Save changes</button> | |
110 | + </div> | |
111 | + </div> | |
112 | + </div> | |
113 | + | |
114 | + <!--/.Panel 2--> | |
115 | + | |
116 | + <!--Panel 3--> | |
117 | + <div class="tab-pane fade" id="panel3" role="tabpanel"> | |
118 | + <div class="panel panel-default"> | |
119 | + <div class="panel-body"> | |
120 | + <div class="togglebutton"> | |
121 | + <label> | |
122 | + <input type="checkbox" checked> <b>Allow users self-enroll.</b> | |
123 | + </label> | |
124 | + </div> | |
125 | + <div class="togglebutton"> | |
126 | + <label> | |
127 | + <input type="checkbox"> <b>Put the system in maintenance mode.</b> | |
128 | + </label> | |
129 | + </div> | |
130 | + <button type="button" class="btn btn-primary">Save changes</button> | |
131 | + </div> | |
132 | + </div> | |
133 | + </div> | |
134 | + </div> | |
135 | +{% endblock content %} | |
0 | 136 | \ No newline at end of file | ... | ... |
app/templates/home.html
... | ... | @@ -3,55 +3,61 @@ |
3 | 3 | {% load static i18n django_bootstrap_breadcrumbs permission_tags %} |
4 | 4 | |
5 | 5 | {% block javascript %} |
6 | - {% if page_obj %} | |
7 | - <script type="text/javascript"> | |
8 | - var pageNum = {{ page_obj.number }}; // The latest page loaded | |
9 | - var numberPages = {{ paginator.num_pages }}; // Indicates the number of pages | |
10 | - var baseUrl = '{% url "app:index" %}'; | |
6 | + {% if page_obj %} | |
7 | + <script type="text/javascript"> | |
8 | + {% if page_obj and paginator %} | |
9 | + var pageNum = {{ page_obj.number }}; // The latest page loaded | |
10 | + var numberPages = {{ paginator.num_pages }}; // Indicates the number of pages | |
11 | + {% else %} | |
12 | + var pageNum = 0 ; // The latest page loaded | |
13 | + var numberPages = 0 ; // Indicates the number of pages | |
14 | + {% endif %} | |
15 | + | |
16 | + var baseUrl = '{% url "app:index" %}'; | |
11 | 17 | |
12 | - // loadOnScroll handler | |
13 | - var loadOnScroll = function() { | |
14 | - // If the current scroll position is past out cutoff point... | |
15 | - if ($(window).scrollTop() >= $(document).height() - $(window).height() - 10) { | |
16 | - // temporarily unhook the scroll event watcher so we don't call a bunch of times in a row | |
17 | - $(window).unbind(); | |
18 | - // execute the load function below that will visit the view and return the content | |
19 | - loadItems(); | |
20 | - } | |
21 | - }; | |
18 | + // loadOnScroll handler | |
19 | + var loadOnScroll = function() { | |
20 | + // If the current scroll position is past out cutoff point... | |
21 | + if ($(window).scrollTop() >= $(document).height() - $(window).height() - 10) { | |
22 | + // temporarily unhook the scroll event watcher so we don't call a bunch of times in a row | |
23 | + $(window).unbind(); | |
24 | + // execute the load function below that will visit the view and return the content | |
25 | + loadItems(); | |
26 | + } | |
27 | + }; | |
22 | 28 | |
23 | - var loadItems = function() { | |
24 | - // Check if page is equal to the number of pages | |
25 | - if (pageNum == numberPages) { | |
26 | - return false | |
27 | - } | |
28 | - // Update the page number | |
29 | - pageNum = pageNum + 1; | |
29 | + var loadItems = function() { | |
30 | + // Check if page is equal to the number of pages | |
31 | + if (pageNum == numberPages) { | |
32 | + return false | |
33 | + } | |
34 | + // Update the page number | |
35 | + pageNum = pageNum + 1; | |
30 | 36 | |
31 | - $("#loading").show(); | |
32 | - // Configure the url we're about to hit | |
33 | - setTimeout(function (){ | |
34 | - $.ajax({ | |
35 | - url: baseUrl, | |
36 | - data: {'page': pageNum}, | |
37 | - success: function(data) { | |
38 | - $("#loading").hide(); | |
37 | + $("#loading").show(); | |
38 | + // Configure the url we're about to hit | |
39 | + setTimeout(function (){ | |
40 | + $.ajax({ | |
41 | + url: baseUrl, | |
42 | + data: {'page': pageNum}, | |
43 | + success: function(data) { | |
44 | + $("#loading").hide(); | |
39 | 45 | |
40 | - $("#timeline").append(data); | |
41 | - }, | |
42 | - complete: function(data, textStatus){ | |
43 | - // Turn the scroll monitor back on | |
44 | - $(window).bind('scroll', loadOnScroll); | |
45 | - } | |
46 | - }); | |
47 | - }, 1000) | |
48 | - }; | |
46 | + $("#timeline").append(data); | |
47 | + }, | |
48 | + complete: function(data, textStatus){ | |
49 | + // Turn the scroll monitor back on | |
50 | + $(window).bind('scroll', loadOnScroll); | |
51 | + } | |
52 | + }); | |
53 | + }, 1000) | |
54 | + }; | |
49 | 55 | |
50 | - $(document).ready(function(){ | |
51 | - $(window).bind('scroll', loadOnScroll); | |
52 | - }); | |
53 | - </script> | |
54 | - {% endif %} | |
56 | + $(document).ready(function(){ | |
57 | + $(window).bind('scroll', loadOnScroll); | |
58 | + }); | |
59 | + </script> | |
60 | + {% endif %} | |
55 | 61 | {% endblock %} |
56 | 62 | |
57 | 63 | {% block breadcrumbs %} |
... | ... | @@ -64,9 +70,9 @@ |
64 | 70 | {% endblock %} |
65 | 71 | |
66 | 72 | {% block sidebar %} |
67 | - <div class="panel panel-primary navigation"> | |
73 | + <div class="panel panel-primary"> | |
68 | 74 | <div class="panel-heading"> |
69 | - <h4>Menu</h4> | |
75 | + <h4>{% trans 'Menu' %}</h4> | |
70 | 76 | </div> |
71 | 77 | <div class="panel-body"> |
72 | 78 | <ul class="nav nav-pills nav-stacked"> |
... | ... | @@ -74,10 +80,12 @@ |
74 | 80 | <li><a href="{% url 'users:profile' %}">{% trans 'Profile' %}</a></li> |
75 | 81 | {% if user|has_role:'student' or not user.is_staff %} |
76 | 82 | <li><a href="{% url 'course:manage' %}">{% trans 'My courses' %}</a></li> |
83 | + <li><a href="{% url 'course:all_courses' %}">{% trans 'All Courses' %}</a></li> | |
77 | 84 | {% endif %} |
78 | - <li><a href="{% url 'core:guest' %}">{% trans 'All Courses' %}</a></li> | |
85 | + <li><a href="{% url 'core:guest' %}">{% trans 'Courses' %}</a></li> | |
79 | 86 | {% if user|has_role:'system_admin' %} |
80 | 87 | <li> <a href="{% url 'users:manage' %}">{% trans 'Manage Users' %}</a></li> |
88 | + <li> <a href="{% url 'app:settings' %}">{% trans 'Settings' %}</a></li> | |
81 | 89 | {% endif %} |
82 | 90 | {% if user|has_role:'system_admin' or user|has_role:'professor' %} |
83 | 91 | <li> |
... | ... | @@ -97,19 +105,19 @@ |
97 | 105 | {% endblock %} |
98 | 106 | |
99 | 107 | {% block content %} |
100 | - {% if user|has_role:'system_admin' %} | |
108 | + {% if user|has_role:'system_admin' %} | |
101 | 109 | <h3>{% trans 'Courses' %}</h3> |
102 | 110 | <div id="timeline"> |
103 | - {% include page_template %} | |
111 | + {% include page_template %} | |
104 | 112 | </div> |
105 | - {% else %} | |
113 | + {% else %} | |
106 | 114 | <div id="timeline"> |
107 | 115 | {% include page_template %} |
108 | 116 | </div> |
109 | - {% endif %} | |
110 | - <div id="loading" class="alert alert-primary" role="alert" style="display: none"> | |
111 | - <center> | |
112 | - <span class="fa fa-spin fa-circle-o-notch"></span> | |
113 | - </center> | |
114 | - </div> | |
117 | + {% endif %} | |
118 | + <div id="loading" class="alert alert-primary" role="alert" style="display: none"> | |
119 | + <center> | |
120 | + <span class="fa fa-spin fa-circle-o-notch"></span> | |
121 | + </center> | |
122 | + </div> | |
115 | 123 | {% endblock %} | ... | ... |
app/templates/home_professor.html
... | ... | @@ -15,7 +15,7 @@ |
15 | 15 | {% endblock %} |
16 | 16 | |
17 | 17 | {% block sidebar %} |
18 | - <div class="panel panel-primary navigation"> | |
18 | + <div class="panel panel-primary"> | |
19 | 19 | <div class="panel-heading"> |
20 | 20 | <h5>{% trans 'Menu' %}</h5> |
21 | 21 | </div> |
... | ... | @@ -32,9 +32,9 @@ |
32 | 32 | {% block content %} |
33 | 33 | |
34 | 34 | <h3>{% trans 'Courses' %}</h3> |
35 | - {% if courses|length > 0 %} | |
36 | - {% for course in courses %} | |
37 | - <a href="{% url 'course:view' course.slug %}"> | |
35 | + {% if courses|length > 0 %} | |
36 | + {% for course in courses %} | |
37 | + <a href="{% url 'course:view' course.slug %}"> | |
38 | 38 | <div class="panel panel-default courseHome"> |
39 | 39 | <div class="panel-body"> |
40 | 40 | <p>{{ course }}</p> |
... | ... | @@ -48,9 +48,9 @@ |
48 | 48 | </div> |
49 | 49 | </div> |
50 | 50 | </a> |
51 | - {% endfor %} | |
52 | - {% else %} | |
53 | - <p>{% trans "You didn't create any course yet." %}</p> | |
54 | - {% endif %} | |
51 | + {% endfor %} | |
52 | + {% else %} | |
53 | + <p>{% trans "You didn't create any course yet." %}</p> | |
54 | + {% endif %} | |
55 | 55 | {% endblock %} |
56 | 56 | ... | ... |
app/templates/home_student.html
... | ... | @@ -16,23 +16,23 @@ |
16 | 16 | |
17 | 17 | |
18 | 18 | {% block sidebar %} |
19 | - <div class="panel panel-primary navigation"> | |
19 | + <div class="panel panel-primary"> | |
20 | 20 | <div class="panel-heading"> |
21 | 21 | <h4>{% trans 'Menu' %}</h4> |
22 | 22 | </div> |
23 | 23 | <div class="panel-body"> |
24 | - <ul class="nav nav-pills nav-stacked"> | |
25 | - <li><a href="{% url 'users:profile' %}">{% trans 'Profile' %}</a></li> | |
26 | - <li><a href="{% url 'course:manage' %}">{% trans 'My Courses' %}</a></li> | |
27 | - <li><a href="{% url 'core:guest' %}">{% trans 'All Courses' %}</a></li> | |
28 | - <li><a href="javascript:void(0)">{% trans 'Google accounts' %}</a></li> | |
24 | + <ul class="nav nav-pills nav-stacked"> | |
25 | + <li><a href="{% url 'users:profile' %}">{% trans 'Profile' %}</a></li> | |
26 | + <li><a href="{% url 'course:manage' %}">{% trans 'My Courses' %}</a></li> | |
27 | + <li><a href="{% url 'course:all_courses' %}">{% trans 'All Courses' %}</a></li> | |
28 | + <li><a href="javascript:void(0)">{% trans 'Google accounts' %}</a></li> | |
29 | 29 | </ul> |
30 | 30 | </div> |
31 | 31 | </div> |
32 | 32 | {% endblock %} |
33 | 33 | |
34 | 34 | {% block content %} |
35 | - <h3>{% trans 'Notifications' %}</h3> | |
35 | + <h3>{% trans 'Notifications' %}</h3> | |
36 | 36 | {% if messages %} |
37 | 37 | {% for message in messages %} |
38 | 38 | <div class="alert alert-success alert-dismissible" role="alert"> |
... | ... | @@ -44,27 +44,27 @@ |
44 | 44 | {% endfor %} |
45 | 45 | {% endif %} |
46 | 46 | <div class="panel panel-default"> |
47 | - <div class="panel-body"> | |
48 | - His course has notified a new activity! | |
49 | - </div> | |
50 | - <div class="panel-footer"> | |
51 | - Go | |
52 | - </div> | |
47 | + <div class="panel-body"> | |
48 | + {% trans 'His course has notified a new activity!' %} | |
49 | + </div> | |
50 | + <div class="panel-footer"> | |
51 | + {% trans 'Go' %} | |
52 | + </div> | |
53 | 53 | </div> |
54 | 54 | <div class="panel panel-default"> |
55 | - <div class="panel-body"> | |
56 | - His teacher has notified a new material! | |
57 | - </div> | |
58 | - <div class="panel-footer"> | |
59 | - Go | |
60 | - </div> | |
55 | + <div class="panel-body"> | |
56 | + {% trans 'His teacher has notified a new material!' %} | |
57 | + </div> | |
58 | + <div class="panel-footer"> | |
59 | + {% trans 'Go' %} | |
60 | + </div> | |
61 | 61 | </div> |
62 | 62 | <div class="panel panel-default"> |
63 | - <div class="panel-body"> | |
64 | - You have a new guardian! | |
65 | - </div> | |
66 | - <div class="panel-footer"> | |
67 | - Go | |
68 | - </div> | |
63 | + <div class="panel-body"> | |
64 | + {% trans 'You have a new guardian!' %} | |
65 | + </div> | |
66 | + <div class="panel-footer"> | |
67 | + {% trans 'Go' %} | |
68 | + </div> | |
69 | 69 | </div> |
70 | 70 | {% endblock %} | ... | ... |
app/templates/home_teacher_student_content.html
... | ... | @@ -11,7 +11,7 @@ |
11 | 11 | </div> |
12 | 12 | <div class="col-xs-10 col-md-11"> |
13 | 13 | <h4 class="resource_inline"><b>{{ notification.actor.username }}</b></h4> |
14 | - <p class="resource_inline">{{notification.message}} em : <a href="{% url 'core:notification_read' notification.id %}">{{ notification.action_resource.resource.name }}</a></p> | |
14 | + <p class="resource_inline">{{notification.message}} {% trans 'at' %} : <a href="{% url 'core:notification_read' notification.id %}">{{ notification.action_resource.resource.name }}</a></p> | |
15 | 15 | <p class="timePost"><i> {{ notification.datetime|timesince }} {% trans "ago" %} </i></p> |
16 | 16 | </div> |
17 | 17 | </div> | ... | ... |
app/urls.py
app/views.py
1 | 1 | from django.shortcuts import render |
2 | 2 | from django.views.generic import ListView |
3 | +from django.views import View | |
4 | +from rolepermissions.mixins import HasRoleMixin | |
3 | 5 | from django.contrib.auth.mixins import LoginRequiredMixin |
4 | 6 | from django.core.urlresolvers import reverse_lazy |
5 | 7 | from core.mixins import LogMixin, NotificationMixin |
6 | 8 | from core.models import Notification, Action, Resource, Action_Resource |
7 | 9 | from users.models import User |
10 | +from .models import EmailBackend | |
11 | +from .forms import EmailBackendForm | |
8 | 12 | from courses.models import Course |
9 | 13 | |
10 | 14 | class AppIndex(LoginRequiredMixin, LogMixin, ListView, NotificationMixin): |
... | ... | @@ -42,4 +46,17 @@ class AppIndex(LoginRequiredMixin, LogMixin, ListView, NotificationMixin): |
42 | 46 | |
43 | 47 | return self.response_class(request = self.request, template = self.template_name, context = context, using = self.template_engine, **response_kwargs) |
44 | 48 | |
49 | +class AmadeusSettings(LoginRequiredMixin, HasRoleMixin, View): | |
50 | + allowed_roles = ['system_admin'] | |
51 | + login_url = reverse_lazy("core:home") | |
52 | + redirect_field_name = 'next' | |
53 | + model = EmailBackend | |
54 | + template_name = 'admin_settings.html' | |
55 | + form_class = EmailBackendForm | |
56 | + success_url = reverse_lazy('app:settings') | |
57 | + | |
58 | + def get(self, request): | |
59 | + return render(request, self.template_name, ) | |
60 | + | |
61 | + | |
45 | 62 | ... | ... |
core/locale/he_il/LC_MESSAGES/django.po
... | ... | @@ -1,66 +0,0 @@ |
1 | -# SOME DESCRIPTIVE TITLE. | |
2 | -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER | |
3 | -# This file is distributed under the same license as the PACKAGE package. | |
4 | -# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | |
5 | -# | |
6 | -#, fuzzy | |
7 | -msgid "" | |
8 | -msgstr "" | |
9 | -"Project-Id-Version: PACKAGE VERSION\n" | |
10 | -"Report-Msgid-Bugs-To: \n" | |
11 | -"POT-Creation-Date: 2016-09-16 02:41-0300\n" | |
12 | -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | |
13 | -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | |
14 | -"Language-Team: LANGUAGE <LL@li.org>\n" | |
15 | -"Language: \n" | |
16 | -"MIME-Version: 1.0\n" | |
17 | -"Content-Type: text/plain; charset=UTF-8\n" | |
18 | -"Content-Transfer-Encoding: 8bit\n" | |
19 | - | |
20 | -#: core/templates/base.html:97 | |
21 | -msgid "Log out" | |
22 | -msgstr "" | |
23 | - | |
24 | -#: core/templates/index.html:38 | |
25 | -msgid "Username" | |
26 | -msgstr "" | |
27 | - | |
28 | -#: core/templates/index.html:44 | |
29 | -msgid "Password" | |
30 | -msgstr "" | |
31 | - | |
32 | -#: core/templates/index.html:52 | |
33 | -msgid "Remember Email" | |
34 | -msgstr "" | |
35 | - | |
36 | -#: core/templates/index.html:61 | |
37 | -msgid "Guest" | |
38 | -msgstr "" | |
39 | - | |
40 | -#: core/templates/index.html:64 core/templates/register_user.html:71 | |
41 | -msgid "Login" | |
42 | -msgstr "" | |
43 | - | |
44 | -#: core/templates/index.html:73 | |
45 | -msgid "Sign Up" | |
46 | -msgstr "" | |
47 | - | |
48 | -#: core/templates/register_user.html:29 | |
49 | -msgid "User Register" | |
50 | -msgstr "" | |
51 | - | |
52 | -#: core/templates/register_user.html:68 | |
53 | -msgid "Save" | |
54 | -msgstr "" | |
55 | - | |
56 | -#: core/templates/remember_password.html:27 | |
57 | -msgid "E-mail" | |
58 | -msgstr "" | |
59 | - | |
60 | -#: core/templates/remember_password.html:31 | |
61 | -msgid "Registration" | |
62 | -msgstr "" | |
63 | - | |
64 | -#: core/templates/remember_password.html:35 | |
65 | -msgid "Send" | |
66 | -msgstr "" |
core/locale/pt_BR/LC_MESSAGES/django.po
... | ... | @@ -8,7 +8,7 @@ msgid "" |
8 | 8 | msgstr "" |
9 | 9 | "Project-Id-Version: PACKAGE VERSION\n" |
10 | 10 | "Report-Msgid-Bugs-To: \n" |
11 | -"POT-Creation-Date: 2016-09-07 00:13-0300\n" | |
11 | +"POT-Creation-Date: 2016-10-26 14:47-0300\n" | |
12 | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
13 | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
14 | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" |
... | ... | @@ -17,91 +17,391 @@ msgstr "" |
17 | 17 | "Content-Type: text/plain; charset=UTF-8\n" |
18 | 18 | "Content-Transfer-Encoding: 8bit\n" |
19 | 19 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" |
20 | +#: core/forms.py:12 | |
21 | +msgid "Password" | |
22 | +msgstr "Senha" | |
23 | + | |
24 | +#: core/forms.py:13 | |
25 | +msgid "Password confirmation" | |
26 | +msgstr "Confirmação de senha" | |
27 | + | |
28 | +#: core/forms.py:27 | |
29 | +msgid "There is already a registered User with this e-mail" | |
30 | +msgstr "Já existe um usuário cadastrado com esse e-mail" | |
31 | + | |
32 | +#: core/forms.py:33 | |
33 | +msgid "Please enter a valid date" | |
34 | +msgstr "Por favor, insira uma data válida" | |
35 | + | |
36 | +#: core/forms.py:40 | |
37 | +msgid "There is already a registeres User with this CPF" | |
38 | +msgstr "Já existem usuários cadastrados com este CPF" | |
39 | + | |
40 | +#: core/forms.py:42 | |
41 | +msgid "Please enter a valid CPF" | |
42 | +msgstr "Por favor, insira um CPF válido" | |
43 | + | |
44 | +#: core/forms.py:50 | |
45 | +#, python-format | |
46 | +msgid "The password must contain at least % d characters." | |
47 | +msgstr "A senha deve conter pelo menos % d caracteres" | |
48 | + | |
49 | +#: core/forms.py:55 | |
50 | +msgid "" | |
51 | +"The password must contain at least one letter and at least one digit or a " | |
52 | +"punctuation character." | |
53 | +msgstr "A senha deve conter pelo menos uma letra, um dígito ou caracter de pontuação." | |
54 | + | |
55 | +#: core/forms.py:65 | |
56 | +msgid "The confirmation password is incorrect." | |
57 | +msgstr "A confirmação de senha está incorreta." | |
58 | + | |
59 | +#: core/models.py:8 | |
60 | +msgid "Type" | |
61 | +msgstr "Tipo" | |
20 | 62 | |
21 | -#: core/models.py:15 core/models.py:36 | |
63 | +#: core/models.py:9 | |
64 | +msgid "Icon" | |
65 | +msgstr "" | |
66 | + | |
67 | +#: core/models.py:12 | |
68 | +msgid "Amadeus Mime Type" | |
69 | +msgstr "" | |
70 | + | |
71 | +#: core/models.py:13 | |
72 | +msgid "Amadeus Mime Types" | |
73 | +msgstr "" | |
74 | + | |
75 | +#: core/models.py:27 core/models.py:51 | |
22 | 76 | msgid "Name" |
23 | 77 | msgstr "Nome" |
24 | 78 | |
25 | -#: core/models.py:16 core/models.py:37 | |
26 | -msgid "Created Date" | |
79 | +#: core/models.py:28 core/models.py:52 | |
80 | +msgid "Slug" | |
27 | 81 | msgstr "" |
28 | 82 | |
29 | -#: core/models.py:49 | |
83 | +#: core/models.py:29 core/models.py:53 | |
84 | +msgid "Created Date" | |
85 | +msgstr "Data de criação" | |
86 | + | |
87 | +#: core/models.py:54 | |
88 | +msgid "URL" | |
89 | +msgstr "URL" | |
90 | + | |
91 | +#: core/models.py:67 | |
30 | 92 | msgid "Action_Applied" |
31 | 93 | msgstr "" |
32 | 94 | |
33 | -#: core/models.py:50 | |
95 | +#: core/models.py:68 | |
34 | 96 | msgid "Resource" |
35 | 97 | msgstr "" |
36 | 98 | |
37 | -#: core/models.py:61 | |
38 | -msgid "message" | |
39 | -msgstr "mensagem" | |
99 | +#: core/models.py:89 | |
100 | +msgid "Message" | |
101 | +msgstr "Mensagem" | |
40 | 102 | |
41 | -#: core/models.py:62 | |
42 | -msgid "Actor" | |
103 | +#: core/models.py:90 | |
104 | +#, python-format | |
105 | +msgid "%(class)s_Actor" | |
43 | 106 | msgstr "" |
44 | 107 | |
45 | -#: core/models.py:63 | |
108 | +#: core/models.py:90 | |
109 | +msgid "User" | |
110 | +msgstr "Usuário" | |
111 | + | |
112 | +#: core/models.py:91 | |
46 | 113 | msgid "Read" |
47 | 114 | msgstr "" |
48 | 115 | |
49 | -#: core/models.py:64 | |
116 | +#: core/models.py:92 core/models.py:104 | |
117 | +msgid "Date and Time of action" | |
118 | +msgstr "Data e hora da ação" | |
119 | + | |
120 | +#: core/models.py:93 core/models.py:106 | |
50 | 121 | msgid "Action_Resource" |
51 | 122 | msgstr "" |
52 | 123 | |
53 | -#: core/templates/base.html:56 | |
54 | -msgid "Log out" | |
55 | -msgstr "Sair" | |
124 | +#: core/models.py:94 | |
125 | +#, python-format | |
126 | +msgid "%(class)s_Performer" | |
127 | +msgstr "" | |
128 | + | |
129 | +#: core/models.py:94 | |
130 | +msgid "Perfomer" | |
131 | +msgstr "Ator" | |
132 | + | |
133 | +#: core/models.py:97 | |
134 | +msgid "Notification" | |
135 | +msgstr "Notificação" | |
136 | + | |
137 | +#: core/models.py:98 core/templates/base.html:73 core/templates/guest.html:68 | |
138 | +msgid "Notifications" | |
139 | +msgstr "Notificações" | |
140 | + | |
141 | +#: core/models.py:105 | |
142 | +msgid "Actor" | |
143 | +msgstr "Ator" | |
144 | + | |
145 | +#: core/models.py:109 | |
146 | +msgid "Log" | |
147 | +msgstr "Log" | |
148 | + | |
149 | +#: core/models.py:110 | |
150 | +msgid "Logs" | |
151 | +msgstr "Logs" | |
152 | + | |
153 | +#: core/templates/base.html:80 core/templates/guest.html:75 | |
154 | +msgid "See More" | |
155 | +msgstr "Ver Mais" | |
156 | + | |
157 | +#: core/templates/base.html:87 core/templates/guest.html:81 | |
158 | +msgid "messages" | |
159 | +msgstr "Mensagens" | |
160 | + | |
161 | +#: core/templates/base.html:100 core/templates/guest.html:94 | |
162 | +msgid "Menu" | |
163 | +msgstr "Menu" | |
164 | + | |
165 | +#: core/templates/base.html:104 core/templates/lembrar_senha.html:110 | |
166 | +msgid "Home" | |
167 | +msgstr "Início" | |
168 | + | |
169 | +#: core/templates/base.html:105 | |
170 | +msgid "Profile" | |
171 | +msgstr "Perfil" | |
172 | + | |
173 | +#: core/templates/base.html:107 | |
174 | +msgid "My courses" | |
175 | +msgstr "Meus cursos" | |
176 | + | |
177 | +#: core/templates/base.html:108 | |
178 | +msgid "All Courses" | |
179 | +msgstr "Cursos" | |
180 | + | |
181 | +#: core/templates/base.html:111 | |
182 | +msgid "Manage Users" | |
183 | +msgstr "Gerenciar usuários" | |
184 | + | |
185 | +#: core/templates/base.html:115 | |
186 | +msgid "Manage Courses" | |
187 | +msgstr "Gerenciar cursos" | |
188 | + | |
189 | +#: core/templates/base.html:133 | |
190 | +msgid "Category" | |
191 | +msgstr "Categoria" | |
192 | + | |
193 | +#: core/templates/base.html:137 | |
194 | +msgid "Create Category" | |
195 | +msgstr "Criar categorias" | |
196 | + | |
197 | +#: core/templates/base.html:138 | |
198 | +msgid "List Category" | |
199 | +msgstr "Listar categoria" | |
200 | + | |
201 | +#: core/templates/guest.html:98 | |
202 | +msgid "Register" | |
203 | +msgstr "Cadastrar" | |
56 | 204 | |
57 | -#: core/templates/index.html:30 | |
205 | +#: core/templates/guest.html:123 | |
206 | +msgid "All" | |
207 | +msgstr "Todos" | |
208 | + | |
209 | +#: core/templates/guest.html:141 | |
210 | +msgid "Are you sure you want to subscribe to this course?" | |
211 | +msgstr "Tem certeza que deseja se inscrever neste curso?" | |
212 | + | |
213 | +#: core/templates/guest.html:141 | |
214 | +msgid "Subscribe" | |
215 | +msgstr "Inscrever" | |
216 | + | |
217 | +#: core/templates/guest.html:146 | |
218 | +msgid "Course Name" | |
219 | +msgstr "Nome do curso" | |
220 | + | |
221 | +#: core/templates/guest.html:147 | |
222 | +msgid "Begining" | |
223 | +msgstr "Início" | |
224 | + | |
225 | +#: core/templates/guest.html:148 | |
226 | +msgid "End" | |
227 | +msgstr "Fim" | |
228 | + | |
229 | +#: core/templates/guest.html:149 | |
230 | +msgid "Professor" | |
231 | +msgstr "Professor" | |
232 | + | |
233 | +#: core/templates/guest.html:151 | |
234 | +msgid "Description" | |
235 | +msgstr "Descrição" | |
236 | + | |
237 | +#: core/templates/index.html:39 | |
58 | 238 | msgid "Username" |
59 | -msgstr "Usuário" | |
239 | +msgstr "Login" | |
60 | 240 | |
61 | -#: core/templates/index.html:36 | |
62 | -msgid "Password" | |
241 | +#: core/templates/index.html:45 | |
242 | +msgid "password" | |
63 | 243 | msgstr "Senha" |
64 | 244 | |
65 | -#: core/templates/index.html:44 | |
245 | +#: core/templates/index.html:52 | |
66 | 246 | msgid "Remember Email" |
67 | -msgstr "Lembrar Senha" | |
247 | +msgstr "Lembrar E-mail" | |
248 | + | |
249 | +#: core/templates/index.html:58 | |
250 | +msgid "Login" | |
251 | +msgstr "" | |
68 | 252 | |
69 | -#: core/templates/index.html:53 | |
253 | +#: core/templates/index.html:61 | |
70 | 254 | msgid "Guest" |
71 | 255 | msgstr "Convidado" |
72 | 256 | |
73 | -#: core/templates/index.html:56 | |
74 | -msgid "Login" | |
75 | -msgstr "Entrar" | |
257 | +#: core/templates/index.html:64 | |
258 | +msgid "Forgot your password?" | |
259 | +msgstr "Esqueceu a senha?" | |
76 | 260 | |
77 | -#: core/templates/index.html:65 | |
261 | +#: core/templates/index.html:68 | |
78 | 262 | msgid "Sign Up" |
79 | 263 | msgstr "Cadastrar" |
80 | 264 | |
81 | -#: core/templates/register_user.html:29 | |
265 | +#: core/templates/lembrar_senha.html:40 | |
266 | +msgid "Amadeus Project" | |
267 | +msgstr "Projeto Amadeus" | |
268 | + | |
269 | +#: core/templates/lembrar_senha.html:65 | |
270 | +msgid "Enter" | |
271 | +msgstr "Entrar" | |
272 | + | |
273 | +#: core/templates/lembrar_senha.html:101 | |
274 | +msgid "The Project" | |
275 | +msgstr "O Projeto" | |
276 | + | |
277 | +#: core/templates/lembrar_senha.html:103 | |
278 | +msgid "CCTE Group" | |
279 | +msgstr "Grupo CCTE" | |
280 | + | |
281 | +#: core/templates/lembrar_senha.html:106 core/templates/lembrar_senha.html:111 | |
282 | +msgid "Remember password" | |
283 | +msgstr "Lembrar senha" | |
284 | + | |
285 | +#: core/templates/lembrar_senha.html:117 | |
286 | +msgid "New account" | |
287 | +msgstr "Nova conta" | |
288 | + | |
289 | +#: core/templates/lembrar_senha.html:126 | |
290 | +msgid "Email" | |
291 | +msgstr "E-mail" | |
292 | + | |
293 | +#: core/templates/lembrar_senha.html:128 | |
294 | +msgid "Your Email address (exemple@mail.com)" | |
295 | +msgstr "Seu endereço de e-mail (exemplo@mail.com)" | |
296 | + | |
297 | +#: core/templates/lembrar_senha.html:163 | |
298 | +msgid "Copyright Amadeus. All rights reserved" | |
299 | +msgstr "Copyright Amadeus. Todos os direitos reservados" | |
300 | + | |
301 | +#: core/templates/register_user.html:36 | |
82 | 302 | msgid "User Register" |
83 | -msgstr "Registrar Usuário" | |
303 | +msgstr "Cadastro de usuário" | |
84 | 304 | |
85 | -#: core/templates/register_user.html:53 | |
305 | +#: core/templates/register_user.html:88 | |
86 | 306 | msgid "Save" |
87 | 307 | msgstr "Salvar" |
88 | 308 | |
89 | -#: core/templates/remember_password.html:18 | |
309 | +#: core/templates/register_user.html:91 | |
310 | +msgid "Cancel" | |
311 | +msgstr "Cancelar" | |
312 | + | |
313 | +#: core/templates/registration/passwor_reset_complete.html:25 | |
314 | +msgid "Your password has been set. You can go ahead and go now." | |
315 | +msgstr "Sua senha foi redefinida. Você pode prosseguir." | |
316 | + | |
317 | +#: core/templates/registration/passwor_reset_confirm.html:24 | |
318 | +msgid "" | |
319 | +"Please enter your new password twice so we can verify you typed it in " | |
320 | +"correctly." | |
321 | +msgstr "Por favor, insira uma nova senha duas vezes para verificarmos que digitou corretamente." | |
322 | + | |
323 | +#: core/templates/registration/passwor_reset_confirm.html:28 | |
324 | +msgid "New password:" | |
325 | +msgstr "Nova senha:" | |
326 | + | |
327 | +#: core/templates/registration/passwor_reset_confirm.html:30 | |
328 | +msgid "Confirm password:" | |
329 | +msgstr "Confirmação de senha:" | |
330 | + | |
331 | +#: core/templates/registration/passwor_reset_confirm.html:31 | |
332 | +msgid "Change my password" | |
333 | +msgstr "Mudar senha" | |
334 | + | |
335 | +#: core/templates/registration/passwor_reset_confirm.html:36 | |
336 | +msgid "" | |
337 | +"The password reset link was invalid, possibly because it has already been " | |
338 | +"used. Please request a new password reset." | |
339 | +msgstr "O link de redefinição de senha está inválido, possivelmente porque ele já foi utilizado. Por favor, solicite uma nova redefinição de senha." | |
340 | + | |
341 | +#: core/templates/registration/passwor_reset_done.html:39 | |
342 | +msgid "" | |
343 | +"We have sent instructions to set up your password, if an account exists with " | |
344 | +"the email entered. You should receive them soon." | |
345 | +msgstr "Foi enviado as instruções para redefinição de senha, se a conta existe com o e-mail informado. Você deve receber a mensagem em breve." | |
346 | + | |
347 | +#: core/templates/registration/passwor_reset_done.html:40 | |
348 | +msgid "" | |
349 | +"If you do not receive an email, please make sure you entered the address you " | |
350 | +"registered, and check the spam folder." | |
351 | +msgstr "Se você não recebeu a mensagem, certifique que informou o e-mail corretamente e cheque sua caixa de spam" | |
352 | + | |
353 | +#: core/templates/registration/passwor_reset_done.html:43 | |
354 | +#: core/templates/registration/passwor_reset_form.html:46 | |
355 | +msgid "Back" | |
356 | +msgstr "Voltar" | |
357 | + | |
358 | +#: core/templates/registration/passwor_reset_form.html:39 | |
90 | 359 | msgid "E-mail" |
91 | 360 | msgstr "E-mail" |
92 | 361 | |
93 | -#: core/templates/remember_password.html:22 | |
94 | -msgid "Registration" | |
95 | -msgstr "Registrar" | |
96 | - | |
97 | -#: core/templates/remember_password.html:26 | |
362 | +#: core/templates/registration/passwor_reset_form.html:43 | |
98 | 363 | msgid "Send" |
99 | 364 | msgstr "Enviar" |
100 | 365 | |
101 | -#: core/views.py:31 | |
366 | +#: core/templates/registration/password_reset_subject.txt:2 | |
367 | +#, python-format | |
368 | +msgid "Password reset on %(site_name)s" | |
369 | +msgstr "Senha redefinida em %(site_name)s" | |
370 | + | |
371 | +#: core/tests.py:97 | |
372 | +msgid "Enter a valid email address." | |
373 | +msgstr "Insira um e-mail válido." | |
374 | + | |
375 | +#: core/tests.py:111 core/tests.py:204 | |
376 | +msgid "This field is required." | |
377 | +msgstr "Este campo é obrigatório." | |
378 | + | |
379 | +#: core/views.py:41 | |
102 | 380 | msgid "User successfully registered!" |
103 | -msgstr "Usuario cadastrado com sucesso" | |
381 | +msgstr "Usuário cadastrado com sucesso!" | |
382 | + | |
383 | +#: core/views.py:56 | |
384 | +msgid "Recover your password" | |
385 | +msgstr "Redefina sua senha" | |
386 | + | |
387 | +#: core/views.py:57 | |
388 | +#, python-brace-format | |
389 | +msgid "" | |
390 | +"Hello {0}, \n" | |
391 | +"Recover your password to use your account.\n" | |
392 | +"Number of registration: {1}\n" | |
393 | +"Link for recuver password.\n" | |
394 | +"\n" | |
395 | +"Respectfully,\n" | |
396 | +"Team Amadeus." | |
397 | +msgstr "Olá, {0} \n" | |
398 | +"Redefina a senha para utilizar sua conta.\n" | |
399 | +"Número de registro: {1}\n" | |
400 | +"Link para redefinição de senha.\n" | |
401 | +"\n" | |
402 | +"Atenciosamente,\n" | |
403 | +"Equipe Amadeus." | |
104 | 404 | |
105 | -#: core/views.py:54 | |
106 | -msgid "E-mail or password are incorrect!" | |
107 | -msgstr "O E-mail e/ou a senha estão incorretos" | |
405 | +#: core/views.py:83 | |
406 | +msgid "E-mail or password are incorrect." | |
407 | +msgstr "E-mail ou senha incorretos." | ... | ... |
core/static/css/base/amadeus.css
... | ... | @@ -2,6 +2,10 @@ |
2 | 2 | clear: both; |
3 | 3 | } |
4 | 4 | |
5 | +.mg-b-5m{ | |
6 | + margin-bottom: 5em; | |
7 | +} | |
8 | + | |
5 | 9 | .navbar .logo {position: absolute; top: 6px; text-align: center; height: 48px; width: 48px;} |
6 | 10 | |
7 | 11 | /* Modal */ |
... | ... | @@ -30,7 +34,7 @@ |
30 | 34 | margin: 10% 10% 5% 5%; |
31 | 35 | } |
32 | 36 | .breadcrumb{ |
33 | - margin-bottom: 5px; | |
37 | + margin-bottom: 25px; | |
34 | 38 | } |
35 | 39 | .courseHome{ |
36 | 40 | text-align: center; |
... | ... | @@ -394,4 +398,27 @@ ul, li { |
394 | 398 | -webkit-animation-duration: 900ms; |
395 | 399 | -webkit-animation-iteration-count: 3; |
396 | 400 | -webkit-animation-timing-function: ease-in-out; |
401 | +} | |
402 | +/* Icon Topic */ | |
403 | +.divMoreActions {text-align: right; height: 39px; float: right;} | |
404 | +.divMoreActions div button {padding-left: 10px; padding-right: 10px; padding-bottom: 10px; margin-bottom: 4px; height: 31px;} | |
405 | +.titleTopic {padding-top: 18px; padding-left: 0px;} | |
406 | +.titleTopic-detail {padding-top: 8px; color: white;} | |
407 | +.titleTopic a h4 {margin-top: 0px; color: black; cursor:pointer;} | |
408 | +.dropdown-menu .pull-right { | |
409 | + right: 0; | |
410 | + } | |
411 | + .editation{display: none} | |
412 | +.moreAccordion{ padding-left: 0px; padding-right: 0px;} | |
413 | +.moreAccordion div button{ padding-left: 0px; padding-right: 0px;} | |
414 | +.cards-content{ padding-left: 0px; padding-right: 0px; } | |
415 | +.cards-detail{margin-left: 4%;} | |
416 | +.cards-detail .panel .panel-heading{/*background-color:;*/} | |
417 | +.cards-detail .panel .panel-heading h4{color:black;} | |
418 | +.course, .subject, .topic{ padding-top: 0px; padding-bottom: 0px; } | |
419 | +.course-detail{padding-top: 10px; padding-bottom: 10px;} | |
420 | + | |
421 | +/* Menu link remove radius */ | |
422 | +.nav-pills > li > a { | |
423 | + border-radius: 0px; | |
397 | 424 | } |
398 | 425 | \ No newline at end of file | ... | ... |
core/static/js/base/amadeus.js
... | ... | @@ -14,6 +14,7 @@ function campoNumerico(campo, evento){ |
14 | 14 | return true; |
15 | 15 | } else { |
16 | 16 | evento.returnValue = false; |
17 | + evento.preventDefault(); | |
17 | 18 | return false; |
18 | 19 | } |
19 | 20 | }; |
... | ... | @@ -28,7 +29,7 @@ function formatarCpf(campo, evento){ |
28 | 29 | } |
29 | 30 | else if( evento ) { // Firefox |
30 | 31 | codTecla = evento.which; |
31 | - } | |
32 | + } | |
32 | 33 | tamanho = campo.value.length; |
33 | 34 | if( (codTecla > 47 && codTecla < 58) || codTecla== 8 || codTecla == 0){ |
34 | 35 | if(tamanho < 14 ){ |
... | ... | @@ -41,8 +42,8 @@ function formatarCpf(campo, evento){ |
41 | 42 | } |
42 | 43 | }else{ |
43 | 44 | evento.returnValue = false; |
45 | + return false; | |
44 | 46 | } |
45 | - return true; | |
46 | 47 | } else { |
47 | 48 | return false; |
48 | 49 | } |
... | ... | @@ -61,30 +62,28 @@ function formatarTelefone(campo, evento){ |
61 | 62 | } |
62 | 63 | tamanho = campo.value.length; |
63 | 64 | |
64 | - if(((codTecla > 47 && codTecla < 58) || (codTecla == 8)) && tamanho < 15){ | |
65 | + if(((codTecla > 47 && codTecla < 58) && tamanho < 15)){ | |
65 | 66 | |
66 | 67 | if(tamanho == 0){ |
67 | 68 | campo.value = "(" + campo.value; |
68 | 69 | }else if( tamanho == 3 ){ |
69 | 70 | campo.value = campo.value + ") "; |
70 | - }else if(tamanho == 9){ | |
71 | + }else if(tamanho == 10){ | |
71 | 72 | campo.value = campo.value + "-"; |
72 | - }else if(tamanho == 14){ | |
73 | - // alert('oi'); | |
74 | - campo.value = campo.value.slice(0, 4) + campo.value.slice(5, 14); | |
75 | - campo.value = campo.value.slice(0, 8) + campo.value.slice(9, 10) + campo.value.slice(8, 9) + campo.value.slice(10, 14) | |
76 | 73 | } |
77 | 74 | return true; |
78 | 75 | |
76 | + | |
79 | 77 | } else if(codTecla == 0 || codTecla == 8){ |
80 | 78 | return true; |
81 | 79 | } else { |
82 | 80 | evento.returnValue = false; |
81 | + evento.preventDefault() | |
83 | 82 | return false; |
84 | 83 | } |
84 | + evento.preventDefault() | |
85 | 85 | return false; |
86 | -} | |
87 | - | |
86 | +}; | |
88 | 87 | /* |
89 | 88 | This functions get the next 5 notifications from the user given a "step"(an amount) of previous notifications |
90 | 89 | */ | ... | ... |
core/templates/base.html
1 | 1 | <!DOCTYPE html> |
2 | 2 | |
3 | 3 | {% load static i18n %} |
4 | +{% load static i18n permission_tags %} | |
4 | 5 | {% get_current_language as LANGUAGE_CODE %} |
5 | 6 | |
6 | 7 | <html> |
... | ... | @@ -19,21 +20,27 @@ |
19 | 20 | |
20 | 21 | <!-- Bootstrap and themes (material) --> |
21 | 22 | <link rel="stylesheet" type="text/css" href="{% static 'bootstrap-3.3.7/css/bootstrap.css' %}"> |
22 | - <link rel="stylesheet" type="text/css" href="{% static 'css/vendor/material.min.css' %}"> | |
23 | - <link rel="stylesheet" type="text/css" href="{% static 'css/vendor/ripples.min.css' %}"> | |
23 | + <link rel="stylesheet" type="text/css" href="{% static 'material/css/bootstrap-material-design.css' %}"> | |
24 | + <link rel="stylesheet" type="text/css" href="{% static 'material/css/bootstrap-material-design.min.css' %}"> | |
25 | + <link rel="stylesheet" type="text/css" href="{% static 'material/css/ripples.css' %}"> | |
26 | + <link rel="stylesheet" type="text/css" href="{% static 'material/css/ripples.min.css' %}"> | |
27 | + | |
28 | + | |
24 | 29 | <link rel="stylesheet" type="text/css" href="{% static 'css/vendor/bootstrap-datepicker.standalone.css' %}"> |
25 | 30 | <link rel="stylesheet" type="text/css" href="{% static 'css/vendor/alertifyjs/alertify.min.css' %}"> |
26 | 31 | <link rel="stylesheet" type="text/css" href="{% static 'css/vendor/alertifyjs/themes/bootstrap.css' %}"> |
27 | 32 | <script type="text/javascript" src="{% static 'bootstrap-3.3.7/js/bootstrap.js' %}"></script> |
28 | 33 | <script type="text/javascript" src="{% static 'js/vendor/bootstrap-acessibility.min.js' %}"></script> |
29 | - <script type="text/javascript" src="{% static 'js/vendor/material.min.js' %}"></script> | |
30 | - <script type="text/javascript" src="{% static 'js/vendor/ripples.min.js' %}"></script> | |
34 | + <script type="text/javascript" src="{% static 'material/js/material.js' %}"></script> | |
35 | + <script type="text/javascript" src="{% static 'material/js/material.min.js' %}"></script> | |
36 | + <script type="text/javascript" src="{% static 'material/js/ripples.js' %}"></script> | |
37 | + <script type="text/javascript" src="{% static 'material/js/ripples.min.js' %}"></script> | |
31 | 38 | <script type="text/javascript" src="{% static 'js/vendor/bootstrap-datepicker.js' %}"></script> |
32 | 39 | |
33 | 40 | {% with "js/vendor/locales/bootstrap-datepicker."|add:LANGUAGE_CODE|add:".js" as locale_datepicker %} |
34 | 41 | <script type="text/javascript" src="{% static locale_datepicker %}"></script> |
35 | 42 | {% endwith %} |
36 | - | |
43 | + | |
37 | 44 | <script type="text/javascript" src="{% static 'js/vendor/alertify.min.js' %}"></script> |
38 | 45 | <script type="text/javascript" src="{% static 'js/vendor/jscookie.js' %}"></script> |
39 | 46 | |
... | ... | @@ -69,14 +76,14 @@ |
69 | 76 | <li class="" data-toggle="tooltip" data-placement="bottom" title data-original-title="notifications"> |
70 | 77 | <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> |
71 | 78 | <ul id="notification-dropdown" class="dropdown-menu"> |
72 | - <li class="dropdown-header">Notifications</li> | |
79 | + <li class="dropdown-header"> {% trans 'Notifications' %}</li> | |
73 | 80 | {% include "notifications.html" %} |
74 | 81 | |
75 | 82 | <li> |
76 | 83 | <a onclick="getNotifications(5)"> |
77 | 84 | <div id="notification-see-more" class="list-group-item"> |
78 | 85 | <div class="row-content"> |
79 | - <p class="list-group-item-text">See More</p> | |
86 | + <p class="list-group-item-text">{% trans 'See More' %}</p> | |
80 | 87 | </div> |
81 | 88 | </a> |
82 | 89 | </li> |
... | ... | @@ -93,7 +100,55 @@ |
93 | 100 | <div class="container-fluid"> |
94 | 101 | <div class="row"> |
95 | 102 | <div class="col-xs-2 col-sm-2 col-md-2 col-lg-2 col-xl-2"> |
96 | - {% block sidebar %}{% endblock %} | |
103 | + {% block sidebar %} | |
104 | + <div class="panel panel-primary navigation"> | |
105 | + <div class="panel-heading"> | |
106 | + <h4>{% trans "Menu" %}</h4> | |
107 | + </div> | |
108 | + <div class="panel-body"> | |
109 | + <ul class="nav nav-pills nav-stacked"> | |
110 | + <li><a href="{% url 'app:index' %}">{% trans 'Home' %}</a></li> | |
111 | + <li><a href="{% url 'users:profile' %}">{% trans 'Profile' %}</a></li> | |
112 | + {% if user|has_role:'student' or not user.is_staff %} | |
113 | + <li><a href="{% url 'course:manage' %}">{% trans 'My courses' %}</a></li> | |
114 | + <li><a href="{% url 'core:all_courses' %}">{% trans 'All Courses' %}</a></li> | |
115 | + {% endif %} | |
116 | + <li><a href="{% url 'core:guest' %}">{% trans 'Courses' %}</a></li> | |
117 | + {% if user|has_role:'system_admin' %} | |
118 | + <li> <a href="{% url 'users:manage' %}">{% trans 'Manage Users' %}</a></li> | |
119 | + {% endif %} | |
120 | + {% if user|has_role:'system_admin' or user|has_role:'professor' %} | |
121 | + <li> | |
122 | + <a href="#courses_list" class="accordion" data-toggle="collapse">{% trans 'Manage Courses' %}</a> | |
123 | + <div id="courses_list" class="collapse"> | |
124 | + <ul class="nav nav-pill nav-stacked accordion_list"> | |
125 | + {% for course in courses_list %} | |
126 | + <li><a href="{% url 'course:view' course.slug %}">{{ course }}</a></li> | |
127 | + {% endfor %} | |
128 | + </ul> | |
129 | + </div> | |
130 | + </li> | |
131 | + {% endif %} | |
132 | + </ul> | |
133 | + </div> | |
134 | + </div> | |
135 | + | |
136 | + {% if user|has_role:'professor' or user|has_role:'system_admin' %} | |
137 | + | |
138 | + <div class="panel panel-primary navigation"> | |
139 | + <div class="panel-heading"> | |
140 | + <h3 class="panel-title">{% trans 'Category' %}</h3> | |
141 | + </div> | |
142 | + <div class="panel-body"> | |
143 | + <ul class="nav nav-pills nav-stacked"> | |
144 | + <li><a href="{% url 'course:create_cat' %}">{% trans 'Create Category'%}</a></li> | |
145 | + <li><a href="{% url 'course:manage_cat' %}">{% trans 'List Category' %}</a></li> | |
146 | + </ul> | |
147 | + </div> | |
148 | + </div> | |
149 | + | |
150 | + {% endif %} | |
151 | + {% endblock %} | |
97 | 152 | </div> |
98 | 153 | <div class="col-xs-10 col-sm-10 col-md-10 col-lg-10 col-xl-10"> |
99 | 154 | {% block breadcrumbs %}{% endblock %} |
... | ... | @@ -109,6 +164,10 @@ |
109 | 164 | {% block script_file %} |
110 | 165 | |
111 | 166 | {% endblock script_file %} |
167 | + | |
168 | + {% block script_link %} | |
169 | + | |
170 | + {% endblock script_link %} | |
112 | 171 | </body> |
113 | 172 | |
114 | 173 | </html> | ... | ... |
core/templates/guest.html
1 | 1 | <!DOCTYPE html> |
2 | 2 | |
3 | -{% load static i18n %} | |
3 | + | |
4 | 4 | {% load i18n custom_filters %} |
5 | +{% load static i18n %} | |
5 | 6 | |
6 | 7 | <html> |
7 | 8 | <head> |
8 | - <title>{{ title }}</title> | |
9 | - | |
10 | - <meta http-equiv="Cache-Control" content="no-cache, no-store" /> | |
11 | - <link href="{% static 'img/topo-amadeus.png' %}" rel="shortcut icon" /> | |
12 | - <!-- Roboto font --> | |
13 | - <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:300,400,500,700" type="text/css"> | |
14 | - <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> | |
15 | - | |
16 | - <!-- jQuery & jQuery UI --> | |
17 | - <script type="text/javascript" src="{% static 'js/vendor/jquery-3.1.0.min.js' %}"></script> | |
18 | - <script type="text/javascript" src="{% static 'js/vendor/jquery-ui.js' %}"></script> | |
19 | - | |
20 | - <!-- Bootstrap and themes (material) --> | |
21 | - <link rel="stylesheet" type="text/css" href="{% static 'bootstrap-3.3.7/css/bootstrap.css' %}"> | |
22 | - <link rel="stylesheet" type="text/css" href="{% static 'css/vendor/material.min.css' %}"> | |
23 | - <link rel="stylesheet" type="text/css" href="{% static 'css/vendor/ripples.min.css' %}"> | |
24 | - <link rel="stylesheet" type="text/css" href="{% static 'css/vendor/datepicker.css' %}"> | |
25 | - <link rel="stylesheet" type="text/css" href="{% static 'css/vendor/alertifyjs/alertify.min.css' %}"> | |
26 | - <link rel="stylesheet" type="text/css" href="{% static 'css/vendor/alertifyjs/themes/bootstrap.css' %}"> | |
27 | - <script type="text/javascript" src="{% static 'bootstrap-3.3.7/js/bootstrap.js' %}"></script> | |
28 | - <script type="text/javascript" src="{% static 'js/vendor/bootstrap-acessibility.min.js' %}"></script> | |
29 | - <script type="text/javascript" src="{% static 'js/vendor/material.min.js' %}"></script> | |
30 | - <script type="text/javascript" src="{% static 'js/vendor/ripples.min.js' %}"></script> | |
31 | - <script type="text/javascript" src="{% static 'js/vendor/bootstrap-datepicker.js' %}"></script> | |
32 | - <script type="text/javascript" src="{% static 'js/vendor/alertify.min.js' %}"></script> | |
33 | - | |
34 | - <!-- Font awesome --> | |
35 | - <link rel="stylesheet" type="text/css" href="{% static 'font-awesome-4.6.3/css/font-awesome.min.css' %}"> | |
36 | - | |
37 | - <!-- Custom styles --> | |
38 | - <link rel="stylesheet" type="text/css" href="{% static 'css/base/amadeus.css' %}"> | |
39 | - | |
40 | - <!-- Init material Bootstrap --> | |
41 | - <script type="text/javascript">$.material.init()</script> | |
42 | - | |
43 | - <!--Javascript block for specific-app ones --> | |
44 | - <script src="{% static 'js/base/amadeus.js' %}"></script> | |
45 | - {% block style %} | |
46 | - {% endblock %} | |
47 | - {% block javascript %} | |
48 | - <script type="text/javascript" src="{% static 'js/course.js' %}"></script> | |
49 | - {% endblock %} | |
9 | + <title>{{ title }}</title> | |
10 | + | |
11 | + <meta http-equiv="Cache-Control" content="no-cache, no-store" /> | |
12 | + <link href="{% static 'img/favicon.ico' %}" rel="shortcut icon" /> | |
13 | + <!-- Roboto font --> | |
14 | + <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:300,400,500,700" type="text/css"> | |
15 | + <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> | |
16 | + | |
17 | + <!-- jQuery & jQuery UI --> | |
18 | + <script type="text/javascript" src="{% static 'js/vendor/jquery-3.1.0.min.js' %}"></script> | |
19 | + <script type="text/javascript" src="{% static 'js/vendor/jquery-ui.js' %}"></script> | |
20 | + | |
21 | + <!-- Bootstrap and themes (material) --> | |
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 'css/vendor/material.min.css' %}"> | |
24 | + <link rel="stylesheet" type="text/css" href="{% static 'css/vendor/ripples.min.css' %}"> | |
25 | + <link rel="stylesheet" type="text/css" href="{% static 'css/vendor/datepicker.css' %}"> | |
26 | + <link rel="stylesheet" type="text/css" href="{% static 'css/vendor/alertifyjs/alertify.min.css' %}"> | |
27 | + <link rel="stylesheet" type="text/css" href="{% static 'css/vendor/alertifyjs/themes/bootstrap.css' %}"> | |
28 | + <script type="text/javascript" src="{% static 'bootstrap-3.3.7/js/bootstrap.js' %}"></script> | |
29 | + <script type="text/javascript" src="{% static 'js/vendor/bootstrap-acessibility.min.js' %}"></script> | |
30 | + <script type="text/javascript" src="{% static 'js/vendor/material.min.js' %}"></script> | |
31 | + <script type="text/javascript" src="{% static 'js/vendor/ripples.min.js' %}"></script> | |
32 | + <script type="text/javascript" src="{% static 'js/vendor/bootstrap-datepicker.js' %}"></script> | |
33 | + <script type="text/javascript" src="{% static 'js/vendor/alertify.min.js' %}"></script> | |
34 | + | |
35 | + <!-- Font awesome --> | |
36 | + <link rel="stylesheet" type="text/css" href="{% static 'font-awesome-4.6.3/css/font-awesome.min.css' %}"> | |
37 | + | |
38 | + <!-- Custom styles --> | |
39 | + <link rel="stylesheet" type="text/css" href="{% static 'css/base/amadeus.css' %}"> | |
40 | + | |
41 | + <!-- Init material Bootstrap --> | |
42 | + <script type="text/javascript">$.material.init()</script> | |
43 | + | |
44 | + <!--Javascript block for specific-app ones --> | |
45 | + <script src="{% static 'js/base/amadeus.js' %}"></script> | |
46 | + {% block style %} | |
47 | + {% endblock %} | |
48 | + {% block javascript %} | |
49 | + <script type="text/javascript" src="{% static 'js/course.js' %}"></script> | |
50 | + {% endblock %} | |
51 | + | |
50 | 52 | </head> |
51 | 53 | <body> |
52 | - {% block nav %} | |
53 | - <div class="navbar navbar-default"> | |
54 | - <div class="navbar-header"> | |
55 | - <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse"> | |
56 | - <span class="icon-bar"></span> | |
57 | - <span class="icon-bar"></span> | |
58 | - <span class="icon-bar"></span> | |
59 | - </button> | |
60 | - <a class="navbar-brand" href="{% url 'app:index' %}"><img class="logo" src="{% static 'img/topo-amadeus-white.png' %}" alt="Logo"/></a> | |
61 | - </div> | |
62 | - <div class="navbar-collapse collapse navbar-responsive-collapse"> | |
63 | - <ul class="nav navbar-nav navbar-right notifications"> | |
64 | - <li class="" data-toggle="tooltip" data-placement="bottom" title data-original-title="notifications"> | |
54 | + {% block nav %} | |
55 | + <div class="navbar navbar-default"> | |
56 | + <div class="navbar-header"> | |
57 | + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse"> | |
58 | + <span class="icon-bar"></span> | |
59 | + <span class="icon-bar"></span> | |
60 | + <span class="icon-bar"></span> | |
61 | + </button> | |
62 | + <a class="navbar-brand" href="{% url 'app:index' %}"><img class="logo" src="{% static 'img/topo-amadeus-white.png' %}" alt="Logo"/></a> | |
63 | + </div> | |
64 | + <div class="navbar-collapse collapse navbar-responsive-collapse"> | |
65 | + <ul class="nav navbar-nav navbar-right notifications"> | |
66 | + <li class="" data-toggle="tooltip" data-placement="bottom" title data-original-title="notifications"> | |
65 | 67 | <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> |
66 | 68 | <ul id="notification-dropdown" class="dropdown-menu"> |
67 | - <li class="dropdown-header">Notifications</li> | |
68 | - {% include "notifications.html" %} | |
69 | + <li class="dropdown-header">{% trans 'Notifications' %}</li> | |
70 | + {% include "notifications.html" %} | |
69 | 71 | |
70 | - <li> | |
71 | - <a onclick="getNotifications(5)"> | |
72 | - <div id="notification-see-more" class="list-group-item"> | |
72 | + <li> | |
73 | + <a onclick="getNotifications(5)"> | |
74 | + <div id="notification-see-more" class="list-group-item"> | |
73 | 75 | <div class="row-content"> |
74 | - <p class="list-group-item-text">See More</p> | |
76 | + <p class="list-group-item-text">{% trans 'See More' %}</p> | |
75 | 77 | </div> |
76 | 78 | </a> |
77 | - </li> | |
79 | + </li> | |
78 | 80 | </ul> |
79 | 81 | </li> |
80 | - | |
81 | 82 | <li data-toggle="tooltip" data-placement="bottom" title data-original-title="{% trans 'messages' %}"> <a href="#"><i class="fa fa-comments" aria-hidden="true"></i></a> </li> |
82 | 83 | <li > <a class="link" href="{% url 'app:index' %}">{{ user }}</a></li> |
83 | - | |
84 | + <li data-toggle="tooltip" data-placement="bottom" title data-original-title="log out"> <a href="{% url 'app:index' %}"><i class="fa fa-sign-out" aria-hidden="true"></i></a></li> | |
84 | 85 | </ul> |
85 | 86 | </div> |
86 | 87 | </div> |
... | ... | @@ -90,9 +91,9 @@ |
90 | 91 | |
91 | 92 | <div class="col-xs-2 col-sm-2 col-md-2 col-lg-2 col-xl-2"> |
92 | 93 | {% block sidebar %} |
93 | - <div class="panel panel-primary navigation"> | |
94 | + <div class="panel panel-primary"> | |
94 | 95 | <div class="panel-heading"> |
95 | - <h4>Menu</h4> | |
96 | + <h4>{% trans 'Menu' %}</h4> | |
96 | 97 | </div> |
97 | 98 | <div class="panel-body"> |
98 | 99 | <ul class="nav nav-pills nav-stacked"> |
... | ... | @@ -119,9 +120,9 @@ |
119 | 120 | </form> |
120 | 121 | </div> |
121 | 122 | |
122 | - <div class="col-md-12"> | |
123 | + <div class="col-md-10"> | |
123 | 124 | <div class="btn-group btn-group-justified btn-group-raised"> |
124 | - <a href="?category=all" class="btn btn-raised btn-info">Todos</a> | |
125 | + <a href="?category=all" class="btn btn-raised btn-info">{% trans 'All' %}</a> | |
125 | 126 | {% for category in categories %} |
126 | 127 | <a href="?category={{category.name}}" class="btn btn-raised btn-primary">{{category.name}}</a> |
127 | 128 | {% endfor %} |
... | ... | @@ -132,7 +133,7 @@ |
132 | 133 | {% block render_breadcrumbs %}{% endblock %} |
133 | 134 | <div> |
134 | 135 | </div> |
135 | - <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"> | |
136 | + <div class="col-xs-12 col-sm-12 col-md-10 col-lg-10 col-xl-12"> | |
136 | 137 | {% block content %} |
137 | 138 | {% for course in courses %} |
138 | 139 | <div class="panel panel-info panel_{{ course.id }}"> |
... | ... | @@ -142,14 +143,14 @@ |
142 | 143 | <a onclick="subscribe($(this), '{% url 'course:subscribe' course.slug %}', {{ course.id}}, '{% trans 'Are you sure you want to subscribe to this course?' %}')" class="btn btn-sm btn-primary btn-raised pull-right" style="margin-top:-4px">{% trans 'Subscribe' %}</a> |
143 | 144 | {% endif %} |
144 | 145 | </div> |
145 | - | |
146 | + | |
146 | 147 | <div class="panel-body"> |
147 | - <p><b>Course Name: </b>{{course.name}}</p> | |
148 | - <p><b>Begining: </b>{{course.init_date}}</p> | |
149 | - <p><b>End: </b>{{course.end_date}}</p> | |
150 | - <p><b>Professor: </b>{{course.professors.name}}</p> | |
148 | + <p><b>{% trans 'Course Name' %}: </b>{{course.name}}</p> | |
149 | + <p><b>{% trans 'Begining' %}: </b>{{course.init_date}}</p> | |
150 | + <p><b>{% trans 'End' %}: </b>{{course.end_date}}</p> | |
151 | + <p><b>{% trans 'Professor' %}: </b>{{course.professors.name}}</p> | |
151 | 152 | <p> |
152 | - <b>Description:</b> | |
153 | + <b>{% trans 'Description' %}:</b> | |
153 | 154 | <i> |
154 | 155 | {{course.content}} |
155 | 156 | </i> | ... | ... |
core/templates/index.html
... | ... | @@ -42,7 +42,7 @@ |
42 | 42 | </div> |
43 | 43 | <div class="col-md-12 col-xs-12 col-lg-10 col-lg-offset-1 col-sm-12"> |
44 | 44 | <div class="form-group"> |
45 | - <label for="inputPassword" class="control-label"> {% trans 'Password' %}</label> | |
45 | + <label for="inputPassword" class="control-label"> {% trans 'password' %}</label> | |
46 | 46 | <input form="form-login" for="inputSmall" type="password" name="password" class="form-control" id="inputPassword" placeholder="Password"> |
47 | 47 | </div> |
48 | 48 | </div> |
... | ... | @@ -61,7 +61,7 @@ |
61 | 61 | <a class="btn btn-default btn-raised btn-block" href="{% url 'core:guest' %}" formaction="#" style="position: initial;">{% trans 'Guest' %}</a> |
62 | 62 | </div> |
63 | 63 | <div class="col-md-10 col-sm-10 col-xs-10 col-lg-6 col-lg-offset-7 forgotPassword"> |
64 | - <a href="{% url 'core:password_reset' %}">{% trans "Forgot your password?" %}</a> | |
64 | + <a href="{% url 'core:password_reset' %}">{% trans 'Forgot your password?' %}</a> | |
65 | 65 | </div> |
66 | 66 | </div> |
67 | 67 | </div> | ... | ... |
core/templates/lembrar_senha.html
... | ... | @@ -37,7 +37,7 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título |
37 | 37 | |
38 | 38 | |
39 | 39 | |
40 | - <title>Projeto Amadeus</title> | |
40 | + <title>{% trans 'Amadeus Project' %}</title> | |
41 | 41 | |
42 | 42 | <meta http-equiv="Cache-Control" content="no-cache, no-store" /> |
43 | 43 | |
... | ... | @@ -62,7 +62,7 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título |
62 | 62 | <form name="logonForm" method="post" action="/amadeuslms/validateLogin.do"> |
63 | 63 | <dt><input type="text" name="login" maxlength="15" size="15" value="" class="inputlogin"> </dt> |
64 | 64 | <dt><input type="password" name="password" maxlength="15" size="15" value="" class="inputlogin"> |
65 | - <br /><a href="{% url 'index' %}" name="logonForm" class="button">Entrar</a></dt> | |
65 | + <br /><a href="{% url 'index' %}" name="logonForm" class="button">{% trans 'Enter' %}</a></dt> | |
66 | 66 | </form> |
67 | 67 | <script type="text/javascript" language="JavaScript"> |
68 | 68 | <!-- |
... | ... | @@ -98,23 +98,23 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título |
98 | 98 | |
99 | 99 | <div id="institutional_menu"> |
100 | 100 | |
101 | - <span><a href="/amadeuslms/fProject.do" target="_blank">O Projeto</a></span> | |
101 | + <span><a href="/amadeuslms/fProject.do" target="_blank">{% trans 'The Project' %}</a></span> | |
102 | 102 | <span> | </span> |
103 | - <span><a href="/amadeuslms/fCCTE.do" target="_blank">Grupo CCTE</a></span> | |
103 | + <span><a href="/amadeuslms/fCCTE.do" target="_blank">{% trans 'CCTE Group' %}</a></span> | |
104 | 104 | </div> |
105 | 105 | <div id="pTitle" class="pTitle"> |
106 | - <h2>Lembrar senha</h2> | |
106 | + <h2>{% trans 'Remember password' %}</h2> | |
107 | 107 | </div> |
108 | 108 | <div id="pBreadCrumbs" class="pBreadCrumbs"> |
109 | 109 | <ul id="breadcrumb"> |
110 | - <li><a href="{% url 'home' %}">Página Inicial</a></li> | |
111 | - <li>Lembrar senha</li> | |
110 | + <li><a href="{% url 'home' %}">{% trans 'Home' %}</a></li> | |
111 | + <li>{%trans 'Remember password' %}</li> | |
112 | 112 | </ul> |
113 | 113 | </div> |
114 | 114 | <div id="pLeftMenu" class="pLeftMenu"> |
115 | 115 | <div id="side_menu_1"> |
116 | 116 | <ul id="menu_sessoes"> |
117 | - <li><a href="{% url 'create_account' %}" class="insert">Nova conta</a></li> | |
117 | + <li><a href="{% url 'create_account' %}" class="insert">{% trans 'New account' %}</a></li> | |
118 | 118 | </ul> |
119 | 119 | </div> |
120 | 120 | </div> |
... | ... | @@ -123,9 +123,9 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título |
123 | 123 | |
124 | 124 | |
125 | 125 | <form name="remindPasswordForm" method="post" action="/amadeuslms/remindPassword.do"> |
126 | - <dt>Endereço de e-mail</dt> | |
126 | + <dt>{% trans 'Email' %}</dt> | |
127 | 127 | <dd><input type="text" name="email" value="" class="formfield2" id="username"></dd> |
128 | - <dd class="description">Seu endereço de e-mail (exemplo@mail.com)</dd> | |
128 | + <dd class="description">{% trans 'Your Email address (exemple@mail.com)' %}</dd> | |
129 | 129 | <dt class="field"><input type="submit" name="remindPassword" value="Enviar e-mail" class="button"></dt> |
130 | 130 | </form> |
131 | 131 | <script type="text/javascript" language="JavaScript"> |
... | ... | @@ -160,7 +160,7 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título |
160 | 160 | |
161 | 161 | |
162 | 162 | <div id="footnote"> |
163 | - <dl><dd>Copyright Amadeus. Todos os direitos reservados<dd></dl> | |
163 | + <dl><dd>{% trans 'Copyright Amadeus. All rights reserved' %}<dd></dl> | |
164 | 164 | </div> |
165 | 165 | |
166 | 166 | </div> | ... | ... |
core/templates/register_user.html
... | ... | @@ -6,6 +6,10 @@ |
6 | 6 | {% block nav %} |
7 | 7 | {% endblock %} |
8 | 8 | |
9 | +{% block sidebar %} | |
10 | + | |
11 | +{% endblock sidebar %} | |
12 | + | |
9 | 13 | |
10 | 14 | {% block content %} |
11 | 15 | {% if messages %} |
... | ... | @@ -19,84 +23,81 @@ |
19 | 23 | {% endfor %} |
20 | 24 | {% endif %} |
21 | 25 | <div class="row"> |
22 | - <div class="col-sm-6 col-sm-offset-4 col-md-6 col-md-offset-4 col-xs-6 col-xs-offset-4 col-lg-6 col-lg-offset-4 col-xl-6 col-xl-offset-4 "> | |
23 | - <div class="col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2 col-xs-8 col-xs-offset-2 col-lg-8 col-lg-offset-2 col-xl-8 col-xl-offset-2"> | |
24 | - <img src="{% static 'img/amadeus.png' %}" class="img-responsive center-block logo-login " alt="logo amadeus"> | |
25 | - </div> | |
26 | - </div> | |
26 | + <div class="col-lg-offset-4 col-lg-8 col-md-offset-4 col-md-8 col-xs-offset-4 col-xs-8 col-sm-offset-4 col-sm-8"> | |
27 | + <div class="col-lg-8 col-md-8 col-xs-8 col-sm-8"> | |
28 | + <img src="{% static 'img/amadeus.png' %}" class="img-responsive center-block " alt="logo amadeus" id="logo"> | |
29 | + </div> | |
30 | + </div> | |
27 | 31 | </div> |
28 | 32 | |
29 | 33 | <div class="row"> |
30 | - <div class="col-md-8 col-md-offset-3 col-sm-10 col-sm-offset-2 col-xs-12 col-xs-offset-1 col-lg-10 col-lg-offset-2 col-xl-8 col-xl-offset-3"> | |
34 | + <div class="col-lg-8 col-lg-offset-3 col-md-8 col-md-offset-3 col-sm-8 col-sm-offset-3 col-xs-8 col-xs-offset-3"> | |
31 | 35 | <div class="card"> |
32 | - <div class="card-content"> | |
33 | 36 | <div class="card-body"> |
34 | - <form class="form-horizontal" name="registerForm" method="post" id="register-user" enctype="multipart/form-data"> | |
37 | + <form class="form-horizontal" name="registerForm" method="post" action="" enctype="multipart/form-data"> | |
35 | 38 | {% csrf_token %} |
36 | - <h2>{% trans 'User Register' %}</h2> | |
37 | - <hr> | |
39 | + <legend>{% trans 'User Register' %}</legend> | |
40 | + {% for field in form %} | |
38 | 41 | <div class="row"> |
39 | - <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> | |
40 | - {% for field in form %} | |
41 | - <div class="form-group {% if form.has_error %} has-error {% endif %} is-fileinput block-register-inline"> | |
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 col-lg-10 col-lg-offset-2"> | |
48 | - {% if field.auto_id == 'id_birth_date' %} | |
49 | - {% render_field field class='form-control input-sm date-picker' %} | |
50 | - <span id="helpBlock" class="help-block">{{ field.help_text }}</span> | |
51 | - {% elif field.auto_id == 'id_image' %} | |
52 | - {% render_field field class='form-control input-sm' %} | |
53 | - <div class="input-group"> | |
54 | - <input type="text" readonly="" class="form-control" placeholder="Choose your photo..."> | |
55 | - <span class="input-group-btn input-group-sm"> | |
56 | - <button type="button" class="btn btn-fab btn-fab-mini"> | |
57 | - <i class="material-icons">attach_file</i> | |
58 | - </button> | |
59 | - </span> | |
60 | - </div> | |
61 | - {% elif field.auto_id == 'id_cpf' %} | |
62 | - {% render_field field class='form-control' onkeypress='campoNumerico(this,event); formatarCpf(this,event);' %} | |
63 | - | |
64 | - {% elif field.auto_id == 'id_phone' %} | |
65 | - {% render_field field class='form-control' onkeypress='campoNumerico(this,event); formatarTelefone(this,event);' %} | |
66 | - {% else %} | |
67 | - {% render_field field class='form-control' %} | |
68 | - <span id="helpBlock" class="help-block">{{ field.help_text }}</span> | |
69 | - {% endif %} | |
70 | - </div> | |
42 | + <div class="form-group is-empty {% if form.has_error %} has-error {% endif %} is-fileinput"> | |
43 | + {% if field.field.required %} | |
44 | + <label for="{{ field.auto_id }}" class="col-md-2 control-label">{{ field.label }}<span>*</span></label> | |
45 | + {% else %} | |
46 | + <label for="{{ field.auto_id }}" class="col-md-2 control-label">{{ field.label }}</label> | |
47 | + {% endif %} | |
48 | + <div class="col-md-10"> | |
49 | + {% if field.auto_id == 'id_birth_date' %} | |
50 | + {% render_field field class='form-control input-sm date-picker' %} | |
51 | + | |
52 | + <span id="helpBlock" class="help-block">{{ field.help_text }}</span> | |
53 | + {% elif field.auto_id == 'id_image' %} | |
54 | + {% render_field field class='form-control input-sm' %} | |
55 | + <div class="input-group"> | |
56 | + <input type="text" readonly="" class="form-control" placeholder="Choose your photo..."> | |
57 | + <span class="input-group-btn input-group-sm"> | |
58 | + <button type="button" class="btn btn-fab btn-fab-mini"> | |
59 | + <i class="material-icons">attach_file</i> | |
60 | + </button> | |
61 | + </span> | |
62 | + </div> | |
63 | + {% elif field.auto_id == 'id_cpf' %} | |
64 | + {% render_field field class='form-control' onkeypress='campoNumerico(this,event); formatarCpf(this,event);' %} | |
71 | 65 | |
72 | - {% if field.errors %} | |
73 | - <div class="alert alert-danger alert-dismissible col-md-offset-4 col-md-8" role="alert"> | |
74 | - <button type="button" class="close" data-dismiss="alert" aria-label="Close"> | |
75 | - <span aria-hidden="true">×</span> | |
76 | - </button> | |
77 | - <ul> | |
78 | - {% for error in field.errors %} | |
79 | - <li>{{ error }}</li> | |
80 | - {% endfor %} | |
81 | - </ul> | |
82 | - </div> | |
83 | - {% endif %} | |
84 | - </div> | |
66 | + {% elif field.auto_id == 'id_phone' %} | |
67 | + {% render_field field class='form-control' onkeypress='campoNumerico(this,event); formatarTelefone(this,event);' %} | |
68 | + {% else %} | |
69 | + {% render_field field class='form-control' %} | |
70 | + <span id="helpBlock" class="help-block">{{ field.help_text }}</span> | |
71 | + {% endif %} | |
72 | + </div> | |
73 | + | |
74 | + {% if field.errors %} | |
75 | + <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"> | |
76 | + <button type="button" class="close" data-dismiss="alert" aria-label="Close"> | |
77 | + <span aria-hidden="true">×</span> | |
78 | + </button> | |
79 | + <ul> | |
80 | + {% for error in field.errors %} | |
81 | + <li>{{ error }}</li> | |
85 | 82 | {% endfor %} |
86 | - <div class="col-md-6 col-xs-6 col-sm-6 col-lg-5 col-lg-offset-1 text-center"> | |
87 | - <input type="submit" value="{% trans 'Save' %}" class="btn btn-success btn-raised" /> | |
88 | - </div> | |
89 | - <div class="col-md-6 col-xs-6 col-sm-6 col-lg-5 text-center"> | |
90 | - <a href="{% url 'core:home' %}" class="btn btn-default btn-raised" >{% trans 'Cancel' %}</a> | |
91 | - </div> | |
83 | + </ul> | |
92 | 84 | </div> |
85 | + {% endif %} | |
86 | + </div> | |
93 | 87 | </div> |
88 | + {% endfor %} | |
89 | + <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"> | |
90 | + <input type="submit" value="{% trans 'Save' %}" class="btn btn-raised btn-primary" /> | |
91 | + </div> | |
92 | + <div class=" col-md-4 col-sm-4 col-xs-4"> | |
93 | + <a href="{% url 'core:home' %}" class=" btn btn-danger btn-raised" >{% trans 'Cancel' %}</a> | |
94 | + </div> | |
95 | + | |
94 | 96 | </form> |
95 | 97 | </div> |
96 | - </div> | |
97 | 98 | </div> |
98 | 99 | </div> |
99 | 100 | </div> |
100 | - | |
101 | + | |
101 | 102 | <br clear="all" /> |
102 | 103 | {% endblock %} | ... | ... |
core/templates/registration/passwor_reset_email.html
1 | -To initiate the password reset process for your {{ user.get_username }} TestSite Account, | |
2 | -click the link below: | |
1 | +{% load static i18n %} | |
2 | + | |
3 | +{% trans 'To initiate the password reset process for your {{ user.get_username }} TestSite Account, | |
4 | +click the link below:' %} | |
3 | 5 | |
4 | 6 | {% block reset_link %} |
5 | 7 | {{ protocol }}://{{ domain }}{% url 'core:password_reset_confirm' uidb64=uid token=token %} |
6 | 8 | |
7 | 9 | {% endblock %} |
8 | 10 | |
9 | -If clicking the link above doesn't work, please copy and paste the URL in a new browser | |
11 | +{% trans 'If clicking the link above doesnt work, please copy and paste the URL in a new browser | |
10 | 12 | window instead. |
11 | 13 | |
12 | 14 | |
13 | 15 | Sincerely, |
14 | -Amadeus. | |
16 | +Amadeus.' %} | ... | ... |
core/views.py
... | ... | @@ -54,7 +54,7 @@ def remember_password(request): |
54 | 54 | registration = request.POST['registration'] |
55 | 55 | if email and registration: |
56 | 56 | subject = _('Recover your password') |
57 | - message = _('Hello %s, \nRecover your password to use your account.\nNumber of registration: %s\nLink for recuver password.\n\nRespectfully,\nTeam Amadeus.' % (request.user,registration)) | |
57 | + message = _('Hello {0}, \nRecover your password to use your account.\nNumber of registration: {1}\nLink for recuver password.\n\nRespectfully,\nTeam Amadeus.'.format(request.user,registration)) | |
58 | 58 | try: |
59 | 59 | send_mail(subject, message, settings.DEFAULT_FROM_EMAIL, [email],fail_silently=False) |
60 | 60 | context['success'] = 'Email successfully sent' | ... | ... |
courses/locale/he_il/LC_MESSAGES/django.po
... | ... | @@ -1,229 +0,0 @@ |
1 | -# SOME DESCRIPTIVE TITLE. | |
2 | -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER | |
3 | -# This file is distributed under the same license as the PACKAGE package. | |
4 | -# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | |
5 | -# | |
6 | -#, fuzzy | |
7 | -msgid "" | |
8 | -msgstr "" | |
9 | -"Project-Id-Version: PACKAGE VERSION\n" | |
10 | -"Report-Msgid-Bugs-To: \n" | |
11 | -"POT-Creation-Date: 2016-09-16 02:41-0300\n" | |
12 | -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | |
13 | -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | |
14 | -"Language-Team: LANGUAGE <LL@li.org>\n" | |
15 | -"Language: \n" | |
16 | -"MIME-Version: 1.0\n" | |
17 | -"Content-Type: text/plain; charset=UTF-8\n" | |
18 | -"Content-Transfer-Encoding: 8bit\n" | |
19 | - | |
20 | -#: courses/templates/category/create.html:8 | |
21 | -#: courses/templates/category/delete.html:7 | |
22 | -#: courses/templates/category/index.html:7 | |
23 | -#: courses/templates/category/update.html:8 | |
24 | -#: courses/templates/category/view.html:7 | |
25 | -#: courses/templates/course/create.html:8 | |
26 | -#: courses/templates/course/delete.html:7 courses/templates/course/home.html:8 | |
27 | -#: courses/templates/course/update.html:8 | |
28 | -#: courses/templates/course/view.html:39 | |
29 | -#: courses/templates/subject/index.html:8 | |
30 | -msgid "Home" | |
31 | -msgstr "" | |
32 | - | |
33 | -#: courses/templates/category/create.html:9 | |
34 | -#: courses/templates/category/delete.html:18 | |
35 | -#: courses/templates/category/index.html:18 | |
36 | -#: courses/templates/category/view.html:18 | |
37 | -msgid "Create Category" | |
38 | -msgstr "" | |
39 | - | |
40 | -#: courses/templates/category/create.html:16 | |
41 | -#: courses/templates/category/delete.html:15 | |
42 | -#: courses/templates/category/index.html:15 | |
43 | -#: courses/templates/category/update.html:16 | |
44 | -#: courses/templates/category/view.html:15 | |
45 | -msgid "Categories" | |
46 | -msgstr "" | |
47 | - | |
48 | -#: courses/templates/category/create.html:26 | |
49 | -#: courses/templates/category/update.html:26 | |
50 | -#: courses/templates/course/create.html:26 | |
51 | -#: courses/templates/course/update.html:32 | |
52 | -msgid "All fields are required" | |
53 | -msgstr "" | |
54 | - | |
55 | -#: courses/templates/category/create.html:51 | |
56 | -#: courses/templates/category/update.html:51 | |
57 | -#: courses/templates/course/create.html:51 | |
58 | -#: courses/templates/course/update.html:57 | |
59 | -msgid "Save" | |
60 | -msgstr "" | |
61 | - | |
62 | -#: courses/templates/category/delete.html:8 | |
63 | -#: courses/templates/category/index.html:8 | |
64 | -msgid "Manage Categories" | |
65 | -msgstr "" | |
66 | - | |
67 | -#: courses/templates/category/delete.html:26 | |
68 | -#: courses/templates/subject/delete.html:11 | |
69 | -msgid "Are you sure you want to delete the category" | |
70 | -msgstr "" | |
71 | - | |
72 | -#: courses/templates/category/delete.html:27 | |
73 | -#: courses/templates/course/delete.html:28 | |
74 | -#: courses/templates/subject/delete.html:12 | |
75 | -msgid "Yes" | |
76 | -msgstr "" | |
77 | - | |
78 | -#: courses/templates/category/delete.html:28 | |
79 | -#: courses/templates/course/delete.html:29 | |
80 | -#: courses/templates/subject/delete.html:13 | |
81 | -msgid "No" | |
82 | -msgstr "" | |
83 | - | |
84 | -#: courses/templates/category/index.html:38 | |
85 | -msgid "Name" | |
86 | -msgstr "" | |
87 | - | |
88 | -#: courses/templates/category/index.html:39 | |
89 | -msgid "Slug" | |
90 | -msgstr "" | |
91 | - | |
92 | -#: courses/templates/category/index.html:40 | |
93 | -msgid "Actions" | |
94 | -msgstr "" | |
95 | - | |
96 | -#: courses/templates/category/index.html:59 | |
97 | -msgid "No categories found" | |
98 | -msgstr "" | |
99 | - | |
100 | -#: courses/templates/category/update.html:9 | |
101 | -#: courses/templates/category/view.html:21 | |
102 | -msgid "Edit Category" | |
103 | -msgstr "" | |
104 | - | |
105 | -#: courses/templates/category/view.html:24 | |
106 | -msgid "Remove Category" | |
107 | -msgstr "" | |
108 | - | |
109 | -#: courses/templates/category/view.html:32 | |
110 | -msgid "Name:" | |
111 | -msgstr "" | |
112 | - | |
113 | -#: courses/templates/category/view.html:33 | |
114 | -msgid "Slug:" | |
115 | -msgstr "" | |
116 | - | |
117 | -#: courses/templates/course/create.html:9 | |
118 | -#: courses/templates/course/delete.html:18 | |
119 | -#: courses/templates/course/filtered.html:11 | |
120 | -#: courses/templates/course/index.html:19 | |
121 | -msgid "Create Course" | |
122 | -msgstr "" | |
123 | - | |
124 | -#: courses/templates/course/create.html:16 | |
125 | -#: courses/templates/course/delete.html:15 | |
126 | -#: courses/templates/course/filtered.html:8 | |
127 | -#: courses/templates/course/home.html:16 | |
128 | -#: courses/templates/course/index.html:16 | |
129 | -#: courses/templates/course/update.html:16 | |
130 | -#: courses/templates/course/view.html:48 | |
131 | -msgid "Courses" | |
132 | -msgstr "" | |
133 | - | |
134 | -#: courses/templates/course/delete.html:27 | |
135 | -msgid "Are you sure you want to delete the couse" | |
136 | -msgstr "" | |
137 | - | |
138 | -#: courses/templates/course/filtered.html:19 | |
139 | -#: courses/templates/course/index.html:27 | |
140 | -msgid "Categories:" | |
141 | -msgstr "" | |
142 | - | |
143 | -#: courses/templates/course/home.html:9 | |
144 | -msgid "Home Course" | |
145 | -msgstr "" | |
146 | - | |
147 | -#: courses/templates/course/index.html:81 | |
148 | -msgid "students tops" | |
149 | -msgstr "" | |
150 | - | |
151 | -#: courses/templates/course/index.html:87 | |
152 | -msgid "Subscribe Period:" | |
153 | -msgstr "" | |
154 | - | |
155 | -#: courses/templates/course/index.html:89 | |
156 | -msgid "Period:" | |
157 | -msgstr "" | |
158 | - | |
159 | -#: courses/templates/course/index.html:105 | |
160 | -msgid "No courses found" | |
161 | -msgstr "" | |
162 | - | |
163 | -#: courses/templates/course/update.html:9 | |
164 | -msgid "Edit Course" | |
165 | -msgstr "" | |
166 | - | |
167 | -#: courses/templates/course/update.html:19 | |
168 | -msgid "Manage Modules" | |
169 | -msgstr "" | |
170 | - | |
171 | -#: courses/templates/course/update.html:22 | |
172 | -msgid "Participants" | |
173 | -msgstr "" | |
174 | - | |
175 | -#: courses/templates/course/view.html:40 | |
176 | -msgid "Profile" | |
177 | -msgstr "" | |
178 | - | |
179 | -#: courses/templates/course/view.html:62 | |
180 | -msgid "Subjects" | |
181 | -msgstr "" | |
182 | - | |
183 | -#: courses/templates/course/view.html:85 | |
184 | -msgid "Professor" | |
185 | -msgstr "" | |
186 | - | |
187 | -#: courses/templates/course/view.html:88 | |
188 | -msgid "Description" | |
189 | -msgstr "" | |
190 | - | |
191 | -#: courses/templates/course/view.html:110 | |
192 | -#: courses/templates/subject/index.html:78 | |
193 | -msgid "Pending Stuffs" | |
194 | -msgstr "" | |
195 | - | |
196 | -#: courses/templates/course/view.html:113 | |
197 | -msgid "No pending tasks at the moment." | |
198 | -msgstr "" | |
199 | - | |
200 | -#: courses/templates/subject/create.html:20 | |
201 | -#: courses/templates/topic/create.html:20 | |
202 | -msgid "Create" | |
203 | -msgstr "" | |
204 | - | |
205 | -#: courses/templates/subject/form_view_teacher.html:10 | |
206 | -#: courses/templates/subject/index.html:47 | |
207 | -msgid "edit" | |
208 | -msgstr "" | |
209 | - | |
210 | -#: courses/templates/subject/index.html:10 | |
211 | -msgid "Manage Subjects" | |
212 | -msgstr "" | |
213 | - | |
214 | -#: courses/templates/subject/index.html:34 | |
215 | -msgid "Create Subject" | |
216 | -msgstr "" | |
217 | - | |
218 | -#: courses/templates/subject/index.html:52 | |
219 | -msgid "delete" | |
220 | -msgstr "" | |
221 | - | |
222 | -#: courses/templates/subject/index.html:71 | |
223 | -msgid "Create Topic" | |
224 | -msgstr "" | |
225 | - | |
226 | -#: courses/templates/subject/update.html:20 | |
227 | -#: courses/templates/topic/update.html:20 | |
228 | -msgid "Update" | |
229 | -msgstr "" |
courses/locale/pt_BR/LC_MESSAGES/django.po
... | ... | @@ -8,7 +8,7 @@ msgid "" |
8 | 8 | msgstr "" |
9 | 9 | "Project-Id-Version: PACKAGE VERSION\n" |
10 | 10 | "Report-Msgid-Bugs-To: \n" |
11 | -"POT-Creation-Date: 2016-09-07 00:13-0300\n" | |
11 | +"POT-Creation-Date: 2016-10-26 14:47-0300\n" | |
12 | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
13 | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
14 | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" |
... | ... | @@ -18,290 +18,564 @@ msgstr "" |
18 | 18 | "Content-Transfer-Encoding: 8bit\n" |
19 | 19 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" |
20 | 20 | |
21 | -#: courses/forms.py:11 courses/forms.py:25 courses/forms.py:58 | |
22 | -#: courses/models.py:7 courses/models.py:20 courses/models.py:44 | |
23 | -#: courses/templates/category/index.html:38 | |
21 | +#: courses/forms.py:13 courses/forms.py:56 courses/forms.py:96 | |
22 | +#: courses/forms.py:133 courses/forms.py:153 courses/models.py:14 | |
23 | +#: courses/models.py:26 courses/models.py:39 courses/models.py:75 | |
24 | +#: courses/models.py:103 courses/models.py:165 | |
25 | +#: courses/templates/course/replicate.html:18 | |
26 | +#: courses/templates/subject/form_view_teacher.html:224 | |
27 | +#: courses/templates/subject/form_view_teacher.html:279 | |
24 | 28 | msgid "Name" |
25 | 29 | msgstr "Nome" |
26 | 30 | |
27 | -#: courses/forms.py:14 | |
28 | -msgid "Category name" | |
29 | -msgstr "" | |
31 | +#: courses/forms.py:16 | |
32 | +#, fuzzy | |
33 | +#| msgid "Category name" | |
34 | +msgid "CourseCategory name" | |
35 | +msgstr "Nome da categoria" | |
36 | + | |
37 | +#: courses/forms.py:26 courses/forms.py:42 | |
38 | +msgid "The end date may not be before the start date." | |
39 | +msgstr "A data final não pode anteceder a data inicial." | |
40 | + | |
41 | +#: courses/forms.py:34 | |
42 | +msgid "The course start date must be after the end of registration." | |
43 | +msgstr "A data de início do curso deve ocorrer após as inscrições." | |
30 | 44 | |
31 | -#: courses/forms.py:26 | |
45 | +#: courses/forms.py:57 courses/forms.py:97 | |
46 | +#: courses/templates/course/replicate.html:28 | |
32 | 47 | msgid "Objectives" |
33 | 48 | msgstr "Objetivos" |
34 | 49 | |
35 | -#: courses/forms.py:27 courses/models.py:23 | |
50 | +#: courses/forms.py:58 courses/forms.py:98 courses/models.py:42 | |
51 | +#: courses/templates/course/replicate.html:37 | |
36 | 52 | msgid "Content" |
37 | 53 | msgstr "Conteúdo" |
38 | 54 | |
39 | -#: courses/forms.py:28 | |
55 | +#: courses/forms.py:59 courses/forms.py:99 | |
56 | +#: courses/templates/course/replicate.html:47 | |
40 | 57 | msgid "Number of studets maximum" |
41 | 58 | msgstr "Número máximo de estudantes" |
42 | 59 | |
43 | -#: courses/forms.py:29 | |
60 | +#: courses/forms.py:60 courses/forms.py:100 | |
61 | +#: courses/templates/course/replicate.html:57 | |
44 | 62 | msgid "Course registration start date" |
45 | 63 | msgstr "Início das inscrições" |
46 | 64 | |
47 | -#: courses/forms.py:30 | |
65 | +#: courses/forms.py:61 courses/forms.py:101 | |
66 | +#: courses/templates/course/replicate.html:67 | |
48 | 67 | msgid "Course registration end date" |
49 | 68 | msgstr "Fim da Inscrições" |
50 | 69 | |
51 | -#: courses/forms.py:31 | |
70 | +#: courses/forms.py:62 courses/forms.py:102 | |
71 | +#: courses/templates/course/replicate.html:77 | |
52 | 72 | msgid "Course start date" |
53 | 73 | msgstr "Data de inicio do Curso" |
54 | 74 | |
55 | -#: courses/forms.py:32 | |
75 | +#: courses/forms.py:63 courses/forms.py:103 | |
76 | +#: courses/templates/course/replicate.html:87 | |
56 | 77 | msgid "Course end date" |
57 | 78 | msgstr "Data de termino do curso" |
58 | 79 | |
59 | -#: courses/forms.py:33 courses/models.py:30 | |
80 | +#: courses/forms.py:64 courses/forms.py:104 courses/models.py:49 | |
60 | 81 | msgid "Image" |
61 | 82 | msgstr "Imagem" |
62 | 83 | |
63 | -#: courses/forms.py:34 courses/models.py:12 courses/models.py:31 | |
64 | -msgid "Category" | |
65 | -msgstr "Categoria" | |
84 | +#: courses/forms.py:65 courses/forms.py:105 | |
85 | +#: courses/templates/course/replicate.html:115 | |
86 | +#, fuzzy | |
87 | +#| msgid "Create Category" | |
88 | +msgid "CourseCategory" | |
89 | +msgstr "Criar Categoria" | |
66 | 90 | |
67 | -#: courses/forms.py:37 | |
91 | +#: courses/forms.py:68 courses/forms.py:109 | |
92 | +#: courses/templates/course/replicate.html:23 | |
68 | 93 | msgid "Course name" |
69 | 94 | msgstr "Nome do Curso" |
70 | 95 | |
71 | -#: courses/forms.py:38 | |
96 | +#: courses/forms.py:69 courses/forms.py:110 | |
97 | +#: courses/templates/course/replicate.html:32 | |
72 | 98 | msgid "Course objective" |
73 | 99 | msgstr "Objetivo do Curso" |
74 | 100 | |
75 | -#: courses/forms.py:39 | |
101 | +#: courses/forms.py:70 courses/forms.py:111 | |
102 | +#: courses/templates/course/replicate.html:42 | |
76 | 103 | msgid "Course modules" |
77 | 104 | msgstr "Ḿódulos do curso" |
78 | 105 | |
79 | -#: courses/forms.py:40 | |
106 | +#: courses/forms.py:71 courses/forms.py:112 | |
107 | +#: courses/templates/course/replicate.html:52 | |
80 | 108 | msgid "Max number of students that a class can have" |
81 | 109 | msgstr "Número máximo de estudantes que uma classe pode ter" |
82 | 110 | |
83 | -#: courses/forms.py:41 | |
111 | +#: courses/forms.py:72 courses/forms.py:113 | |
112 | +#: courses/templates/course/replicate.html:62 | |
84 | 113 | msgid "Date that starts the registration period of the course (dd/mm/yyyy)" |
85 | 114 | msgstr "Data do começo do período de inscrição do curso (dia/mês/ano)" |
86 | 115 | |
87 | -#: courses/forms.py:42 | |
116 | +#: courses/forms.py:73 courses/forms.py:114 | |
117 | +#: courses/templates/course/replicate.html:72 | |
88 | 118 | msgid "Date that ends the registration period of the course (dd/mm/yyyy)" |
89 | 119 | msgstr "Data do termino do período de inscrição do curso (dia/mês/ano)" |
90 | 120 | |
91 | -#: courses/forms.py:43 | |
121 | +#: courses/forms.py:74 courses/forms.py:115 | |
122 | +#: courses/templates/course/replicate.html:82 | |
92 | 123 | msgid "Date that the course starts (dd/mm/yyyy)" |
93 | 124 | msgstr "Data que o curso começa (dia/mês/ano)" |
94 | 125 | |
95 | -#: courses/forms.py:44 | |
126 | +#: courses/forms.py:75 courses/forms.py:116 | |
127 | +#: courses/templates/course/replicate.html:92 | |
96 | 128 | msgid "Date that the course ends (dd/mm/yyyy)" |
97 | 129 | msgstr "Data que o curso termina (dia/mês/ano)" |
98 | 130 | |
99 | -#: courses/forms.py:45 | |
131 | +#: courses/forms.py:76 courses/forms.py:117 | |
132 | +#: courses/templates/course/replicate.html:110 | |
100 | 133 | msgid "Representative image of the course" |
101 | 134 | msgstr "Imagem representativa do curso" |
102 | 135 | |
103 | -#: courses/forms.py:46 | |
104 | -msgid "Category which the course belongs" | |
136 | +#: courses/forms.py:77 courses/forms.py:118 | |
137 | +#: courses/templates/course/replicate.html:124 | |
138 | +#, fuzzy | |
139 | +#| msgid "Category which the course belongs" | |
140 | +msgid "CourseCategory which the course belongs" | |
105 | 141 | msgstr "Categoria ao qual o curso pertence" |
106 | 142 | |
107 | -#: courses/forms.py:59 courses/models.py:46 | |
143 | +#: courses/forms.py:106 | |
144 | +#, fuzzy | |
145 | +#| msgid "Maximum Students" | |
146 | +msgid "Student" | |
147 | +msgstr "Quantidade máxima de estudantes" | |
148 | + | |
149 | +#: courses/forms.py:119 | |
150 | +#, fuzzy | |
151 | +#| msgid "Course modules" | |
152 | +msgid "Course's Students" | |
153 | +msgstr "Ḿódulos do curso" | |
154 | + | |
155 | +#: courses/forms.py:134 courses/forms.py:154 courses/models.py:77 | |
156 | +#: courses/models.py:105 courses/models.py:167 | |
157 | +#: courses/templates/course/course_card.html:35 | |
158 | +#: courses/templates/course/view.html:69 | |
159 | +#: courses/templates/course/view.html:164 | |
160 | +#: courses/templates/course/view.html:220 | |
161 | +#: courses/templates/subject/form_view_teacher.html:121 | |
162 | +#: courses/templates/subject/index.html:80 | |
108 | 163 | msgid "Description" |
109 | 164 | msgstr "Descrição" |
110 | 165 | |
111 | -#: courses/forms.py:60 | |
166 | +#: courses/forms.py:135 | |
167 | +#, fuzzy | |
168 | +#| msgid "Course start date" | |
169 | +msgid "Start date" | |
170 | +msgstr "Data de inicio do Curso" | |
171 | + | |
172 | +#: courses/forms.py:136 | |
173 | +#, fuzzy | |
174 | +#| msgid "Course end date" | |
175 | +msgid "End date" | |
176 | +msgstr "Data de termino do curso" | |
177 | + | |
178 | +#: courses/forms.py:137 | |
112 | 179 | msgid "Is it visible?" |
113 | 180 | msgstr "Visível?" |
114 | 181 | |
115 | -#: courses/forms.py:63 | |
116 | -msgid "Module's name" | |
117 | -msgstr "nome do módulo" | |
182 | +#: courses/forms.py:140 | |
183 | +#, fuzzy | |
184 | +#| msgid "Module's name" | |
185 | +msgid "Subjects's name" | |
186 | +msgstr "Nome do módulo" | |
118 | 187 | |
119 | -#: courses/forms.py:64 | |
120 | -msgid "Modules's description" | |
121 | -msgstr "descrição do módulo" | |
188 | +#: courses/forms.py:141 | |
189 | +#, fuzzy | |
190 | +#| msgid "Modules's description" | |
191 | +msgid "Subjects's description" | |
192 | +msgstr "Descrição do módulo" | |
122 | 193 | |
123 | -#: courses/forms.py:65 | |
124 | -msgid "Is the module visible?" | |
125 | -msgstr "" | |
194 | +#: courses/forms.py:142 | |
195 | +msgid "Start date of the subject" | |
196 | +msgstr "Data de início do assunto" | |
126 | 197 | |
127 | -#: courses/models.py:8 courses/models.py:21 courses/models.py:45 | |
128 | -#: courses/templates/category/index.html:39 | |
198 | +#: courses/forms.py:143 | |
199 | +msgid "End date of the subject" | |
200 | +msgstr "Data final do assunto" | |
201 | + | |
202 | +#: courses/forms.py:144 | |
203 | +#, fuzzy | |
204 | +#| msgid "Is the module visible?" | |
205 | +msgid "Is the subject visible?" | |
206 | +msgstr "O módulo é visível?" | |
207 | + | |
208 | +#: courses/forms.py:157 | |
209 | +#, fuzzy | |
210 | +#| msgid "Module's name" | |
211 | +msgid "Topic's name" | |
212 | +msgstr "nome do módulo" | |
213 | + | |
214 | +#: courses/forms.py:158 | |
215 | +#, fuzzy | |
216 | +#| msgid "Modules's description" | |
217 | +msgid "Topic's description" | |
218 | +msgstr "Descrição do módulo" | |
219 | + | |
220 | +#: courses/models.py:15 courses/models.py:27 courses/models.py:40 | |
221 | +#: courses/models.py:76 courses/models.py:104 courses/models.py:166 | |
129 | 222 | msgid "Slug" |
130 | 223 | msgstr "" |
131 | 224 | |
132 | -#: courses/models.py:9 courses/models.py:25 courses/models.py:48 | |
225 | +#: courses/models.py:16 courses/models.py:28 courses/models.py:44 | |
226 | +#: courses/models.py:81 courses/models.py:106 | |
133 | 227 | msgid "Creation Date" |
134 | -msgstr "" | |
228 | +msgstr "Data de criação" | |
135 | 229 | |
136 | -#: courses/models.py:13 courses/templates/category/create.html:16 | |
137 | -#: courses/templates/category/delete.html:15 | |
138 | -#: courses/templates/category/index.html:15 | |
139 | -#: courses/templates/category/update.html:16 | |
140 | -#: courses/templates/category/view.html:15 | |
230 | +#: courses/models.py:19 courses/models.py:31 courses/models.py:50 | |
231 | +#: courses/models.py:84 courses/templates/category/create.html:43 | |
232 | +#: courses/templates/category/index.html:44 | |
233 | +#: courses/templates/category/update.html:43 | |
234 | +#: courses/templates/course/index.html:48 | |
235 | +msgid "Category" | |
236 | +msgstr "Categoria" | |
237 | + | |
238 | +#: courses/models.py:20 courses/models.py:32 | |
141 | 239 | msgid "Categories" |
142 | 240 | msgstr "Categorias" |
143 | 241 | |
144 | -#: courses/models.py:22 | |
242 | +#: courses/models.py:41 | |
145 | 243 | msgid "Objectivies" |
146 | -msgstr "" | |
244 | +msgstr "Objetivos" | |
147 | 245 | |
148 | -#: courses/models.py:24 | |
246 | +#: courses/models.py:43 | |
149 | 247 | msgid "Maximum Students" |
150 | 248 | msgstr "Quantidade máximo de estudantes" |
151 | 249 | |
152 | -#: courses/models.py:26 | |
250 | +#: courses/models.py:45 | |
153 | 251 | msgid "Register Date (Begin)" |
154 | -msgstr "" | |
252 | +msgstr "Data de inscrição (Início)" | |
155 | 253 | |
156 | -#: courses/models.py:27 | |
254 | +#: courses/models.py:46 | |
157 | 255 | msgid "Register Date (End)" |
158 | -msgstr "" | |
256 | +msgstr "Data de inscrição (término)" | |
159 | 257 | |
160 | -#: courses/models.py:28 | |
258 | +#: courses/models.py:47 | |
161 | 259 | msgid "Begin of Course Date" |
162 | -msgstr "" | |
260 | +msgstr "Início do curso" | |
163 | 261 | |
164 | -#: courses/models.py:29 | |
262 | +#: courses/models.py:48 | |
165 | 263 | msgid "End of Course Date" |
166 | -msgstr "" | |
264 | +msgstr "Término do curso" | |
167 | 265 | |
168 | -#: courses/models.py:32 | |
169 | -msgid "User" | |
170 | -msgstr "" | |
266 | +#: courses/models.py:51 courses/models.py:85 | |
267 | +msgid "Professors" | |
268 | +msgstr "Professores" | |
171 | 269 | |
172 | -#: courses/models.py:36 courses/models.py:49 | |
270 | +#: courses/models.py:52 courses/models.py:86 courses/models.py:127 | |
271 | +#: courses/models.py:147 | |
272 | +#, fuzzy | |
273 | +#| msgid "Maximum Students" | |
274 | +msgid "Students" | |
275 | +msgstr "Quantidade máximo de estudantes" | |
276 | + | |
277 | +#: courses/models.py:53 | |
278 | +msgid "Public" | |
279 | +msgstr "Público" | |
280 | + | |
281 | +#: courses/models.py:57 courses/models.py:83 | |
173 | 282 | msgid "Course" |
174 | 283 | msgstr "Curso" |
175 | 284 | |
176 | -#: courses/models.py:37 courses/templates/course/create.html:16 | |
177 | -#: courses/templates/course/delete.html:15 | |
178 | -#: courses/templates/course/filtered.html:8 | |
179 | -#: courses/templates/course/home.html:16 courses/templates/course/index.html:15 | |
180 | -#: courses/templates/course/update.html:16 | |
181 | -#: courses/templates/course/view.html:15 | |
182 | -#: courses/templates/module/create.html:17 | |
183 | -#: courses/templates/module/delete.html:16 | |
184 | -#: courses/templates/module/index.html:16 | |
185 | -#: courses/templates/module/update.html:17 | |
285 | +#: courses/models.py:58 courses/templates/course/filtered.html:8 | |
286 | +#: courses/templates/course/home.html:16 | |
186 | 287 | msgid "Courses" |
187 | 288 | msgstr "Cursos" |
188 | 289 | |
189 | -#: courses/models.py:47 courses/templates/module/index.html:107 | |
290 | +#: courses/models.py:78 courses/models.py:110 | |
190 | 291 | msgid "Visible" |
191 | 292 | msgstr "Visível" |
192 | 293 | |
193 | -#: courses/models.py:53 | |
194 | -msgid "Module" | |
195 | -msgstr "Modulo" | |
294 | +#: courses/models.py:79 | |
295 | +#, fuzzy | |
296 | +#| msgid "Begin of Course Date" | |
297 | +msgid "Begin of Subject Date" | |
298 | +msgstr "Início do curso" | |
299 | + | |
300 | +#: courses/models.py:80 | |
301 | +#, fuzzy | |
302 | +#| msgid "End of Course Date" | |
303 | +msgid "End of Subject Date" | |
304 | +msgstr "Término do curso" | |
305 | + | |
306 | +#: courses/models.py:82 courses/models.py:107 | |
307 | +msgid "Date of last update" | |
308 | +msgstr "Data da última atualização" | |
309 | + | |
310 | +#: courses/models.py:90 courses/models.py:108 | |
311 | +msgid "Subject" | |
312 | +msgstr "Assunto" | |
313 | + | |
314 | +#: courses/models.py:91 | |
315 | +#, fuzzy | |
316 | +#| msgid "Objectives" | |
317 | +msgid "Subjects" | |
318 | +msgstr "Objetivos" | |
319 | + | |
320 | +#: courses/models.py:109 | |
321 | +msgid "Owner" | |
322 | +msgstr "Proprietário" | |
196 | 323 | |
197 | -#: courses/models.py:54 courses/templates/module/index.html:92 | |
198 | -msgid "Modules" | |
199 | -msgstr "Modulos" | |
324 | +#: courses/models.py:114 courses/models.py:125 courses/models.py:146 | |
325 | +msgid "Topic" | |
326 | +msgstr "Tópico" | |
327 | + | |
328 | +#: courses/models.py:115 | |
329 | +msgid "Topics" | |
330 | +msgstr "Tópicos" | |
331 | + | |
332 | +#: courses/models.py:126 | |
333 | +msgid "Deliver Date" | |
334 | +msgstr "Data de entrega" | |
335 | + | |
336 | +#: courses/models.py:128 courses/models.py:148 | |
337 | +#, fuzzy | |
338 | +#| msgid "Maximum Students" | |
339 | +msgid "All Students" | |
340 | +msgstr "Quantidade máximo de estudantes" | |
341 | + | |
342 | +#: courses/models.py:151 courses/models.py:156 | |
343 | +#: courses/templates/subject/form_view_student.html:35 | |
344 | +#: courses/templates/subject/form_view_teacher.html:56 | |
345 | +#: courses/templates/subject/form_view_teacher.html:127 | |
346 | +msgid "Material" | |
347 | +msgstr "Material" | |
348 | + | |
349 | +#: courses/models.py:171 | |
350 | +#, fuzzy | |
351 | +#| msgid "Create Category" | |
352 | +msgid "subject category" | |
353 | +msgstr "Criar Categoria" | |
354 | + | |
355 | +#: courses/models.py:172 | |
356 | +#, fuzzy | |
357 | +#| msgid "Categories" | |
358 | +msgid "subject categories" | |
359 | +msgstr "Categorias" | |
200 | 360 | |
201 | 361 | #: courses/templates/category/create.html:8 |
202 | -#: courses/templates/category/delete.html:7 | |
203 | -#: courses/templates/category/index.html:7 | |
204 | -#: courses/templates/category/update.html:8 | |
205 | -#: courses/templates/category/view.html:7 | |
362 | +#: courses/templates/category/index.html:9 | |
363 | +#: courses/templates/category/update.html:9 | |
206 | 364 | #: courses/templates/course/create.html:8 |
207 | 365 | #: courses/templates/course/delete.html:7 courses/templates/course/home.html:8 |
208 | -#: courses/templates/course/index.html:7 courses/templates/course/update.html:8 | |
209 | -#: courses/templates/course/view.html:7 courses/templates/module/create.html:8 | |
210 | -#: courses/templates/module/delete.html:7 courses/templates/module/index.html:7 | |
211 | -#: courses/templates/module/update.html:8 | |
366 | +#: courses/templates/course/index.html:20 | |
367 | +#: courses/templates/course/replicate.html:8 | |
368 | +#: courses/templates/course/view.html:28 | |
369 | +#: courses/templates/subject/index.html:8 | |
370 | +#: courses/templates/subject/index.html:25 | |
371 | +#: courses/templates/subject_category/index.html:8 | |
372 | +#: courses/templates/topic/index.html:8 | |
212 | 373 | msgid "Home" |
213 | 374 | msgstr "Inicio" |
214 | 375 | |
215 | 376 | #: courses/templates/category/create.html:9 |
216 | -#: courses/templates/category/delete.html:18 | |
217 | -#: courses/templates/category/index.html:18 | |
218 | -#: courses/templates/category/view.html:18 | |
377 | +#: courses/templates/category/create.html:36 | |
378 | +#: courses/templates/category/create.html:47 | |
379 | +#: courses/templates/category/index.html:37 | |
380 | +#: courses/templates/category/index.html:48 | |
381 | +#: courses/templates/category/update.html:37 | |
382 | +#: courses/templates/category/update.html:47 | |
383 | +#: courses/templates/course/index.html:52 | |
219 | 384 | msgid "Create Category" |
220 | 385 | msgstr "Criar Categoria" |
221 | 386 | |
222 | -#: courses/templates/category/create.html:26 | |
223 | -#: courses/templates/category/update.html:26 | |
224 | -#: courses/templates/course/create.html:26 | |
225 | -#: courses/templates/course/update.html:32 | |
226 | -#: courses/templates/module/create.html:52 | |
227 | -#: courses/templates/module/update.html:52 | |
228 | -msgid "All fields are required" | |
229 | -msgstr "Todos os campos são obrigatótios" | |
230 | - | |
231 | -#: courses/templates/category/create.html:51 | |
232 | -#: courses/templates/category/update.html:51 | |
233 | -#: courses/templates/course/create.html:51 | |
234 | -#: courses/templates/course/update.html:57 | |
235 | -#: courses/templates/module/create.html:77 | |
236 | -#: courses/templates/module/update.html:77 | |
387 | +#: courses/templates/category/create.html:16 | |
388 | +#: courses/templates/category/index.html:17 | |
389 | +#: courses/templates/category/update.html:17 | |
390 | +#: courses/templates/course/index.html:16 | |
391 | +#: courses/templates/course/view.html:24 | |
392 | +#: courses/templates/subject/index.html:21 | |
393 | +#: courses/templates/topic/index.html:24 | |
394 | +msgid "Menu" | |
395 | +msgstr "Menu" | |
396 | + | |
397 | +#: courses/templates/category/create.html:20 | |
398 | +#: courses/templates/category/index.html:21 | |
399 | +#: courses/templates/category/update.html:21 | |
400 | +#: courses/templates/course/index.html:21 | |
401 | +#: courses/templates/course/view.html:29 | |
402 | +#: courses/templates/subject/index.html:26 | |
403 | +#: courses/templates/topic/index.html:28 | |
404 | +msgid "Profile" | |
405 | +msgstr "Perfil" | |
406 | + | |
407 | +#: courses/templates/category/create.html:21 | |
408 | +#: courses/templates/category/index.html:22 | |
409 | +#: courses/templates/category/update.html:22 | |
410 | +#: courses/templates/course/view.html:30 courses/templates/topic/index.html:29 | |
411 | +#, fuzzy | |
412 | +#| msgid "Courses" | |
413 | +msgid "My Courses" | |
414 | +msgstr "Meus Cursos" | |
415 | + | |
416 | +#: courses/templates/category/create.html:30 | |
417 | +#: courses/templates/category/index.html:31 | |
418 | +#: courses/templates/category/update.html:31 | |
419 | +#: courses/templates/topic/index.html:37 | |
420 | +msgid "Actions" | |
421 | +msgstr "Ações" | |
422 | + | |
423 | +#: courses/templates/category/create.html:34 | |
424 | +#: courses/templates/category/index.html:35 | |
425 | +#: courses/templates/category/update.html:35 | |
426 | +#: courses/templates/course/replicate.html:9 courses/views.py:133 | |
427 | +#, fuzzy | |
428 | +#| msgid "Duplicate Course" | |
429 | +msgid "Replicate Course" | |
430 | +msgstr "Duplicar curso" | |
431 | + | |
432 | +#: courses/templates/category/create.html:35 | |
433 | +#: courses/templates/category/index.html:36 | |
434 | +#: courses/templates/category/update.html:36 | |
435 | +#: courses/templates/course/create.html:9 | |
436 | +#: courses/templates/course/filtered.html:11 courses/views.py:104 | |
437 | +msgid "Create Course" | |
438 | +msgstr "Criar curso" | |
439 | + | |
440 | +#: courses/templates/category/create.html:48 | |
441 | +#: courses/templates/category/index.html:49 | |
442 | +#: courses/templates/category/update.html:48 | |
443 | +#: courses/templates/course/index.html:53 | |
444 | +#, fuzzy | |
445 | +#| msgid "Edit Category" | |
446 | +msgid "List Category" | |
447 | +msgstr "Editar categoria" | |
448 | + | |
449 | +#: courses/templates/category/create.html:77 | |
450 | +#: courses/templates/category/update.html:90 | |
237 | 451 | msgid "Save" |
238 | 452 | msgstr "Salvar" |
239 | 453 | |
240 | -#: courses/templates/category/delete.html:8 | |
241 | -#: courses/templates/category/index.html:8 | |
242 | -msgid "Manage Categories" | |
243 | -msgstr "" | |
454 | +#: courses/templates/category/delete.html:10 | |
455 | +#, fuzzy | |
456 | +#| msgid "Create Category" | |
457 | +msgid "Delete Category" | |
458 | +msgstr "Criar Categoria" | |
244 | 459 | |
245 | -#: courses/templates/category/delete.html:26 | |
246 | -msgid "Are you sure you want to delete the category" | |
247 | -msgstr "" | |
460 | +#: courses/templates/category/delete.html:17 | |
461 | +#: courses/templates/subject/delete.html:11 | |
462 | +#, fuzzy | |
463 | +#| msgid "Are you sure you want to delete the couse" | |
464 | +msgid "Are you sure you want to delete the subject" | |
465 | +msgstr "Você tem certeza que deseja deletar o curso" | |
248 | 466 | |
249 | -#: courses/templates/category/delete.html:27 | |
250 | -#: courses/templates/course/delete.html:28 | |
251 | -#: courses/templates/module/delete.html:50 | |
252 | -msgid "Yes" | |
253 | -msgstr "Sim" | |
467 | +#: courses/templates/category/delete.html:23 | |
468 | +#: courses/templates/course/course_card.html:57 | |
469 | +#: courses/templates/subject/form_view_teacher.html:352 | |
470 | +msgid "Close" | |
471 | +msgstr "Fechar" | |
254 | 472 | |
255 | -#: courses/templates/category/delete.html:28 | |
256 | -#: courses/templates/course/delete.html:29 | |
257 | -#: courses/templates/module/delete.html:51 | |
258 | -msgid "No" | |
259 | -msgstr "Não" | |
473 | +#: courses/templates/category/delete.html:24 | |
474 | +#, fuzzy | |
475 | +#| msgid "Delete Course" | |
476 | +msgid "Delete" | |
477 | +msgstr "Deletar curso" | |
260 | 478 | |
261 | -#: courses/templates/category/index.html:40 | |
262 | -msgid "Actions" | |
263 | -msgstr "" | |
479 | +#: courses/templates/category/index.html:10 | |
480 | +msgid "Manage Categories" | |
481 | +msgstr "Gerenciar categorias" | |
264 | 482 | |
265 | -#: courses/templates/category/index.html:59 | |
266 | -msgid "No categories found" | |
267 | -msgstr "" | |
483 | +#: courses/templates/category/index.html:84 | |
484 | +#: courses/templates/course/update.html:54 | |
485 | +#: courses/templates/subject/update.html:20 | |
486 | +#: courses/templates/topic/update.html:20 | |
487 | +msgid "Update" | |
488 | +msgstr "Atualizar" | |
268 | 489 | |
269 | -#: courses/templates/category/update.html:9 | |
270 | -#: courses/templates/category/view.html:21 | |
490 | +#: courses/templates/category/index.html:85 | |
491 | +#, fuzzy | |
492 | +#| msgid "Remove Category" | |
493 | +msgid "Remover" | |
494 | +msgstr "Remover categoria" | |
495 | + | |
496 | +#: courses/templates/category/update.html:10 | |
271 | 497 | msgid "Edit Category" |
272 | -msgstr "" | |
498 | +msgstr "Editar categoria" | |
273 | 499 | |
274 | -#: courses/templates/category/view.html:24 | |
275 | -msgid "Remove Category" | |
276 | -msgstr "" | |
500 | +#: courses/templates/course/course_card.html:22 | |
501 | +#: courses/templates/course/view.html:56 | |
502 | +#: courses/templates/course/view.html:145 | |
503 | +#: courses/templates/course/view.html:202 | |
504 | +#: courses/templates/subject/form_view_teacher.html:36 | |
505 | +#: courses/templates/subject/index.html:68 | |
506 | +#: courses/templates/topic/index.html:69 | |
507 | +msgid "Replicate" | |
508 | +msgstr "Repetir" | |
509 | + | |
510 | +#: courses/templates/course/course_card.html:23 | |
511 | +#, fuzzy | |
512 | +#| msgid "Are you sure you want to delete the couse" | |
513 | +msgid "Are you sure you want to delete this course?" | |
514 | +msgstr "Você tem certeza que deseja deletar o curso" | |
515 | + | |
516 | +#: courses/templates/course/course_card.html:23 | |
517 | +#: courses/templates/course/view.html:58 | |
518 | +#: courses/templates/course/view.html:146 | |
519 | +#: courses/templates/course/view.html:203 | |
520 | +#: courses/templates/subject/form_view_teacher.html:38 | |
521 | +#: courses/templates/subject/index.html:70 | |
522 | +#: courses/templates/topic/index.html:71 | |
523 | +msgid "Remove" | |
524 | +msgstr "Remover" | |
525 | + | |
526 | +#: courses/templates/course/course_card.html:32 | |
527 | +#: courses/templates/course/view.html:66 | |
528 | +#, fuzzy | |
529 | +#| msgid "Course name" | |
530 | +msgid "Course Name" | |
531 | +msgstr "Nome do Curso" | |
277 | 532 | |
278 | -#: courses/templates/category/view.html:32 | |
279 | -msgid "Name:" | |
280 | -msgstr "" | |
533 | +#: courses/templates/course/course_card.html:33 | |
534 | +#: courses/templates/course/view.html:67 | |
535 | +msgid "Coordinator" | |
536 | +msgstr "Coordenador" | |
537 | + | |
538 | +#: courses/templates/course/course_card.html:49 | |
539 | +#, fuzzy | |
540 | +#| msgid "Duplicate Course" | |
541 | +msgid "Repicate Course" | |
542 | +msgstr "Duplicar Curso" | |
543 | + | |
544 | +#: courses/templates/course/course_card.html:58 | |
545 | +#: courses/templates/course/create.html:55 | |
546 | +#: courses/templates/subject/create.html:20 | |
547 | +#: courses/templates/subject/form_view_teacher.html:353 | |
548 | +#: courses/templates/topic/create.html:20 | |
549 | +#, fuzzy | |
550 | +#| msgid "Create Course" | |
551 | +msgid "Create" | |
552 | +msgstr "Criar curso" | |
281 | 553 | |
282 | -#: courses/templates/category/view.html:33 | |
283 | -msgid "Slug:" | |
554 | +#: courses/templates/course/create.html:29 | |
555 | +#: courses/templates/course/replicate.html:105 | |
556 | +#: courses/templates/course/update.html:28 | |
557 | +msgid "attach_file" | |
284 | 558 | msgstr "" |
285 | 559 | |
286 | -#: courses/templates/course/create.html:9 | |
560 | +#: courses/templates/course/delete.html:17 | |
561 | +#, fuzzy | |
562 | +#| msgid "Are you sure you want to delete the couse" | |
563 | +msgid "Are you sure you want to delete the course" | |
564 | +msgstr "Você tem certeza que deseja deletar o curso" | |
565 | + | |
287 | 566 | #: courses/templates/course/delete.html:18 |
288 | -#: courses/templates/course/filtered.html:11 | |
289 | -#: courses/templates/course/index.html:18 courses/templates/course/view.html:25 | |
290 | -#: courses/templates/module/create.html:20 | |
291 | -#: courses/templates/module/delete.html:19 | |
292 | -#: courses/templates/module/index.html:26 | |
293 | -#: courses/templates/module/update.html:20 | |
294 | -msgid "Create Course" | |
295 | -msgstr "" | |
567 | +#: courses/templates/subject/delete.html:12 | |
568 | +msgid "Yes" | |
569 | +msgstr "Sim" | |
296 | 570 | |
297 | -#: courses/templates/course/delete.html:27 | |
298 | -msgid "Are you sure you want to delete the couse" | |
299 | -msgstr "" | |
571 | +#: courses/templates/course/delete.html:19 | |
572 | +#: courses/templates/subject/delete.html:13 | |
573 | +msgid "No" | |
574 | +msgstr "Não" | |
300 | 575 | |
301 | 576 | #: courses/templates/course/filtered.html:19 |
302 | -#: courses/templates/course/index.html:26 | |
303 | 577 | msgid "Categories:" |
304 | -msgstr "" | |
578 | +msgstr "Categorias:" | |
305 | 579 | |
306 | 580 | #: courses/templates/course/home.html:9 |
307 | 581 | #, fuzzy |
... | ... | @@ -309,155 +583,398 @@ msgstr "" |
309 | 583 | msgid "Home Course" |
310 | 584 | msgstr "Curso" |
311 | 585 | |
312 | -#: courses/templates/course/index.html:8 | |
313 | -msgid "Manage Courses" | |
314 | -msgstr "" | |
586 | +#: courses/templates/course/index.html:23 | |
587 | +#: courses/templates/subject/index.html:28 | |
588 | +#, fuzzy | |
589 | +#| msgid "Courses" | |
590 | +msgid "My courses" | |
591 | +msgstr "Cursos" | |
315 | 592 | |
316 | -#: courses/templates/course/index.html:80 | |
317 | -msgid "students tops" | |
318 | -msgstr "" | |
593 | +#: courses/templates/course/index.html:24 | |
594 | +#: courses/templates/course/view.html:31 | |
595 | +#: courses/templates/subject/index.html:29 | |
596 | +#, fuzzy | |
597 | +#| msgid "Courses" | |
598 | +msgid "All Courses" | |
599 | +msgstr "Cursos" | |
319 | 600 | |
320 | -#: courses/templates/course/index.html:86 | |
321 | -msgid "Subscribe Period:" | |
322 | -msgstr "" | |
601 | +#: courses/templates/course/index.html:27 | |
602 | +#: courses/templates/subject/index.html:32 | |
603 | +#, fuzzy | |
604 | +#| msgid "Manage Courses" | |
605 | +msgid "Manage Users" | |
606 | +msgstr "Gerenciar cursos" | |
323 | 607 | |
324 | -#: courses/templates/course/index.html:88 courses/templates/course/view.html:59 | |
325 | -#: courses/templates/module/index.html:83 | |
326 | -msgid "Period:" | |
327 | -msgstr "" | |
608 | +#: courses/templates/course/index.html:31 | |
609 | +#: courses/templates/subject/index.html:36 | |
610 | +msgid "Manage Courses" | |
611 | +msgstr "Gerenciar cursos" | |
328 | 612 | |
329 | 613 | #: courses/templates/course/index.html:104 |
330 | 614 | msgid "No courses found" |
331 | -msgstr "" | |
615 | +msgstr "Nenhum curso encontrado" | |
332 | 616 | |
333 | -#: courses/templates/course/update.html:9 courses/templates/course/view.html:28 | |
334 | -#: courses/templates/module/create.html:26 | |
335 | -#: courses/templates/module/delete.html:25 | |
336 | -#: courses/templates/module/index.html:29 | |
337 | -#: courses/templates/module/update.html:26 | |
338 | -msgid "Edit Course" | |
339 | -msgstr "" | |
617 | +#: courses/templates/course/replicate.html:97 | |
618 | +#, fuzzy | |
619 | +#| msgid "Image" | |
620 | +msgid "Imagem" | |
621 | +msgstr "Imagem" | |
340 | 622 | |
341 | -#: courses/templates/course/update.html:19 | |
342 | -#: courses/templates/course/view.html:21 | |
343 | -#: courses/templates/module/create.html:29 | |
344 | -#: courses/templates/module/delete.html:9 | |
345 | -#: courses/templates/module/delete.html:28 | |
346 | -#: courses/templates/module/index.html:9 courses/templates/module/index.html:22 | |
347 | -#: courses/templates/module/update.html:29 | |
348 | -msgid "Manage Modules" | |
349 | -msgstr "" | |
623 | +#: courses/templates/course/view.html:55 | |
624 | +#: courses/templates/course/view.html:243 | |
625 | +#, fuzzy | |
626 | +#| msgid "Create Course" | |
627 | +msgid "Create Subject" | |
628 | +msgstr "Criar curso" | |
629 | + | |
630 | +#: courses/templates/course/view.html:57 | |
631 | +#: courses/templates/subject/form_view_teacher.html:37 | |
632 | +#: courses/templates/subject/index.html:69 | |
633 | +#: courses/templates/topic/index.html:70 | |
634 | +msgid "Edit" | |
635 | +msgstr "Editar" | |
636 | + | |
637 | +#: courses/templates/course/view.html:83 | |
638 | +msgid "Create a New Subject" | |
639 | +msgstr "Criar novo assunto" | |
640 | + | |
641 | +#: courses/templates/course/view.html:89 | |
642 | +#: courses/templates/subject/form_view_teacher.html:173 | |
643 | +#: courses/templates/subject/form_view_teacher.html:313 | |
644 | +msgid "Cancel" | |
645 | +msgstr "Cancelar" | |
646 | + | |
647 | +#: courses/templates/course/view.html:90 | |
648 | +#: courses/templates/course/view.html:117 | |
649 | +#: courses/templates/course/view.html:260 | |
650 | +#: courses/templates/subject/form_view_teacher.html:206 | |
651 | +#: courses/templates/subject/form_view_teacher.html:258 | |
652 | +msgid "Confirm" | |
653 | +msgstr "Confirmar" | |
654 | + | |
655 | +#: courses/templates/course/view.html:113 | |
656 | +#: courses/templates/course/view.html:256 | |
657 | +#, fuzzy | |
658 | +#| msgid "Are you sure you want to delete the couse" | |
659 | +msgid "Are you sure you want to remove this subject?" | |
660 | +msgstr "Você tem certeza que deseja deletar o curso" | |
350 | 661 | |
351 | -#: courses/templates/course/update.html:22 | |
352 | -#: courses/templates/course/view.html:31 | |
353 | -#: courses/templates/module/create.html:32 | |
354 | -#: courses/templates/module/delete.html:31 | |
355 | -#: courses/templates/module/index.html:32 | |
356 | -#: courses/templates/module/update.html:32 | |
357 | -msgid "Participants" | |
358 | -msgstr "" | |
662 | +#: courses/templates/course/view.html:154 | |
663 | +#: courses/templates/course/view.html:210 | |
664 | +#, fuzzy | |
665 | +#| msgid "Are you sure you want to delete the couse" | |
666 | +msgid "Are you sure you want to subscribe to this subject?" | |
667 | +msgstr "Você tem certeza que deseja deletar o curso" | |
359 | 668 | |
360 | -#: courses/templates/course/view.html:18 | |
361 | -#: courses/templates/module/create.html:23 | |
362 | -#: courses/templates/module/delete.html:22 | |
363 | -#: courses/templates/module/index.html:19 | |
364 | -#: courses/templates/module/update.html:23 | |
365 | -msgid "Course Info" | |
366 | -msgstr "" | |
669 | +#: courses/templates/course/view.html:154 | |
670 | +#: courses/templates/course/view.html:210 | |
671 | +#, fuzzy | |
672 | +#| msgid "Subscribes:" | |
673 | +msgid "Subscribe" | |
674 | +msgstr "Inscrições:" | |
675 | + | |
676 | +#: courses/templates/course/view.html:161 | |
677 | +#: courses/templates/course/view.html:217 | |
678 | +#: courses/templates/subject/index.html:78 | |
679 | +msgid "Professor" | |
680 | +msgstr "Professor" | |
681 | + | |
682 | +#: courses/templates/course/view.html:171 | |
683 | +#: courses/templates/course/view.html:227 | |
684 | +msgid "Begining" | |
685 | +msgstr "Início" | |
686 | + | |
687 | +#: courses/templates/course/view.html:174 | |
688 | +#: courses/templates/course/view.html:230 | |
689 | +#: courses/templates/subject/index.html:88 | |
690 | +msgid "End" | |
691 | +msgstr "Final" | |
692 | + | |
693 | +#: courses/templates/subject/form_view_student.html:45 | |
694 | +#: courses/templates/subject/form_view_teacher.html:83 | |
695 | +#: courses/templates/subject/form_view_teacher.html:94 | |
696 | +#: courses/templates/subject/form_view_teacher.html:153 | |
697 | +#, fuzzy | |
698 | +#| msgid "Objectivies" | |
699 | +msgid "Activities" | |
700 | +msgstr "Objetivos" | |
367 | 701 | |
368 | -#: courses/templates/course/view.html:34 | |
369 | -#: courses/templates/module/create.html:35 | |
370 | -#: courses/templates/module/delete.html:34 | |
371 | -#: courses/templates/module/index.html:35 | |
372 | -#: courses/templates/module/update.html:35 | |
373 | -msgid "Course avaliations" | |
374 | -msgstr "" | |
702 | +#: courses/templates/subject/form_view_teacher.html:62 | |
703 | +#: courses/templates/subject/form_view_teacher.html:133 | |
704 | +msgid "Create a Link" | |
705 | +msgstr "Criar link" | |
375 | 706 | |
376 | -#: courses/templates/course/view.html:37 | |
377 | -#: courses/templates/module/create.html:38 | |
378 | -#: courses/templates/module/delete.html:37 | |
379 | -#: courses/templates/module/index.html:38 | |
380 | -#: courses/templates/module/update.html:38 | |
381 | -msgid "Duplicate Course" | |
382 | -msgstr "" | |
707 | +#: courses/templates/subject/form_view_teacher.html:65 | |
708 | +#: courses/templates/subject/form_view_teacher.html:136 | |
709 | +#, fuzzy | |
710 | +#| msgid "Create Module" | |
711 | +msgid "Create a file" | |
712 | +msgstr "Criar módulos" | |
383 | 713 | |
384 | -#: courses/templates/course/view.html:40 | |
385 | -#: courses/templates/module/create.html:41 | |
386 | -#: courses/templates/module/delete.html:40 | |
387 | -#: courses/templates/module/index.html:41 | |
388 | -#: courses/templates/module/update.html:41 | |
389 | -msgid "Delete Course" | |
390 | -msgstr "" | |
714 | +#: courses/templates/subject/form_view_teacher.html:100 | |
715 | +#, fuzzy | |
716 | +#| msgid "Create Course" | |
717 | +msgid "Create Forum" | |
718 | +msgstr "Criar curso" | |
391 | 719 | |
392 | -#: courses/templates/course/view.html:56 | |
393 | -msgid "Subscribes:" | |
394 | -msgstr "" | |
720 | +#: courses/templates/subject/form_view_teacher.html:101 | |
721 | +#, fuzzy | |
722 | +#| msgid "Create Module" | |
723 | +msgid "Create Poll" | |
724 | +msgstr "Criar módulos" | |
395 | 725 | |
396 | -#: courses/templates/course/view.html:66 | |
397 | -msgid "Objectives:" | |
398 | -msgstr "" | |
726 | +#: courses/templates/subject/form_view_teacher.html:117 | |
727 | +msgid "Name Topic" | |
728 | +msgstr "Nome do tópico" | |
399 | 729 | |
400 | -#: courses/templates/course/view.html:69 | |
401 | -msgid "Work Plan:" | |
402 | -msgstr "" | |
730 | +#: courses/templates/subject/form_view_teacher.html:159 | |
731 | +msgid "Anything" | |
732 | +msgstr "Qualquer coisa" | |
403 | 733 | |
404 | -#: courses/templates/module/create.html:10 | |
405 | -#: courses/templates/module/index.html:70 | |
406 | -msgid "Create Module" | |
407 | -msgstr "" | |
734 | +#: courses/templates/subject/form_view_teacher.html:174 | |
735 | +#: courses/templates/subject/form_view_teacher.html:314 | |
736 | +msgid "Submit" | |
737 | +msgstr "Enviar" | |
408 | 738 | |
409 | -#: courses/templates/module/delete.html:49 | |
410 | -msgid "Are you sure you want to delete the module" | |
411 | -msgstr "" | |
739 | +#: courses/templates/subject/form_view_teacher.html:202 | |
740 | +#, fuzzy | |
741 | +#| msgid "Delete Course" | |
742 | +msgid "Delete your Topic?" | |
743 | +msgstr "Deletar curso" | |
412 | 744 | |
413 | -#: courses/templates/module/index.html:80 | |
414 | -msgid "students maximum" | |
745 | +#: courses/templates/subject/form_view_teacher.html:220 | |
746 | +msgid "Material EMBED" | |
415 | 747 | msgstr "" |
416 | 748 | |
417 | -#: courses/templates/module/index.html:109 | |
418 | -msgid "Invisible" | |
749 | +#: courses/templates/subject/form_view_teacher.html:231 | |
750 | +msgid "Code" | |
419 | 751 | msgstr "" |
420 | 752 | |
421 | -#: courses/templates/module/index.html:125 | |
422 | -msgid "No modules found" | |
423 | -msgstr "" | |
753 | +#: courses/templates/subject/form_view_teacher.html:235 | |
754 | +#, fuzzy | |
755 | +#| msgid "Modules's description" | |
756 | +msgid "Material description" | |
757 | +msgstr "Descrição do módulo" | |
424 | 758 | |
425 | -#: courses/templates/module/update.html:10 | |
426 | -msgid "Edit Module" | |
427 | -msgstr "" | |
759 | +#: courses/templates/subject/form_view_teacher.html:277 | |
760 | +msgid "Proposal Activity" | |
761 | +msgstr "Atividade proposta" | |
428 | 762 | |
429 | -#: courses/views.py:48 | |
430 | -msgid "Course created successfully!" | |
431 | -msgstr "" | |
763 | +#: courses/templates/subject/form_view_teacher.html:285 | |
764 | +#, fuzzy | |
765 | +#| msgid "Description" | |
766 | +msgid "Describe" | |
767 | +msgstr "Descrição" | |
768 | + | |
769 | +#: courses/templates/subject/form_view_teacher.html:291 | |
770 | +msgid "Opening" | |
771 | +msgstr "Abertura" | |
772 | + | |
773 | +#: courses/templates/subject/form_view_teacher.html:297 | |
774 | +msgid "Ending" | |
775 | +msgstr "Final" | |
776 | + | |
777 | +#: courses/templates/subject/form_view_teacher.html:306 | |
778 | +msgid "Send Later" | |
779 | +msgstr "Enviar depois" | |
780 | + | |
781 | +#: courses/templates/subject/form_view_teacher.html:344 | |
782 | +msgid "Forum" | |
783 | +msgstr "Fórum" | |
784 | + | |
785 | +#: courses/templates/subject/index.html:11 | |
786 | +#, fuzzy | |
787 | +#| msgid "Manage Courses" | |
788 | +msgid "Manage Subjects" | |
789 | +msgstr "Gerenciar cursos" | |
790 | + | |
791 | +#: courses/templates/subject/index.html:85 | |
792 | +msgid "Beginning" | |
793 | +msgstr "Início" | |
432 | 794 | |
433 | -#: courses/views.py:70 | |
434 | -msgid "Course edited successfully!" | |
795 | +#: courses/templates/subject/index.html:105 | |
796 | +#, fuzzy | |
797 | +#| msgid "Create Course" | |
798 | +msgid "Create Topic" | |
799 | +msgstr "Criar curso" | |
800 | + | |
801 | +#: courses/templates/subject/poll_item_actions.html:9 | |
802 | +#: courses/templates/subject/poll_item_actions.html:11 | |
803 | +msgid "poll" | |
804 | +msgstr "Enquete" | |
805 | + | |
806 | +#: courses/templates/subject_category/index.html:34 | |
807 | +#, fuzzy | |
808 | +#| msgid "Create Category" | |
809 | +msgid "Create Subject Category" | |
810 | +msgstr "Criar Categoria" | |
811 | + | |
812 | +#: courses/templates/subject_category/index.html:48 | |
813 | +msgid "edit" | |
814 | +msgstr "Editar" | |
815 | + | |
816 | +#: courses/templates/subject_category/index.html:54 | |
817 | +msgid "delete" | |
818 | +msgstr "Deletar" | |
819 | + | |
820 | +#: courses/templates/topic/index.html:12 | |
821 | +#, fuzzy | |
822 | +#| msgid "Manage Categories" | |
823 | +msgid "Manage Topic" | |
824 | +msgstr "Gerenciar categorias" | |
825 | + | |
826 | +#: courses/templates/topic/index.html:41 | |
827 | +msgid "Participants" | |
828 | +msgstr "Participantes" | |
829 | + | |
830 | +#: courses/templates/topic/index.html:42 | |
831 | +#, fuzzy | |
832 | +#| msgid "Duplicate Course" | |
833 | +msgid "Replicate subject" | |
834 | +msgstr "Duplicar curso" | |
835 | + | |
836 | +#: courses/templates/topic/index.html:43 | |
837 | +#, fuzzy | |
838 | +#| msgid "Create Course" | |
839 | +msgid "Create subject" | |
840 | +msgstr "Criar curso" | |
841 | + | |
842 | +#: courses/templates/topic/index.html:44 | |
843 | +#, fuzzy | |
844 | +#| msgid "Edit Course" | |
845 | +msgid "Edit subject" | |
846 | +msgstr "Editar curso" | |
847 | + | |
848 | +#: courses/templates/topic/index.html:45 | |
849 | +msgid "Remove subject" | |
850 | +msgstr "Remover assunto" | |
851 | + | |
852 | +#: courses/templates/topic/index.html:112 | |
853 | +msgid "Atividade.doc" | |
435 | 854 | msgstr "" |
436 | 855 | |
437 | -#: courses/views.py:92 | |
856 | +#: courses/templates/topic/index.html:117 | |
857 | +msgid "Grade" | |
858 | +msgstr "Nota" | |
859 | + | |
860 | +#: courses/templates/topic/index.html:127 | |
861 | +msgid "Send" | |
862 | +msgstr "Enviar" | |
863 | + | |
864 | +#: courses/templates/topic/index.html:150 | |
865 | +#, fuzzy | |
866 | +#| msgid "No categories found" | |
867 | +msgid "No activity found" | |
868 | +msgstr "Nenhuma categoria encontrada" | |
869 | + | |
870 | +#: courses/views.py:265 | |
438 | 871 | msgid "Course deleted successfully!" |
439 | -msgstr "" | |
872 | +msgstr "Curso deletado com sucesso!" | |
873 | + | |
874 | +#: courses/views.py:276 | |
875 | +msgid "Successfully subscribed to the course!" | |
876 | +msgstr "Inscrição no curso realizada com sucesso!" | |
877 | + | |
878 | +#: courses/views.py:278 | |
879 | +msgid "" | |
880 | +"An error has occured. Could not subscribe to this course, try again later" | |
881 | +msgstr "Ocorreu um erro. Não pôde inscrever no curso, tente novamente" | |
440 | 882 | |
441 | -#: courses/views.py:142 | |
883 | +#: courses/views.py:336 | |
442 | 884 | msgid "Category created successfully!" |
443 | -msgstr "" | |
885 | +msgstr "Categoria criada com sucesso!" | |
444 | 886 | |
445 | -#: courses/views.py:164 | |
446 | -msgid "Category edited successfully!" | |
447 | -msgstr "" | |
887 | +#: courses/views.py:349 | |
888 | +#, fuzzy | |
889 | +#| msgid "Category edited successfully!" | |
890 | +msgid "Category updated successfully!" | |
891 | +msgstr "Categoria editada com sucesso!" | |
448 | 892 | |
449 | -#: courses/views.py:185 | |
893 | +#: courses/views.py:374 | |
450 | 894 | msgid "Category deleted successfully!" |
451 | -msgstr "" | |
895 | +msgstr "Categoria deletada com sucesso!" | |
452 | 896 | |
453 | -#: courses/views.py:237 | |
454 | -msgid "Module created successfully!" | |
455 | -msgstr "" | |
897 | +#: courses/views.py:633 | |
898 | +msgid "Successfully subscribed to the subject!" | |
899 | +msgstr "Inscrição no assunto realizada com sucesso!" | |
456 | 900 | |
457 | -#: courses/views.py:268 | |
458 | -msgid "Module edited successfully!" | |
459 | -msgstr "" | |
901 | +#: courses/views.py:635 | |
902 | +msgid "" | |
903 | +"An error has occured. Could not subscribe to this subject, try again later" | |
904 | +msgstr "Ocorreu um erro. Não pôde inscrever no assunto, tente novamente" | |
460 | 905 | |
461 | -#: courses/views.py:291 | |
462 | -msgid "Module deleted successfully!" | |
463 | -msgstr "" | |
906 | +#: courses/views.py:637 | |
907 | +msgid "You're not subscribed in the course yet." | |
908 | +msgstr "Você não está inscrito no curso ainda." | |
909 | + | |
910 | +#~ msgid "User" | |
911 | +#~ msgstr "Usuário" | |
912 | + | |
913 | +#~ msgid "Module" | |
914 | +#~ msgstr "Modulo" | |
915 | + | |
916 | +#~ msgid "Modules" | |
917 | +#~ msgstr "Modulos" | |
918 | + | |
919 | +#~ msgid "All fields are required" | |
920 | +#~ msgstr "Todos os campos são obrigatótios" | |
921 | + | |
922 | +#~ msgid "Are you sure you want to delete the category" | |
923 | +#~ msgstr "Você tem certeza que deseja deletar a categoria" | |
924 | + | |
925 | +#~ msgid "Name:" | |
926 | +#~ msgstr "Nome:" | |
927 | + | |
928 | +#~ msgid "students tops" | |
929 | +#~ msgstr "Melhores estudantes" | |
930 | + | |
931 | +#~ msgid "Subscribe Period:" | |
932 | +#~ msgstr "Inscrever período:" | |
933 | + | |
934 | +#~ msgid "Period:" | |
935 | +#~ msgstr "Período:" | |
936 | + | |
937 | +#~ msgid "Manage Modules" | |
938 | +#~ msgstr "Gerenciar módulos" | |
939 | + | |
940 | +#~ msgid "Course Info" | |
941 | +#~ msgstr "Informações do curso" | |
942 | + | |
943 | +#~ msgid "Course avaliations" | |
944 | +#~ msgstr "Avaliações do curso" | |
945 | + | |
946 | +#~ msgid "Objectives:" | |
947 | +#~ msgstr "Objetivos:" | |
948 | + | |
949 | +#~ msgid "Work Plan:" | |
950 | +#~ msgstr "Plano de trabalho:" | |
951 | + | |
952 | +#~ msgid "Are you sure you want to delete the module" | |
953 | +#~ msgstr "Você tem certeza que deseja deletar o módulo" | |
954 | + | |
955 | +#~ msgid "students maximum" | |
956 | +#~ msgstr "Capacidade de estudantes" | |
957 | + | |
958 | +#~ msgid "Invisible" | |
959 | +#~ msgstr "Invisível" | |
960 | + | |
961 | +#~ msgid "No modules found" | |
962 | +#~ msgstr "Nenhum módulo encontrado" | |
963 | + | |
964 | +#~ msgid "Edit Module" | |
965 | +#~ msgstr "Editar módulo" | |
966 | + | |
967 | +#~ msgid "Course created successfully!" | |
968 | +#~ msgstr "Curso criado com sucesso!" | |
969 | + | |
970 | +#~ msgid "Course edited successfully!" | |
971 | +#~ msgstr "Curso editado com sucesso!" | |
972 | + | |
973 | +#~ msgid "Module created successfully!" | |
974 | +#~ msgstr "Módulo criado com sucesso!" | |
975 | + | |
976 | +#~ msgid "Module edited successfully!" | |
977 | +#~ msgstr "Módulo editado com sucesso!" | |
978 | + | |
979 | +#~ msgid "Module deleted successfully!" | |
980 | +#~ msgstr "Módulo deletado com sucesso!" | ... | ... |
courses/permissions.py
1 | 1 | from rolepermissions.permissions import register_object_checker |
2 | -from amadeus.roles import SystemAdmin | |
2 | +from amadeus.roles import SystemAdmin, Professor | |
3 | + | |
4 | +@register_object_checker() | |
5 | +def view_topic(role, user, topic): | |
6 | + if (role == SystemAdmin): | |
7 | + return True | |
8 | + | |
9 | + if (user in topic.subject.course.professors.all() and user in topic.subject.professors.all()): | |
10 | + return True | |
11 | + | |
12 | + if (user in topic.subject.course.students.all() and user in topic.subject.students.all()): | |
13 | + return True | |
14 | + | |
15 | + return False | |
3 | 16 | |
4 | 17 | @register_object_checker() |
5 | 18 | def edit_topic(role, user, topic): |
... | ... | @@ -12,6 +25,19 @@ def edit_topic(role, user, topic): |
12 | 25 | return False |
13 | 26 | |
14 | 27 | @register_object_checker() |
28 | +def view_subject(role, user, subject): | |
29 | + if (role == SystemAdmin): | |
30 | + return True | |
31 | + | |
32 | + if (user in subject.course.professors.all() and user in subject.professors.all()): | |
33 | + return True | |
34 | + | |
35 | + if (user in subject.course.students.all() and user in subject.students.all()): | |
36 | + return True | |
37 | + | |
38 | + return False | |
39 | + | |
40 | +@register_object_checker() | |
15 | 41 | def edit_subject(role, user, subject): |
16 | 42 | if (role == SystemAdmin): |
17 | 43 | return True |
... | ... | @@ -32,6 +58,13 @@ def delete_subject(role, user, subject): |
32 | 58 | return False |
33 | 59 | |
34 | 60 | @register_object_checker() |
61 | +def delete_category(role, user, category): | |
62 | + if (role == SystemAdmin or role == Professor): | |
63 | + return True | |
64 | + | |
65 | + return False | |
66 | + | |
67 | +@register_object_checker() | |
35 | 68 | def update_course(role, user, course): |
36 | 69 | if (role == SystemAdmin): |
37 | 70 | return True | ... | ... |
courses/static/js/course.js
1 | +var locale = navigator.language || navigator.userLanguage; | |
2 | + | |
3 | +$('.date-picker').datepicker({ | |
4 | + language: locale, | |
5 | +}); | |
6 | + | |
1 | 7 | /* |
2 | 8 | * |
3 | 9 | * Function to get a cookie stored on browser |
... | ... | @@ -49,13 +55,13 @@ function subscribe(elem, url, id, confirm_message) { |
49 | 55 | function delete_course(url, course, message, return_url) { |
50 | 56 | alertify.confirm(message, function(){ |
51 | 57 | var csrftoken = getCookie('csrftoken'); |
52 | - | |
58 | + | |
53 | 59 | $.ajax({ |
54 | 60 | method: 'post', |
55 | 61 | beforeSend: function (request) { |
56 | 62 | request.setRequestHeader('X-CSRFToken', csrftoken); |
57 | 63 | }, |
58 | - url: url, | |
64 | + url: url, | |
59 | 65 | success: function(data) { |
60 | 66 | alertify.alert('Remove Course', 'Course removed successfully!', function(){ |
61 | 67 | window.location.href = return_url; |
... | ... | @@ -64,14 +70,14 @@ function delete_course(url, course, message, return_url) { |
64 | 70 | }); |
65 | 71 | }); |
66 | 72 | } |
67 | -/* | |
73 | +/* | |
68 | 74 | * |
69 | 75 | * Function to load create course's form |
70 | 76 | * |
71 | 77 | */ |
72 | 78 | function replicate_course(url, course) { |
73 | 79 | $.ajax({ |
74 | - url: url, | |
80 | + url: url, | |
75 | 81 | data: {'form': course}, |
76 | 82 | success: function(data) { |
77 | 83 | $(".course_replicate_form").html(data); | ... | ... |
courses/static/js/modal_category.js
courses/static/js/topic_editation_presentation.js
1 | -$(".edit_card").on('click', function() { | |
2 | - $(".presentation").css('display','none'); | |
3 | - $(".editation").css('display','block'); | |
4 | -}) | |
5 | -$(".edit_card_end").on('click', function() { | |
6 | - $(".editation").css('display','none'); | |
7 | - $(".presentation").css('display','block'); | |
8 | -}) | |
9 | 1 | \ No newline at end of file |
2 | +function show_editation(id_topic){ | |
3 | + $("#presentation_"+ id_topic).css('display','none'); | |
4 | + $("#editation_"+ id_topic).css('display','block'); | |
5 | +} | |
6 | + | |
7 | +function show_presentation(id_topic){ | |
8 | + $("#editation_"+ id_topic).css('display','none'); | |
9 | + $("#presentation_"+ id_topic).css('display','block'); | |
10 | +} | |
10 | 11 | \ No newline at end of file | ... | ... |
courses/templates/category/create.html
... | ... | @@ -27,25 +27,25 @@ |
27 | 27 | |
28 | 28 | <div class="panel panel-primary navigation"> |
29 | 29 | <div class="panel-heading"> |
30 | - <h3 class="panel-title">Actions</h3> | |
30 | + <h3 class="panel-title">{% trans 'Actions' %}</h3> | |
31 | 31 | </div> |
32 | 32 | <div class="panel-body"> |
33 | 33 | <ul class="nav nav-pills nav-stacked"> |
34 | - <li><a href="javascript:void(0)">Replicate Course</a></li> | |
35 | - <li><a href="{% url 'course:create' %}">Create Course</a></li> | |
36 | - <li><a href="{% url 'course:create_cat' %}">Create Category</a></li> | |
34 | + <li><a href="javascript:void(0)">{% trans 'Replicate Course' %}</a></li> | |
35 | + <li><a href="{% url 'course:create' %}">{% trans 'Create Course' %}</a></li> | |
36 | + <li><a href="{% url 'course:create_cat' %}">{% trans 'Create Category' %}</a></li> | |
37 | 37 | </ul> |
38 | 38 | </div> |
39 | 39 | </div> |
40 | 40 | |
41 | 41 | <div class="panel panel-primary navigation"> |
42 | 42 | <div class="panel-heading"> |
43 | - <h3 class="panel-title">Category</h3> | |
43 | + <h3 class="panel-title">{% trans 'Category' %}</h3> | |
44 | 44 | </div> |
45 | 45 | <div class="panel-body"> |
46 | 46 | <ul class="nav nav-pills nav-stacked"> |
47 | - <li><a href="{% url 'course:create_cat' %}">Create Category</a></li> | |
48 | - <li><a href="{% url 'course:manage_cat' %}">List Category</a></li> | |
47 | + <li><a href="{% url 'course:create_cat' %}">{% trans 'Create Category' %}</a></li> | |
48 | + <li><a href="{% url 'course:manage_cat' %}">{% trans 'List Category' %}</a></li> | |
49 | 49 | </ul> |
50 | 50 | </div> |
51 | 51 | </div> | ... | ... |
courses/templates/category/index.html
... | ... | @@ -28,25 +28,25 @@ |
28 | 28 | |
29 | 29 | <div class="panel panel-primary navigation"> |
30 | 30 | <div class="panel-heading"> |
31 | - <h3 class="panel-title">Actions</h3> | |
31 | + <h3 class="panel-title">{% trans 'Actions' %}</h3> | |
32 | 32 | </div> |
33 | 33 | <div class="panel-body"> |
34 | 34 | <ul class="nav nav-pills nav-stacked"> |
35 | - <li><a href="javascript:void(0)">Replicate Course</a></li> | |
36 | - <li><a href="{% url 'course:create' %}">Create Course</a></li> | |
37 | - <li><a href="{% url 'course:create_cat' %}">Create Category</a></li> | |
35 | + <li><a href="javascript:void(0)">{% trans 'Replicate Course' %}</a></li> | |
36 | + <li><a href="{% url 'course:create' %}">{% trans 'Create Course' %}</a></li> | |
37 | + <li><a href="{% url 'course:create_cat' %}">{% trans 'Create Category' %}</a></li> | |
38 | 38 | </ul> |
39 | 39 | </div> |
40 | 40 | </div> |
41 | 41 | |
42 | 42 | <div class="panel panel-primary navigation"> |
43 | 43 | <div class="panel-heading"> |
44 | - <h3 class="panel-title">Category</h3> | |
44 | + <h3 class="panel-title">{% trans 'Category' %}</h3> | |
45 | 45 | </div> |
46 | 46 | <div class="panel-body"> |
47 | 47 | <ul class="nav nav-pills nav-stacked"> |
48 | - <li><a href="{% url 'course:create_cat' %}">Create Category</a></li> | |
49 | - <li><a href="{% url 'course:manage_cat' %}">List Category</a></li> | |
48 | + <li><a href="{% url 'course:create_cat' %}">{% trans 'Create Category' %}</a></li> | |
49 | + <li><a href="{% url 'course:manage_cat' %}">{% trans 'List Category' %}</a></li> | |
50 | 50 | </ul> |
51 | 51 | </div> |
52 | 52 | </div> |
... | ... | @@ -72,7 +72,7 @@ |
72 | 72 | <div class="panel-heading" role="tab"> |
73 | 73 | <div class="row"> |
74 | 74 | <div class="col-xs-9 col-md-10 titleTopic"> |
75 | - <h4 style="color:white">{{category}}</h4> | |
75 | + <h4 style="color:white; margin-left: 20px;">{{category}}</h4> | |
76 | 76 | </div> |
77 | 77 | |
78 | 78 | <div class="col-xs-4 col-md-2" id="divMoreActions"> | ... | ... |
courses/templates/category/update.html
... | ... | @@ -28,24 +28,24 @@ |
28 | 28 | |
29 | 29 | <div class="panel panel-primary navigation"> |
30 | 30 | <div class="panel-heading"> |
31 | - <h3 class="panel-title">Actions</h3> | |
31 | + <h3 class="panel-title">{% trans 'Actions' %}</h3> | |
32 | 32 | </div> |
33 | 33 | <div class="panel-body"> |
34 | 34 | <ul class="nav nav-pills nav-stacked"> |
35 | - <li><a href="javascript:void(0)">Replicate Course</a></li> | |
36 | - <li><a href="{% url 'course:create' %}">Create Course</a></li> | |
37 | - <li><a href="{% url 'course:create_cat' %}">Create Category</a></li> | |
35 | + <li><a href="javascript:void(0)">{% trans 'Replicate Course' %}</a></li> | |
36 | + <li><a href="{% url 'course:create' %}">{% trans 'Create Course' %}</a></li> | |
37 | + <li><a href="{% url 'course:create_cat' %}">{% trans 'Create Category' %}</a></li> | |
38 | 38 | </ul> |
39 | 39 | </div> |
40 | 40 | </div> |
41 | 41 | <div class="panel panel-primary navigation"> |
42 | 42 | <div class="panel-heading"> |
43 | - <h3 class="panel-title">Category</h3> | |
43 | + <h3 class="panel-title">{% trans 'Category' %}</h3> | |
44 | 44 | </div> |
45 | 45 | <div class="panel-body"> |
46 | 46 | <ul class="nav nav-pills nav-stacked"> |
47 | - <li><a href="{% url 'course:create_cat' %}">Create Category</a></li> | |
48 | - <li><a href="{% url 'course:manage_cat' %}">List Category</a></li> | |
47 | + <li><a href="{% url 'course:create_cat' %}">{% trans 'Create Category' %}</a></li> | |
48 | + <li><a href="{% url 'course:manage_cat' %}">{% trans 'List Category' %}</a></li> | |
49 | 49 | </ul> |
50 | 50 | </div> |
51 | 51 | </div> | ... | ... |
courses/templates/course/course_card.html
1 | 1 | {% load static i18n permission_tags %} |
2 | 2 | {% load django_bootstrap_breadcrumbs %} |
3 | - | |
4 | -<div class="panel-group ui-accordion ui-widget ui-helper-reset ui-sortable" id="accordion-{{course.slug}}" role="tablist" aria-multiselectable="false"> | |
5 | - <div class="group"> | |
6 | - <div class="panel panel-info"> | |
7 | - <div class="panel-heading" role="tab"> | |
8 | - <div class="row"> | |
9 | - <div class="col-xs-9 col-md-10 titleTopic"> | |
10 | - <a role="button" data-toggle="collapse" data-parent="#accordion-{{course.slug}}" href=".collapseOne-{{course.slug}}" aria-expanded="false" aria-controls="collapseOne-{{course.slug}}" class="collapsed"> | |
11 | - <h4 style="color:white">{{course.name}}</h4> | |
12 | - </a> | |
13 | - </div> | |
14 | - {% if user|has_role:'professor' or user|has_role:'system_admin' %} | |
15 | - <div class="col-xs-4 col-md-2" id="divMoreActions"> | |
16 | - <div class="btn-group"> | |
17 | - <button class="btn btn-default btn-sm dropdown-toggle" type="button" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
18 | - <i class="fa fa-ellipsis-v fa-2x" aria-hidden="true"></i> | |
19 | - </button> | |
20 | - <ul class="dropdown-menu" aria-labelledby="moreActions"> | |
21 | - <li><a href="{% url 'course:replicate_course' course.slug %}"><i class="fa fa-files-o fa-fw" aria-hidden="true"></i>{% trans 'Replicate' %}</a></li> | |
22 | - <li><a href="javascript:delete_course('{% url 'course:delete' course.slug %}', '{{ course.slug }}', '{% trans "Are you sure you want to delete this course?" %}', '{% url 'course:manage' %}')"><i class="fa fa-trash fa-fw" aria-hidden="true"></i>{% trans 'Remove' %}</a></li> | |
23 | - </ul> | |
24 | - </div> | |
25 | - </div> | |
26 | - {% endif %} | |
27 | - </div> | |
28 | - </div> | |
29 | - <div class="panel-collapse collapseOne-{{course.slug}} collapse in" role="tabpanel" aria-labelledby="headingOne" aria-expanded="true" aria-hidden="false" tabindex="0"> | |
30 | - <div class="panel-body"> | |
31 | - <p><b>Course Name: </b>{{course.name}}</p> | |
32 | - <p><b>Coordinator: </b>{{course.professors.all.0}}</p> | |
33 | - <p> | |
34 | - <b>Description:</b> | |
35 | - <i> | |
36 | - {{course.content}} | |
37 | - </i> | |
38 | - </p> | |
39 | - <a href="{% url 'course:view' course.slug %}" class="btn btn-raised btn-default center-block">{% trans 'View Course' %}<div class="ripple-container"></div></a> | |
40 | - </div> | |
41 | - </div> | |
42 | - </div> | |
43 | - </div> | |
3 | +<div class="group"> | |
4 | + <div class="panel panel-info"> | |
5 | + <div class="panel-heading course"> | |
6 | + <div class="row"> | |
7 | + <div class="col-md-1 moreAccordion" data-toggle="collapse" data-parent="#accordion-{{course.slug}}" href=".collapseOne-{{course.slug}}" aria-expanded="false" aria-controls="collapseOne-{{course.slug}}"> | |
8 | + <button class="btn btn-default btn-sm caret-square"><i class="fa fa-caret-square-o-down fa-2x" aria-hidden="true"></i></button> | |
9 | + </div> | |
10 | + <div class="col-xs-9 col-md-4 titleTopic"> | |
11 | + <a role="button" href="{% url 'course:view' course.slug %}"> | |
12 | + <h4>{{course.name}}</h4> | |
13 | + </a> | |
14 | + </div> | |
15 | + {% if user|has_role:'professor' or user|has_role:'system_admin' %} | |
16 | + <div class="col-xs-4 col-md-6 divMoreActions" > | |
17 | + <div class="btn-group"> | |
18 | + <button class="btn btn-default btn-sm dropdown-toggle" type="button" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
19 | + <i class="fa fa-ellipsis-v fa-2x" aria-hidden="true"></i> | |
20 | + </button> | |
21 | + <ul class="dropdown-menu pull-right" aria-labelledby="moreActions"> | |
22 | + <li><a href="{% url 'course:replicate_course' course.slug %}"><i class="fa fa-files-o fa-fw" aria-hidden="true"></i>{% trans 'Replicate' %}</a></li> | |
23 | + <li><a href="javascript:delete_course('{% url 'course:delete' course.slug %}', '{{ course.slug }}', '{% trans "Are you sure you want to delete this course?" %}', '{% url 'course:manage' %}')"><i class="fa fa-trash fa-fw" aria-hidden="true"></i> {% trans 'Remove' %}</a></li> | |
24 | + </ul> | |
25 | + </div> | |
26 | + </div> | |
27 | + {% elif user|has_role:'student' %} | |
28 | + {% if not request.user in course.students.all %} | |
29 | + <a onclick="subscribe($(this), '{% url 'course:subscribe' course.slug %}', {{ course.id}}, '{% trans 'Are you sure you want to subscribe to this course?' %}')"><button class="btn btn-sm btn-primary btn-raised pull-right">{% trans 'Subscribe' %}</button></a> | |
30 | + {% endif %} | |
31 | + {% endif %} | |
32 | + </div> | |
33 | + </div> | |
34 | + <div class="panel-collapse collapseOne-{{course.slug}} collapse in" role="tabpanel" aria-labelledby="headingOne" aria-expanded="true" aria-hidden="false" tabindex="0"> | |
35 | + <div class="panel-body"> | |
36 | + <p><b>{% trans 'Course Name' %}: </b>{{course.name}}</p> | |
37 | + <p><b>{% trans 'Coordinator' %}: </b>{{course.professors.all.0}}</p> | |
38 | + <p> | |
39 | + <b>{% trans 'Description' %}:</b> | |
40 | + <i> | |
41 | + {{course.content}} | |
42 | + </i> | |
43 | + </p> | |
44 | + </div> | |
45 | + </div> | |
46 | + </div> | |
44 | 47 | </div> |
45 | 48 | |
46 | 49 | <div class="modal fade" id="replicateCourse" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> | ... | ... |
courses/templates/course/create.html
... | ... | @@ -26,7 +26,7 @@ |
26 | 26 | <input type="text" readonly="" class="form-control" placeholder="Choose your photo..."/> |
27 | 27 | <span class="input-group-btn input-group-sm"> |
28 | 28 | <button type="button" class="btn btn-fab btn-fab-mini"> |
29 | - <i class="material-icons">attach_file</i> | |
29 | + <i class="material-icons">{% trans 'attach_file' %}</i> | |
30 | 30 | </button> |
31 | 31 | </span> |
32 | 32 | </div> | ... | ... |
courses/templates/course/home.html
courses/templates/course/index.html
... | ... | @@ -11,9 +11,9 @@ |
11 | 11 | {% endblock %} |
12 | 12 | |
13 | 13 | {% block sidebar %} |
14 | - <div class="panel panel-primary navigation"> | |
14 | + <div class="panel panel-primary"> | |
15 | 15 | <div class="panel-heading"> |
16 | - <h4>Menu</h4> | |
16 | + <h4>{% trans 'Menu' %}</h4> | |
17 | 17 | </div> |
18 | 18 | <div class="panel-body"> |
19 | 19 | <ul class="nav nav-pills nav-stacked"> |
... | ... | @@ -21,8 +21,9 @@ |
21 | 21 | <li><a href="{% url 'users:profile' %}">{% trans 'Profile' %}</a></li> |
22 | 22 | {% if user|has_role:'student' or not user.is_staff %} |
23 | 23 | <li><a href="{% url 'course:manage' %}">{% trans 'My courses' %}</a></li> |
24 | - <li><a href="{% url 'core:guest' %}">{% trans 'All Courses' %}</a></li> | |
24 | + <li><a href="{% url 'course:all_courses' %}">{% trans 'All Courses' %}</a></li> | |
25 | 25 | {% endif %} |
26 | + <li><a href="{% url 'core:guest' %}">{% trans 'Courses' %}</a></li> | |
26 | 27 | {% if user|has_role:'system_admin' %} |
27 | 28 | <li> <a href="{% url 'users:manage' %}">{% trans 'Manage Users' %}</a></li> |
28 | 29 | {% endif %} |
... | ... | @@ -42,89 +43,108 @@ |
42 | 43 | </div> |
43 | 44 | </div> |
44 | 45 | |
45 | - {% if user|has_role:'professor' or user|has_role:'system_admin' %} | |
46 | + {% if user|has_role:'professor' or user|has_role:'system_admin' %} | |
47 | + <div class="panel panel-primary"> | |
48 | + <div class="panel-heading"> | |
49 | + <h3 class="panel-title">{% trans 'Category' %}</h3> | |
50 | + </div> | |
51 | + <div class="panel-body"> | |
52 | + <ul class="nav nav-pills nav-stacked"> | |
53 | + <li><a href="{% url 'course:create_cat' %}">{% trans 'Create Category' %}</a></li> | |
54 | + <li><a href="{% url 'course:manage_cat' %}">{% trans 'List Category' %}</a></li> | |
55 | + </ul> | |
56 | + </div> | |
57 | + </div> | |
58 | + {% endif %} | |
59 | + <div class="panel-group" id="accordion"> | |
60 | + <div class="panel panel-primary"> | |
61 | + <div class="panel-heading"> | |
62 | + <h4 class="panel-title"> | |
63 | + <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne"> | |
64 | + </span>{% trans 'Categorys' %}</a> | |
65 | + </h4> | |
66 | + </div> | |
67 | + <div id="collapseOne" class="panel-collapse collapse in"> | |
68 | + <div class="panel-body"> | |
69 | + <table class="table"> | |
70 | + {% for category in categorys_courses %} | |
71 | + <tr> | |
72 | + <td> | |
73 | + <a href="?category={{category.name}}">{{category.name}}</a> | |
74 | + </td> | |
75 | + </tr> | |
76 | + {% endfor %} | |
77 | + </table> | |
78 | + </div> | |
79 | + </div> | |
80 | + </div> | |
81 | + </div> | |
46 | 82 | |
47 | - <div class="panel panel-primary navigation"> | |
48 | - <div class="panel-heading"> | |
49 | - <h3 class="panel-title">Category</h3> | |
50 | - </div> | |
51 | - <div class="panel-body"> | |
52 | - <ul class="nav nav-pills nav-stacked"> | |
53 | - <li><a href="{% url 'course:create_cat' %}">Create Category</a></li> | |
54 | - <li><a href="{% url 'course:manage_cat' %}">List Category</a></li> | |
55 | - </ul> | |
56 | - </div> | |
57 | - </div> | |
58 | - {% endif %} | |
59 | 83 | {% endblock %} |
60 | 84 | |
61 | 85 | {% block content %} |
62 | - {% if messages %} | |
63 | - {% for message in messages %} | |
64 | - <div class="alert alert-success alert-dismissible" role="alert"> | |
65 | - <button type="button" class="close" data-dismiss="alert" aria-label="Close"> | |
66 | - <span aria-hidden="true">×</span> | |
67 | - </button> | |
68 | - <p>{{ message }}</p> | |
69 | - </div> | |
70 | - {% endfor %} | |
71 | - {% endif %} | |
86 | + {% if messages %} | |
87 | + {% for message in messages %} | |
88 | + <div class="alert alert-success alert-dismissible" role="alert"> | |
89 | + <button type="button" class="close" data-dismiss="alert" aria-label="Close"> | |
90 | + <span aria-hidden="true">×</span> | |
91 | + </button> | |
92 | + <p>{{ message }}</p> | |
93 | + </div> | |
94 | + {% endfor %} | |
95 | + {% endif %} | |
72 | 96 | |
73 | -<div class="col-md-12"> | |
74 | - <form id="searchform" action="{% url 'course:manage' %}" method="get" accept-charset="utf-8"> | |
75 | - <div class="input-group"> | |
76 | - <div class="form-group is-empty"> | |
77 | - <input type="search" class="form-control" placeholder="Search Courses" name="q" id="searchbox"></div> | |
78 | - <span class="input-group-btn input-group-sm"> | |
79 | - <button type="button" class="btn btn-fab btn-fab-mini"> | |
80 | - <i class="material-icons">search</i> | |
81 | - </button> | |
82 | - </span> | |
83 | - </div> | |
84 | - </form> | |
97 | +<div class="col-md-12 cards-content"> | |
98 | + <form id="searchform" action="{% url 'course:manage' %}" method="get" accept-charset="utf-8"> | |
99 | + <div class="input-group"> | |
100 | + <div class="form-group is-empty"> | |
101 | + <input type="text" class="form-control" placeholder="Search Courses" name="q"></div> | |
102 | + <span class="input-group-btn input-group-sm"> | |
103 | + <button type="submit" class="btn btn-fab btn-fab-mini"> | |
104 | + <i class="fa fa-search" aria-hidden="true"></i> | |
105 | + </button> | |
106 | + </span> | |
107 | + </div> | |
108 | + </form> | |
85 | 109 | </div> |
86 | - | |
87 | 110 | |
88 | 111 | </fieldset> |
89 | - <div class="col-md-12"> | |
90 | - {% if courses|length > 0 %} | |
91 | - {% if request.GET.category == 'all' or none or request.GET.category == '' %} | |
92 | - {% for course in list_courses %} | |
93 | - {% include "course/course_card.html" %} | |
94 | - {% endfor %} | |
95 | - {% else %} | |
96 | - {% for course in courses_category %} | |
97 | - {% if course.category.name == request.GET.category %} | |
98 | - <!-- Put your content here! --> | |
99 | - {% include "course/course_card.html" %} | |
100 | - {% endif %} | |
101 | - {% endfor %} | |
102 | - {% endif %} | |
103 | - {% else %} | |
104 | - {% trans 'No courses found' %} | |
105 | - {% endif %} | |
106 | - </div> | |
107 | - <div class="col-md-12"> | |
108 | - <nav aria-label="Page navigation"> | |
109 | - <ul class="pagination"> | |
110 | - {% if page_obj.has_previous %} | |
111 | - <li> | |
112 | - <a href="?page={{ page_obj.previous_page_number }}"><span><<</span></a> | |
113 | - </li> | |
114 | - {% endif %} | |
115 | - {% for page_number in paginator.page_range %} | |
116 | - <li{% if page_obj.number == page_number %} class="active"{% endif %}> | |
117 | - <a href="?page={{ page_number }}">{{ page_number }}</a> | |
118 | - </li> | |
119 | - {% endfor %} | |
120 | - {% if page_obj.has_next %} | |
121 | - <li> | |
122 | - <a href="?page={{ page_obj.next_page_number }}"><span>>></span></a> | |
123 | - </li> | |
124 | - {% endif %} | |
125 | - </ul> | |
126 | - </nav> | |
127 | - </div> | |
128 | - | |
129 | - <script type="text/javascript" src="{% static 'js/course.js' %}"></script> | |
112 | + <div class="col-md-12 cards-content"> | |
113 | + {% if courses|length > 0 %} | |
114 | + {% if request.GET.category == '' or aparece or request.GET.q == '' %} | |
115 | + {% for course in list_courses %} | |
116 | + {% include "course/course_card.html" %} | |
117 | + {% endfor %} | |
118 | + {% endif %} | |
119 | + {% if request.GET.category or request.GET.q %} | |
120 | + {% for course in courses %} | |
121 | + {% include "course/course_card.html" %} | |
122 | + {% endfor %} | |
123 | + {% endif %} | |
124 | + {% else %} | |
125 | + {% trans 'No courses found' %} | |
126 | + {% endif %} | |
127 | + </div> | |
128 | + <div class="col-md-12"> | |
129 | + <nav aria-label="Page navigation"> | |
130 | + <ul class="pagination"> | |
131 | + {% if page_obj.has_previous %} | |
132 | + <li> | |
133 | + <a href="?page={{ page_obj.previous_page_number }}"><span><<</span></a> | |
134 | + </li> | |
135 | + {% endif %} | |
136 | + {% for page_number in paginator.page_range %} | |
137 | + <li{% if page_obj.number == page_number %} class="active"{% endif %}> | |
138 | + <a href="?page={{ page_number }}">{{ page_number }}</a> | |
139 | + </li> | |
140 | + {% endfor %} | |
141 | + {% if page_obj.has_next %} | |
142 | + <li> | |
143 | + <a href="?page={{ page_obj.next_page_number }}"><span>>></span></a> | |
144 | + </li> | |
145 | + {% endif %} | |
146 | + </ul> | |
147 | + </nav> | |
148 | + </div> | |
149 | + <script type="text/javascript" src="{% static 'js/course.js' %}"></script> | |
130 | 150 | {% endblock %} | ... | ... |
courses/templates/course/replicate.html
... | ... | @@ -15,86 +15,86 @@ |
15 | 15 | <div class="card-body"> |
16 | 16 | <form method="post" action="" enctype="multipart/form-data">{% csrf_token %} |
17 | 17 | <div class="form-group is-fileinput"> |
18 | - <label for="id_name">Name</label> | |
18 | + <label for="id_name">{% trans 'Name' %}</label> | |
19 | 19 | |
20 | 20 | |
21 | 21 | <input class="form-control" id="id_name" maxlength="100" name="name" type="text" required="" value="{{course.name}}"> |
22 | 22 | |
23 | - <span class="help-block">Course name</span> | |
23 | + <span class="help-block">{% trans 'Course name' %}</span> | |
24 | 24 | |
25 | 25 | </div> |
26 | 26 | |
27 | 27 | <div class="form-group is-fileinput"> |
28 | - <label for="id_objectivies">Objectives</label> | |
28 | + <label for="id_objectivies">{% trans 'Objectives' %}</label> | |
29 | 29 | |
30 | 30 | <textarea class="form-control" cols="80" id="id_objectivies" name="objectivies" rows="5">{{course.objectivies}}</textarea> |
31 | 31 | |
32 | - <span class="help-block">Course objective</span> | |
32 | + <span class="help-block">{% trans 'Course objective' %}</span> | |
33 | 33 | |
34 | 34 | </div> |
35 | 35 | |
36 | 36 | <div class="form-group is-fileinput"> |
37 | - <label for="id_content">Content</label> | |
37 | + <label for="id_content">{% trans 'Content' %}</label> | |
38 | 38 | |
39 | 39 | |
40 | 40 | <textarea class="form-control" cols="80" id="id_content" name="content" rows="5">{{course.content}}</textarea> |
41 | 41 | |
42 | - <span class="help-block">Course modules</span> | |
42 | + <span class="help-block">{% trans 'Course modules' %}</span> | |
43 | 43 | |
44 | 44 | </div> |
45 | 45 | |
46 | 46 | <div class="form-group is-fileinput"> |
47 | - <label for="id_max_students">Number of studets maximum</label> | |
47 | + <label for="id_max_students">{% trans 'Number of studets maximum' %}</label> | |
48 | 48 | |
49 | 49 | |
50 | 50 | <input class="form-control" id="id_max_students" min="0" name="max_students" type="number" value="{{course.max_students}}"> |
51 | 51 | |
52 | - <span class="help-block">Max number of students that a class can have</span> | |
52 | + <span class="help-block">{% trans 'Max number of students that a class can have' %}</span> | |
53 | 53 | |
54 | 54 | </div> |
55 | 55 | |
56 | 56 | <div class="form-group is-fileinput"> |
57 | - <label for="id_init_register_date">Course registration start date</label> | |
57 | + <label for="id_init_register_date">{% trans 'Course registration start date' %}</label> | |
58 | 58 | |
59 | 59 | |
60 | 60 | <input type="date" class="form-control" name="init_register_date" value="None" min="2016-10-24"> |
61 | 61 | |
62 | - <span class="help-block">Date that starts the registration period of the course (dd/mm/yyyy)</span> | |
62 | + <span class="help-block">{% trans 'Date that starts the registration period of the course (dd/mm/yyyy)' %}</span> | |
63 | 63 | |
64 | 64 | </div> |
65 | 65 | |
66 | 66 | <div class="form-group is-fileinput"> |
67 | - <label for="id_end_register_date">Course registration end date</label> | |
67 | + <label for="id_end_register_date">{% trans 'Course registration end date' %}</label> | |
68 | 68 | |
69 | 69 | |
70 | 70 | <input type="date" class="form-control" name="end_register_date" value="None" min="2016-10-24"> |
71 | 71 | |
72 | - <span class="help-block">Date that ends the registration period of the course (dd/mm/yyyy)</span> | |
72 | + <span class="help-block">{% trans 'Date that ends the registration period of the course (dd/mm/yyyy)' %}</span> | |
73 | 73 | |
74 | 74 | </div> |
75 | 75 | |
76 | 76 | <div class="form-group is-fileinput"> |
77 | - <label for="id_init_date">Course start date</label> | |
77 | + <label for="id_init_date">{% trans 'Course start date' %}</label> | |
78 | 78 | |
79 | 79 | |
80 | 80 | <input type="date" class="form-control" name="init_date" value="None" min="2016-10-24"> |
81 | 81 | |
82 | - <span class="help-block">Date that the course starts (dd/mm/yyyy)</span> | |
82 | + <span class="help-block">{% trans 'Date that the course starts (dd/mm/yyyy)' %}</span> | |
83 | 83 | |
84 | 84 | </div> |
85 | 85 | |
86 | 86 | <div class="form-group is-fileinput"> |
87 | - <label for="id_end_date">Course end date</label> | |
87 | + <label for="id_end_date">{% trans 'Course end date' %}</label> | |
88 | 88 | |
89 | 89 | |
90 | 90 | <input type="date" class="form-control" name="end_date" value="None" min="2016-10-24"> |
91 | 91 | |
92 | - <span class="help-block">Date that the course ends (dd/mm/yyyy)</span> | |
92 | + <span class="help-block">{% trans 'Date that the course ends (dd/mm/yyyy)' %}</span> | |
93 | 93 | |
94 | 94 | </div> |
95 | 95 | |
96 | 96 | <div class="form-group is-fileinput"> |
97 | - <label for="id_image">Imagem</label> | |
97 | + <label for="id_image">{% trans 'Imagem' %}</label> | |
98 | 98 | |
99 | 99 | |
100 | 100 | <input class="form-control" id="id_image" name="image" type="file"> |
... | ... | @@ -102,17 +102,17 @@ |
102 | 102 | <input type="text" readonly="" class="form-control" placeholder="Choose your photo..."> |
103 | 103 | <span class="input-group-btn input-group-sm"> |
104 | 104 | <button type="button" class="btn btn-fab btn-fab-mini"> |
105 | - <i class="material-icons">attach_file</i> | |
105 | + <i class="material-icons">{% trans 'attach_file' %}</i> | |
106 | 106 | </button> |
107 | 107 | </span> |
108 | 108 | </div> |
109 | 109 | |
110 | - <span class="help-block">Representative image of the course</span> | |
110 | + <span class="help-block">{% trans 'Representative image of the course' %}</span> | |
111 | 111 | |
112 | 112 | </div> |
113 | 113 | |
114 | 114 | <div class="form-group is-fileinput"> |
115 | - <label for="id_category">CourseCategory</label> | |
115 | + <label for="id_category">{% trans 'CourseCategory' %}</label> | |
116 | 116 | |
117 | 117 | |
118 | 118 | <select class="form-control" id="id_category" name="category" required=""> |
... | ... | @@ -121,7 +121,7 @@ |
121 | 121 | {% endfor %} |
122 | 122 | </select> |
123 | 123 | |
124 | - <span class="help-block">CourseCategory which the course belongs</span> | |
124 | + <span class="help-block">{% trans 'CourseCategory which the course belongs' %}</span> | |
125 | 125 | |
126 | 126 | </div> |
127 | 127 | ... | ... |
courses/templates/course/update.html
... | ... | @@ -18,14 +18,14 @@ |
18 | 18 | <div class="form-group {% if form.has_error %} has-error {% endif %} is-fileinput"> |
19 | 19 | <label for="{{ field.auto_id }}">{{ field.label }}</label> |
20 | 20 | {% 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'%} |
21 | - <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'}}"> | |
21 | + <input type="text" class="form-control date-picker" name="{{field.name}}" value="{{field.value|date:'SHORT_DATE_FORMAT'}}" min="{{now|date:'SHORT_DATE_FORMAT'}}"> | |
22 | 22 | {% elif field.auto_id == 'id_image' %} |
23 | 23 | {% render_field field class='form-control' %} |
24 | 24 | <div class="input-group"> |
25 | 25 | <input type="text" readonly="" class="form-control" placeholder="Choose your photo..."/> |
26 | 26 | <span class="input-group-btn input-group-sm"> |
27 | 27 | <button type="button" class="btn btn-fab btn-fab-mini"> |
28 | - <i class="material-icons">attach_file</i> | |
28 | + <i class="material-icons">{% trans 'attach_file' %}</i> | |
29 | 29 | </button> |
30 | 30 | </span> |
31 | 31 | </div> | ... | ... |
courses/templates/course/view.html
... | ... | @@ -12,16 +12,17 @@ |
12 | 12 | {% endblock %} |
13 | 13 | |
14 | 14 | {% block breadcrumbs %} |
15 | - | |
16 | - {{ block.super }} | |
17 | - {% breadcrumb 'Course detail' 'course:view' %} | |
18 | - | |
15 | + <ol class="breadcrumb"> | |
16 | + <li><a href="{% url 'app:index' %}">{% trans 'Home' %}</a></li> | |
17 | + <li><a href="{% url 'course:manage' %}">{% trans 'Courses' %}</a></li> | |
18 | + <li><a href="{% url 'course:view' course.slug %}">{{ course }}</a></li> | |
19 | + </ol> | |
19 | 20 | {% endblock %} |
20 | 21 | |
21 | 22 | {% block sidebar %} |
22 | - <div class="panel panel-primary navigation"> | |
23 | + <div class="panel panel-primary"> | |
23 | 24 | <div class="panel-heading"> |
24 | - <h5>{% trans 'Menu' %}</h5> | |
25 | + <h4>{% trans 'Menu' %}</h4> | |
25 | 26 | </div> |
26 | 27 | <div class="panel-body"> |
27 | 28 | <ul class="nav nav-pills nav-stacked"> |
... | ... | @@ -33,20 +34,32 @@ |
33 | 34 | </div> |
34 | 35 | </div> |
35 | 36 | |
36 | - | |
37 | + <div class="panel panel-primary"> | |
38 | + <div class="panel-heading"> | |
39 | + <h5>{% trans 'Categories' %}</h5> | |
40 | + </div> | |
41 | + <div class="panel-body"> | |
42 | + <ul class="nav nav-pills nav-stacked"> | |
43 | + <li {% if category is None %}class="active"{% endif %}><a href="{% url 'course:view' course.slug %}">{% trans 'All' %}</a></li> | |
44 | + {% for cat in categorys_subjects %} | |
45 | + <li {% if category == cat.slug %}class="active"{% endif %}><a href="{% url 'course:view_filter' course.slug cat.slug %}">{{ cat }}</a></li> | |
46 | + {% endfor %} | |
47 | + </ul> | |
48 | + </div> | |
49 | + </div> | |
37 | 50 | {% endblock %} |
38 | 51 | |
39 | 52 | {% block content %} |
40 | 53 | |
41 | - <div class="col-md-12"> | |
54 | + <div class="col-md-12 cards-content"> | |
42 | 55 | <div class="panel panel-info"> |
43 | - <div class="panel-heading headingOne"> | |
56 | + <div class="panel-heading course-detail"> | |
44 | 57 | <div class="row"> |
45 | - <div class="col-xs-8 col-md-10 titleTopic"> | |
46 | - <h4>{{course}}</h4> | |
58 | + <div class="col-xs-8 col-md-4 .titleTopic-detail"> | |
59 | + <h4>{{course.name}}</h4> | |
47 | 60 | </div> |
48 | 61 | {% if user|has_role:'professor' and user in course.professors or user|has_role:'system_admin' %} |
49 | - <div class="col-xs-4 col-md-2" id="divMoreActions"> | |
62 | + <div class="col-xs-4 col-md-8" id="divMoreActions"> | |
50 | 63 | <div class="btn-group"> |
51 | 64 | <button class="btn btn-default btn-sm dropdown-toggle" type="button" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
52 | 65 | <i class="fa fa-ellipsis-v fa-2x" aria-hidden="true"></i> |
... | ... | @@ -63,18 +76,18 @@ |
63 | 76 | </div> |
64 | 77 | </div> |
65 | 78 | <div class="panel-body"> |
66 | - <p><b>Course Name: </b>{{course.name}}</p> | |
67 | - <p><b>Coordinator: </b>{{course.professors}}</p> | |
79 | + <p><b>{% trans 'Coordinator' %}: </b>{% for professor in course.professors.all %}{% if not forloop.first %},{% endif %} | |
80 | + {{professor}}{% if forloop.last %}.{% endif %}{% endfor %}</p> | |
68 | 81 | <p> |
69 | - <b>Description:</b> | |
82 | + <b>{% trans 'Description' %}:</b> | |
70 | 83 | <i> |
71 | - {{course.description}} | |
84 | + {{ course.objectivies }} | |
72 | 85 | </i> |
73 | 86 | </p> |
74 | 87 | |
75 | 88 | </div> |
76 | 89 | </div> |
77 | - | |
90 | + | |
78 | 91 | <!-- MODAL CREATE SUBJECT --> |
79 | 92 | <div class="modal" tabindex="-1" role="dialog " id="createSubject"> |
80 | 93 | <div class="modal-dialog"> |
... | ... | @@ -121,26 +134,28 @@ |
121 | 134 | </div> |
122 | 135 | </div> |
123 | 136 | </div> |
124 | -<div> | |
125 | - {% if request.GET.category == 'all' or none or request.GET.category == '' %} | |
126 | - {% for subject in subjects %} | |
127 | - <div class="panel panel-info panel_{{ subject.id }}"> | |
128 | - <div class="panel-heading headingTwo ui-sortable-handle" role="tab"> | |
137 | +<div class="cards-detail"> | |
138 | + {% for subject in subjects %} | |
139 | + <div class="panel panel-default panel_{{ subject.id }}"> | |
140 | + <div class="panel-heading heading_{{subject.id}} subject ui-sortable-handle"> | |
129 | 141 | <div class="row"> |
130 | - <div class="col-xs-9 col-md-10 titleTopic"> | |
131 | - <a role="button" data-toggle="collapse" data-parent="#accordion" href=".collapseTwo" aria-expanded="true" aria-controls="collapseTwo"> | |
132 | - <h4 style="color:white">{{subject.name}}</h4> | |
142 | + <div class="col-md-1 moreAccordion" data-toggle="collapse" data-parent="#accordion-{{subject.slug}}" href=".collapseSubject-{{subject.slug}}" aria-expanded="false" aria-controls="collapseSubject-{{subject.slug}}"> | |
143 | + <button class="btn btn-default btn-sm caret-square"><i class="fa fa-caret-square-o-down fa-2x" aria-hidden="true"></i></button> | |
144 | + </div> | |
145 | + <div class="col-xs-9 col-md-4 titleTopic"> | |
146 | + <a role="button" href="{% url 'course:view_subject' subject.slug %}"> | |
147 | + <h4>{{subject.name}}</h4> | |
133 | 148 | </a> |
134 | 149 | </div> |
135 | 150 | {% if user|has_role:'professor' and user in subject.professors or user|has_role:'system_admin' %} |
136 | - <div class="col-xs-3 col-md-2" id="divMoreActions"> | |
151 | + <div class="col-xs-3 col-md-6" id="divMoreActions"> | |
137 | 152 | <div class="btn-group"> |
138 | 153 | <button class="btn btn-default btn-sm dropdown-toggle" type="button" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
139 | 154 | <i class="fa fa-ellipsis-v fa-2x" aria-hidden="true"></i> |
140 | 155 | </button> |
141 | 156 | <ul class="dropdown-menu" aria-labelledby="moreActions"> |
142 | - <li><a href="javascript:void(0)" data-toggle="modal" data-target="#myModal3"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i> Replicate</a></li> | |
143 | - <li><a href="javascript:void(0)" data-toggle="modal" data-target="#removeSubject2"><i class="fa fa-trash fa-fw" aria-hidden="true"></i> Remove</a></li> | |
157 | + <li><a href="javascript:void(0)" data-toggle="modal" data-target="#myModal3"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i> {% trans 'Replicate' %}</a></li> | |
158 | + <li><a href="javascript:void(0)" data-toggle="modal" data-target="#removeSubject2"><i class="fa fa-trash fa-fw" aria-hidden="true"></i> {% trans 'Remove' %}</a></li> | |
144 | 159 | </ul> |
145 | 160 | </div> |
146 | 161 | </div> |
... | ... | @@ -153,81 +168,32 @@ |
153 | 168 | {% endif %} |
154 | 169 | </div> |
155 | 170 | </div> |
156 | - <div class="panel-body"> | |
157 | - <p><b>{% trans "Professor" %}: </b>{% for professor in subject.professors.all %}{% if not forloop.first %},{% endif %} | |
158 | - {{professor}}{% if forloop.last %}.{% endif %}{% endfor %}</p> | |
159 | - <p> | |
160 | - <b>{% trans "Description" %}: </b> | |
161 | - <i> | |
162 | - {{subject.description}} | |
163 | - </i> | |
164 | - </p> | |
165 | - <div class="row"> | |
166 | - <div class="col-xs-6 col-md-6"> | |
167 | - <p><b>{% trans "Begining" %}: </b>{{subject.init_date}}</p> | |
168 | - </div> | |
169 | - <div class="col-xs-6 col-md-6"> | |
170 | - <p><b>{% trans "End" %}: </b>{{subject.end_date}}</p> | |
171 | - </div> | |
171 | + <div class="panel-collapse collapseSubject-{{subject.slug}} collapse in" aria-labelledby="heading_{{subject.id}}" aria-expanded="true" aria-hidden="false"> | |
172 | + <div class="panel-body"> | |
173 | + <p><b>{% trans "Professor" %}: </b>{% for professor in subject.professors.all %}{% if not forloop.first %},{% endif %} | |
174 | + {{professor}}{% if forloop.last %}.{% endif %}{% endfor %}</p> | |
175 | + <p> | |
176 | + <b>{% trans 'Category' %}: </b><i>{{ subject.category }}</i> | |
177 | + </p> | |
178 | + <p> | |
179 | + <b>{% trans "Description" %}: </b> | |
180 | + <i> | |
181 | + {{subject.description}} | |
182 | + </i> | |
183 | + </p> | |
184 | + <div class="row"> | |
185 | + <div class="col-xs-6 col-md-6"> | |
186 | + <p><b>{% trans "Begining" %}: </b>{{subject.init_date}}</p> | |
172 | 187 | </div> |
173 | - <a href="{% url 'course:view_subject' subject.slug %}" class="btn btn-raised btn-default center-block view_btn" {% if user|show_subject_subscribe:subject %}style="display:none"{% endif %}>{% trans 'View Subject' %}<div class="ripple-container"></div></a> | |
174 | - </div> | |
175 | - </div> | |
176 | - {% endfor %} | |
177 | - {% else %} | |
178 | - {% for subject in subjects_category %} | |
179 | - {% if subject.category.name == request.GET.category %} | |
180 | - <div class="panel panel-info panel_{{ subject.id }}"> | |
181 | - <div class="panel-heading headingTwo ui-sortable-handle" role="tab"> | |
182 | - <div class="row"> | |
183 | - <div class="col-xs-9 col-md-10 titleTopic"> | |
184 | - <a role="button" data-toggle="collapse" data-parent="#accordion" href=".collapseTwo" aria-expanded="true" aria-controls="collapseTwo"> | |
185 | - <h4 style="color:white">{{subject.name}}</h4> | |
186 | - </a> | |
188 | + <div class="col-xs-6 col-md-6"> | |
189 | + <p><b>{% trans "End" %}: </b>{{subject.end_date}}</p> | |
187 | 190 | </div> |
188 | - {% if user|has_role:'professor' and user in subject.professors or user|has_role:'system_admin' %} | |
189 | - <div class="col-xs-3 col-md-2" id="divMoreActions"> | |
190 | - <div class="btn-group"> | |
191 | - <button class="btn btn-default btn-sm dropdown-toggle" type="button" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
192 | - <i class="fa fa-ellipsis-v fa-2x" aria-hidden="true"></i> | |
193 | - </button> | |
194 | - <ul class="dropdown-menu" aria-labelledby="moreActions"> | |
195 | - <li><a href="javascript:void(0)" data-toggle="modal" data-target="#myModal3"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i> Replicate</a></li> | |
196 | - <li><a href="javascript:void(0)" data-toggle="modal" data-target="#removeSubject2"><i class="fa fa-trash fa-fw" aria-hidden="true"></i> Remove</a></li> | |
197 | - </ul> | |
198 | - </div> | |
199 | - </div> | |
200 | - {% endif %} | |
201 | - {% if user|show_subject_subscribe:subject %} | |
202 | - <div class="col-xs-3 col-md-2"> | |
203 | - <a onclick="subscribe($(this), '{% url 'course:subscribe_subject' subject.slug %}', {{ subject.id }}, '{% trans 'Are you sure you want to subscribe to this subject?' %}')" class="btn btn-sm btn-primary btn-raised">{% trans 'Subscribe' %}</a> | |
204 | - </div> | |
205 | - {% endif %} | |
206 | - </div> | |
191 | + </div> | |
207 | 192 | </div> |
208 | - <div class="panel-body"> | |
209 | - <p><b>{% trans "Professor" %}: </b>{% for professor in subject.professors.all %}{% if not forloop.first %},{% endif %} | |
210 | - {{professor}}{% if forloop.last %}.{% endif %}{% endfor %}</p> | |
211 | - <p> | |
212 | - <b>{% trans "Description" %}: </b> | |
213 | - <i> | |
214 | - {{subject.description}} | |
215 | - </i> | |
216 | - </p> | |
217 | - <div class="row"> | |
218 | - <div class="col-xs-6 col-md-6"> | |
219 | - <p><b>{% trans "Begining" %}: </b>{{subject.init_date}}</p> | |
220 | - </div> | |
221 | - <div class="col-xs-6 col-md-6"> | |
222 | - <p><b>{% trans "End" %}: </b>{{subject.end_date}}</p> | |
223 | - </div> | |
224 | - </div> | |
225 | - <a href="{% url 'course:view_subject' subject.slug %}" class="btn btn-raised btn-default center-block view_btn" {% if user|show_subject_subscribe:subject %}style="display:none"{% endif %}>{% trans 'View Subject' %}<div class="ripple-container"></div></a> | |
226 | - </div> | |
193 | + </div> | |
227 | 194 | </div> |
228 | - {% endif %} | |
229 | - {% endfor %} | |
230 | - {% endif %} | |
195 | + {% endfor %} | |
196 | + | |
231 | 197 | |
232 | 198 | {% if user|has_role:'professor' and user in course.professors.all or user|has_role:'system_admin' %} |
233 | 199 | ... | ... |
courses/templates/subject/form_view_student.html
1 | -{% load static i18n list_topic_foruns %} | |
1 | + {% load static i18n list_topic_foruns permission_tags widget_tweaks professor_access%} | |
2 | 2 | |
3 | -{% block javascript %} | |
4 | - <script type="text/javascript" src="{% static 'js/forum.js' %}"></script> | |
5 | -{% endblock %} | |
6 | 3 | |
7 | -<div class="panel panel-default"> | |
8 | - <a href="{% url 'course:view_topic' topic.slug %}"> | |
9 | - <div class="panel-heading"> | |
10 | - <div class="row"> | |
11 | - <div class="col-md-9 col-sm-9"> | |
12 | - <h3>{{topic}}</h3> | |
13 | - </div> | |
14 | - </div> | |
15 | - </div> | |
16 | - </a> | |
17 | - <div class="panel-body"> | |
18 | - <p>{{topic.description|linebreaks}}</p> | |
4 | + {% block javascript %} | |
5 | + <script type="text/javascript" src="{% static 'js/forum.js' %}"></script> | |
6 | + <script src="{% static 'js/file.js' %}"></script> | |
7 | + <script type="text/javascript" src="{% static 'js/material.js' %}"></script> | |
8 | + <script type = "text/javascript" src="{% static 'links.js' %}"></script> | |
9 | + {% endblock %} | |
10 | +<div class="cards-detail"> | |
11 | + <div class="panel-group accordion ui-accordion ui-widget ui-helper-reset ui-sortable" role="tablist" aria-multiselectable="false"> | |
12 | + <div class="group"><div class="panel panel-default"> | |
13 | + <div class="panel-heading topic ui-sortable-handle" role="tab"> | |
14 | + <div class="row"> | |
15 | + <div class="col-md-1 moreAccordion" data-toggle="collapse" data-parent="#accordion-{{topic.slug}}" href=".collapseTopic-{{topic.slug}}" aria-expanded="false" aria-controls="collapseTopic-{{topic.slug}}"> | |
16 | + <button class="btn btn-default btn-sm caret-square"><i class="fa fa-caret-square-o-down fa-2x" aria-hidden="true"></i></button> | |
19 | 17 | </div> |
20 | - | |
21 | -</div> | |
22 | - | |
18 | + <div class="col-xs-9 col-md-9 titleTopic"> | |
19 | + <a href="{% url 'course:view_topic' topic.slug %}" role="button"> | |
20 | + <h4>{{topic}}</h4> | |
21 | + </a> | |
22 | + </div> | |
23 | + </div> | |
24 | + </div> | |
25 | + <div class="panel-collapse collapseTopic-{{topic.slug}} collapse in" role="tabpanel" aria-labelledby="heading_{{topic.id}}" aria-expanded="true" aria-hidden="false"> | |
26 | + <div class="panel-body"> | |
27 | + <div class="presentation"> | |
28 | + <p> | |
29 | + <i> | |
30 | + {{topic.description|linebreaks}} | |
31 | + </i> | |
32 | + </p> | |
23 | 33 | |
24 | -<div class="modal fade" id="forumModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> | |
25 | - <div class="modal-dialog" role="document"> | |
26 | - <div class="modal-content"> | |
27 | - <div class="modal-header"> | |
28 | - <h4 class="modal-title" id="myModalLabel">{% trans 'Forum' %}</h4> | |
29 | - </div> | |
30 | - <div class="modal-body"> | |
31 | - <section> | |
32 | - <div class="forum_topics"></div> | |
33 | - </section> | |
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> | |
34 | 39 | </div> |
35 | - <div class="modal-footer"> | |
36 | - <button type="button" class="btn btn-danger btn-raised" data-dismiss="modal">{% trans 'Close' %}</button> | |
37 | - <button type="button" class="btn btn-primary btn-raised">{% trans 'Save changes' %}</button> | |
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> | |
38 | 48 | </div> |
49 | + <ul> | |
50 | + {% list_topic_poll request topic %} | |
51 | + {% list_topic_foruns request topic %} | |
52 | + </ul> | |
53 | + </div> | |
39 | 54 | </div> |
55 | + </div> | |
56 | + </div> | |
57 | + </div> | |
58 | + </div> | |
59 | + {% professor_subject topic.subject user as professor_links %} | |
60 | + {% if professor_links %} | |
61 | + {% include "links/create_link.html" %} | |
62 | + {% include "links/delete_link.html" %} | |
63 | + {% endif %} | |
64 | + | |
65 | + | |
66 | + <!-- MODAL LINK EDIT--> | |
67 | + {% professor_subject topic.subject user as links_update %} | |
68 | + {% if links_update%} | |
69 | + {% include "links/update_link.html" %} | |
70 | + {% endif %} | |
40 | 71 | </div> |
41 | -</div> | |
72 | + </div> | |
42 | 73 | \ No newline at end of file | ... | ... |
courses/templates/subject/form_view_teacher.html
1 | - {% load static i18n list_topic_foruns permission_tags widget_tweaks professor_access%} | |
1 | +{% load static i18n list_topic_foruns permission_tags widget_tweaks professor_access%} | |
2 | 2 | |
3 | - {% block javascript %} | |
4 | - <script type="text/javascript" src="{% static 'js/forum.js' %}"></script> | |
5 | - <script src="{% static 'js/file.js' %}"></script> | |
6 | - <script type="text/javascript" src="{% static 'js/material.js' %}"></script> | |
7 | - <script type = "text/javascript" src="{% static 'links.js' %}"></script> | |
8 | - {% endblock %} | |
9 | - | |
10 | - <div class="panel-group accordion ui-accordion ui-widget ui-helper-reset ui-sortable" role="tablist" aria-multiselectable="false"> | |
11 | - <div class="group"><div class="panel panel-default"> | |
12 | - <div class="panel-heading headingOne ui-sortable-handle" role="tab"> | |
3 | +{% block javascript %} | |
4 | + <script type="text/javascript" src="{% static 'js/forum.js' %}"></script> | |
5 | + <script src="{% static 'js/file.js' %}"></script> | |
6 | + <script type="text/javascript" src="{% static 'js/material.js' %}"></script> | |
7 | + <script type = "text/javascript" src="{% static 'js/links.js' %}"></script> | |
8 | +{% endblock %} | |
9 | +<div class="panel panel-default cards-detail"> | |
10 | + <div class="panel-heading topic"> | |
11 | + <div class="row"> | |
12 | + <div class="col-md-1 moreAccordion" data-toggle="collapse" data-parent="#accordion-{{topic.slug}}" href=".collapseTopic-{{topic.slug}}" aria-expanded="false" aria-controls="collapseTopic-{{topic.slug}}"> | |
13 | + <button class="btn btn-default btn-sm caret-square"><i class="fa fa-caret-square-o-down fa-2x" aria-hidden="true"></i></button> | |
14 | + </div> | |
15 | + <div class="col-xs-9 col-md-9 titleTopic"> | |
16 | + <a role="button"> | |
17 | + <h4>{{topic}}</h4> | |
18 | + </a> | |
19 | + </div><!--column --> | |
20 | + <div class="col-xs-3 col-md-2 divMoreActions"> | |
21 | + <div class="btn-group"> | |
22 | + <button type="button" class="btn btn-default btn-sm eye" data-toggle="tooltip" data-placement="bottom" title="Visible"> | |
23 | + <i class="fa fa-eye fa-2x" aria-hidden="true"></i> | |
24 | + </button> | |
25 | + </div> | |
26 | + <div class="btn-group"> | |
27 | + <button class="btn btn-default btn-sm dropdown-toggle" type="button" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
28 | + <i class="fa fa-ellipsis-v fa-2x" aria-hidden="true"></i> | |
29 | + </button> | |
30 | + {% professor_subject topic.subject user as dropdown_topic %} | |
31 | + {% if dropdown_topic %} | |
32 | + <ul class="dropdown-menu pull-right" aria-labelledby="moreActions"> | |
33 | + <li><a href="javascript:void(0)" data-toggle="modal" data-target="#myModal4"><i class="fa fa-files-o fa-fw" aria-hidden="true"></i> {% trans "Replicate" %}</a></li> | |
34 | + <li><a href="javascript:show_editation('{{topic.slug}}')"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i> {% trans "Edit" %}</a></li> | |
35 | + <li><a href="javascript:void(0)" data-toggle="modal" data-target="#removeTopic"><i class="fa fa-trash fa-fw" aria-hidden="true"></i> {% trans "Remove" %}</a></li> | |
36 | + </ul> | |
37 | + {% endif %} | |
38 | + </div> | |
39 | + </div><!--column--> | |
40 | + </div><!--row--> | |
41 | + </div> | |
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 | + <div class="panel-body"> | |
44 | + <div class="presentation" id="presentation_{{topic.slug}}"> | |
45 | + <p> | |
46 | + <i> | |
47 | + {{topic.description|linebreaks}} | |
48 | + </i> | |
49 | + </p> | |
13 | 50 | <div class="row"> |
14 | - <div class="col-xs-9 col-md-10 titleTopic"> | |
15 | - <a role="button" data-toggle="collapse" data-parent=".accordion" href=".collapseOne" aria-expanded="false" aria-controls="collapseOne" class="" aria-selected="false" tabindex="-1"> | |
16 | - {{topic}} | |
17 | - </a> | |
18 | - </div> | |
19 | - <div class="col-xs-3 col-md-2 divMoreActions"> | |
20 | - <div class="btn-group"> | |
21 | - <button type="button" class="btn btn-default btn-sm eye" data-toggle="tooltip" data-placement="bottom" title="Visible"> | |
22 | - <i class="fa fa-eye fa-2x" aria-hidden="true"></i> | |
23 | - </button> | |
24 | - </div> | |
25 | - <div class="btn-group"> | |
26 | - <button class="btn btn-default btn-sm dropdown-toggle" type="button" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
27 | - <i class="fa fa-ellipsis-v fa-2x" aria-hidden="true"></i> | |
28 | - </button> | |
29 | - {% professor_subject topic.subject user as dropdown_topic %} | |
30 | - {% if dropdown_topic %} | |
31 | - <ul class="dropdown-menu pull-right" aria-labelledby="moreActions"> | |
32 | - <li><a href="javascript:void(0)" data-toggle="modal" data-target="#myModal4"><i class="fa fa-files-o fa-fw" aria-hidden="true"></i> {% trans "Replicate" %}</a></li> | |
33 | - <li><a href="javascript:void(0)" class="edit_card"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i> {% trans "Edit" %}</a></li> | |
34 | - <li><a href="javascript:void(0)" data-toggle="modal" data-target="#removeTopic"><i class="fa fa-trash fa-fw" aria-hidden="true"></i> {% trans "Remove" %}</a></li> | |
35 | - </ul> | |
36 | - {% endif %} | |
51 | + <div class="col-xs-6 col-md-6"> | |
52 | + <div class="resource_inline"> | |
53 | + <h4>{% trans 'Material' %}</h4> | |
37 | 54 | </div> |
38 | - </div> | |
39 | - </div> | |
40 | - </div> | |
41 | - <div class="panel-collapse collapseOne collapse in" role="tabpanel" aria-labelledby="headingOne" aria-expanded="false" aria-hidden="true" tabindex="-1" aria-selected="false"> | |
42 | - <div class="panel-body"> | |
43 | - <div class="presentation"> | |
44 | - <p> | |
45 | - <i> | |
46 | - {{topic.description|linebreaks}} | |
47 | - </i> | |
48 | - </p> | |
49 | - <div class="row"> | |
50 | - <div class="col-xs-6 col-md-6"> | |
51 | - <div class="resource_inline"> | |
52 | - <h4>Material</h4> | |
53 | - </div> | |
54 | - <div class="resource_inline"> | |
55 | - <div class="dropdown"> | |
56 | - <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> | |
57 | - <ul class="dropdown-menu" aria-labelledby="dLabel"> | |
58 | - <li><a href=" javascript:get_modal_link('{% url 'course:links:create_link' topic.slug %}', '#createLinksModal','#divModalLink') ">Create a Link<div class="ripple-container"><div class="ripple ripple-on ripple-out" style="left: 54.5312px; top: 22px; background-color: rgb(0, 150, 136); transform: scale(20);"></div></div></a></li> | |
59 | - <li> | |
60 | - <a href="javascript:get_modal_file('{% url 'course:file:create_file' topic.slug %}', '#fileModal', '#divModalFile')"> | |
61 | - {% trans "Create a file" %} | |
62 | - <div class="ripple-container"> | |
63 | - <div class="ripple ripple-on ripple-out" style="left: 33.5312px; top: 11px; background-color: rgb(0, 150, 136); transform: scale(20);"> | |
64 | - </div> | |
65 | - </div> | |
66 | - </a> | |
67 | - </li> | |
68 | - </ul> | |
69 | - </div> | |
70 | - </div> | |
71 | - <ul id="list-materials"> | |
72 | - {% list_topic_file request topic %} | |
73 | - {% list_topic_link request topic%} | |
74 | - | |
75 | - </ul> | |
76 | - </div> | |
77 | - <div class="col-xs-4 col-md-4"> | |
78 | - <div class="resource_inline"> | |
79 | - <h4>Activities</h4> | |
80 | - </div> | |
81 | - <div class="resource_inline"> | |
82 | - <div class="dropdown"> | |
83 | - <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> | |
84 | - <ul class="dropdown-menu" aria-labelledby="dLabel"> | |
85 | - <li><a href="javascript:createForum('{% url 'course:forum:create' %}', '{{ topic.id }}')">{% trans 'Create Forum' %}<div class="ripple-container"><div class="ripple ripple-on ripple-out" style="left: 33.5312px; top: 11px; background-color: rgb(0, 150, 136); transform: scale(20);"></div></div></a></li> | |
86 | - <li><a href="javascript:modal.get('{% url 'course:poll:create_poll' topic.slug%}','#poll','#modal_poll');">{% trans 'Create Poll' %}</a></li> | |
87 | - | |
88 | - </ul> | |
89 | - </div> | |
90 | - </div> | |
91 | - <ul> | |
92 | - | |
93 | - <div class="foruns_list"> | |
94 | - {% list_topic_poll request topic %} | |
95 | - {% list_topic_foruns request topic %} | |
96 | - </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> | |
97 | 61 | </ul> |
98 | 62 | </div> |
99 | - | |
100 | 63 | </div> |
64 | + <ul> | |
65 | + {% list_topic_file request topic %} | |
66 | + {% list_topic_link request topic%} | |
67 | + </ul> | |
101 | 68 | </div> |
102 | - <div class="editation" style="display: none"> | |
103 | - <div class="form-group"> | |
104 | - <label class="control-label" for="focusedInput2">Name Topic</label> | |
105 | - <input type="text" class="form-control" value="Topic 1"> | |
69 | + <div class="col-xs-4 col-md-4"> | |
70 | + <div class="resource_inline"> | |
71 | + <h4>{% trans 'Activities' %}</h4> | |
106 | 72 | </div> |
107 | - <div class="form-group is-empty"> | |
108 | - <label class="control-label" for="focusedInput2">Description</label> | |
109 | - <textarea class="form-control" rows="3" id="textArea"></textarea> | |
110 | - </div> | |
111 | - <div class="row"> | |
112 | - <div class=" col-xs-6 col-md-4"> | |
113 | - <div class="resource_inline"> | |
114 | - <h4>Material</h4> | |
115 | - </div> | |
116 | - <div class="resource_inline"> | |
117 | - <div class="dropdown"> | |
118 | - <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> | |
119 | - <ul class="dropdown-menu" aria-labelledby="dLabel"> | |
120 | - <li><a href="javascript:get_modal_link('{% url 'course:links:create_link' topic.slug %}', '#createLinksModal','#divModalLink')">Create a Link</a></li> | |
121 | - <li> | |
122 | - <a href="#"> | |
123 | - {% trans "Create a file" %} | |
124 | - <div class="ripple-container"> | |
125 | - <div class="ripple ripple-on ripple-out" style="left: 33.5312px; top: 11px; background-color: rgb(0, 150, 136); transform: scale(20);"> | |
126 | - </div> | |
127 | - </div> | |
128 | - </a> | |
129 | - </li> | |
130 | - </ul> | |
131 | - </div> | |
132 | - </div> | |
133 | - <ul id="list-materials-edit"> | |
134 | - {% list_topic_link_edit request topic%} | |
135 | - {% list_topic_file_edit request topic %} | |
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> | |
136 | 79 | </ul> |
137 | 80 | </div> |
138 | - <div class="col-xs-4 col-md-offset-1 col-md-4"> | |
139 | - <div class="resource_inline"> | |
140 | - <h4>Activities</h4> | |
141 | - </div> | |
142 | - <div class="resource_inline"> | |
143 | - <div class="dropdown"> | |
144 | - <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> | |
145 | - <ul class="dropdown-menu" aria-labelledby="dLabel"> | |
146 | - <li>Qualquer coisa</li> | |
147 | - </ul> | |
148 | - </div> | |
149 | - </div> | |
150 | - <ul> | |
151 | - <li class="icon_edit_remove"><i class="fa fa-pencil fa-lg" aria-hidden="true"></i> <i class="fa fa-trash fa-lg" aria-hidden="true"></i></li> | |
152 | - | |
153 | - <li class="icon_edit_remove"><i class="fa fa-pencil fa-lg" aria-hidden="true"></i> <i class="fa fa-trash fa-lg" aria-hidden="true"></i></li> | |
154 | - | |
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> | |
155 | 109 | </ul> |
156 | 110 | </div> |
157 | 111 | </div> |
158 | - <div class="form-group"> | |
159 | - <div class="col-md-10"> | |
160 | - <button type="button" class="btn btn-raised btn-default edit_card_end">Cancel</button> | |
161 | - <button type="submit" class="btn btn-raised btn-primary edit_card_end">Submit</button> | |
112 | + <ul> | |
113 | + {% list_topic_file_edit request topic %} | |
114 | + {% list_topic_link_edit request topic%} | |
115 | + </ul> | |
116 | + </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> | |
162 | 128 | </div> |
163 | 129 | </div> |
130 | + <ul> | |
131 | + {% list_topic_poll request topic %} | |
132 | + {% list_topic_foruns request topic %} | |
133 | + </ul> | |
164 | 134 | </div> |
165 | 135 | </div> |
166 | - </div> | |
167 | - | |
168 | - </div> | |
169 | - <!-- MODAL REMOVE TOPIC --> | |
170 | - <div class="modal" id="removeTopic"> | |
171 | - <div class="modal-dialog"> | |
172 | - <div class="modal-content"> | |
173 | - <div class="modal-header"> | |
174 | - <button type="button" class="close" data-dismiss="modal" aria-hidden="true">X</button> | |
175 | - <h4 class="modal-title"></h4> | |
176 | - </div> | |
177 | - <div class="modal-body"> | |
178 | - <p>Delete your Topic?</p> | |
179 | - </div> | |
180 | - <div class="modal-footer"> | |
181 | - | |
182 | - <a href="" target="_self"><button type="button" class="btn btn-primary">Confirm</button></a> | |
183 | - | |
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> | |
184 | 140 | </div> |
185 | 141 | </div> |
186 | - </div> | |
142 | + </div><!--EndEditation--> | |
143 | + | |
187 | 144 | </div> |
188 | - <!-- END --> | |
189 | - {% professor_subject topic.subject user as professor_links %} | |
190 | - {% if professor_links%} | |
191 | - {% include "links/create_link.html" %} | |
192 | - {% include "links/delete_link.html" %} | |
193 | - {% endif %} | |
145 | + </div> | |
146 | +</div> | |
194 | 147 | |
195 | - <!-- MODAL EMBEED--> | |
196 | - <div class="modal fade" id="embedModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> | |
197 | - <div class="modal-dialog" role="document"> | |
198 | - <div class="modal-content"> | |
199 | - <div class="modal-header"> | |
200 | - <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | |
201 | - <h4 class="modal-title" id="myModalLabel">Material EMBED</h4> | |
202 | - </div> | |
203 | - <div class="modal-body"> | |
204 | - <div class="form-group is-empty"> | |
205 | - <label for="inputEmail" class="col-md-2 control-label">Name:</label> | |
206 | - <div class="col-md-10"> | |
207 | - <input type="text" class="form-control" id="inputEmail" placeholder="Name"> | |
208 | - </div> | |
209 | - </div> | |
210 | - <form class="form-horizontal"> | |
211 | - <div class="form-group is-empty"> | |
212 | - <label for="textArea" class="col-md-2 control-label">Code:</label> | |
148 | +<!-- MODALs --> | |
213 | 149 | |
214 | - <div class="col-md-10"> | |
215 | - <textarea class="form-control" rows="2" id="textArea"></textarea> | |
216 | - <span class="help-block">Material description</span> | |
217 | - </div> | |
218 | - </div> | |
219 | - <div class="form-group is-empty"> | |
220 | - <label for="number" class="col-md-2 control-label">Height</label> | |
221 | - <div class="col-md-4"> | |
222 | - <input type="number" class="form-control" id="inputNumber" placeholder="Heiht"> | |
223 | - </div> | |
224 | - </div> | |
225 | - <div class="form-group is-empty"> | |
226 | - <label for="number" class="col-md-2 control-label">Weight</label> | |
227 | - <div class="col-md-4"> | |
228 | - <input type="number" class="form-control" id="inputNumber" placeholder="Weight"> | |
229 | - </div> | |
230 | - </div> | |
231 | - </form> | |
232 | 150 | |
233 | - </div> | |
234 | - <div class="modal-footer"> | |
235 | - <!-- Don't remove that!!! | |
236 | - <button type="button" class="btn btn-danger btn-raised" data-dismiss="modal">Close</button>--> | |
151 | +<!-- MODAL REMOVE TOPIC --> | |
152 | +<div class="modal" id="removeTopic"> | |
153 | + <div class="modal-dialog"> | |
154 | + <div class="modal-content"> | |
155 | + <div class="modal-header"> | |
156 | + <button type="button" class="close" data-dismiss="modal" aria-hidden="true">X</button> | |
157 | + <h4 class="modal-title"></h4> | |
158 | + </div> | |
159 | + <div class="modal-body"> | |
160 | + <p>{% trans 'Delete your Topic?' %}</p> | |
161 | + </div> | |
162 | + <div class="modal-footer"> | |
163 | + | |
164 | + <a href="" target="_self"><button type="button" class="btn btn-primary">{% trans 'Confirm' %}</button></a> | |
237 | 165 | |
238 | - <!-- Put curtom buttons here!!! --> | |
239 | - <button type="button" class="btn btn-primary btn-raised">Confirm</button> | |
240 | - </div> | |
241 | - </div> | |
242 | 166 | </div> |
243 | 167 | </div> |
244 | - <!-- EndModal --> | |
168 | + </div> | |
169 | +</div> | |
170 | +<!-- END --> | |
245 | 171 | |
246 | - <!-- MODAL ACTIVITIES--> | |
247 | - <div class="modal fade" id="ActivityModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> | |
248 | - <div class="modal-dialog" role="document"> | |
249 | - <div class="modal-content"> | |
250 | - <div class="modal-header"> | |
251 | - <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | |
252 | - <h4 class="modal-title" id="myModalLabel"></h4> | |
172 | +<!-- MODAL EMBEED--> | |
173 | +<div class="modal fade" id="embedModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> | |
174 | + <div class="modal-dialog" role="document"> | |
175 | + <div class="modal-content"> | |
176 | + <div class="modal-header"> | |
177 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | |
178 | + <h4 class="modal-title" id="myModalLabel">{% trans 'Material EMBED' %}</h4> | |
179 | + </div> | |
180 | + <div class="modal-body"> | |
181 | + <div class="form-group is-empty"> | |
182 | + <label for="inputEmail" class="col-md-2 control-label">{% trans 'Name' %}:</label> | |
183 | + <div class="col-md-10"> | |
184 | + <input type="text" class="form-control" id="inputEmail" placeholder="Name"> | |
253 | 185 | </div> |
254 | - <div class="modal-body"> | |
255 | - <form class="form-horizontal"> | |
186 | + </div> | |
187 | + <form class="form-horizontal"> | |
188 | + <div class="form-group is-empty"> | |
189 | + <label for="textArea" class="col-md-2 control-label">{% trans 'Code' %}:</label> | |
256 | 190 | |
257 | - <fieldset> | |
258 | - <legend>Atividade Proposta</legend> | |
259 | - <div class="form-group is-empty"> | |
260 | - <label for="NameIn" class="col-md-2 control-label">Name:</label> | |
261 | - <div class="col-md-10"> | |
262 | - <input type="text" id="NameIn" class="form-control"> | |
263 | - </div> | |
264 | - </div> | |
265 | - <div class="form-group is-empty"> | |
266 | - <label for="DescIn" class="col-md-2 control-label">Describe:</label> | |
267 | - <div class="col-md-10"> | |
268 | - <textarea class="form-control" id="DescIn" rows="2"></textarea> | |
269 | - </div> | |
270 | - </div> | |
271 | - <div class="form-group is-empty"> | |
272 | - <label for="DateIn" class="col-md-2 control-label">Opening: </label> | |
273 | - <div class="col-md-10"> | |
274 | - <input type="text" id="DateIn" class="form-control date-picker" requerid=""> | |
275 | - </div> | |
276 | - </div> | |
277 | - <div class="form-group is-empty"> | |
278 | - <label for="DateIn" class="col-md-2 control-label">Ending: </label> | |
279 | - <div class="col-md-10"> | |
280 | - <input type="text" id="DateIn" class="form-control date-picker" requerid=""> | |
281 | - </div> | |
191 | + <div class="col-md-10"> | |
192 | + <textarea class="form-control" rows="2" id="textArea"></textarea> | |
193 | + <span class="help-block">{% trans 'Material description' %}</span> | |
282 | 194 | </div> |
283 | - <div class="form-group" style="margin-top: 0;"> | |
284 | - <div class="col-md-offset-2 col-md-10"> | |
285 | - <div class="checkbox"> | |
286 | - <label> | |
287 | - <input type="checkbox"><span class="checkbox-material"><span class="check"></span></span> Send Later | |
288 | - </label> | |
289 | - </div> | |
290 | - </div> | |
195 | + </div> | |
196 | + <div class="form-group is-empty"> | |
197 | + <label for="number" class="col-md-2 control-label">{% trans 'Height' %}</label> | |
198 | + <div class="col-md-4"> | |
199 | + <input type="number" class="form-control" id="inputNumber" placeholder="Heiht"> | |
291 | 200 | </div> |
292 | - <div class="form-group"> | |
293 | - <div class="col-md-10 col-md-offset-2"> | |
294 | - <button type="button" class="btn btn-default">Cancel</button> | |
295 | - <button type="submit" class="btn btn-primary">Submit</button> | |
296 | - </div> | |
201 | + </div> | |
202 | + <div class="form-group is-empty"> | |
203 | + <label for="number" class="col-md-2 control-label">{% trans 'Weight' %}</label> | |
204 | + <div class="col-md-4"> | |
205 | + <input type="number" class="form-control" id="inputNumber" placeholder="Weight"> | |
297 | 206 | </div> |
207 | + </div> | |
208 | + </form> | |
298 | 209 | |
210 | + </div> | |
211 | + <div class="modal-footer"> | |
212 | + <!-- Don't remove that!!! | |
213 | + <button type="button" class="btn btn-danger btn-raised" data-dismiss="modal">Close</button>--> | |
299 | 214 | |
300 | - </fieldset> | |
301 | - </form> | |
302 | - </div> | |
303 | - </div> | |
215 | + <!-- Put curtom buttons here!!! --> | |
216 | + <button type="button" class="btn btn-primary btn-raised">{% trans 'Confirm' %}</button> | |
304 | 217 | </div> |
305 | 218 | </div> |
306 | - <!--EndModal--> | |
219 | + </div> | |
220 | +</div> | |
221 | +<!-- EndModal --> | |
307 | 222 | |
223 | +<!-- MODAL ACTIVITIES--> | |
224 | +<div class="modal fade" id="ActivityModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> | |
225 | + <div class="modal-dialog" role="document"> | |
226 | + <div class="modal-content"> | |
227 | + <div class="modal-header"> | |
228 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | |
229 | + <h4 class="modal-title" id="myModalLabel"></h4> | |
230 | + </div> | |
231 | + <div class="modal-body"> | |
232 | + <form class="form-horizontal"> | |
308 | 233 | |
234 | + <fieldset> | |
235 | + <legend>{% trans 'Proposal Activity' %}</legend> | |
236 | + <div class="form-group is-empty"> | |
237 | + <label for="NameIn" class="col-md-2 control-label">{% trans 'Name' %}:</label> | |
238 | + <div class="col-md-10"> | |
239 | + <input type="text" id="NameIn" class="form-control"> | |
240 | + </div> | |
241 | + </div> | |
242 | + <div class="form-group is-empty"> | |
243 | + <label for="DescIn" class="col-md-2 control-label">{% trans 'Describe' %}:</label> | |
244 | + <div class="col-md-10"> | |
245 | + <textarea class="form-control" id="DescIn" rows="2"></textarea> | |
246 | + </div> | |
247 | + </div> | |
248 | + <div class="form-group is-empty"> | |
249 | + <label for="DateIn" class="col-md-2 control-label">{% trans 'Opening' %}: </label> | |
250 | + <div class="col-md-10"> | |
251 | + <input type="text" id="DateIn" class="form-control date-picker" requerid=""> | |
252 | + </div> | |
253 | + </div> | |
254 | + <div class="form-group is-empty"> | |
255 | + <label for="DateIn" class="col-md-2 control-label">{% trans 'Ending' %}: </label> | |
256 | + <div class="col-md-10"> | |
257 | + <input type="text" id="DateIn" class="form-control date-picker" requerid=""> | |
258 | + </div> | |
259 | + </div> | |
260 | + <div class="form-group" style="margin-top: 0;"> | |
261 | + <div class="col-md-offset-2 col-md-10"> | |
262 | + <div class="checkbox"> | |
263 | + <label> | |
264 | + <input type="checkbox"><span class="checkbox-material"><span class="check"></span></span> {% trans 'Send Later' %} | |
265 | + </label> | |
266 | + </div> | |
267 | + </div> | |
268 | + </div> | |
269 | + <div class="form-group"> | |
270 | + <div class="col-md-10 col-md-offset-2"> | |
271 | + <button type="button" class="btn btn-default">{% trans 'Cancel' %}</button> | |
272 | + <button type="submit" class="btn btn-primary">{% trans 'Submit' %}</button> | |
273 | + </div> | |
274 | + </div> | |
309 | 275 | |
310 | - <!-- MODAL LINK EDIT--> | |
311 | - {% professor_subject topic.subject user as links_update %} | |
312 | - {% if links_update%} | |
313 | - {% include "links/update_link.html" %} | |
314 | - {% endif %} | |
315 | 276 | |
316 | - <!-- EndModal --> | |
317 | - </div> | |
277 | + </fieldset> | |
278 | + </form> | |
279 | + </div> | |
318 | 280 | </div> |
281 | + </div> | |
282 | +</div> | |
283 | +<!--EndModal--> | |
284 | + | |
285 | +<!-- MODAL LINK EDIT--> | |
319 | 286 | |
320 | 287 | |
321 | - <div class="modal fade" id="createForum" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> | |
322 | - <div class="modal-dialog" role="document"> | |
323 | - <div class="modal-content"> | |
324 | - <div class="modal-header"> | |
325 | - <h4 class="modal-title" id="myModalLabel">{% trans 'Forum' %}</h4> | |
326 | - </div> | |
327 | - <div class="modal-body"> | |
328 | - <section> | |
329 | - <div class="forum_form"></div> | |
330 | - </section> | |
331 | - </div> | |
332 | - <div class="modal-footer"> | |
333 | - <button type="button" class="btn btn-danger btn-raised" data-dismiss="modal">{% trans 'Close' %}</button> | |
334 | - <button type="button" onclick="$('#forum_create').submit();" class="btn btn-primary btn-raised">{% trans 'Create' %}</button> | |
335 | - </div> | |
288 | +<!-- EndModal --> | |
289 | + | |
290 | + | |
291 | +<div class="modal fade" id="createForum" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> | |
292 | + <div class="modal-dialog" role="document"> | |
293 | + <div class="modal-content"> | |
294 | + <div class="modal-header"> | |
295 | + <h4 class="modal-title" id="myModalLabel">{% trans 'Forum' %}</h4> | |
296 | + </div> | |
297 | + <div class="modal-body"> | |
298 | + <section> | |
299 | + <div class="forum_form"></div> | |
300 | + </section> | |
301 | + </div> | |
302 | + <div class="modal-footer"> | |
303 | + <button type="button" class="btn btn-danger btn-raised" data-dismiss="modal">{% trans 'Close' %}</button> | |
304 | + <button type="button" onclick="$('#forum_create').submit();" class="btn btn-primary btn-raised">{% trans 'Create' %}</button> | |
336 | 305 | </div> |
337 | 306 | </div> |
338 | 307 | </div> |
308 | +</div> | ... | ... |
courses/templates/subject/index.html
... | ... | @@ -3,89 +3,101 @@ |
3 | 3 | {% load static i18n permission_tags professor_access %} |
4 | 4 | |
5 | 5 | {% block breadcrumbs %} |
6 | - | |
7 | - <ol class="breadcrumb"> | |
8 | - <li><a href="{% url 'app:index' %}">{% trans 'Home' %}</a></li> | |
9 | - <li><a href="{% url 'course:view' course.slug %}">{{ course }}</a></li> | |
10 | - {% if user|has_role:'professor' or user|has_role:'system_admin' %} | |
11 | - <li class="active">{% trans 'Manage Subjects' %}</li> | |
12 | - {% else %} | |
13 | - <li class="active">{{ subject.name }}</li> | |
14 | - {% endif %} | |
15 | - | |
16 | - </ol> | |
6 | +<ol class="breadcrumb"> | |
7 | + <li><a href="{% url 'app:index' %}">{% trans 'Home' %}</a></li> | |
8 | + <li><a href="{% url 'course:manage' %}">{% trans 'Courses' %}</a></li> | |
9 | + <li><a href="{% url 'course:view' course.slug %}">{{ course }}</a></li> | |
10 | + <li class="active">{{ subject }}</li> | |
11 | +</ol> | |
17 | 12 | {% endblock %} |
18 | - | |
19 | 13 | {% block sidebar %} |
20 | - <div class="panel panel-primary navigation"> | |
21 | - <div class="panel-heading"> | |
22 | - <h5>{% trans 'Menu' %}</h5> | |
23 | - </div> | |
24 | - <div class="panel-body"> | |
25 | - <ul class="nav nav-pills nav-stacked"> | |
26 | - <li><a href="{% url 'users:profile' %}">{% trans 'Profile' %}</a></li> | |
27 | - <li><a href="{% url 'course:manage' %}">{% trans 'My Courses' %}</a></li> | |
28 | - </ul> | |
29 | - </div> | |
14 | +<div class="panel panel-primary"> | |
15 | + <div class="panel-heading"> | |
16 | + <h4>{% trans 'Menu' %}</h4> | |
17 | + </div> | |
18 | + <div class="panel-body"> | |
19 | + <ul class="nav nav-pills nav-stacked"> | |
20 | + <li><a href="{% url 'app:index' %}">{% trans 'Home' %}</a></li> | |
21 | + <li><a href="{% url 'users:profile' %}">{% trans 'Profile' %}</a></li> | |
22 | + {% if user|has_role:'student' or not user.is_staff %} | |
23 | + <li><a href="{% url 'course:manage' %}">{% trans 'My courses' %}</a></li> | |
24 | + <li><a href="{% url 'core:guest' %}">{% trans 'All Courses' %}</a></li> | |
25 | + {% endif %} | |
26 | + {% if user|has_role:'system_admin' %} | |
27 | + <li> <a href="{% url 'users:manage' %}">{% trans 'Manage Users' %}</a></li> | |
28 | + {% endif %} | |
29 | + {% if user|has_role:'system_admin' or user|has_role:'professor' %} | |
30 | + <li> | |
31 | + <a href="#courses_list" class="accordion" data-toggle="collapse">{% trans 'Manage Courses' %}</a> | |
32 | + <div id="courses_list" class="collapse"> | |
33 | + <ul class="nav nav-pill nav-stacked accordion_list"> | |
34 | + {% for course in courses_list %} | |
35 | + <li><a href="{% url 'course:view' course.slug %}">{{ course }}</a></li> | |
36 | + {% endfor %} | |
37 | + </ul> | |
38 | + </div> | |
39 | + </li> | |
40 | + {% endif %} | |
41 | + </ul> | |
30 | 42 | </div> |
43 | +</div> | |
31 | 44 | |
32 | 45 | |
33 | 46 | {% endblock %} |
34 | 47 | |
35 | 48 | {% block content %} |
36 | 49 | <div class="panel panel-info"> |
37 | - <div class="panel-heading"> | |
38 | - <div class="row"> | |
39 | - <div class="col-md-10 col-sm-10"> | |
40 | - <h3>{{subject}}</h3> | |
41 | - </div> | |
42 | - {% professor_subject subject user as subject_professor%} | |
43 | - {% if subject_professor %} | |
44 | - <div class="col-xs-4 col-md-2 divMoreActions"> | |
45 | - <div class="btn-group"> | |
46 | - <button class="btn btn-default btn-sm dropdown-toggle" type="button" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
47 | - <i class="fa fa-ellipsis-v fa-2x" aria-hidden="true"></i> | |
48 | - </button> | |
49 | - <ul class="dropdown-menu pull-right" aria-labelledby="moreActions"> | |
50 | - <li><a href="javascript:void(0)"><i class="fa fa-files-o fa-fw" aria-hidden="true"></i> {% trans "Replicate" %}</a></li> | |
51 | - <li><a href="{% url 'course:update_subject' subject.slug %}" <i class="fa fa-pencil fa-fw" aria-hidden="true"></i> {% trans "Edit" %}</a></li> | |
52 | - <li><a href="{% url 'course:delete_subject' subject.slug %}" ><i class="fa fa-trash fa-fw" aria-hidden="true"></i> {% trans "Remove" %}</a></li> | |
53 | - </ul> | |
54 | - </div> | |
55 | - </div> | |
56 | - {% endif %} | |
57 | - </div> | |
58 | - </div> | |
59 | - <div class="panel-body"> | |
60 | - <p><b>{% trans "Professor" %}:</b> {{subject.professors}}</p> | |
61 | - <p> | |
62 | - <b>{% trans "Description" %}:</b> | |
63 | - {{subject.description|linebreaks}} | |
64 | - </p> | |
65 | - <div class="row"> | |
66 | - <div class="col-xs-6 col-md-6"> | |
67 | - <p><b>{% trans "Beginning" %}:</b> {{subject.init_date}}</p> | |
68 | - </div> | |
69 | - <div class="col-xs-6 col-md-6"> | |
70 | - <p><b>{% trans "End" %}:</b> {{subject.end_date}}</p> | |
71 | - </div> | |
72 | - </div> | |
73 | - </div> | |
74 | - </div> | |
75 | - | |
76 | - {% for topic in topics %} | |
77 | - {% professor_subject topic.subject user as topic_professor%} | |
78 | - {% if topic_professor %} | |
79 | - {% include "subject/form_view_teacher.html" %} | |
80 | - {% else %} | |
81 | - {% include "subject/form_view_student.html" %} | |
82 | - {% endif %} | |
83 | - {% endfor %} | |
84 | - {% professor_subject subject user as professor_sub %} | |
85 | - {% if professor_sub %} | |
86 | - <div class="form-group"> | |
87 | - <a href="{% url 'course:create_topic' subject.slug %}" data-toggle="modal" data-target="" class="btn btn-primary btn-lg btn-block btn-raised" name="create_topic">{% trans "Create Topic" %}<div class="ripple-container"></div></a> | |
50 | + <div class="panel-heading course-detail"> | |
51 | + <div class="row"> | |
52 | + <div class="col-md-10 col-sm-10"> | |
53 | + <h4>{{subject}}</h4> | |
54 | + </div> | |
55 | + <div class="col-xs-4 col-md-2 divMoreActions"> | |
56 | + {% professor_subject subject user as subject_professor%} | |
57 | + {% if subject_professor %} | |
58 | + <div class="btn-group"> | |
59 | + <button class="btn btn-default btn-sm dropdown-toggle" type="button" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
60 | + <i class="fa fa-ellipsis-v fa-2x" aria-hidden="true"></i> | |
61 | + </button> | |
62 | + <ul class="dropdown-menu pull-right" aria-labelledby="moreActions"> | |
63 | + <li><a href="javascript:void(0)"><i class="fa fa-files-o fa-fw" aria-hidden="true"></i> {% trans "Replicate" %}</a></li> | |
64 | + <li><a href="{% url 'course:update_subject' subject.slug %}" <i class="fa fa-pencil fa-fw" aria-hidden="true"></i> {% trans "Edit" %}</a></li> | |
65 | + <li><a href="{% url 'course:delete_subject' subject.slug %}" ><i class="fa fa-trash fa-fw" aria-hidden="true"></i> {% trans "Remove" %}</a></li> | |
66 | + </ul> | |
67 | + </div> | |
68 | + {% endif %} | |
69 | + </div> | |
70 | + </div> | |
71 | + </div> | |
72 | + <div class="panel-body"> | |
73 | + <p><b>{% trans "Professor" %}:</b> {% for professor in subject.professors.all %}{% if not forloop.first %},{% endif %} | |
74 | + {{professor}}{% if forloop.last %}.{% endif %}{% endfor %}</p> | |
75 | + <p> | |
76 | + <b>{% trans "Description" %}:</b> | |
77 | + {{subject.description|linebreaks}} | |
78 | + </p> | |
79 | + <div class="row"> | |
80 | + <div class="col-xs-6 col-md-6"> | |
81 | + <p><b>{% trans "Beginning" %}:</b> {{subject.init_date}}</p> | |
82 | + </div> | |
83 | + <div class="col-xs-6 col-md-6"> | |
84 | + <p><b>{% trans "End" %}:</b> {{subject.end_date}}</p> | |
85 | + </div> | |
88 | 86 | </div> |
89 | - {% endif %} | |
90 | - | |
87 | + </div> | |
88 | + </div> | |
89 | + {% for topic in topics %} | |
90 | + {% professor_subject topic.subject user as topic_professor%} | |
91 | + {% if topic_professor %} | |
92 | + {% include "subject/form_view_teacher.html" %} | |
93 | + {% else %} | |
94 | + {% include "subject/form_view_student.html" %} | |
95 | + {% endif %} | |
96 | + {% endfor %} | |
97 | + {% professor_subject subject user as professor_sub %} | |
98 | + {% if professor_sub %} | |
99 | + <div class="form-group"> | |
100 | + <a href="{% url 'course:create_topic' subject.slug %}" data-toggle="modal" data-target="" class="btn btn-primary btn-lg btn-block btn-raised" name="create_topic">{% trans "Create Topic" %}<div class="ripple-container"></div></a> | |
101 | + </div> | |
102 | + {% endif %} | |
91 | 103 | {% endblock %} | ... | ... |
courses/templates/subject/poll_item_actions.html
... | ... | @@ -6,9 +6,9 @@ |
6 | 6 | {% for poll in polls %} |
7 | 7 | {% professor_subject poll.topic.subject request.user as permission%} |
8 | 8 | {% if permission %} |
9 | - <li id="poll_{{poll.slug}}"><i class="material-icons">poll</i> <a href="javascript:modal.get('{% url 'course:poll:update_poll' poll.slug %}','#poll','#modal_poll');">{{ poll.name }}</a><a href="javascript:modal.get('{% url 'course:poll:delete_poll' poll.slug %}','#poll','#modal_poll');"><span class="glyphicon glyphicon-remove"></span></a></li> | |
9 | + <li id="poll_{{poll.slug}}"><i class="material-icons">{% trans 'poll' %}</i> <a href="javascript:modal.get('{% url 'course:poll:update_poll' poll.slug %}','#poll','#modal_poll');">{{ poll.name }}</a><a href="javascript:modal.get('{% url 'course:poll:delete_poll' poll.slug %}','#poll','#modal_poll');"><span class="glyphicon glyphicon-remove"></span></a></li> | |
10 | 10 | {% else %} |
11 | - <li id="poll_{{poll.slug}}"><i class="material-icons">poll</i> <a href="javascript:modal.get('{% url 'course:poll:view_poll' poll.slug %}','#poll','#modal_poll');">{{ poll.name }}</a></li> | |
11 | + <li id="poll_{{poll.slug}}"><i class="material-icons">{% trans 'poll' %}</i> <a href="javascript:modal.get('{% url 'course:poll:view_poll' poll.slug %}','#poll','#modal_poll');">{{ poll.name }}</a></li> | |
12 | 12 | {% endif %} |
13 | 13 | {% endfor %} |
14 | 14 | {# <button class="btn btn-primary btn-raised" onclick="javascript:modal.get('{% url 'course:poll:create_poll' topic.slug%}','#poll','#modal_poll');">{% trans '+ Create Poll' %}</button> #} | ... | ... |
... | ... | @@ -0,0 +1,110 @@ |
1 | +{% extends 'subject/index.html' %} | |
2 | + | |
3 | +{% load static i18n permission_tags widget_tweaks %} | |
4 | + | |
5 | +{% block breadcrumbs %} | |
6 | + | |
7 | + <ol class="breadcrumb"> | |
8 | + <li><a href="">{% trans 'Home' %}</a></li> | |
9 | + <li><a href="">{{ subject }}</a></li> | |
10 | + <li class="active">{% trans 'Manage Topic' %}</li> | |
11 | + <li class="active">{{ topic.name }}</li> | |
12 | + </ol> | |
13 | +{% endblock %} | |
14 | + | |
15 | + | |
16 | +{% block content %} | |
17 | + | |
18 | +<div class="col-md-12"> | |
19 | + <div><div class="well"> | |
20 | + <div class="row"> | |
21 | + <div class="col-md-offset-2 col-md-9"> | |
22 | + <h2 class="resource_inline"><b>Book 1</b></h2> | |
23 | + </div> | |
24 | + <div class="col-md-offset-2 col-md-8"> | |
25 | + <a href="{{ file.file_url }}">{{ file.url }}</a> | |
26 | + </div> | |
27 | + </div> | |
28 | +</div></div> | |
29 | + <div><div class="well"> | |
30 | + <div class="row"> | |
31 | + <div class="list-group"> | |
32 | + <div class="list-group-item"> | |
33 | + <div class="form-group is-empty"> | |
34 | + <div class="row"> | |
35 | + <div class="col-md-1"> | |
36 | + <span class="input-group-btn"> | |
37 | + <button type="button" class="btn btn-fab btn-fab-mini"> | |
38 | + <i class="material-icons">send</i> | |
39 | + </button> | |
40 | + </span> | |
41 | + </div> | |
42 | + <div class="col-md-10"> | |
43 | + <input type="text" id="addon3a" class="form-control" placeholder="Add Comment"> | |
44 | + </div> | |
45 | + </div> | |
46 | + </div> | |
47 | + </div> | |
48 | + </div> | |
49 | + </div> | |
50 | +</div> | |
51 | +<div class="well timeLine"> | |
52 | + <div class="row"> | |
53 | + <div class="col-xs-2 col-md-1"> | |
54 | + <img class="imgTimeLine" src="http://localhost:8080/assets/img/images/team-avatar-2.jpg"> | |
55 | + </div> | |
56 | + <div class="col-xs-10 col-md-11"> | |
57 | + <i class="fa fa-flag-o" aria-hidden="true"></i> | |
58 | + <a href="#"><h4 class="resource_inline"><b>Beltrano Camargo</b></h4></a> | |
59 | + <p class="timePost"><i>Há 11 horas</i></p> | |
60 | + <!--ListComents --> | |
61 | + <div class="list-group"> | |
62 | + <div class="list-group-item"> | |
63 | + <div class="row-picture"> | |
64 | + <img class="circle" src="http://localhost:8080/assets/img/images/team-avatar-1.jpg" alt="icon"> | |
65 | + </div> | |
66 | + <div class="row-content"> | |
67 | + <h4 class="list-group-item-heading">Sicrano da Silva</h4> | |
68 | + <div class="least-content">11 horas</div> | |
69 | + | |
70 | + <p class="list-group-item-text">Quais capítulos devo estudar?</p> | |
71 | + </div> | |
72 | + </div> | |
73 | + <div class="list-group-separator"></div> | |
74 | + <div class="list-group-item"> | |
75 | + <div class="row-picture"> | |
76 | + <img class="circle" src="http://localhost:8080/assets/img/images/team-avatar-2.jpg" alt="icon"> | |
77 | + </div> | |
78 | + <div class="row-content"> | |
79 | + <h4 class="list-group-item-heading">Beltrano Camargo</h4> | |
80 | + <div class="least-content">11 horas</div> | |
81 | + | |
82 | + <p class="list-group-item-text">capítulos 5 e 6</p> | |
83 | + </div> | |
84 | + </div> | |
85 | + <div class="list-group-separator"></div> | |
86 | + <div class="list-group"> | |
87 | + <div class="list-group-item"> | |
88 | + <div class="form-group is-empty"> | |
89 | + <div class="row"> | |
90 | + <div class="col-md-1 col-md-offset-1"> | |
91 | + <span class="input-group-btn"> | |
92 | + <button type="button" class="btn btn-fab btn-fab-mini"> | |
93 | + <i class="material-icons">send</i> | |
94 | + </button> | |
95 | + </span> | |
96 | + </div> | |
97 | + <div class="col-md-10"> | |
98 | + <input type="text" id="addon3a" class="form-control" placeholder="Add Comment"> | |
99 | + </div> | |
100 | + </div> | |
101 | + </div> | |
102 | + </div> | |
103 | + </div> | |
104 | + </div> | |
105 | + <!-- endListComents --> | |
106 | + </div> | |
107 | + </div> | |
108 | +</div></div> | |
109 | + </div> | |
110 | +{% endblock %} | |
0 | 111 | \ No newline at end of file | ... | ... |
courses/templates/topic/index.html
... | ... | @@ -28,7 +28,7 @@ |
28 | 28 | |
29 | 29 | {% block sidebar %} |
30 | 30 | |
31 | - <div class="panel panel-primary navigation"> | |
31 | + <div class="panel panel-primary"> | |
32 | 32 | <div class="panel-heading"> |
33 | 33 | <h5>{% trans 'Menu' %}</h5> |
34 | 34 | </div> |
... | ... | @@ -41,6 +41,7 @@ |
41 | 41 | </div> |
42 | 42 | |
43 | 43 | |
44 | + | |
44 | 45 | {% endblock %} |
45 | 46 | |
46 | 47 | {% block content %} |
... | ... | @@ -105,12 +106,12 @@ |
105 | 106 | <div class="panel-body"> |
106 | 107 | <div class="row"> |
107 | 108 | <div class="col-md-4"> |
108 | - <i class="fa fa-file-archive-o fa-lg" aria-hidden="true">Atividade.doc</i> | |
109 | + <i class="fa fa-file-archive-o fa-lg" aria-hidden="true">{% trans 'Atividade.doc' %}</i> | |
109 | 110 | </div> |
110 | 111 | {% professor_subject subject user as permi_test%} |
111 | 112 | {% if permi_test %} |
112 | 113 | <div class="col-md-4"> |
113 | - <label> Nota:</label> | |
114 | + <label> {% trans 'Grade' %}:</label> | |
114 | 115 | <input type="number" step="0.01"> |
115 | 116 | </div> |
116 | 117 | {% else %} |
... | ... | @@ -120,7 +121,7 @@ |
120 | 121 | <div class="form-group {% if form.pdf.errors %} has-error {% endif %}"> |
121 | 122 | {{ form.as_p }} |
122 | 123 | </div> |
123 | - <button type="submit" class="btn btn-success" id="send_button">Enviar</button> | |
124 | + <button type="submit" class="btn btn-success" id="send_button">{% trans 'Send' %}</button> | |
124 | 125 | </div> |
125 | 126 | {% endif %} |
126 | 127 | </div> | ... | ... |
courses/templates/topic/link_topic_list.html
1 | 1 | {% load static i18n list_topic_foruns permission_tags %} |
2 | 2 | <div id="list-topic{{ topic.id }}-links"> |
3 | 3 | {% for link in links%} |
4 | - <li><i class="fa fa-link" aria-hidden="true"></i> <a href="javascript:get_modal_link('{% url 'course:links:view_link' link.slug %}', '#viewLinkModal','#divModalLink')">{{link}}</a></li> | |
4 | + <li id = "link_{{ link.slug }}"><i class="fa fa-link" aria-hidden="true"></i> <a href="javascript:get_modal_link('{% url 'course:links:view_link' link.slug %}', '#viewLinkModal','#divModalLink')">{{link.name}}</a></li> | |
5 | 5 | {% endfor %} |
6 | 6 | </div> |
7 | 7 | <div class = 'row' id ="divModalLink"> | ... | ... |
courses/templates/topic/link_topic_list_edit.html
... | ... | @@ -2,8 +2,12 @@ |
2 | 2 | <div id="list-topic{{ topic.id }}-links-edit"> |
3 | 3 | {% for link in links%} |
4 | 4 | |
5 | - <li class="icon_edit_remove"> <a href="#" data-toggle="modal" data-target="#linksModalEdit"><i class="fa fa-pencil fa-lg" aria-hidden="true"></i></a> <a href="#" data-toggle="modal" data-target="#removeLink"><i class="fa fa-trash fa-lg" aria-hidden="true"></i></a></li> | |
6 | - <li><i class="fa fa-link" aria-hidden="true"></i> <a href="javascript:get_modal_link('{% url 'course:links:view_link' link.slug %}', '#viewLinkModal','#divModalLink')">{{link}}</a></li> | |
5 | + <li class="icon_edit_remove" id = "link_edit_icon_{{ link.slug }}"> <a href="javascript:get_modal_link('{% url 'course:links:update_link' link.slug %}', '#linksModalEdit', '#divModalLinkUpdate')"><i class="fa fa-pencil fa-lg" aria-hidden="true"></i></a> <a href="javascript:get_modal_link('{% url 'course:links:delete_link' link.slug %}', '#linkDeleteModal', '#divModalLinkUpdate')"><i class="fa fa-trash fa-lg" aria-hidden="true"></i></a></li> | |
6 | + <li id="link_edit_{{ link.slug }}"><i class="fa fa-link" aria-hidden="true"></i> <a href="javascript:get_modal_link('{% url 'course:links:view_link' link.slug %}', '#viewLinkModal','#divModalLink')">{{link.name}}</a></li> | |
7 | 7 | |
8 | 8 | {% endfor %} |
9 | 9 | </div> |
10 | + | |
11 | +<div class="row" id="divModalLinkUpdate"> | |
12 | + | |
13 | +</div> | ... | ... |
courses/templates/topic/list_file.html
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | |
3 | 3 | <div id="list-topic{{ topic.id }}-files"> |
4 | 4 | {% for file in files %} |
5 | - <li id="file_{{ file.slug }}"><i class="material-icons">{{ file.file_type.icon }}</i> <a href="{{ file.file_url.url }}" target="_blank">{{ file.name }}</a></li> | |
5 | + <li id="file_{{ file.slug }}"><i class="material-icons">{{ file.file_type.icon }}</i> <a href="{% url 'course:file_material_view' file.slug %}" target="_blank">{{ file.name }}</a></li> | |
6 | 6 | {% endfor %} |
7 | 7 | </div> |
8 | 8 | ... | ... |
courses/templates/topic/list_topic_foruns.html
1 | -{% for forum in foruns %} | |
2 | - <li><i class="fa fa-commenting" aria-hidden="true"></i> <a id="forum_{{ forum.id }}" href="{% url 'course:forum:view' forum.slug %}"> {{ forum }}</a></li> | |
3 | -{% endfor %} | |
4 | 1 | \ No newline at end of file |
2 | +<div class="foruns_list"> | |
3 | + {% for forum in foruns %} | |
4 | + <li><i class="fa fa-commenting" aria-hidden="true"></i> <a id="forum_{{ forum.id }}" href="{% url 'course:forum:view' forum.slug %}"> {{ forum }}</a></li> | |
5 | + {% endfor %} | |
6 | +</div> | |
5 | 7 | \ No newline at end of file | ... | ... |
courses/templatetags/custom_filters.py
... | ... | @@ -4,6 +4,19 @@ from rolepermissions.verifications import has_role |
4 | 4 | register = template.Library() |
5 | 5 | |
6 | 6 | @register.filter |
7 | +def hide_subscribe_view_btn(user, subject): | |
8 | + if not user is None: | |
9 | + if user.is_authenticated: | |
10 | + if has_role(user, 'student') and not user.is_staff: | |
11 | + if user in subject.course.students.all(): | |
12 | + if not user in subject.students.all(): | |
13 | + return True | |
14 | + else: | |
15 | + return True | |
16 | + | |
17 | + return False | |
18 | + | |
19 | +@register.filter | |
7 | 20 | def show_subject_subscribe(user, subject): |
8 | 21 | if not user is None: |
9 | 22 | if user.is_authenticated: | ... | ... |
courses/urls.py
... | ... | @@ -3,10 +3,10 @@ from django.conf.urls import url, include |
3 | 3 | from . import views |
4 | 4 | urlpatterns = [ |
5 | 5 | url(r'^$', views.IndexView.as_view(), name='manage'), |
6 | + url(r'^all-courses/$', views.AllCoursesView.as_view(), name='all_courses'), | |
6 | 7 | url(r'^create/$', views.CreateCourseView.as_view(), name='create'), |
7 | 8 | url(r'^replicate_course/(?P<slug>[\w_-]+)/$', views.ReplicateCourseView.as_view(), name='replicate_course'), |
8 | 9 | url(r'^edit/(?P<slug>[\w_-]+)/$', views.UpdateCourseView.as_view(), name='update'), |
9 | - url(r'^(?P<slug>[\w_-]+)/$', views.CourseView.as_view(), name='view'), | |
10 | 10 | url(r'^delete/(?P<slug>[\w_-]+)/$', views.DeleteCourseView.as_view(), name='delete'), |
11 | 11 | url(r'^subscribe/(?P<slug>[\w_-]+)/$', views.subscribe_course, name='subscribe'), |
12 | 12 | url(r'^category/(?P<slug>[\w_-]+)/$', views.FilteredView.as_view(), name='filter'), |
... | ... | @@ -28,5 +28,10 @@ urlpatterns = [ |
28 | 28 | url(r'^exam/', include('exam.urls', namespace = 'exam')), |
29 | 29 | url(r'^files/', include('files.urls', namespace = 'file')), |
30 | 30 | url(r'^upload-material/$', views.UploadMaterialView.as_view(), name='upload_material'), |
31 | + url(r'^subjects/file-material-view/(?P<slug>[\w_-]+)/$', views.FileMaterialView.as_view(), name='file_material_view'), | |
31 | 32 | url(r'^links/',include('links.urls',namespace = 'links')), |
33 | + url(r'^(?P<slug>[\w_-]+)/', include([ | |
34 | + url(r'^$', views.CourseView.as_view(), name='view'), | |
35 | + url(r'^(?P<category>[\w_-]+)/$', views.CourseView.as_view(), name='view_filter') | |
36 | + ])), | |
32 | 37 | ] | ... | ... |
courses/views.py
... | ... | @@ -9,9 +9,10 @@ from django.core.urlresolvers import reverse_lazy |
9 | 9 | from django.utils.translation import ugettext_lazy as _ |
10 | 10 | from rolepermissions.verifications import has_role |
11 | 11 | from django.db.models import Q |
12 | +import operator | |
13 | +from functools import reduce | |
12 | 14 | from rolepermissions.verifications import has_object_permission |
13 | 15 | from django.http import HttpResponseRedirect, JsonResponse |
14 | - | |
15 | 16 | from .forms import CourseForm, UpdateCourseForm, CategoryCourseForm, SubjectForm,TopicForm,ActivityForm |
16 | 17 | from .models import Course, Subject, CourseCategory,Topic, SubjectCategory,Activity, CategorySubject |
17 | 18 | from core.mixins import NotificationMixin |
... | ... | @@ -30,7 +31,30 @@ class IndexView(LoginRequiredMixin, NotificationMixin, generic.ListView): |
30 | 31 | queryset = Course.objects.all() |
31 | 32 | template_name = 'course/index.html' |
32 | 33 | context_object_name = 'courses' |
33 | - paginate_by = 2 | |
34 | + paginate_by = 10 | |
35 | + aparece = True | |
36 | + | |
37 | + | |
38 | + def get_queryset(self): | |
39 | + result = super(IndexView, self).get_queryset() | |
40 | + | |
41 | + course_search = self.request.GET.get('q', None) | |
42 | + category_search = self.request.GET.get('category', None) | |
43 | + if course_search: | |
44 | + self.aparece = False | |
45 | + query_list = course_search.split() | |
46 | + result = result.filter( | |
47 | + reduce(operator.and_, | |
48 | + (Q(name__icontains=q) for q in query_list)) | |
49 | + ) | |
50 | + if category_search: | |
51 | + self.aparece = False | |
52 | + query_list = category_search.split() | |
53 | + result = result.filter( | |
54 | + reduce(operator.and_, | |
55 | + (Q(category__name=category) for category in query_list)) | |
56 | + ) | |
57 | + return result | |
34 | 58 | |
35 | 59 | def get_context_data(self, **kwargs): |
36 | 60 | context = super(IndexView, self).get_context_data(**kwargs) |
... | ... | @@ -42,17 +66,10 @@ class IndexView(LoginRequiredMixin, NotificationMixin, generic.ListView): |
42 | 66 | elif has_role(self.request.user,'system_admin'): |
43 | 67 | list_courses = queryset.order_by('name') |
44 | 68 | categorys_courses = CourseCategory.objects.all() |
45 | - else: | |
69 | + elif has_role(self.request.user, 'student'): | |
46 | 70 | list_courses = Course.objects.filter(Q(students = True)|Q(students__name = self.request.user.name)).order_by('name') |
47 | 71 | categorys_courses = CourseCategory.objects.filter(course_category__students__name = self.request.user.name).distinct() |
48 | 72 | |
49 | - courses_category = Course.objects.filter(category__name = self.request.GET.get('category')) | |
50 | - none = None | |
51 | - q = self.request.GET.get('category', None) | |
52 | - if q is None: | |
53 | - none = True | |
54 | - context['none'] = none | |
55 | - | |
56 | 73 | paginator = Paginator(list_courses, self.paginate_by) |
57 | 74 | page = self.request.GET.get('page') |
58 | 75 | |
... | ... | @@ -63,23 +80,67 @@ class IndexView(LoginRequiredMixin, NotificationMixin, generic.ListView): |
63 | 80 | except EmptyPage: |
64 | 81 | list_courses = paginator.page(paginator.num_pages) |
65 | 82 | |
66 | - context['courses_category'] = courses_category | |
67 | 83 | context['list_courses'] = list_courses |
68 | 84 | context['categorys_courses'] = categorys_courses |
85 | + context['aparece'] = self.aparece | |
69 | 86 | |
70 | 87 | return context |
71 | 88 | |
89 | +class AllCoursesView(LoginRequiredMixin, NotificationMixin, generic.ListView): | |
90 | + | |
91 | + login_url = reverse_lazy("core:home") | |
92 | + redirect_field_name = 'next' | |
93 | + queryset = Course.objects.all() | |
94 | + template_name = 'course/index.html' | |
95 | + context_object_name = 'courses' | |
96 | + paginate_by = 5 | |
97 | + aparece = True | |
98 | + | |
99 | + | |
72 | 100 | def get_queryset(self): |
101 | + result = super(AllCoursesView, self).get_queryset() | |
102 | + | |
103 | + course_search = self.request.GET.get('q', None) | |
104 | + category_search = self.request.GET.get('category', None) | |
105 | + if course_search: | |
106 | + self.aparece = False | |
107 | + query_list = course_search.split() | |
108 | + result = result.filter( | |
109 | + reduce(operator.and_, | |
110 | + (Q(name__icontains=q) for q in query_list)) | |
111 | + ) | |
112 | + if category_search: | |
113 | + self.aparece = False | |
114 | + query_list = category_search.split() | |
115 | + result = result.filter( | |
116 | + reduce(operator.and_, | |
117 | + (Q(category__name=category) for category in query_list)) | |
118 | + ) | |
119 | + return result | |
120 | + | |
121 | + def get_context_data(self, **kwargs): | |
122 | + context = super(AllCoursesView, self).get_context_data(**kwargs) | |
123 | + list_courses = None | |
124 | + categorys_courses = None | |
125 | + list_courses = Course.objects.all().order_by('name') | |
126 | + categorys_courses = CourseCategory.objects.all().distinct().order_by('name') | |
127 | + | |
128 | + paginator = Paginator(list_courses, self.paginate_by) | |
129 | + page = self.request.GET.get('page') | |
130 | + | |
73 | 131 | try: |
74 | - name = self.kwargs['q'] | |
75 | - except: | |
76 | - name = '' | |
77 | - if (name != ''): | |
78 | - object_list = Course.objects.filter(name__icontains = name) | |
79 | - else: | |
80 | - object_list = Course.objects.all() | |
81 | - return object_list | |
132 | + list_courses = paginator.page(page) | |
133 | + except PageNotAnInteger: | |
134 | + list_courses = paginator.page(1) | |
135 | + except EmptyPage: | |
136 | + list_courses = paginator.page(paginator.num_pages) | |
137 | + | |
138 | + context['list_courses'] = list_courses | |
139 | + context['categorys_courses'] = categorys_courses | |
140 | + context['aparece'] = self.aparece | |
82 | 141 | |
142 | + return context | |
143 | + | |
83 | 144 | class CreateCourseView(LoginRequiredMixin, HasRoleMixin, NotificationMixin,generic.edit.CreateView): |
84 | 145 | |
85 | 146 | allowed_roles = ['professor', 'system_admin'] |
... | ... | @@ -125,7 +186,7 @@ class ReplicateCourseView(LoginRequiredMixin, HasRoleMixin, NotificationMixin,ge |
125 | 186 | if has_role(self.request.user,'system_admin'): |
126 | 187 | courses = Course.objects.all() |
127 | 188 | elif has_role(self.request.user,'professor'): |
128 | - courses = self.request.user.courses.all() | |
189 | + courses = self.request.user.courses_professors.all() | |
129 | 190 | categorys_courses = CourseCategory.objects.all() |
130 | 191 | context['courses'] = courses |
131 | 192 | context['course'] = course |
... | ... | @@ -197,7 +258,7 @@ class DeleteCourseView(LoginRequiredMixin, HasRoleMixin, generic.DeleteView): |
197 | 258 | return context |
198 | 259 | |
199 | 260 | |
200 | -class CourseView( NotificationMixin, generic.DetailView): | |
261 | +class CourseView(NotificationMixin, generic.DetailView): | |
201 | 262 | |
202 | 263 | login_url = reverse_lazy("core:home") |
203 | 264 | redirect_field_name = 'next' |
... | ... | @@ -210,12 +271,20 @@ class CourseView( NotificationMixin, generic.DetailView): |
210 | 271 | courses = None |
211 | 272 | context = super(CourseView, self).get_context_data(**kwargs) |
212 | 273 | course = get_object_or_404(Course, slug = self.kwargs.get('slug')) |
274 | + | |
275 | + category_sub = self.kwargs.get('category', None) | |
276 | + | |
213 | 277 | if has_role(self.request.user,'system_admin'): |
214 | 278 | subjects = course.subjects.all() |
215 | 279 | elif has_role(self.request.user,'professor'): |
216 | 280 | subjects = course.subjects.filter(professors__in=[self.request.user]) |
217 | 281 | elif has_role(self.request.user, 'student') or self.request.user is None: |
218 | 282 | subjects = course.subjects.filter(visible=True) |
283 | + | |
284 | + if not category_sub is None: | |
285 | + cat = get_object_or_404(CategorySubject, slug = category_sub) | |
286 | + subjects = subjects.filter(category = cat) | |
287 | + | |
219 | 288 | context['subjects'] = subjects |
220 | 289 | |
221 | 290 | if has_role(self.request.user,'system_admin'): |
... | ... | @@ -237,13 +306,7 @@ class CourseView( NotificationMixin, generic.DetailView): |
237 | 306 | |
238 | 307 | subjects_category = Subject.objects.filter(category__name = self.request.GET.get('category')) |
239 | 308 | |
240 | - none = None | |
241 | - q = self.request.GET.get('category', None) | |
242 | - if q is None: | |
243 | - none = True | |
244 | - context['none'] = none | |
245 | - | |
246 | - context['subjects_category'] = subjects_category | |
309 | + context['category'] = category_sub | |
247 | 310 | context['categorys_subjects'] = categorys_subjects |
248 | 311 | context['courses'] = courses |
249 | 312 | context['course'] = course |
... | ... | @@ -381,6 +444,14 @@ class SubjectsView(LoginRequiredMixin, generic.ListView): |
381 | 444 | context_object_name = 'subjects' |
382 | 445 | model = Subject |
383 | 446 | |
447 | + def dispatch(self, *args, **kwargs): | |
448 | + subject = get_object_or_404(Subject, slug = self.kwargs.get('slug')) | |
449 | + | |
450 | + if(not has_object_permission('view_subject', self.request.user, subject)): | |
451 | + return self.handle_no_permission() | |
452 | + | |
453 | + return super(SubjectsView, self).dispatch(*args, **kwargs) | |
454 | + | |
384 | 455 | def get_queryset(self): |
385 | 456 | subject = get_object_or_404(Subject, slug = self.kwargs.get('slug')) |
386 | 457 | course = subject.course |
... | ... | @@ -428,6 +499,14 @@ class TopicsView(LoginRequiredMixin, generic.ListView): |
428 | 499 | context_object_name = 'topics' |
429 | 500 | model = Topic |
430 | 501 | |
502 | + def dispatch(self, *args, **kwargs): | |
503 | + topic = get_object_or_404(Topic, slug = self.kwargs.get('slug')) | |
504 | + | |
505 | + if(not has_object_permission('view_topic', self.request.user, topic)): | |
506 | + return self.handle_no_permission() | |
507 | + | |
508 | + return super(TopicsView, self).dispatch(*args, **kwargs) | |
509 | + | |
431 | 510 | def get_queryset(self): |
432 | 511 | topic = get_object_or_404(Topic, slug = self.kwargs.get('slug')) |
433 | 512 | subject = topic.subject |
... | ... | @@ -633,3 +712,12 @@ class IndexSubjectCategoryView(LoginRequiredMixin, generic.ListView): |
633 | 712 | context = super(IndexSubjectCategoryView, self).get_context_data(**kwargs) |
634 | 713 | context['subject_categories'] = SubjectCategory.objects.all() |
635 | 714 | return context |
715 | + | |
716 | +class FileMaterialView(LoginRequiredMixin, generic.DetailView): | |
717 | + | |
718 | + allowed_roles = ['professor', 'system_admin', 'student'] | |
719 | + login_url = reverse_lazy("core:home") | |
720 | + redirect_field_name = 'next' | |
721 | + model = Material | |
722 | + context_object_name = 'file' | |
723 | + template_name = 'topic/file_material_view.html' | |
636 | 724 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,167 @@ |
1 | +# SOME DESCRIPTIVE TITLE. | |
2 | +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER | |
3 | +# This file is distributed under the same license as the PACKAGE package. | |
4 | +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | |
5 | +# | |
6 | +#, fuzzy | |
7 | +msgid "" | |
8 | +msgstr "" | |
9 | +"Project-Id-Version: PACKAGE VERSION\n" | |
10 | +"Report-Msgid-Bugs-To: \n" | |
11 | +"POT-Creation-Date: 2016-10-26 14:47-0300\n" | |
12 | +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | |
13 | +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | |
14 | +"Language-Team: LANGUAGE <LL@li.org>\n" | |
15 | +"Language: \n" | |
16 | +"MIME-Version: 1.0\n" | |
17 | +"Content-Type: text/plain; charset=UTF-8\n" | |
18 | +"Content-Transfer-Encoding: 8bit\n" | |
19 | +"Plural-Forms: nplurals=2; plural=(n > 1);\n" | |
20 | + | |
21 | +#: exam/forms.py:18 exam/forms.py:22 | |
22 | +msgid "It is required one these fields." | |
23 | +msgstr "" | |
24 | + | |
25 | +#: exam/forms.py:33 | |
26 | +msgid "Start date to resolve the exam" | |
27 | +msgstr "Data de início para resolver o exame" | |
28 | + | |
29 | +#: exam/forms.py:35 | |
30 | +msgid "Maximum date permited to resolve the exam" | |
31 | +msgstr "Data máxima permitida para resolver o exame" | |
32 | + | |
33 | +#: exam/models.py:9 | |
34 | +msgid "Begin of Course Date" | |
35 | +msgstr "Data de início do curso" | |
36 | + | |
37 | +#: exam/models.py:10 | |
38 | +msgid "Exibe?" | |
39 | +msgstr "Exibir?" | |
40 | + | |
41 | +#: exam/models.py:13 exam/models.py:35 | |
42 | +msgid "Exam" | |
43 | +msgstr "Exame" | |
44 | + | |
45 | +#: exam/models.py:14 | |
46 | +msgid "Exams" | |
47 | +msgstr "Exames" | |
48 | + | |
49 | +#: exam/models.py:21 exam/models.py:27 | |
50 | +msgid "Answer" | |
51 | +msgstr "Resposta" | |
52 | + | |
53 | +#: exam/models.py:22 | |
54 | +msgid "Order" | |
55 | +msgstr "Ordem" | |
56 | + | |
57 | +#: exam/models.py:23 exam/models.py:28 | |
58 | +msgid "Answers" | |
59 | +msgstr "Respostas" | |
60 | + | |
61 | +#: exam/models.py:34 | |
62 | +msgid "Answered" | |
63 | +msgstr "Respondida" | |
64 | + | |
65 | +#: exam/models.py:36 | |
66 | +msgid "Answers Students" | |
67 | +msgstr "Resposta dos estudantes" | |
68 | + | |
69 | +#: exam/models.py:37 | |
70 | +msgid "Student" | |
71 | +msgstr "Estudante" | |
72 | + | |
73 | +#: exam/models.py:38 | |
74 | +msgid "Answered Date" | |
75 | +msgstr "Data da resposta" | |
76 | + | |
77 | +#: exam/models.py:41 | |
78 | +msgid "Answer Stundent" | |
79 | +msgstr "Resposta do estudante" | |
80 | + | |
81 | +#: exam/models.py:42 | |
82 | +msgid "Answers Student" | |
83 | +msgstr "Respostas dos estudantes" | |
84 | + | |
85 | +#: exam/templates/exam/create.html:9 | |
86 | +msgid "New Exam" | |
87 | +msgstr "Novo exame" | |
88 | + | |
89 | +#: exam/templates/exam/create.html:14 exam/templates/exam/create.html:16 | |
90 | +msgid "Exam Name" | |
91 | +msgstr "Nome do exame" | |
92 | + | |
93 | +#: exam/templates/exam/create.html:20 | |
94 | +msgid "Exam's begin date" | |
95 | +msgstr "Data de início do exame" | |
96 | + | |
97 | +#: exam/templates/exam/create.html:22 | |
98 | +msgid "Begin Date" | |
99 | +msgstr "Data de início" | |
100 | + | |
101 | +#: exam/templates/exam/create.html:26 | |
102 | +msgid "Exam's end date" | |
103 | +msgstr "Data final do exame" | |
104 | + | |
105 | +#: exam/templates/exam/create.html:28 | |
106 | +msgid "End Date" | |
107 | +msgstr "Data final" | |
108 | + | |
109 | +#: exam/templates/exam/create.html:35 | |
110 | +msgid "Allow submissions after deadline?" | |
111 | +msgstr "Permitir submissões após o prazo?" | |
112 | + | |
113 | +#: exam/templates/exam/create.html:44 exam/templates/exam/create.html:47 | |
114 | +msgid "Question Type" | |
115 | +msgstr "Tipo de questão" | |
116 | + | |
117 | +#: exam/templates/exam/create.html:48 | |
118 | +msgid "Multiple Choice" | |
119 | +msgstr "Múltipla escolha" | |
120 | + | |
121 | +#: exam/templates/exam/create.html:49 | |
122 | +msgid "True or False" | |
123 | +msgstr "Verdadeiro ou falso" | |
124 | + | |
125 | +#: exam/templates/exam/create.html:50 | |
126 | +msgid "Gap Filling" | |
127 | +msgstr "Preenchimento de lacunas" | |
128 | + | |
129 | +#: exam/templates/exam/create.html:51 | |
130 | +msgid "Discursive Question" | |
131 | +msgstr "Questão discursiva" | |
132 | + | |
133 | +#: exam/templates/exam/create.html:57 | |
134 | +msgid "add question" | |
135 | +msgstr "Adicionar questão" | |
136 | + | |
137 | +#: exam/templates/exam/create.html:62 | |
138 | +msgid "Create" | |
139 | +msgstr "Criar" | |
140 | + | |
141 | +#: exam/templates/exam/discursive_question.html:2 | |
142 | +#: exam/templates/exam/discursive_question.html:4 | |
143 | +#: exam/templates/exam/multiple_choice_question.html:5 | |
144 | +#: exam/templates/exam/true_or_false_question.html:20 | |
145 | +#: exam/templates/exam/true_or_false_question.html:25 | |
146 | +msgid "Question" | |
147 | +msgstr "Questão" | |
148 | + | |
149 | +#: exam/templates/exam/gap_filling_question.html:2 | |
150 | +msgid "Gap Filling Question" | |
151 | +msgstr "Questão de preenchimento de lacunas" | |
152 | + | |
153 | +#: exam/templates/exam/multiple_choice_question.html:15 | |
154 | +msgid "Alternatives" | |
155 | +msgstr "Alternativas" | |
156 | + | |
157 | +#: exam/templates/exam/true_or_false_answer.html:9 | |
158 | +msgid "Write your alternative" | |
159 | +msgstr "Escreva sua alternativa" | |
160 | + | |
161 | +#: exam/templates/exam/true_or_false_question.html:37 | |
162 | +msgid "Alternatives: T/F" | |
163 | +msgstr "Alternativas: V/F" | |
164 | + | |
165 | +#: exam/templates/exam/true_or_false_question.html:45 | |
166 | +msgid "New Alternative" | |
167 | +msgstr "Nova alternativa" | ... | ... |
exam/templates/exam/create.html.py
... | ... | @@ -74,9 +74,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |
74 | 74 | XXXXXXXXXXXXXXXXXXXXXXXXX X XXXXXX |
75 | 75 | XXX |
76 | 76 | XXX |
77 | - | |
78 | 77 | XXX XXXXXXXXXXXXXXXX X XX |
79 | - | |
80 | 78 | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XX X |
81 | 79 | XXX XXXXXXX X XXXXX XXXXXXXXXXXX XXXXXXXXXXXXXXXX X |
82 | 80 | XXXXXXXXX X |
... | ... | @@ -85,12 +83,9 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XX X |
85 | 83 | XXXXXXXXXX X |
86 | 84 | XXXXXXXXX |
87 | 85 | XXXXXXXXXXXXXXXXXXXXXXXXXXXXX |
88 | - | |
89 | 86 | XXXXXXXXXXXXXXXXXXX |
90 | 87 | XXX |
91 | - | |
92 | 88 | XXX XXXXXXXXXXXXXXXXXX X XX |
93 | - | |
94 | 89 | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XX X |
95 | 90 | XXX XXXXXXX X XXXXX XXXXXXXXXXXX XXXXXXXXXXXXXXXX X |
96 | 91 | XXXXXXXXX X |
... | ... | @@ -104,10 +99,8 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XX X |
104 | 99 | XXXXXXXXXX X |
105 | 100 | XXXXXXXXX |
106 | 101 | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |
107 | - | |
108 | 102 | XXXXXXXXXXXXXXXXXXXXX |
109 | 103 | XXX |
110 | - | |
111 | 104 | XXXXXXXXXXXX X |
112 | 105 | XX XXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXX |
113 | 106 | XXX | ... | ... |
exam/templates/exam/gap_filling_question.html
exam/templates/exam/gap_filling_question.html.py
exam/templates/exam/multiple_choice_question.html
1 | +{% load i18n %} | |
2 | + | |
1 | 3 | <div class="form-group" id="multipleChoice"> |
2 | 4 | |
3 | - <label for="questionName" class="col-md-2 control-label">Question</label> | |
5 | + <label for="questionName" class="col-md-2 control-label">{% trans 'Question' %}</label> | |
4 | 6 | |
5 | 7 | |
6 | 8 | <div class="col-md-10"> |
... | ... | @@ -10,7 +12,7 @@ |
10 | 12 | |
11 | 13 | </div> |
12 | 14 | <div class="form-group"> |
13 | - <label for="alternative" class="col-md-2 control-label">Alternatives</label> | |
15 | + <label for="alternative" class="col-md-2 control-label">{% trans 'Alternatives' %}</label> | |
14 | 16 | <div class="col-md-10" id="radios"> |
15 | 17 | <div class="radio radio-primary"> |
16 | 18 | <label> |
... | ... | @@ -29,7 +31,7 @@ |
29 | 31 | <!-- new alternative button --> |
30 | 32 | <div class="form-group"> |
31 | 33 | <div class="col-md-12 col-md-offset-2"> |
32 | - <button type="button" class="btn btn-primary" id="newAlternative">New Alternative</button> | |
34 | + <button type="button" class="btn btn-primary" id="newAlternative">{% trans 'New Alternative' %]</button> | |
33 | 35 | </div> |
34 | 36 | </div> |
35 | 37 | <div class="form-group"> | ... | ... |
exam/templates/exam/multiple_choice_question.html.py
1 | +BBBB BBBB | |
2 | + | |
1 | 3 | XXXX XXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX |
2 | 4 | |
3 | - XXXXXX XXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
5 | + XXXXXX XXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXX gettext(u'Question') XXXXXXXX | |
4 | 6 | |
5 | 7 | |
6 | 8 | XXXX XXXXXXXXXXXXXXXXXX |
... | ... | @@ -10,7 +12,7 @@ XXXX XXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX |
10 | 12 | |
11 | 13 | XXXXXX |
12 | 14 | XXXX XXXXXXXXXXXXXXXXXXX |
13 | - XXXXXX XXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
15 | + XXXXXX XXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXX gettext(u'Alternatives') XXXXXXXX | |
14 | 16 | XXXX XXXXXXXXXXXXXXXXX XXXXXXXXXXXX |
15 | 17 | XXXX XXXXXXXXXXXX XXXXXXXXXXXXXXX |
16 | 18 | XXXXXXX |
... | ... | @@ -29,7 +31,7 @@ XXXXXX |
29 | 31 | XXXX XXX XXXXXXXXXXX XXXXXX XXX |
30 | 32 | XXXX XXXXXXXXXXXXXXXXXXX |
31 | 33 | XXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXX |
32 | - XXXXXXX XXXXXXXXXXXXX XXXXXXXXXX XXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX | |
34 | + XXXXXXX XXXXXXXXXXXXX XXXXXXXXXX XXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXX XXXXX XXXX XXXXXXXXXXXX XXXXXXXXXXX | |
33 | 35 | XXXXXX |
34 | 36 | XXXXXX |
35 | 37 | XXXX XXXXXXXXXXXXXXXXXXX | ... | ... |
... | ... | @@ -0,0 +1,88 @@ |
1 | +# SOME DESCRIPTIVE TITLE. | |
2 | +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER | |
3 | +# This file is distributed under the same license as the PACKAGE package. | |
4 | +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | |
5 | +# | |
6 | +#, fuzzy | |
7 | +msgid "" | |
8 | +msgstr "" | |
9 | +"Project-Id-Version: PACKAGE VERSION\n" | |
10 | +"Report-Msgid-Bugs-To: \n" | |
11 | +"POT-Creation-Date: 2016-10-26 14:47-0300\n" | |
12 | +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | |
13 | +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | |
14 | +"Language-Team: LANGUAGE <LL@li.org>\n" | |
15 | +"Language: \n" | |
16 | +"MIME-Version: 1.0\n" | |
17 | +"Content-Type: text/plain; charset=UTF-8\n" | |
18 | +"Content-Transfer-Encoding: 8bit\n" | |
19 | +"Plural-Forms: nplurals=2; plural=(n > 1);\n" | |
20 | + | |
21 | +#: files/forms.py:12 files/forms.py:29 | |
22 | +msgid "File too large (Max 10MB)" | |
23 | +msgstr "Arquivo muito grande (máximo de 10MB)" | |
24 | + | |
25 | +#: files/models.py:20 | |
26 | +msgid "Professors" | |
27 | +msgstr "Professores" | |
28 | + | |
29 | +#: files/models.py:21 | |
30 | +msgid "Description" | |
31 | +msgstr "Descrição" | |
32 | + | |
33 | +#: files/models.py:22 files/models.py:27 | |
34 | +msgid "File" | |
35 | +msgstr "Arquivo" | |
36 | + | |
37 | +#: files/models.py:23 | |
38 | +msgid "Type file" | |
39 | +msgstr "Tipo de arquivo" | |
40 | + | |
41 | +#: files/models.py:28 | |
42 | +msgid "Files" | |
43 | +msgstr "Arquivos" | |
44 | + | |
45 | +#: files/templates/files/create_file.html:10 | |
46 | +msgid "Add File" | |
47 | +msgstr "Adicionar arquivo" | |
48 | + | |
49 | +#: files/templates/files/create_file.html:38 | |
50 | +#: files/templates/files/update_file.html:40 | |
51 | +msgid "Choose your file..." | |
52 | +msgstr "Escolha seu arquivo..." | |
53 | + | |
54 | +#: files/templates/files/create_file.html:68 | |
55 | +#: files/templates/files/update_file.html:73 | |
56 | +msgid "The file size shouldnt exceed 10MB" | |
57 | +msgstr "O tamanho máximo não pode exceder 10MB" | |
58 | + | |
59 | +#: files/templates/files/create_file.html:74 | |
60 | +#: files/templates/files/delete_file.html:34 | |
61 | +#: files/templates/files/update_file.html:79 | |
62 | +msgid "Close" | |
63 | +msgstr "Fechar" | |
64 | + | |
65 | +#: files/templates/files/create_file.html:75 | |
66 | +#: files/templates/files/update_file.html:80 | |
67 | +msgid "Submit" | |
68 | +msgstr "Enviar" | |
69 | + | |
70 | +#: files/templates/files/delete_file.html:12 | |
71 | +msgid "Delete File" | |
72 | +msgstr "Deletar arquivo" | |
73 | + | |
74 | +#: files/templates/files/delete_file.html:30 | |
75 | +msgid "Are you sure to delete " | |
76 | +msgstr "Tem certeza que deseja deletar " | |
77 | + | |
78 | +#: files/templates/files/delete_file.html:35 | |
79 | +msgid "Delete" | |
80 | +msgstr "Deletar" | |
81 | + | |
82 | +#: files/templates/files/update_file.html:12 | |
83 | +msgid "Edit File" | |
84 | +msgstr "Editar arquivo" | |
85 | + | |
86 | +#: files/templates/files/update_file.html:48 | |
87 | +msgid "See current file" | |
88 | +msgstr "Visualizar arquivo atual" | ... | ... |
files/templates/files/create_file.html
... | ... | @@ -65,14 +65,14 @@ |
65 | 65 | |
66 | 66 | <div class="form-group"> |
67 | 67 | <div class="col-md-12 text-center"> |
68 | - <p><b>The file size shouldn't exceed 10MB</b></p> | |
68 | + <p><b>{% trans 'The file size shouldnt exceed 10MB' %}</b></p> | |
69 | 69 | </div> |
70 | 70 | </div> |
71 | 71 | |
72 | 72 | <div class="form-group"> |
73 | 73 | <div class="col-md-12"> |
74 | 74 | <button type="button" class="btn btn-danger btn-raised" data-dismiss="modal">{% trans "Close" %}</button> |
75 | - <button class="btn btn-raised btn-primary" type="submit">Submit</button> | |
75 | + <button class="btn btn-raised btn-primary" type="submit">{% trans 'Submit' %}</button> | |
76 | 76 | </div> |
77 | 77 | </div> |
78 | 78 | </fieldset> | ... | ... |
files/templates/files/create_file.html.py
... | ... | @@ -65,14 +65,14 @@ XXXX XXXXXXXXXXXXX |
65 | 65 | |
66 | 66 | XXXX XXXXXXXXXXXXXXXXXXX |
67 | 67 | XXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXX |
68 | - XXXXXXXXX XXXX XXXX XXXXXXXXX XXXXXX XXXXXXXXXXXX | |
68 | + XXXXXX gettext(u'The file size shouldnt exceed 10MB') XXXXXXXX | |
69 | 69 | XXXXXX |
70 | 70 | XXXXXX |
71 | 71 | |
72 | 72 | XXXX XXXXXXXXXXXXXXXXXXX |
73 | 73 | XXXX XXXXXXXXXXXXXXXXXX |
74 | 74 | XXXXXXX XXXXXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXX gettext(u'Close') XXXXXXXXX |
75 | - XXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
75 | + XXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXXXX XXXXXXXXXXXXXX gettext(u'Submit') XXXXXXXXX | |
76 | 76 | XXXXXX |
77 | 77 | XXXXXX |
78 | 78 | XXXXXXXXXXX | ... | ... |
files/templates/files/delete_file.html
... | ... | @@ -32,7 +32,7 @@ |
32 | 32 | <div class="form-group"> |
33 | 33 | <div class="col-md-12"> |
34 | 34 | <button type="button" class="btn btn-danger btn-raised" data-dismiss="modal">{% trans "Close" %}</button> |
35 | - <button class="btn btn-raised btn-primary" type="submit">Delete</button> | |
35 | + <button class="btn btn-raised btn-primary" type="submit">{% trans 'Delete' %}</button> | |
36 | 36 | </div> |
37 | 37 | </div> |
38 | 38 | </fieldset> | ... | ... |
files/templates/files/delete_file.html.py
... | ... | @@ -32,7 +32,7 @@ XXXX XXXXXXXXXXXXXXXXXXXX |
32 | 32 | XXXX XXXXXXXXXXXXXXXXXXX |
33 | 33 | XXXX XXXXXXXXXXXXXXXXXX |
34 | 34 | XXXXXXX XXXXXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXX gettext(u'Close') XXXXXXXXX |
35 | - XXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
35 | + XXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXXXX XXXXXXXXXXXXXX gettext(u'Delete') XXXXXXXXX | |
36 | 36 | XXXXXX |
37 | 37 | XXXXXX |
38 | 38 | XXXXXXXXXXX | ... | ... |
files/templates/files/update_file.html
... | ... | @@ -70,14 +70,14 @@ |
70 | 70 | |
71 | 71 | <div class="form-group"> |
72 | 72 | <div class="col-md-12 text-center"> |
73 | - <p><b>The file size shouldn't exceed 10MB</b></p> | |
73 | + <p><b>{% trans 'The file size shouldnt exceed 10MB' %}</b></p> | |
74 | 74 | </div> |
75 | 75 | </div> |
76 | 76 | |
77 | 77 | <div class="form-group"> |
78 | 78 | <div class="col-md-12"> |
79 | 79 | <button type="button" class="btn btn-danger btn-raised" data-dismiss="modal">{% trans "Close" %}</button> |
80 | - <button class="btn btn-raised btn-primary" type="submit">Submit</button> | |
80 | + <button class="btn btn-raised btn-primary" type="submit">{% trans 'Submit' %}</button> | |
81 | 81 | </div> |
82 | 82 | </div> |
83 | 83 | </fieldset> | ... | ... |
files/templates/files/update_file.html.py
... | ... | @@ -70,14 +70,14 @@ XXXX XXXXXXXXXXXXXXXXXXXX |
70 | 70 | |
71 | 71 | XXXX XXXXXXXXXXXXXXXXXXX |
72 | 72 | XXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXX |
73 | - XXXXXXXXX XXXX XXXX XXXXXXXXX XXXXXX XXXXXXXXXXXX | |
73 | + XXXXXX gettext(u'The file size shouldnt exceed 10MB') XXXXXXXX | |
74 | 74 | XXXXXX |
75 | 75 | XXXXXX |
76 | 76 | |
77 | 77 | XXXX XXXXXXXXXXXXXXXXXXX |
78 | 78 | XXXX XXXXXXXXXXXXXXXXXX |
79 | 79 | XXXXXXX XXXXXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXX gettext(u'Close') XXXXXXXXX |
80 | - XXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
80 | + XXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXXXX XXXXXXXXXXXXXX gettext(u'Submit') XXXXXXXXX | |
81 | 81 | XXXXXX |
82 | 82 | XXXXXX |
83 | 83 | XXXXXXXXXXX | ... | ... |
... | ... | @@ -0,0 +1,250 @@ |
1 | +# SOME DESCRIPTIVE TITLE. | |
2 | +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER | |
3 | +# This file is distributed under the same license as the PACKAGE package. | |
4 | +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | |
5 | +# | |
6 | +#, fuzzy | |
7 | +msgid "" | |
8 | +msgstr "" | |
9 | +"Project-Id-Version: PACKAGE VERSION\n" | |
10 | +"Report-Msgid-Bugs-To: \n" | |
11 | +"POT-Creation-Date: 2016-10-26 14:47-0300\n" | |
12 | +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | |
13 | +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | |
14 | +"Language-Team: LANGUAGE <LL@li.org>\n" | |
15 | +"Language: \n" | |
16 | +"MIME-Version: 1.0\n" | |
17 | +"Content-Type: text/plain; charset=UTF-8\n" | |
18 | +"Content-Transfer-Encoding: 8bit\n" | |
19 | +"Plural-Forms: nplurals=2; plural=(n > 1);\n" | |
20 | + | |
21 | +#: forum/forms.py:11 | |
22 | +msgid "Title" | |
23 | +msgstr "Título" | |
24 | + | |
25 | +#: forum/forms.py:12 forum/models.py:14 | |
26 | +#: forum/templates/forum/forum_list.html:23 | |
27 | +#: forum/templates/forum/forum_view.html:58 | |
28 | +#: forum/templates/forum/render_forum.html:4 | |
29 | +msgid "Description" | |
30 | +msgstr "Descrição" | |
31 | + | |
32 | +#: forum/forms.py:13 | |
33 | +msgid "Limit Date" | |
34 | +msgstr "Data limite" | |
35 | + | |
36 | +#: forum/forms.py:16 | |
37 | +msgid "Forum title" | |
38 | +msgstr "Título do fórum" | |
39 | + | |
40 | +#: forum/forms.py:17 | |
41 | +msgid "What is this forum about?" | |
42 | +msgstr "Qual o assunto deste fórum?" | |
43 | + | |
44 | +#: forum/forms.py:18 | |
45 | +msgid "Limit date for students post on this forum" | |
46 | +msgstr "Data limite para estudantes postarem neste fórum" | |
47 | + | |
48 | +#: forum/forms.py:33 forum/forms.py:46 | |
49 | +msgid "Message" | |
50 | +msgstr "Mensagem" | |
51 | + | |
52 | +#: forum/models.py:15 forum/models.py:33 forum/models.py:61 | |
53 | +msgid "Modification Date" | |
54 | +msgstr "Data de modificação" | |
55 | + | |
56 | +#: forum/models.py:16 | |
57 | +msgid "Create Date" | |
58 | +msgstr "Data de criação" | |
59 | + | |
60 | +#: forum/models.py:19 forum/models.py:35 | |
61 | +#: forum/templates/forum/forum_view.html:16 | |
62 | +#: forum/templates/forum/forum_view.html:116 | |
63 | +msgid "Forum" | |
64 | +msgstr "Fórum" | |
65 | + | |
66 | +#: forum/models.py:20 | |
67 | +msgid "Foruns" | |
68 | +msgstr "Fóruns" | |
69 | + | |
70 | +#: forum/models.py:31 forum/models.py:58 | |
71 | +msgid "Autor" | |
72 | +msgstr "Autor" | |
73 | + | |
74 | +#: forum/models.py:32 | |
75 | +msgid "Post message" | |
76 | +msgstr "Postar mensagem" | |
77 | + | |
78 | +#: forum/models.py:34 | |
79 | +msgid "Post Date" | |
80 | +msgstr "Data de postagem" | |
81 | + | |
82 | +#: forum/models.py:38 forum/models.py:59 | |
83 | +msgid "Post" | |
84 | +msgstr "Postar" | |
85 | + | |
86 | +#: forum/models.py:39 | |
87 | +msgid "Posts" | |
88 | +msgstr "Postagens" | |
89 | + | |
90 | +#: forum/models.py:60 | |
91 | +msgid "Answer message" | |
92 | +msgstr "Resposta" | |
93 | + | |
94 | +#: forum/models.py:62 | |
95 | +msgid "Answer Date" | |
96 | +msgstr "Data da resposta" | |
97 | + | |
98 | +#: forum/models.py:65 | |
99 | +msgid "Post Answer" | |
100 | +msgstr "Postar resposta" | |
101 | + | |
102 | +#: forum/models.py:66 | |
103 | +msgid "Post Answers" | |
104 | +msgstr "Postar respostas" | |
105 | + | |
106 | +#: forum/templates/forum/forum_list.html:16 | |
107 | +#: forum/templates/forum/forum_view.html:44 | |
108 | +#: forum/templates/post/post_list.html:20 | |
109 | +#: forum/templates/post/post_load_more_render.html:20 | |
110 | +#: forum/templates/post/post_render.html:18 | |
111 | +#: forum/templates/post_answers/post_answer_list.html:17 | |
112 | +#: forum/templates/post_answers/post_answer_load_more_render.html:17 | |
113 | +#: forum/templates/post_answers/post_answer_render.html:15 | |
114 | +msgid "Edit" | |
115 | +msgstr "Editar" | |
116 | + | |
117 | +#: forum/templates/forum/forum_list.html:17 | |
118 | +#: forum/templates/forum/forum_view.html:45 | |
119 | +msgid "Are you sure you want to delete this forum?" | |
120 | +msgstr "Tem certeza que deseja deletar este fórum?" | |
121 | + | |
122 | +#: forum/templates/forum/forum_list.html:17 | |
123 | +#: forum/templates/forum/forum_view.html:45 | |
124 | +msgid "Delete" | |
125 | +msgstr "Deletar" | |
126 | + | |
127 | +#: forum/templates/forum/forum_list.html:24 | |
128 | +#: forum/templates/forum/forum_view.html:59 | |
129 | +#: forum/templates/forum/render_forum.html:5 | |
130 | +msgid "Opened in" | |
131 | +msgstr "Aberto em" | |
132 | + | |
133 | +#: forum/templates/forum/forum_list.html:59 | |
134 | +#: forum/templates/forum/forum_view.html:91 | |
135 | +#: forum/templates/post_answers/post_answer_form.html:38 | |
136 | +msgid "send" | |
137 | +msgstr "Enviar" | |
138 | + | |
139 | +#: forum/templates/forum/forum_view.html:13 | |
140 | +msgid "Home" | |
141 | +msgstr "Início" | |
142 | + | |
143 | +#: forum/templates/forum/forum_view.html:27 | |
144 | +msgid "Menu" | |
145 | +msgstr "Menu" | |
146 | + | |
147 | +#: forum/templates/forum/forum_view.html:31 | |
148 | +msgid "Profile" | |
149 | +msgstr "Perfil" | |
150 | + | |
151 | +#: forum/templates/forum/forum_view.html:32 | |
152 | +msgid "My Courses" | |
153 | +msgstr "Meus cursos" | |
154 | + | |
155 | +#: forum/templates/forum/forum_view.html:40 | |
156 | +msgid "Actions" | |
157 | +msgstr "Ações" | |
158 | + | |
159 | +#: forum/templates/forum/forum_view.html:44 | |
160 | +msgid "Forum edited successfully!" | |
161 | +msgstr "Fórum editado com sucesso!" | |
162 | + | |
163 | +#: forum/templates/forum/forum_view.html:124 | |
164 | +msgid "Close" | |
165 | +msgstr "Fechar" | |
166 | + | |
167 | +#: forum/templates/forum/forum_view.html:125 | |
168 | +msgid "Update" | |
169 | +msgstr "Atualizar" | |
170 | + | |
171 | +#: forum/templates/post/post_list.html:11 | |
172 | +#: forum/templates/post/post_load_more_render.html:11 | |
173 | +#: forum/templates/post/post_render.html:9 | |
174 | +msgid "reply" | |
175 | +msgstr "Responder" | |
176 | + | |
177 | +#: forum/templates/post/post_list.html:20 | |
178 | +#: forum/templates/post/post_load_more_render.html:20 | |
179 | +#: forum/templates/post/post_render.html:18 | |
180 | +msgid "Post edited successfully!" | |
181 | +msgstr "Post editado com sucesso!" | |
182 | + | |
183 | +#: forum/templates/post/post_list.html:21 | |
184 | +#: forum/templates/post/post_load_more_render.html:21 | |
185 | +#: forum/templates/post/post_render.html:19 | |
186 | +#: forum/templates/post_answers/post_answer_list.html:18 | |
187 | +#: forum/templates/post_answers/post_answer_load_more_render.html:18 | |
188 | +#: forum/templates/post_answers/post_answer_render.html:16 | |
189 | +msgid "Remove" | |
190 | +msgstr "Remover" | |
191 | + | |
192 | +#: forum/templates/post/post_list.html:30 | |
193 | +#: forum/templates/post/post_load_more_render.html:30 | |
194 | +#: forum/templates/post/post_render.html:28 | |
195 | +#: forum/templates/post_answers/post_answer_list.html:26 | |
196 | +#: forum/templates/post_answers/post_answer_load_more_render.html:26 | |
197 | +#: forum/templates/post_answers/post_answer_render.html:24 | |
198 | +msgid "ago" | |
199 | +msgstr "atrás" | |
200 | + | |
201 | +#: forum/templates/post/post_list.html:32 | |
202 | +#: forum/templates/post/post_load_more_render.html:32 | |
203 | +#: forum/templates/post/post_render.html:30 | |
204 | +#: forum/templates/post_answers/post_answer_list.html:28 | |
205 | +#: forum/templates/post_answers/post_answer_load_more_render.html:28 | |
206 | +#: forum/templates/post_answers/post_answer_render.html:26 | |
207 | +msgid "Edited" | |
208 | +msgstr "Editado" | |
209 | + | |
210 | +#: forum/templates/post/post_list.html:54 forum/views.py:196 | |
211 | +msgid "Load more posts" | |
212 | +msgstr "Carregar mais postagens" | |
213 | + | |
214 | +#: forum/templates/post/post_update_form.html:32 | |
215 | +#: forum/templates/post_answers/post_answer_form.html:32 | |
216 | +msgid "Cancel" | |
217 | +msgstr "Cancelar" | |
218 | + | |
219 | +#: forum/templates/post/post_update_form.html:33 | |
220 | +#: forum/templates/post_answers/post_answer_form.html:33 | |
221 | +msgid "Save changes" | |
222 | +msgstr "Salvar mudanças" | |
223 | + | |
224 | +#: forum/templates/post_answers/post_answer_list.html:17 | |
225 | +#: forum/templates/post_answers/post_answer_load_more_render.html:17 | |
226 | +#: forum/templates/post_answers/post_answer_render.html:15 | |
227 | +msgid "Answer edited sucessfully!" | |
228 | +msgstr "Resposta editada com sucesso!" | |
229 | + | |
230 | +#: forum/templates/post_answers/post_answer_list.html:18 | |
231 | +#: forum/templates/post_answers/post_answer_load_more_render.html:18 | |
232 | +#: forum/templates/post_answers/post_answer_render.html:16 | |
233 | +msgid "Are you sure you want to delete this answer?" | |
234 | +msgstr "Tem certeza que deseja deletar esta resposta?" | |
235 | + | |
236 | +#: forum/templates/post_answers/post_answer_list.html:42 forum/views.py:295 | |
237 | +msgid "Load more answers" | |
238 | +msgstr "Carregar mais respostas" | |
239 | + | |
240 | +#: forum/views.py:130 | |
241 | +msgid "Forum deleted successfully." | |
242 | +msgstr "Fórum deletado com sucesso." | |
243 | + | |
244 | +#: forum/views.py:253 | |
245 | +msgid "Post deleted successfully." | |
246 | +msgstr "Postagem deletada com sucesso." | |
247 | + | |
248 | +#: forum/views.py:365 | |
249 | +msgid "Post answer deleted successfully." | |
250 | +msgstr "Resposta deletada com sucesso." | ... | ... |
... | ... | @@ -0,0 +1,32 @@ |
1 | +from rolepermissions.permissions import register_object_checker | |
2 | +from amadeus.roles import SystemAdmin | |
3 | + | |
4 | +@register_object_checker() | |
5 | +def view_forum(role, user, forum): | |
6 | + if (role == SystemAdmin): | |
7 | + return True | |
8 | + | |
9 | + if (user in forum.topic.subject.professors.all() or user in forum.topic.subject.students.all()): | |
10 | + return True | |
11 | + | |
12 | + return False | |
13 | + | |
14 | +@register_object_checker() | |
15 | +def edit_forum(role, user, forum): | |
16 | + if (role == SystemAdmin): | |
17 | + return True | |
18 | + | |
19 | + if (user in forum.topic.subject.professors.all()): | |
20 | + return True | |
21 | + | |
22 | + return False | |
23 | + | |
24 | +@register_object_checker() | |
25 | +def delete_forum(role, user, forum): | |
26 | + if (role == SystemAdmin): | |
27 | + return True | |
28 | + | |
29 | + if (user in forum.topic.subject.professors.all()): | |
30 | + return True | |
31 | + | |
32 | + return False | ... | ... |
forum/static/js/forum.js
... | ... | @@ -47,7 +47,7 @@ function createForum(url, topic) { |
47 | 47 | $(".forum_form").html(data); |
48 | 48 | $("#id_topic").val(topic); |
49 | 49 | |
50 | - setForumCreateFormSubmit(); | |
50 | + setForumCreateFormSubmit(topic); | |
51 | 51 | } |
52 | 52 | }); |
53 | 53 | |
... | ... | @@ -59,7 +59,7 @@ function createForum(url, topic) { |
59 | 59 | * Function to set the forum's create form submit function |
60 | 60 | * |
61 | 61 | */ |
62 | -function setForumCreateFormSubmit() { | |
62 | +function setForumCreateFormSubmit(topic) { | |
63 | 63 | $('.date-picker').datepicker({ |
64 | 64 | language: locale, |
65 | 65 | }); |
... | ... | @@ -70,16 +70,15 @@ function setForumCreateFormSubmit() { |
70 | 70 | type: frm.attr('method'), |
71 | 71 | url: frm.attr('action'), |
72 | 72 | data: frm.serialize(), |
73 | + dataType: "json", | |
73 | 74 | success: function (data) { |
74 | - data = data.split('-'); | |
75 | - | |
76 | - $('.foruns_list').append("<li><i class='fa fa-commenting' aria-hidden='true'></i> <a id='forum_"+data[1]+"' href='"+data[0]+"'> "+data[2]+"</a></li>"); | |
75 | + $(".topic_" + topic).find('.foruns_list').append("<li><i class='fa fa-commenting' aria-hidden='true'></i> <a id='forum_"+data.forum_id+"' href='"+data.url+"'> "+data.name+"</a></li>"); | |
77 | 76 | |
78 | 77 | $("#createForum").modal('hide'); |
79 | 78 | }, |
80 | 79 | error: function(data) { |
81 | 80 | $(".forum_form").html(data.responseText); |
82 | - setForumCreateFormSubmit(); | |
81 | + setForumCreateFormSubmit(topic); | |
83 | 82 | } |
84 | 83 | }); |
85 | 84 | return false; |
... | ... | @@ -183,7 +182,7 @@ function edit_post(url, post_id, success_message) { |
183 | 182 | success: function (data) { |
184 | 183 | alertify.success(success_message); |
185 | 184 | |
186 | - $("#post_"+post_id).parent().after(data); | |
185 | + $("#post_"+post_id).parent().after(data.html); | |
187 | 186 | frm.parent().parent().remove(); |
188 | 187 | }, |
189 | 188 | error: function(data) { |
... | ... | @@ -345,7 +344,7 @@ function edit_post_answer(url, answer_id, success_message) { |
345 | 344 | success: function (data) { |
346 | 345 | alertify.success(success_message); |
347 | 346 | |
348 | - $("#answer_"+answer_id).parent().after(data); | |
347 | + $("#answer_"+answer_id).parent().after(data.html); | |
349 | 348 | frm.parent().parent().remove(); |
350 | 349 | }, |
351 | 350 | error: function(data) { | ... | ... |
forum/templates/forum/forum_form.html
... | ... | @@ -7,6 +7,10 @@ |
7 | 7 | <div class="form-group {% if form.has_error %} has-error {% endif %} is-fileinput"> |
8 | 8 | {% if field.field.widget.input_type == 'hidden' %} |
9 | 9 | {% render_field field class='form-control' %} |
10 | + {% elif field.auto_id == 'id_limit_date' %} | |
11 | + <label for="{{ field.auto_id }}">{{ field.label }}</label> | |
12 | + <input type="text" class="form-control date-picker"name="{{field.name}}" value="{{field.value|date:'SHORT_DATE_FORMAT'}}" id="{{ field.auto_id }}"> | |
13 | + <span id="helpBlock" class="help-block">{{ field.help_text }}</span> | |
10 | 14 | {% else %} |
11 | 15 | <label for="{{ field.auto_id }}">{{ field.label }}</label> |
12 | 16 | {% render_field field %} | ... | ... |
forum/templates/forum/forum_list.html
forum/templates/forum/forum_list.html.py
... | ... | @@ -56,7 +56,7 @@ XXXXX XXXXXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXBBB BBBBBBBBBBBBBBBBBBBBBBBBBBX XXXXX |
56 | 56 | BBBBB |
57 | 57 | XXXXX XXXXXXXXXXXXXXXXXXXXXXXX |
58 | 58 | XXXXXXX XXXXXXXXXXXXX XXXXXXXXXX XXXXXXX XXXXXXXXXXXXXX |
59 | - XX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
59 | + XX XXXXXXXXXXXXXXXXXXXXXXX gettext(u'send') XXXX | |
60 | 60 | XXXXXXXXX |
61 | 61 | XXXXXXX |
62 | 62 | XXXXXX | ... | ... |
forum/templates/forum/forum_view.html
... | ... | @@ -34,7 +34,7 @@ |
34 | 34 | </div> |
35 | 35 | </div> |
36 | 36 | |
37 | - {% if request.user|has_role:'system_admin' or request.user|has_role:'professor' and request.user == post.user %} | |
37 | + {% if request.user|has_role:'system_admin' or request.user|has_role:'professor' and request.user in forum.topic.subject.professors.all %} | |
38 | 38 | <div class="panel panel-primary navigation"> |
39 | 39 | <div class="panel-heading"> |
40 | 40 | <h3 class="panel-title">{% trans 'Actions' %}</h3> |
... | ... | @@ -88,7 +88,7 @@ |
88 | 88 | {% endif %} |
89 | 89 | <span class="input-group-btn"> |
90 | 90 | <button type="submit" class="btn btn-fab btn-fab-mini"> |
91 | - <i class="material-icons">send</i> | |
91 | + <i class="material-icons">{% trans 'send' %}</i> | |
92 | 92 | </button> |
93 | 93 | </span> |
94 | 94 | </div> | ... | ... |
forum/templates/forum/forum_view.html.py
... | ... | @@ -34,7 +34,7 @@ BBBBB BBBBBBB |
34 | 34 | XXXXXX |
35 | 35 | XXXXXX |
36 | 36 | |
37 | - BB BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB BB BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB BBB BBBBBBBBBBBB BB BBBBBBBBB | |
37 | + BB BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB BB BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB BBB BBBBBBBBBBBB BB BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB | |
38 | 38 | XXXX XXXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXXXXX |
39 | 39 | XXXX XXXXXXXXXXXXXXXXXXXXXX |
40 | 40 | XXX XXXXXXXXXXXXXXXXXXXX gettext(u'Actions') XXXXX |
... | ... | @@ -88,7 +88,7 @@ BBBBB BBBBBBB |
88 | 88 | BBBBB |
89 | 89 | XXXXX XXXXXXXXXXXXXXXXXXXXXXXX |
90 | 90 | XXXXXXX XXXXXXXXXXXXX XXXXXXXXXX XXXXXXX XXXXXXXXXXXXXX |
91 | - XX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
91 | + XX XXXXXXXXXXXXXXXXXXXXXXX gettext(u'send') XXXX | |
92 | 92 | XXXXXXXXX |
93 | 93 | XXXXXXX |
94 | 94 | XXXXXX | ... | ... |
forum/templates/post/post_list.html
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 | {{ post.user }} |
9 | 9 | <div class="pull-right"> |
10 | 10 | <a href="javascript:answer('{{ post.id }}', '{% url 'course:forum:reply_post' %}');"> |
11 | - <i class="material-icons">reply</i> | |
11 | + <i class="material-icons">{% trans 'reply' %}</i> | |
12 | 12 | </a> |
13 | 13 | {% if request.user|has_role:'system_admin' or request.user == post.user %} |
14 | 14 | {% csrf_token %} | ... | ... |
forum/templates/post/post_list.html.py
... | ... | @@ -8,7 +8,7 @@ BB BBBBBBBBBBBB B B |
8 | 8 | |
9 | 9 | XXXX XXXXXXXXXXXXXXXXXXX |
10 | 10 | XX XXXXXXXXXXXXXXXXXXXXXXXXXXX XBBB BBBBBBBBBBBBBBBBBBBBBBBBBXXXXX |
11 | - XX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
11 | + XX XXXXXXXXXXXXXXXXXXXXXXX gettext(u'reply') XXXX | |
12 | 12 | XXXX |
13 | 13 | BB BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB BB BBBBBBBBBBBB BB BBBBBBBBB |
14 | 14 | BBBBBBBBBB | ... | ... |
forum/templates/post/post_load_more_render.html
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 | {{ post.user }} |
9 | 9 | <div class="pull-right"> |
10 | 10 | <a href="javascript:answer('{{ post.id }}', '{% url 'course:forum:reply_post' %}');"> |
11 | - <i class="material-icons">reply</i> | |
11 | + <i class="material-icons">{% trans 'reply' %}</i> | |
12 | 12 | </a> |
13 | 13 | {% if request.user|has_role:'system_admin' or request.user == post.user %} |
14 | 14 | {% csrf_token %} | ... | ... |
... | ... | @@ -0,0 +1,50 @@ |
1 | +BBBB BBBB BBBBBBBBBBBBBBB BBBBBBBBBBBBBBBB | |
2 | + | |
3 | +BB BBBBBBBBBBBB B B | |
4 | + BBB BBBB BB BBBBB | |
5 | + XXXX XXXXXXXXXX XXXXXXXX | |
6 | + XXXX XXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXX | |
7 | + XXX XXXXXXXXXXXXXXXXXX | |
8 | + | |
9 | + XXXX XXXXXXXXXXXXXXXXXXX | |
10 | + XX XXXXXXXXXXXXXXXXXXXXXXXXXXX XBBB BBBBBBBBBBBBBBBBBBBBBBBBBXXXXX | |
11 | + XX XXXXXXXXXXXXXXXXXXXXXXX gettext(u'reply') XXXX | |
12 | + XXXX | |
13 | + BB BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB BB BBBBBBBBBBBB BB BBBBBBBBB | |
14 | + BBBBBBBBBB | |
15 | + XXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXX | |
16 | + XX XXXXXXXXXX XXXXXXXXXXX XXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXX | |
17 | + XX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
18 | + XXXX | |
19 | + XXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
20 | + XXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXBBB BBBBBBBBBBBBBBBBBBBBBBBBBB BBBBBBBXX XXX X gettext(u'Post edited successfully!') XXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX gettext(u'Edit') XXXXXXXXX | |
21 | + XXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXBBB BBBBBBBBBBBBBBBBBBBBBBBBBB BBBBBBBXX XXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX gettext(u'Remove') XXXXXXXXX | |
22 | + XXXXX | |
23 | + XXXXXX | |
24 | + BBBBB | |
25 | + XXXXXX | |
26 | + XXXXX | |
27 | + XXXX XXXXXXXXXXXXXXXXXXXXX | |
28 | + XXXX XXXXXXXXXXXXXXXXXX | |
29 | + XX XXXXXXXXXXXXXXXXXXXXX | |
30 | + XX XXXXXXXXX XXXXXXXXXXXXXXXX FFFFFFFFF gettext(u'ago') | |
31 | + BB BBBBBBBBBBBBBBBB | |
32 | + XXXX X gettext(u'Edited') XXXXX | |
33 | + BBBBB | |
34 | + XXXX | |
35 | + XXXXXX | |
36 | + XX XXXXXXXXXXXXXXXXXXXXXFFFFFFFFFFXXXX | |
37 | + XXXXXX | |
38 | + XXXX XXXXXXXXXXXXXXXXXXXXXXXXXX | |
39 | + XXXX XXXXXXXXXXXXXXXXXXXX | |
40 | + BBBBBBBBBBBBBBBB BBBBBBB BBBB | |
41 | + XXXXXX | |
42 | + XXXX XXXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXX XXXXXXXXXXXXXXX XXXXXX | |
43 | + XXXXXXXX | |
44 | + XXXXX XXXXXXXXX XXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXX | |
45 | + XXXXXXXXX | |
46 | + XXXXXX | |
47 | + XXXXXX | |
48 | + XXXXXX | |
49 | + BBBBBB | |
50 | +BBBBB | |
0 | 51 | \ No newline at end of file | ... | ... |
forum/templates/post/post_render.html
... | ... | @@ -6,7 +6,7 @@ |
6 | 6 | {{ post.user }} |
7 | 7 | <div class="pull-right"> |
8 | 8 | <a href="javascript:answer('{{ post.id }}', '{% url 'course:forum:reply_post' %}');"> |
9 | - <i class="material-icons">reply</i> | |
9 | + <i class="material-icons">{% trans 'reply' %}</i> | |
10 | 10 | </a> |
11 | 11 | {% if request.user|has_role:'system_admin' or request.user|has_role:'professor' and request.user == post.user %} |
12 | 12 | {% csrf_token %} | ... | ... |
forum/templates/post/post_render.html.py
1 | 1 | BBBB BBBB BBBBBBBBBBBBBBB BBBBBBBBBBBBBBBB |
2 | 2 | |
3 | -XXXX XXXXXXXXXXXX | |
3 | +XXXX XXXXXXXXXX XXXXXXXXXX | |
4 | 4 | XXXX XXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXX |
5 | 5 | XXX XXXXXXXXXXXXXXXXXX |
6 | 6 | |
7 | 7 | XXXX XXXXXXXXXXXXXXXXXXX |
8 | 8 | XX XXXXXXXXXXXXXXXXXXXXXXXXXXX XBBB BBBBBBBBBBBBBBBBBBBBBBBBBXXXXX |
9 | - XX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
9 | + XX XXXXXXXXXXXXXXXXXXXXXXX gettext(u'reply') XXXX | |
10 | 10 | XXXX |
11 | 11 | BB BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB BB BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB BBB BBBBBBBBBBBB BB BBBBBBBBB |
12 | 12 | BBBBBBBBBB |
... | ... | @@ -15,7 +15,7 @@ XXXX XXXXXXXXXXXX |
15 | 15 | XX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |
16 | 16 | XXXX |
17 | 17 | XXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |
18 | - XXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXBBB BBBBBBBBBBBBBBBBBBBBBBBBBB BBBBBBBXX XXX X gettext(u'Post edited successfully!') XXXXXXXXX | |
18 | + XXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXBBB BBBBBBBBBBBBBBBBBBBBBBBBBB BBBBBBBXX XXX X gettext(u'Post edited successfully!') XXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX gettext(u'Edit') XXXXXXXXX | |
19 | 19 | XXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXBBB BBBBBBBBBBBBBBBBBBBBBBBBBB BBBBBBBXX XXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX gettext(u'Remove') XXXXXXXXX |
20 | 20 | XXXXX |
21 | 21 | XXXXXX |
... | ... | @@ -26,7 +26,7 @@ XXXX XXXXXXXXXXXX |
26 | 26 | XXXX XXXXXXXXXXXXXXXXXX |
27 | 27 | XX XXXXXXXXXXXXXXXXXXXXX |
28 | 28 | XX XXXXXXXXX XXXXXXXXXXXXXXXX FFFFFFFFF gettext(u'ago') |
29 | - BB BBBBBBBBBBBBBB BB BBBBBBBBBBBBBBBBBBBBB | |
29 | + BB BBBBBBBBBBBBBBBB | |
30 | 30 | XXXX X gettext(u'Edited') XXXXX |
31 | 31 | BBBBB |
32 | 32 | XXXX | ... | ... |
forum/templates/post_answers/post_answer_form.html
forum/templates/post_answers/post_answer_form.html.py
... | ... | @@ -35,7 +35,7 @@ XXXXX XXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXBB BBBBBBBBB BBBBBBBBBBBBBB |
35 | 35 | BBBB |
36 | 36 | XXXXX XXXXXXXXXXXXXXXXXXXXXXXX |
37 | 37 | XXXXXXX XXXXXXXXXXXXX XXXXXXXXXX XXXXXXX XXXXXXXXXXXXXX |
38 | - XX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
38 | + XX XXXXXXXXXXXXXXXXXXXXXXX gettext(u'send') XXXX | |
39 | 39 | XXXXXXXXX |
40 | 40 | XXXXXXX |
41 | 41 | BBBBB | ... | ... |
forum/templates/post_answers/post_answer_load_more_render.html.py
0 → 100644
... | ... | @@ -0,0 +1,38 @@ |
1 | +BBBB BBBB BBBBBBBBBBBBBBB | |
2 | + | |
3 | +BB BBBBBBBBBBBBBB B B | |
4 | + BBB BBBBBB BB BBBBBBB | |
5 | + XXXX XXXXXXXXXXXXXXX | |
6 | + XXXX XXXXXXXXXXXX XXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXX | |
7 | + XXXX XXXXXXXXXXXXXXXX XXXXXXXXXXX | |
8 | + XXX XXXXXXXXXXXXXXXXXX | |
9 | + | |
10 | + BB BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB BB BBBBBBBBBBBB BB BBBBBBBBBBB | |
11 | + XXXX XXXXXXXXXXXXXXXXXXX | |
12 | + XXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXX | |
13 | + XX XXXXXXXXXX XXXXXXXXXXX XXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXX | |
14 | + XX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
15 | + XXXX | |
16 | + XXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
17 | + XXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXBBB BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB BBBBBBBBBXX XXX X gettext(u'Answer edited sucessfully!') XXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX gettext(u'Edit') XXXXXXXXX | |
18 | + XXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXBBB BBBBBBBBBBBBBBBBBBBBBBBBBBBB BBBBBBBBBXX XXX X gettext(u'Are you sure you want to delete this answer?') XXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX gettext(u'Remove') XXXXXXXXX | |
19 | + XXXXX | |
20 | + XXXXXX | |
21 | + XXXXXX | |
22 | + BBBBB | |
23 | + XXXXX | |
24 | + XXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
25 | + XXXX XXXXXXXXXXXXXXXXXX | |
26 | + XX XXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXX XXXXXXXXXXXXXXXX FFFFFFFFF gettext(u'ago') | |
27 | + BB BBBBBBBBBBBBBBBBBB | |
28 | + XXXX X gettext(u'Edited') XXXXX | |
29 | + BBBBB | |
30 | + XXXX | |
31 | + XXXXXX | |
32 | + XX XXXXXXXXXXXXXXXXXXXXXFFFFFFFFFFXXXX | |
33 | + XXXXXX | |
34 | + XXXXXX | |
35 | + XXXXXX | |
36 | + XXXXXX | |
37 | + BBBBBB | |
38 | +BBBBB | |
0 | 39 | \ No newline at end of file | ... | ... |
forum/templates/post_answers/post_answer_render.html.py
forum/tests/test_model_answer.py
forum/tests/test_model_forum.py
forum/tests/test_model_post.py
forum/tests/test_view_forum.py
... | ... | @@ -42,13 +42,11 @@ class ForumViewTestCase (TestCase): |
42 | 42 | |
43 | 43 | self.category = CourseCategory.objects.create( |
44 | 44 | name = 'Category test', |
45 | - slug = 'category_test' | |
46 | 45 | ) |
47 | 46 | self.category.save() |
48 | 47 | |
49 | 48 | self.course = Course.objects.create( |
50 | 49 | name = 'Course Test', |
51 | - slug = 'course_test', | |
52 | 50 | max_students = 50, |
53 | 51 | init_register_date = '2016-08-26', |
54 | 52 | end_register_date = '2016-10-01', |
... | ... | @@ -60,7 +58,6 @@ class ForumViewTestCase (TestCase): |
60 | 58 | |
61 | 59 | self.subject = Subject.objects.create( |
62 | 60 | name = 'Subject Test', |
63 | - slug='subject-test', | |
64 | 61 | description = "description of the subject test", |
65 | 62 | visible = True, |
66 | 63 | course = self.course, |
... | ... | @@ -80,7 +77,6 @@ class ForumViewTestCase (TestCase): |
80 | 77 | self.forum = Forum.objects.create( |
81 | 78 | topic=self.topic, |
82 | 79 | name = 'forum test', |
83 | - slug='forum-test', | |
84 | 80 | description = 'description of the forum test', |
85 | 81 | create_date = '2016-10-02', |
86 | 82 | modification_date = '2016-10-03', |
... | ... | @@ -124,22 +120,16 @@ class ForumViewTestCase (TestCase): |
124 | 120 | self.assertEquals(response.status_code, 200) |
125 | 121 | |
126 | 122 | response = self.client_professor.get(url) |
127 | - self.assertEquals(response.status_code, 200) | |
123 | + self.assertEquals(response.status_code, 302) | |
128 | 124 | |
129 | 125 | response = self.client_student.get(url) |
130 | - self.assertEquals(response.status_code, 200) | |
126 | + self.assertEquals(response.status_code, 302) | |
131 | 127 | |
132 | 128 | def test_ForumDetail_context(self): |
133 | 129 | url = reverse('course:forum:view', kwargs={'slug':self.forum.slug}) |
134 | 130 | |
135 | 131 | response = self.client.get(url) |
136 | - self.assertTrue('forum' in response.context) | |
137 | - | |
138 | - response = self.client_professor.get(url) | |
139 | - self.assertTrue('forum' in response.context) | |
140 | - | |
141 | - response = self.client_student.get(url) | |
142 | - self.assertTrue('forum' in response.context) | |
132 | + self.assertTrue('form' in response.context) | |
143 | 133 | |
144 | 134 | |
145 | 135 | ######################### CreateForumView ######################### |
... | ... | @@ -180,7 +170,7 @@ class ForumViewTestCase (TestCase): |
180 | 170 | self.assertEquals(list_forum, Forum.objects.all().count()) |
181 | 171 | |
182 | 172 | response = self.client_student.post(url, data) |
183 | - self.assertEquals (response.status_code, 400) | |
173 | + self.assertEquals (response.status_code, 403) | |
184 | 174 | self.assertEquals(list_forum, Forum.objects.all().count()) |
185 | 175 | |
186 | 176 | def test_CreateForum_form_ok (self): |
... | ... | @@ -214,20 +204,7 @@ class ForumViewTestCase (TestCase): |
214 | 204 | self.assertEquals(response.status_code, 200) |
215 | 205 | |
216 | 206 | response = self.client_professor.get(url) |
217 | - self.assertEquals(response.status_code, 200) | |
218 | - | |
219 | - #response = self.client_student.get(url) | |
220 | - #self.assertEquals(response.status_code, 400) | |
221 | - | |
222 | - | |
223 | - def test_UpdateForum_context(self): | |
224 | - url = reverse('course:forum:update', kwargs={'pk':self.forum.pk}) | |
225 | - | |
226 | - response = self.client.get(url) | |
227 | - self.assertTrue('form' in response.context) | |
228 | - | |
229 | - response = self.client_professor.get(url) | |
230 | - self.assertTrue('form' in response.context) | |
207 | + self.assertEquals(response.status_code, 302) | |
231 | 208 | |
232 | 209 | |
233 | 210 | def test_UpdateForum_form_error (self): |
... | ... | @@ -238,10 +215,10 @@ class ForumViewTestCase (TestCase): |
238 | 215 | self.assertEquals (response.status_code, 400) |
239 | 216 | |
240 | 217 | response = self.client_professor.post(url, data) |
241 | - self.assertEquals (response.status_code, 400) | |
218 | + self.assertEquals (response.status_code, 302) | |
242 | 219 | |
243 | 220 | response = self.client_student.post(url, data) |
244 | - self.assertEquals (response.status_code, 400) | |
221 | + self.assertEquals (response.status_code, 302) | |
245 | 222 | |
246 | 223 | def test_UpdateForum_form_ok (self): |
247 | 224 | url = reverse('course:forum:update', kwargs={'pk':self.forum.pk}) |
... | ... | @@ -260,16 +237,16 @@ class ForumViewTestCase (TestCase): |
260 | 237 | |
261 | 238 | data['name'] = 'Forum Updated as professor' |
262 | 239 | self.assertEquals(Forum.objects.all()[0].name, 'Forum Updated') |
263 | - response = self.client_professor.post(url, data) | |
240 | + response = self.client.post(url, data) | |
264 | 241 | self.assertEquals (response.status_code, 302) |
265 | 242 | self.assertEquals(Forum.objects.all()[0].name, 'Forum Updated as professor') |
266 | 243 | forum = Forum.objects.get(name='Forum Updated as professor') |
267 | 244 | |
268 | - #data['name'] = 'Forum Updated as student' | |
269 | - #self.assertEquals(Forum.objects.all()[0].name, 'Forum Updated as professor') | |
270 | - #response = self.client_student.post(url, data) | |
271 | - #self.assertEquals (response.status_code, 400) | |
272 | - #self.assertNotEquals(Forum.objects.all()[0].name, 'Forum Updated as student') | |
245 | + data['name'] = 'Forum Updated as student' | |
246 | + self.assertEquals(Forum.objects.all()[0].name, 'Forum Updated as professor') | |
247 | + response = self.client_student.post(url, data) | |
248 | + self.assertEquals (response.status_code, 302) | |
249 | + self.assertNotEquals(Forum.objects.all()[0].name, 'Forum Updated as student') | |
273 | 250 | forum = Forum.objects.get(name='Forum Updated as professor') |
274 | 251 | |
275 | 252 | ######################### CreatePostView ######################### | ... | ... |
forum/views.py
... | ... | @@ -9,6 +9,9 @@ from django.http import Http404, JsonResponse |
9 | 9 | from django.urls import reverse |
10 | 10 | from django.template.loader import render_to_string |
11 | 11 | |
12 | +from rolepermissions.mixins import HasRoleMixin | |
13 | +from rolepermissions.verifications import has_object_permission | |
14 | + | |
12 | 15 | from .models import Forum, Post, PostAnswer |
13 | 16 | from courses.models import Topic |
14 | 17 | from core.models import Action, Resource |
... | ... | @@ -41,7 +44,9 @@ class ForumIndex(LoginRequiredMixin, generic.ListView): |
41 | 44 | |
42 | 45 | return context |
43 | 46 | |
44 | -class CreateForumView(LoginRequiredMixin, generic.edit.CreateView, NotificationMixin): | |
47 | +class CreateForumView(LoginRequiredMixin, HasRoleMixin, generic.edit.CreateView, NotificationMixin): | |
48 | + allowed_roles = ['professor', 'system_admin'] | |
49 | + | |
45 | 50 | login_url = reverse_lazy("core:home") |
46 | 51 | redirect_field_name = 'next' |
47 | 52 | |
... | ... | @@ -67,9 +72,11 @@ class CreateForumView(LoginRequiredMixin, generic.edit.CreateView, NotificationM |
67 | 72 | def render_forum(request, forum): |
68 | 73 | last_forum = get_object_or_404(Forum, id = forum) |
69 | 74 | |
70 | - return HttpResponse(str(reverse_lazy('course:forum:view', args = (), kwargs = {'slug': last_forum.slug})) + '-' + str(forum) + '-' + str(last_forum.name)) | |
75 | + return JsonResponse({'url': str(reverse_lazy('course:forum:view', args = (), kwargs = {'slug': last_forum.slug})), 'forum_id': str(forum), 'name': str(last_forum.name)}) | |
76 | + | |
77 | +class UpdateForumView(LoginRequiredMixin, HasRoleMixin, generic.UpdateView): | |
78 | + allowed_roles = ['professor', 'system_admin'] | |
71 | 79 | |
72 | -class UpdateForumView(LoginRequiredMixin, generic.UpdateView): | |
73 | 80 | login_url = reverse_lazy("core:home") |
74 | 81 | redirect_field_name = 'next' |
75 | 82 | |
... | ... | @@ -77,6 +84,14 @@ class UpdateForumView(LoginRequiredMixin, generic.UpdateView): |
77 | 84 | form_class = ForumForm |
78 | 85 | model = Forum |
79 | 86 | |
87 | + def dispatch(self, *args, **kwargs): | |
88 | + forum = get_object_or_404(Forum, id = self.kwargs.get('pk')) | |
89 | + | |
90 | + if(not has_object_permission('edit_forum', self.request.user, forum)): | |
91 | + return self.handle_no_permission() | |
92 | + | |
93 | + return super(UpdateForumView, self).dispatch(*args, **kwargs) | |
94 | + | |
80 | 95 | def form_invalid(self, form): |
81 | 96 | return self.render_to_response(self.get_context_data(form = form), status = 400) |
82 | 97 | |
... | ... | @@ -93,7 +108,9 @@ def render_edit_forum(request, forum): |
93 | 108 | |
94 | 109 | return render(request, 'forum/render_forum.html', context) |
95 | 110 | |
96 | -class ForumDeleteView(LoginRequiredMixin, generic.DeleteView): | |
111 | +class ForumDeleteView(LoginRequiredMixin, HasRoleMixin, generic.DeleteView): | |
112 | + allowed_roles = ['professor', 'system_admin'] | |
113 | + | |
97 | 114 | login_url = reverse_lazy("core:home") |
98 | 115 | redirect_field_name = 'next' |
99 | 116 | |
... | ... | @@ -101,6 +118,14 @@ class ForumDeleteView(LoginRequiredMixin, generic.DeleteView): |
101 | 118 | pk_url_kwarg = 'pk' |
102 | 119 | success_url = reverse_lazy('course:forum:deleted_forum') |
103 | 120 | |
121 | + def dispatch(self, *args, **kwargs): | |
122 | + forum = get_object_or_404(Forum, id = self.kwargs.get('pk')) | |
123 | + | |
124 | + if(not has_object_permission('delete_forum', self.request.user, forum)): | |
125 | + return self.handle_no_permission() | |
126 | + | |
127 | + return super(ForumDeleteView, self).dispatch(*args, **kwargs) | |
128 | + | |
104 | 129 | def forum_deleted(request): |
105 | 130 | return HttpResponse(_("Forum deleted successfully.")) |
106 | 131 | |
... | ... | @@ -112,6 +137,14 @@ class ForumDetailView(LoginRequiredMixin, generic.DetailView): |
112 | 137 | template_name = 'forum/forum_view.html' |
113 | 138 | context_object_name = 'forum' |
114 | 139 | |
140 | + def dispatch(self, *args, **kwargs): | |
141 | + forum = get_object_or_404(Forum, slug = self.kwargs.get('slug')) | |
142 | + | |
143 | + if(not has_object_permission('view_forum', self.request.user, forum)): | |
144 | + return self.handle_no_permission() | |
145 | + | |
146 | + return super(ForumDetailView, self).dispatch(*args, **kwargs) | |
147 | + | |
115 | 148 | def get_context_data(self, **kwargs): |
116 | 149 | context = super(ForumDetailView, self).get_context_data(**kwargs) |
117 | 150 | forum = get_object_or_404(Forum, slug = self.kwargs.get('slug')) | ... | ... |
links/admin.py
... | ... | @@ -3,8 +3,8 @@ from django.contrib import admin |
3 | 3 | from .models import Link |
4 | 4 | |
5 | 5 | class LinkAdmin(admin.ModelAdmin): |
6 | - list_display = ['name', 'link_url','link_description'] | |
7 | - search_fields = ['name', 'link_url','link_description'] | |
6 | + list_display = ['name', 'slug','link_url','link_description'] | |
7 | + search_fields = ['name','slug' ,'link_url','link_description'] | |
8 | 8 | |
9 | 9 | |
10 | 10 | admin.site.register(Link, LinkAdmin) | ... | ... |
links/forms.py
1 | 1 | from django import forms |
2 | 2 | from .models import Link |
3 | -import validators | |
3 | +from django.utils.translation import ugettext_lazy as _ | |
4 | +from django.core.exceptions import ValidationError, FieldError | |
5 | +import requests | |
4 | 6 | |
5 | 7 | class CreateLinkForm(forms.ModelForm): |
6 | 8 | |
7 | - def clean_link(self): | |
9 | + def clean_link_url(self): | |
8 | 10 | link_url = self.cleaned_data['link_url'] |
9 | - if not validators.url(link_url): | |
10 | - raise forms.ValidationError(_('Please enter a valid URL')) | |
11 | + try: | |
12 | + response = requests.head(link_url) | |
13 | + if response.status_code >= 400: | |
14 | + raise forms.ValidationError(_('Invalid url!')) | |
15 | + except requests.ConnectionError: | |
16 | + raise forms.ValidationError(_('Invalid url!')) | |
11 | 17 | return link_url |
12 | 18 | |
13 | 19 | class Meta: |
... | ... | @@ -15,6 +21,15 @@ class CreateLinkForm(forms.ModelForm): |
15 | 21 | fields = ['name','link_url','link_description'] |
16 | 22 | |
17 | 23 | class UpdateLinkForm(forms.ModelForm): |
24 | + def clean_link_url(self): | |
25 | + link_url = self.cleaned_data['link_url'] | |
26 | + try: | |
27 | + resposta = requests.head(link_url) | |
28 | + if resposta.status_code >= 400: | |
29 | + raise forms.ValidationError(_('Invalid url!')) | |
30 | + except requests.ConnectionError: | |
31 | + raise forms.ValidationError(_('Invalid url!')) | |
32 | + return link_url | |
18 | 33 | class Meta: |
19 | 34 | model = Link |
20 | 35 | fields = ['name','link_url','link_description'] | ... | ... |
... | ... | @@ -0,0 +1,60 @@ |
1 | +from bs4 import BeautifulSoup | |
2 | +from urllib.request import urlopen | |
3 | +import urllib.request | |
4 | + | |
5 | +def make_soup(url): | |
6 | + try: | |
7 | + html = urlopen(url).read() | |
8 | + return BeautifulSoup(html,"lxml") | |
9 | + | |
10 | + except urllib.error.HTTPError as e: | |
11 | + return "Use default image" | |
12 | + | |
13 | +def get_images(url,slug): | |
14 | + downloaded = False | |
15 | + try: | |
16 | + soup = make_soup(url) | |
17 | + except: | |
18 | + return("Use default image",downloaded) | |
19 | + if soup == None or type(soup) == str: | |
20 | + return ("Use default image",downloaded) | |
21 | + images = [img for img in soup.findAll('img')] | |
22 | + image_links = [each.get('src') for each in images] | |
23 | + link_slug = slug | |
24 | + filename = '' | |
25 | + for each in image_links: | |
26 | + if downloaded: | |
27 | + break | |
28 | + booleano = False | |
29 | + if each != "": | |
30 | + if each == None: | |
31 | + continue | |
32 | + if 'jpg' in each: | |
33 | + booleano = True | |
34 | + pos = each.index("jpg") | |
35 | + each = each[0:pos+3] | |
36 | + filename = '.jpg' | |
37 | + elif 'png' in each: | |
38 | + booleano = True | |
39 | + pos = each.index("png") | |
40 | + each = each[0:pos+3] | |
41 | + filename = '.png' | |
42 | + elif 'jpeg' in each: | |
43 | + booleano = True | |
44 | + pos = each.index('jpeg') | |
45 | + each = each[0:pos+4] | |
46 | + filename = '.jpeg' | |
47 | + if not booleano: | |
48 | + continue | |
49 | + | |
50 | + if each[0] + each[1] == '//' or each[0] == '/': | |
51 | + each = 'http:'+each | |
52 | + if each[0:4] != 'http' and each[0:5] != 'https': | |
53 | + each = url[0:url.index('/',8)] + each | |
54 | + caminho = "links/static/images/" | |
55 | + try: | |
56 | + urllib.request.urlretrieve(each,"%s"%(caminho)+str(link_slug)+filename) | |
57 | + downloaded = True | |
58 | + except Exception: | |
59 | + continue | |
60 | + return filename,downloaded | ... | ... |
... | ... | @@ -0,0 +1,80 @@ |
1 | +# SOME DESCRIPTIVE TITLE. | |
2 | +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER | |
3 | +# This file is distributed under the same license as the PACKAGE package. | |
4 | +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | |
5 | +# | |
6 | +#, fuzzy | |
7 | +msgid "" | |
8 | +msgstr "" | |
9 | +"Project-Id-Version: PACKAGE VERSION\n" | |
10 | +"Report-Msgid-Bugs-To: \n" | |
11 | +"POT-Creation-Date: 2016-10-27 23:54-0300\n" | |
12 | +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | |
13 | +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | |
14 | +"Language-Team: LANGUAGE <LL@li.org>\n" | |
15 | +"Language: \n" | |
16 | +"MIME-Version: 1.0\n" | |
17 | +"Content-Type: text/plain; charset=UTF-8\n" | |
18 | +"Content-Transfer-Encoding: 8bit\n" | |
19 | +"Plural-Forms: nplurals=2; plural=(n > 1);\n" | |
20 | + | |
21 | +#: .\forms.py:16 .\forms.py:22 | |
22 | +msgid "Invalid url!" | |
23 | +msgstr "Url inválida!" | |
24 | + | |
25 | +#: .\templates\links\create_link.html:9 | |
26 | +msgid "Create a New Link" | |
27 | +msgstr "Criar um novo link" | |
28 | + | |
29 | +#: .\templates\links\create_link.html:46 .\templates\links\delete_link.html:15 | |
30 | +#: .\templates\links\update_link.html:25 | |
31 | +msgid "Cancel" | |
32 | +msgstr "Cancelar" | |
33 | + | |
34 | +#: .\templates\links\delete_link.html:11 | |
35 | +msgid "Do you really want to delete this link?" | |
36 | +msgstr "Você realmente deseja apagar este link?" | |
37 | + | |
38 | +#: .\templates\links\delete_link.html:16 | |
39 | +msgid "Confirm" | |
40 | +msgstr "Confirmar" | |
41 | + | |
42 | +#: .\templates\links\update_link.html:8 | |
43 | +msgid "Links" | |
44 | +msgstr "Links" | |
45 | + | |
46 | +#: .\templates\links\update_link.html:13 | |
47 | +msgid "Name" | |
48 | +msgstr "Nome" | |
49 | + | |
50 | +#: .\templates\links\update_link.html:17 | |
51 | +msgid "URL" | |
52 | +msgstr "URL" | |
53 | + | |
54 | +#: .\templates\links\update_link.html:21 | |
55 | +msgid "Description" | |
56 | +msgstr "Descrição" | |
57 | + | |
58 | +#: .\templates\links\update_link.html:26 | |
59 | +msgid "Submit" | |
60 | +msgstr "Enviar" | |
61 | + | |
62 | +#: .\templates\links\view_link.html:8 | |
63 | +msgid "Link" | |
64 | +msgstr "Link" | |
65 | + | |
66 | +#: .\templates\links\view_link.html:17 | |
67 | +msgid "Read more" | |
68 | +msgstr "Ler mais" | |
69 | + | |
70 | +#: .\views.py:28 | |
71 | +msgid "Link created successfully!" | |
72 | +msgstr "Link criado com sucesso!" | |
73 | + | |
74 | +#: .\views.py:50 | |
75 | +msgid "Link deleted Successfully!" | |
76 | +msgstr "Link apagado com sucesso!" | |
77 | + | |
78 | +#: .\views.py:69 | |
79 | +msgid "Link updated successfully!" | |
80 | +msgstr "Link atualizado com sucesso!" | ... | ... |
... | ... | @@ -0,0 +1,20 @@ |
1 | +# -*- coding: utf-8 -*- | |
2 | +# Generated by Django 1.10 on 2016-10-28 18:34 | |
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 | + ('links', '0001_initial'), | |
12 | + ] | |
13 | + | |
14 | + operations = [ | |
15 | + migrations.AddField( | |
16 | + model_name='link', | |
17 | + name='image', | |
18 | + field=models.ImageField(blank=True, upload_to='links/'), | |
19 | + ), | |
20 | + ] | ... | ... |
links/models.py
... | ... | @@ -5,6 +5,7 @@ from autoslug.fields import AutoSlugField |
5 | 5 | class Link(Material): |
6 | 6 | link_url = models.URLField() |
7 | 7 | link_description = models.CharField(max_length=200) |
8 | + image = models.ImageField(upload_to = 'links/',blank = True) | |
8 | 9 | class Meta: |
9 | 10 | verbose_name = 'Link' |
10 | 11 | verbose_name_plural = "Links" | ... | ... |
19.5 KB