Commit 4dab0e1d95f4aa0a1ed2227c51addd3ddb2a4fb8
Exists in
master
and in
5 other branches
Register user #22
Showing
13 changed files
with
160 additions
and
79 deletions
Show diff stats
app/locale/pt_BR/LC_MESSAGES/django.po
@@ -140,7 +140,7 @@ msgid "" | @@ -140,7 +140,7 @@ msgid "" | ||
140 | msgstr "" | 140 | msgstr "" |
141 | "Project-Id-Version: PACKAGE VERSION\n" | 141 | "Project-Id-Version: PACKAGE VERSION\n" |
142 | "Report-Msgid-Bugs-To: \n" | 142 | "Report-Msgid-Bugs-To: \n" |
143 | -"POT-Creation-Date: 2016-09-03 00:18-0300\n" | 143 | +"POT-Creation-Date: 2016-09-05 20:28-0300\n" |
144 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | 144 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
145 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | 145 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
146 | "Language-Team: LANGUAGE <LL@li.org>\n" | 146 | "Language-Team: LANGUAGE <LL@li.org>\n" |
app/views.py
1 | from django.shortcuts import render | 1 | from django.shortcuts import render |
2 | from django.views.generic import TemplateView | 2 | from django.views.generic import TemplateView |
3 | from django.contrib.auth.mixins import LoginRequiredMixin | 3 | from django.contrib.auth.mixins import LoginRequiredMixin |
4 | -from django.utils.decorators import decorator_from_middleware_with_args | ||
5 | -from django.utils.decorators import decorator_from_middleware | ||
6 | -from django.utils.decorators import method_decorator | 4 | +from django.core.urlresolvers import reverse_lazy |
7 | from core.mixins import LogMixin | 5 | from core.mixins import LogMixin |
8 | 6 | ||
9 | from courses.models import Course | 7 | from courses.models import Course |
10 | 8 | ||
11 | class AppIndex(LoginRequiredMixin, LogMixin, TemplateView): | 9 | class AppIndex(LoginRequiredMixin, LogMixin, TemplateView): |
12 | log_action = "Acessou home" | 10 | log_action = "Acessou home" |
11 | + login_url = reverse_lazy("core:home") | ||
12 | + redirect_field_name = 'next' | ||
13 | template_name = "home_professor.html" | 13 | template_name = "home_professor.html" |
14 | 14 | ||
15 | def render_to_response(self, context, **response_kwargs): | 15 | def render_to_response(self, context, **response_kwargs): |
core/locale/pt_BR/LC_MESSAGES/django.po
@@ -49,7 +49,7 @@ msgid "" | @@ -49,7 +49,7 @@ msgid "" | ||
49 | msgstr "" | 49 | msgstr "" |
50 | "Project-Id-Version: PACKAGE VERSION\n" | 50 | "Project-Id-Version: PACKAGE VERSION\n" |
51 | "Report-Msgid-Bugs-To: \n" | 51 | "Report-Msgid-Bugs-To: \n" |
52 | -"POT-Creation-Date: 2016-09-03 00:18-0300\n" | 52 | +"POT-Creation-Date: 2016-09-05 20:28-0300\n" |
53 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | 53 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
54 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | 54 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
55 | "Language-Team: LANGUAGE <LL@li.org>\n" | 55 | "Language-Team: LANGUAGE <LL@li.org>\n" |
@@ -0,0 +1,9 @@ | @@ -0,0 +1,9 @@ | ||
1 | +<nav aria-label="Page navigation"> | ||
2 | + <ul class="pagination"> | ||
3 | + {% for page_number in paginator.page_range %} | ||
4 | + <li{% if page_obj.number == page_number %} class="active"{% endif %}> | ||
5 | + <a href="?page={{ page_number }}{{ getvars }}">{{ page_number }}</a> | ||
6 | + </li> | ||
7 | + {% endfor %} | ||
8 | + </ul> | ||
9 | +</nav> | ||
0 | \ No newline at end of file | 10 | \ No newline at end of file |
@@ -0,0 +1,22 @@ | @@ -0,0 +1,22 @@ | ||
1 | +from django import template | ||
2 | + | ||
3 | +register = template.Library() | ||
4 | + | ||
5 | + | ||
6 | +@register.inclusion_tag('pagination.html') | ||
7 | +def pagination(request, paginator, page_obj): | ||
8 | + context = { | ||
9 | + 'request': request, | ||
10 | + 'paginator': paginator, | ||
11 | + 'page_obj': page_obj, | ||
12 | + } | ||
13 | + | ||
14 | + getvars = request.GET.copy() | ||
15 | + | ||
16 | + if 'page' in getvars: | ||
17 | + del getvars['page'] | ||
18 | + | ||
19 | + if len(getvars) > 0: | ||
20 | + context['getvars'] = '&%s' % getvars.urlencode() | ||
21 | + | ||
22 | + return context | ||
0 | \ No newline at end of file | 23 | \ No newline at end of file |
courses/locale/pt_BR/LC_MESSAGES/django.po
@@ -467,7 +467,7 @@ msgid "" | @@ -467,7 +467,7 @@ msgid "" | ||
467 | msgstr "" | 467 | msgstr "" |
468 | "Project-Id-Version: PACKAGE VERSION\n" | 468 | "Project-Id-Version: PACKAGE VERSION\n" |
469 | "Report-Msgid-Bugs-To: \n" | 469 | "Report-Msgid-Bugs-To: \n" |
470 | -"POT-Creation-Date: 2016-09-03 00:18-0300\n" | 470 | +"POT-Creation-Date: 2016-09-05 20:28-0300\n" |
471 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | 471 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
472 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | 472 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
473 | "Language-Team: LANGUAGE <LL@li.org>\n" | 473 | "Language-Team: LANGUAGE <LL@li.org>\n" |
@@ -477,7 +477,7 @@ msgstr "" | @@ -477,7 +477,7 @@ msgstr "" | ||
477 | "Content-Transfer-Encoding: 8bit\n" | 477 | "Content-Transfer-Encoding: 8bit\n" |
478 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" | 478 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" |
479 | 479 | ||
480 | -#: courses/forms.py:11 courses/forms.py:25 courses/forms.py:55 | 480 | +#: courses/forms.py:11 courses/forms.py:25 courses/forms.py:58 |
481 | #: courses/models.py:7 courses/models.py:20 courses/models.py:44 | 481 | #: courses/models.py:7 courses/models.py:20 courses/models.py:44 |
482 | #: courses/templates/category/index.html:38 | 482 | #: courses/templates/category/index.html:38 |
483 | msgid "Name" | 483 | msgid "Name" |
@@ -563,23 +563,23 @@ msgstr "" | @@ -563,23 +563,23 @@ msgstr "" | ||
563 | msgid "Category which the course belongs" | 563 | msgid "Category which the course belongs" |
564 | msgstr "" | 564 | msgstr "" |
565 | 565 | ||
566 | -#: courses/forms.py:56 courses/models.py:46 | 566 | +#: courses/forms.py:59 courses/models.py:46 |
567 | msgid "Description" | 567 | msgid "Description" |
568 | msgstr "" | 568 | msgstr "" |
569 | 569 | ||
570 | -#: courses/forms.py:57 | 570 | +#: courses/forms.py:60 |
571 | msgid "Is it visible?" | 571 | msgid "Is it visible?" |
572 | msgstr "" | 572 | msgstr "" |
573 | 573 | ||
574 | -#: courses/forms.py:60 | 574 | +#: courses/forms.py:63 |
575 | msgid "Module's name" | 575 | msgid "Module's name" |
576 | msgstr "" | 576 | msgstr "" |
577 | 577 | ||
578 | -#: courses/forms.py:61 | 578 | +#: courses/forms.py:64 |
579 | msgid "Modules's description" | 579 | msgid "Modules's description" |
580 | msgstr "" | 580 | msgstr "" |
581 | 581 | ||
582 | -#: courses/forms.py:62 | 582 | +#: courses/forms.py:65 |
583 | msgid "Is the module visible?" | 583 | msgid "Is the module visible?" |
584 | msgstr "" | 584 | msgstr "" |
585 | 585 | ||
@@ -635,7 +635,7 @@ msgstr "Curso" | @@ -635,7 +635,7 @@ msgstr "Curso" | ||
635 | #: courses/models.py:37 courses/templates/course/create.html:16 | 635 | #: courses/models.py:37 courses/templates/course/create.html:16 |
636 | #: courses/templates/course/delete.html:15 | 636 | #: courses/templates/course/delete.html:15 |
637 | #: courses/templates/course/filtered.html:8 | 637 | #: courses/templates/course/filtered.html:8 |
638 | -#: courses/templates/course/index.html:15 | 638 | +#: courses/templates/course/home.html:16 courses/templates/course/index.html:15 |
639 | #: courses/templates/course/update.html:16 | 639 | #: courses/templates/course/update.html:16 |
640 | #: courses/templates/course/view.html:15 | 640 | #: courses/templates/course/view.html:15 |
641 | #: courses/templates/module/create.html:17 | 641 | #: courses/templates/module/create.html:17 |
@@ -663,9 +663,9 @@ msgstr "Modulos" | @@ -663,9 +663,9 @@ msgstr "Modulos" | ||
663 | #: courses/templates/category/update.html:8 | 663 | #: courses/templates/category/update.html:8 |
664 | #: courses/templates/category/view.html:7 | 664 | #: courses/templates/category/view.html:7 |
665 | #: courses/templates/course/create.html:8 | 665 | #: courses/templates/course/create.html:8 |
666 | -#: courses/templates/course/delete.html:7 courses/templates/course/index.html:7 | ||
667 | -#: courses/templates/course/update.html:8 courses/templates/course/view.html:7 | ||
668 | -#: courses/templates/module/create.html:8 | 666 | +#: courses/templates/course/delete.html:7 courses/templates/course/home.html:8 |
667 | +#: courses/templates/course/index.html:7 courses/templates/course/update.html:8 | ||
668 | +#: courses/templates/course/view.html:7 courses/templates/module/create.html:8 | ||
669 | #: courses/templates/module/delete.html:7 courses/templates/module/index.html:7 | 669 | #: courses/templates/module/delete.html:7 courses/templates/module/index.html:7 |
670 | #: courses/templates/module/update.html:8 | 670 | #: courses/templates/module/update.html:8 |
671 | msgid "Home" | 671 | msgid "Home" |
@@ -762,6 +762,12 @@ msgstr "" | @@ -762,6 +762,12 @@ msgstr "" | ||
762 | msgid "Categories:" | 762 | msgid "Categories:" |
763 | msgstr "" | 763 | msgstr "" |
764 | 764 | ||
765 | +#: courses/templates/course/home.html:9 | ||
766 | +#, fuzzy | ||
767 | +#| msgid "Course" | ||
768 | +msgid "Home Course" | ||
769 | +msgstr "Curso" | ||
770 | + | ||
765 | #: courses/templates/course/index.html:8 | 771 | #: courses/templates/course/index.html:8 |
766 | msgid "Manage Courses" | 772 | msgid "Manage Courses" |
767 | msgstr "" | 773 | msgstr "" |
db.sqlite3
No preview for this file type
logs/log_file_05-09-2016.txt
@@ -42,13 +42,10 @@ | @@ -42,13 +42,10 @@ | ||
42 | 05/09/2016 04:39:39 - test - Entrou no sistema | 42 | 05/09/2016 04:39:39 - test - Entrou no sistema |
43 | 05/09/2016 04:39:39 - test - Acessou home | 43 | 05/09/2016 04:39:39 - test - Acessou home |
44 | 05/09/2016 04:40:28 - matheuslins - Acessou home | 44 | 05/09/2016 04:40:28 - matheuslins - Acessou home |
45 | -05/09/2016 13:14:23 - ailson - Acessou home | ||
46 | -05/09/2016 13:17:28 - ailson - Entrou no sistema | ||
47 | -05/09/2016 13:17:38 - ailson - Entrou no sistema | ||
48 | -05/09/2016 13:18:20 - ailson - Entrou no sistema | ||
49 | -05/09/2016 13:18:57 - ailson - Entrou no sistema | ||
50 | -05/09/2016 15:04:41 - ailson - Acessou home | ||
51 | -05/09/2016 15:16:39 - ailson - Acessou home | ||
52 | -05/09/2016 15:41:52 - ailson - Acessou home | ||
53 | -05/09/2016 16:08:38 - ailson - Entrou no sistema | ||
54 | -05/09/2016 16:08:38 - ailson - Acessou home | 45 | +05/09/2016 15:28:49 - zambom - Acessou home |
46 | +05/09/2016 15:29:02 - zambom - Entrou no sistema | ||
47 | +05/09/2016 15:29:02 - zambom - Acessou home | ||
48 | +05/09/2016 15:31:13 - zambom - Entrou no sistema | ||
49 | +05/09/2016 15:31:13 - zambom - Acessou home | ||
50 | +05/09/2016 20:20:12 - admin - Entrou no sistema | ||
51 | +05/09/2016 20:20:13 - admin - Acessou home |
logs/log_file_06-09-2016.txt
users/locale/pt_BR/LC_MESSAGES/django.po
@@ -239,7 +239,7 @@ msgid "" | @@ -239,7 +239,7 @@ msgid "" | ||
239 | msgstr "" | 239 | msgstr "" |
240 | "Project-Id-Version: PACKAGE VERSION\n" | 240 | "Project-Id-Version: PACKAGE VERSION\n" |
241 | "Report-Msgid-Bugs-To: \n" | 241 | "Report-Msgid-Bugs-To: \n" |
242 | -"POT-Creation-Date: 2016-09-03 00:18-0300\n" | 242 | +"POT-Creation-Date: 2016-09-05 20:28-0300\n" |
243 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | 243 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
244 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | 244 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
245 | "Language-Team: LANGUAGE <LL@li.org>\n" | 245 | "Language-Team: LANGUAGE <LL@li.org>\n" |
@@ -261,7 +261,7 @@ msgstr "Entrar" | @@ -261,7 +261,7 @@ msgstr "Entrar" | ||
261 | msgid "" | 261 | msgid "" |
262 | "Type a valid username. This fields should only contain letters, numbers and " | 262 | "Type a valid username. This fields should only contain letters, numbers and " |
263 | "the characteres: @/./+/-/_ ." | 263 | "the characteres: @/./+/-/_ ." |
264 | -msgstr "" | 264 | +msgstr "Digite um nome de usuário válido. Esse campo deve conter apenas letras, números e os caracteres: @/./+/-/_ ." |
265 | 265 | ||
266 | #: users/models.py:16 | 266 | #: users/models.py:16 |
267 | msgid "" | 267 | msgid "" |
@@ -271,9 +271,9 @@ msgstr "" | @@ -271,9 +271,9 @@ msgstr "" | ||
271 | 271 | ||
272 | #: users/models.py:17 | 272 | #: users/models.py:17 |
273 | msgid "Mail" | 273 | msgid "Mail" |
274 | -msgstr "" | 274 | +msgstr "Email" |
275 | 275 | ||
276 | -#: users/models.py:18 | 276 | +#: users/models.py:18 users/templates/list_users.html:41 |
277 | msgid "Name" | 277 | msgid "Name" |
278 | msgstr "Nome" | 278 | msgstr "Nome" |
279 | 279 | ||
@@ -303,7 +303,7 @@ msgstr "Imagem" | @@ -303,7 +303,7 @@ msgstr "Imagem" | ||
303 | 303 | ||
304 | #: users/models.py:23 | 304 | #: users/models.py:23 |
305 | msgid "Birth Date" | 305 | msgid "Birth Date" |
306 | -msgstr "" | 306 | +msgstr "Data de nascimento" |
307 | 307 | ||
308 | #: users/models.py:24 | 308 | #: users/models.py:24 |
309 | msgid "Phone" | 309 | msgid "Phone" |
@@ -311,15 +311,15 @@ msgstr "Telefone" | @@ -311,15 +311,15 @@ msgstr "Telefone" | ||
311 | 311 | ||
312 | #: users/models.py:25 users/templates/users/profile.html:42 | 312 | #: users/models.py:25 users/templates/users/profile.html:42 |
313 | msgid "Cpf" | 313 | msgid "Cpf" |
314 | -msgstr "" | 314 | +msgstr "Cpf" |
315 | 315 | ||
316 | #: users/models.py:26 | 316 | #: users/models.py:26 |
317 | msgid "Type" | 317 | msgid "Type" |
318 | -msgstr "" | 318 | +msgstr "Tipo" |
319 | 319 | ||
320 | #: users/models.py:26 | 320 | #: users/models.py:26 |
321 | msgid "Professor" | 321 | msgid "Professor" |
322 | -msgstr "" | 322 | +msgstr "Professor" |
323 | 323 | ||
324 | #: users/models.py:26 | 324 | #: users/models.py:26 |
325 | msgid "Student" | 325 | msgid "Student" |
@@ -327,11 +327,11 @@ msgstr "Aluno" | @@ -327,11 +327,11 @@ msgstr "Aluno" | ||
327 | 327 | ||
328 | #: users/models.py:27 | 328 | #: users/models.py:27 |
329 | msgid "Create Date" | 329 | msgid "Create Date" |
330 | -msgstr "" | 330 | +msgstr "Data de criação" |
331 | 331 | ||
332 | #: users/models.py:28 | 332 | #: users/models.py:28 |
333 | msgid "Administrador" | 333 | msgid "Administrador" |
334 | -msgstr "" | 334 | +msgstr "Administrador" |
335 | 335 | ||
336 | #: users/models.py:29 | 336 | #: users/models.py:29 |
337 | msgid "Active" | 337 | msgid "Active" |
@@ -345,18 +345,17 @@ msgstr "Usuário" | @@ -345,18 +345,17 @@ msgstr "Usuário" | ||
345 | msgid "Users" | 345 | msgid "Users" |
346 | msgstr "Usuários" | 346 | msgstr "Usuários" |
347 | 347 | ||
348 | -#: users/templates/list_users.html:8 users/templates/list_users.html:15 | ||
349 | -#: users/templates/users/index.html:8 | ||
350 | -msgid "Manage Users" | ||
351 | -msgstr "Gerenciar Usuários" | ||
352 | - | ||
353 | -#: users/templates/list_users.html:14 users/templates/users/create.html:8 | 348 | +#: users/templates/list_users.html:9 users/templates/users/create.html:8 |
354 | #: users/templates/users/edit_profile.html:8 users/templates/users/index.html:7 | 349 | #: users/templates/users/edit_profile.html:8 users/templates/users/index.html:7 |
355 | #: users/templates/users/profile.html:8 users/templates/users/update.html:8 | 350 | #: users/templates/users/profile.html:8 users/templates/users/update.html:8 |
356 | #: users/templates/users/view.html:7 | 351 | #: users/templates/users/view.html:7 |
357 | msgid "Home" | 352 | msgid "Home" |
358 | msgstr "Início" | 353 | msgstr "Início" |
359 | 354 | ||
355 | +#: users/templates/list_users.html:10 users/templates/users/index.html:8 | ||
356 | +msgid "Manage Users" | ||
357 | +msgstr "Gerenciar Usuários" | ||
358 | + | ||
360 | #: users/templates/list_users.html:23 | 359 | #: users/templates/list_users.html:23 |
361 | msgid "Add user" | 360 | msgid "Add user" |
362 | msgstr "Adicionar usuário" | 361 | msgstr "Adicionar usuário" |
@@ -365,14 +364,36 @@ msgstr "Adicionar usuário" | @@ -365,14 +364,36 @@ msgstr "Adicionar usuário" | ||
365 | msgid "Send email" | 364 | msgid "Send email" |
366 | msgstr "Enviar e-mail" | 365 | msgstr "Enviar e-mail" |
367 | 366 | ||
367 | +#: users/templates/list_users.html:42 | ||
368 | +#: users/templates/users/edit_profile.html:16 | ||
369 | +#: users/templates/users/profile.html:9 users/templates/users/profile.html:16 | ||
370 | +msgid "Profile" | ||
371 | +msgstr "Perfil" | ||
372 | + | ||
373 | +#: users/templates/list_users.html:43 | ||
374 | +msgid "Email" | ||
375 | +msgstr "Email" | ||
376 | + | ||
377 | +#: users/templates/list_users.html:44 | ||
378 | +msgid "Contact" | ||
379 | +msgstr "Contato" | ||
380 | + | ||
381 | +#: users/templates/list_users.html:46 | ||
382 | +msgid "Edit" | ||
383 | +msgstr "Editar" | ||
384 | + | ||
385 | +#: users/templates/list_users.html:47 | ||
386 | +msgid "Delete" | ||
387 | +msgstr "Apagar" | ||
388 | + | ||
368 | #: users/templates/users/create.html:9 | 389 | #: users/templates/users/create.html:9 |
369 | msgid "New User" | 390 | msgid "New User" |
370 | -msgstr "" | 391 | +msgstr "Novo usuário" |
371 | 392 | ||
372 | #: users/templates/users/create.html:16 users/templates/users/index.html:15 | 393 | #: users/templates/users/create.html:16 users/templates/users/index.html:15 |
373 | #: users/templates/users/update.html:16 users/templates/users/view.html:15 | 394 | #: users/templates/users/update.html:16 users/templates/users/view.html:15 |
374 | msgid "System Users" | 395 | msgid "System Users" |
375 | -msgstr "" | 396 | +msgstr "Usuários do sistema" |
376 | 397 | ||
377 | #: users/templates/users/create.html:19 users/templates/users/index.html:18 | 398 | #: users/templates/users/create.html:19 users/templates/users/index.html:18 |
378 | #: users/templates/users/update.html:19 users/templates/users/view.html:18 | 399 | #: users/templates/users/update.html:19 users/templates/users/view.html:18 |
@@ -402,11 +423,6 @@ msgstr "" | @@ -402,11 +423,6 @@ msgstr "" | ||
402 | msgid "Edit Profile" | 423 | msgid "Edit Profile" |
403 | msgstr "" | 424 | msgstr "" |
404 | 425 | ||
405 | -#: users/templates/users/edit_profile.html:16 | ||
406 | -#: users/templates/users/profile.html:9 users/templates/users/profile.html:16 | ||
407 | -msgid "Profile" | ||
408 | -msgstr "" | ||
409 | - | ||
410 | #: users/templates/users/index.html:56 users/templates/users/profile.html:32 | 426 | #: users/templates/users/index.html:56 users/templates/users/profile.html:32 |
411 | #: users/templates/users/view.html:39 | 427 | #: users/templates/users/view.html:39 |
412 | msgid "Administrator" | 428 | msgid "Administrator" |
users/templates/list_users.html
1 | -{% extends 'base.html' %} | ||
2 | - | ||
3 | -{% load i18n %} | ||
4 | - | ||
5 | -{% block breadcrumbs %} | ||
6 | - <div class="row"> | ||
7 | - <div class="col-md-12"> | ||
8 | - <h4>{% trans 'Manage Users' %}</h4> | ||
9 | - </div> | ||
10 | - </div> | ||
11 | - <div class="row"> | ||
12 | - <div class="col-md-12"> | ||
13 | - <ul class="breadcrumb" style="margin-bottom: 5px;"> | ||
14 | - <li><a href="{% url 'app:index' %}">{% trans 'Home' %}</a></li> | ||
15 | - <li class="active">{% trans 'Manage Users' %}</li> | ||
16 | - </ul> | ||
17 | - </div> | ||
18 | - </div> | ||
19 | -{% endblock %} | ||
20 | - | ||
21 | -{% block sidebar %} | ||
22 | - <div class="btn-group-vertical"> | ||
23 | - <a href="{% url 'users:create' %}" class="btn btn-raised">{% trans 'Add user' %}</a> | ||
24 | - <a href="javascript:void(0)" class="btn btn-raised">{% trans 'Send email' %}</a> | ||
25 | - </div> | ||
26 | -{% endblock %} | ||
27 | - | ||
28 | -{% block content %} | ||
29 | - <input type="text" class="form-control" name="search" placeholder="search.."> | ||
30 | -{% endblock %} | 1 | +{% extends 'base.html' %} |
2 | + | ||
3 | +{% load i18n pagination %} | ||
4 | + | ||
5 | +{% block breadcrumbs %} | ||
6 | + <div class="row"> | ||
7 | + <div class="col-md-12"> | ||
8 | + <ul class="breadcrumb" style="margin-bottom: 5px;"> | ||
9 | + <li><a href="{% url 'app:index' %}">{% trans 'Home' %}</a></li> | ||
10 | + <li class="active">{% trans 'Manage Users' %}</li> | ||
11 | + </ul> | ||
12 | + </div> | ||
13 | + </div> | ||
14 | +{% endblock %} | ||
15 | + | ||
16 | +{% block sidebar %} | ||
17 | + <div class="panel panel-primary navigation"> | ||
18 | + <div class="panel-heading"> | ||
19 | + <h5>Menu</h5> | ||
20 | + </div> | ||
21 | + <div class="panel-body"> | ||
22 | + <ul class="nav nav-pills nav-stacked"> | ||
23 | + <li><a href="{% url 'users:create' %}">{% trans 'Add user' %}</a></li> | ||
24 | + <li><a href="javascript:void(0)">{% trans 'Send email' %}</a></li> | ||
25 | + </ul> | ||
26 | + </div> | ||
27 | + </div> | ||
28 | +{% endblock %} | ||
29 | + | ||
30 | +{% block content %} | ||
31 | + <input type="text" class="form-control" name="search" placeholder="search.."> | ||
32 | + | ||
33 | + {% if users|length > 0 %} | ||
34 | + {% for acc in users %} | ||
35 | + <div class="row panel panel-default"> | ||
36 | + <div class="panel-body"> | ||
37 | + <div class="col-md-4"> | ||
38 | + <img src="{{ acc.image.url }}" alt="photoUser" class="img-circle img-responsive"> | ||
39 | + </div> | ||
40 | + <div class="col-md-8"> | ||
41 | + <p>{% trans 'Name' %}: {{ acc.name }}</p> | ||
42 | + <p>{% trans 'Profile' %}: {{ acc.get_type_profile_display }}</p> | ||
43 | + <p>{% trans 'Email' %}: {{ acc.email }}</p> | ||
44 | + <p>{% trans 'Contact' %}: {{ acc.phone }}</p> | ||
45 | + <div align="right"> | ||
46 | + <a href="javascript:void(0)" class="btn btn-raised btn-inverse">{% trans 'Edit' %}</a> | ||
47 | + <a href="javascript:void(0)" class="btn btn-raised btn-danger">{% trans 'Delete' %}</a> | ||
48 | + </div> | ||
49 | + </div> | ||
50 | + </div> | ||
51 | + </div> | ||
52 | + {% endfor %} | ||
53 | + {% pagination request paginator page_obj %} | ||
54 | + {% else %} | ||
55 | + | ||
56 | + {% endif %} | ||
57 | +{% endblock %} |