From 243569a6c9ef33ce0c7e73d51a0dad84df69fad5 Mon Sep 17 00:00:00 2001 From: Zambom Date: Thu, 1 Sep 2016 22:48:17 -0300 Subject: [PATCH] Criando template a partir do arquivo que estava disponível no repositório da uxdesign --- app/locale/pt_BR/LC_MESSAGES/django.po | 27 +++++++++++++-------------- core/locale/pt_BR/LC_MESSAGES/django.po | 6 +++++- courses/locale/pt_BR/LC_MESSAGES/django.po | 2 +- users/locale/pt_BR/LC_MESSAGES/django.po | 22 +++++++++++++++------- users/templates/list_users.html | 30 ++++++++++++++++++++++++++++++ users/urls.py | 2 +- users/views.py | 4 ++-- 7 files changed, 67 insertions(+), 26 deletions(-) create mode 100644 users/templates/list_users.html diff --git a/app/locale/pt_BR/LC_MESSAGES/django.po b/app/locale/pt_BR/LC_MESSAGES/django.po index 69c0be9..b9fb593 100644 --- a/app/locale/pt_BR/LC_MESSAGES/django.po +++ b/app/locale/pt_BR/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-09-01 16:02-0300\n" +"POT-Creation-Date: 2016-09-01 22:44-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -58,7 +58,7 @@ msgstr "" msgid "You can:" msgstr "" -#: app/templates/app/index.html:24 app/templates/home_app.html:43 +#: app/templates/app/index.html:24 app/templates/home_app.html:26 msgid "Create Course" msgstr "Criar Curso" @@ -94,38 +94,37 @@ msgstr "" msgid "Most popular keywords:" msgstr "" -#: app/templates/home_app.html:15 -msgid "Amadeus" -msgstr "Amadeus" - -#: app/templates/home_app.html:31 +#: app/templates/home_app.html:14 msgid "Home" msgstr "Início" -#: app/templates/home_app.html:39 +#: app/templates/home_app.html:22 msgid "Pending tasks" msgstr "Tarefas Pendentes" -#: app/templates/home_app.html:40 +#: app/templates/home_app.html:23 msgid "Users Online (1)" msgstr "Pessoas Online (1)" -#: app/templates/home_app.html:41 +#: app/templates/home_app.html:24 msgid "Course" msgstr "Curso" -#: app/templates/home_app.html:44 +#: app/templates/home_app.html:27 msgid "Manage Course" msgstr "Gerenciar Curso" -#: app/templates/home_app.html:52 +#: app/templates/home_app.html:35 msgid "Courses" msgstr "Cursos" -#: app/templates/home_app.html:68 +#: app/templates/home_app.html:51 msgid "You didn't create any course yet." msgstr "Você não criou nenhum curso ainda." -#: app/templates/home_app.html:76 +#: app/templates/home_app.html:59 msgid "Goals" msgstr "Metas" + +#~ msgid "Amadeus" +#~ msgstr "Amadeus" diff --git a/core/locale/pt_BR/LC_MESSAGES/django.po b/core/locale/pt_BR/LC_MESSAGES/django.po index 654844a..066a4f4 100644 --- a/core/locale/pt_BR/LC_MESSAGES/django.po +++ b/core/locale/pt_BR/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-09-01 16:02-0300\n" +"POT-Creation-Date: 2016-09-01 22:44-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,6 +18,10 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" +#: core/templates/base.html:43 +msgid "Amadeus" +msgstr "" + #: core/templates/index.html:29 msgid "Entrar" msgstr "" diff --git a/courses/locale/pt_BR/LC_MESSAGES/django.po b/courses/locale/pt_BR/LC_MESSAGES/django.po index ca3e928..43cd726 100644 --- a/courses/locale/pt_BR/LC_MESSAGES/django.po +++ b/courses/locale/pt_BR/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-09-01 16:02-0300\n" +"POT-Creation-Date: 2016-09-01 22:44-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/users/locale/pt_BR/LC_MESSAGES/django.po b/users/locale/pt_BR/LC_MESSAGES/django.po index a497fd2..0a74173 100644 --- a/users/locale/pt_BR/LC_MESSAGES/django.po +++ b/users/locale/pt_BR/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-09-01 16:02-0300\n" +"POT-Creation-Date: 2016-09-01 22:44-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -114,12 +114,24 @@ msgstr "" msgid "Users" msgstr "" -#: users/templates/users/create.html:8 +#: users/templates/list_users.html:14 users/templates/users/create.html:8 #: users/templates/users/edit_profile.html:8 users/templates/users/index.html:7 #: users/templates/users/profile.html:8 users/templates/users/update.html:8 #: users/templates/users/view.html:7 msgid "Home" -msgstr "" +msgstr "Início" + +#: users/templates/list_users.html:15 users/templates/users/index.html:8 +msgid "Manage Users" +msgstr "Gerenciar Usuários" + +#: users/templates/list_users.html:23 +msgid "Add user" +msgstr "Adicionar usuário" + +#: users/templates/list_users.html:24 +msgid "Send email" +msgstr "Enviar e-mail" #: users/templates/users/create.html:9 msgid "New User" @@ -163,10 +175,6 @@ msgstr "" msgid "Profile" msgstr "" -#: users/templates/users/index.html:8 -msgid "Manage Users" -msgstr "" - #: users/templates/users/index.html:56 users/templates/users/profile.html:32 #: users/templates/users/view.html:39 msgid "Administrator" diff --git a/users/templates/list_users.html b/users/templates/list_users.html new file mode 100644 index 0000000..9163c6c --- /dev/null +++ b/users/templates/list_users.html @@ -0,0 +1,30 @@ +{% extends 'base.html' %} + +{% load i18n %} + +{% block breadcrumbs %} +
+
+

{% trans 'Manage Users' %}

+
+
+
+
+ +
+
+{% endblock %} + +{% block sidebar %} + +{% endblock %} + +{% block content %} + +{% endblock %} \ No newline at end of file diff --git a/users/urls.py b/users/urls.py index 48708d5..17f7d73 100644 --- a/users/urls.py +++ b/users/urls.py @@ -3,7 +3,7 @@ from django.conf.urls import url from . import views urlpatterns = [ - url(r'^usuarios/$', views.Index.as_view(), name='manage'), + url(r'^usuarios/$', views.UsersListView.as_view(), name='manage'), url(r'^usuarios/criar/$', views.Create.as_view(), name='create'), url(r'^usuario/editar/(?P[\w_-]+)/$', views.Update.as_view(), name='update'), url(r'^usuario/dados/(?P[\w_-]+)/$', views.View.as_view(), name='view'), diff --git a/users/views.py b/users/views.py index 89fdc84..3db60a3 100644 --- a/users/views.py +++ b/users/views.py @@ -9,12 +9,12 @@ from rolepermissions.shortcuts import assign_role from .models import User from .forms import UserForm, ProfileForm -class Index(HasRoleMixin, LoginRequiredMixin, generic.ListView): +class UsersListView(HasRoleMixin, LoginRequiredMixin, generic.ListView): allowed_roles = ['system_admin'] login_url = '/' redirect_field_name = 'next' - template_name = 'users/index.html' + template_name = 'list_users.html' context_object_name = 'users' paginate_by = 10 -- libgit2 0.21.2