From ed800678dbb6c548af95a88b03a35b79223e52b3 Mon Sep 17 00:00:00 2001 From: Matheus Lins Date: Sat, 19 Nov 2016 23:22:47 -0300 Subject: [PATCH] conflite --- app/templates/home.html | 22 ++++++++++++++++++++-- core/locale/pt_BR/LC_MESSAGES/django.po | 41 +++++++++++++++++++++-------------------- core/templates/guest.html | 59 ++++++++++++++++++++++++----------------------------------- core/templates/register_user.html | 2 +- core/views.py | 21 ++++++++++++++++----- users/locale/pt_BR/LC_MESSAGES/django.po | 340 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------------------------------------------------------------------------------------------------------------------------------- users/models.py | 2 +- users/templates/list_users.html | 3 --- users/templates/users/create.html | 17 ++++++++++++----- users/templates/users/index.html | 2 +- users/views.py | 11 +++++++---- 11 files changed, 272 insertions(+), 248 deletions(-) diff --git a/app/templates/home.html b/app/templates/home.html index 0f8ba72..0325e2b 100644 --- a/app/templates/home.html +++ b/app/templates/home.html @@ -96,8 +96,26 @@ {% endblock %} {% if user|has_role:'system_admin' %} -
  • {% trans 'Manage Users' %}
  • -
  • {% trans 'Settings' %}
  • + +
  • + {% trans 'Users' %} + +
  • +
  • + {% trans 'Settings' %} + +
  • {% endif %} diff --git a/core/locale/pt_BR/LC_MESSAGES/django.po b/core/locale/pt_BR/LC_MESSAGES/django.po index 2295c5f..823f953 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-11-16 11:23-0300\n" +"POT-Creation-Date: 2016-11-19 10:24-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -23,10 +23,8 @@ msgid "Password" msgstr "Senha" #: .\forms.py:13 -#, fuzzy -#| msgid "Confirm password:" msgid "Confirm Password" -msgstr "Confirmação de senha:" +msgstr "Confirme a senha:" #: .\forms.py:27 msgid "There is already a registered User with this e-mail" @@ -40,7 +38,7 @@ msgstr "Por favor, insira uma data válida" #, fuzzy #| msgid "There is already a registeres User with this CPF" msgid "There is already a registered User with this CPF" -msgstr "Já existem usuários cadastrados com este CPF" +msgstr "Já existe usuário cadastrado com este CPF" #: .\forms.py:52 #, python-format @@ -138,7 +136,7 @@ msgstr "Autor" msgid "Notification" msgstr "Notificação" -#: .\models.py:99 .\templates\base.html:92 .\templates\guest.html:70 +#: .\models.py:99 .\templates\base.html:92 msgid "Notifications" msgstr "Notificações" @@ -166,11 +164,11 @@ msgstr "Logs" msgid "Search Files (.pdf, others) and/or activities" msgstr "Pesquisar arquivos (.pdf, outros) e/ou atividades" -#: .\templates\base.html:98 .\templates\guest.html:77 +#: .\templates\base.html:98 msgid "See More" msgstr "Ver Mais" -#: .\templates\base.html:105 .\templates\guest.html:83 +#: .\templates\base.html:105 msgid "messages" msgstr "Mensagens" @@ -196,14 +194,22 @@ msgstr "Mudar senha" msgid "Remove account" msgstr "Remover conta" -#: .\templates\guest.html:97 +#: .\templates\guest.html:67 .\templates\index.html:67 .\views.py:115 +msgid "Guest" +msgstr "Convidado" + +#: .\templates\guest.html:80 msgid "Menu" msgstr "Menu" -#: .\templates\guest.html:101 .\templates\register_user.html:110 +#: .\templates\guest.html:84 .\templates\register_user.html:110 msgid "Register" msgstr "Cadastrar" +#: .\templates\guest.html:98 +msgid "Search Courses" +msgstr "Pesquisar Cursos" + #: .\templates\index.html:37 msgid "Sign in with your account to continue" msgstr "Faça login com sua conta para continuar" @@ -220,10 +226,6 @@ msgstr "Lembrar E-mail" msgid "Log in" msgstr "Acessar" -#: .\templates\index.html:67 -msgid "Guest" -msgstr "Convidado" - #: .\templates\index.html:72 msgid "Forgot your password?" msgstr "Esqueceu sua senha?" @@ -236,9 +238,11 @@ msgstr "Cadastrar" msgid "User Register" msgstr "Cadastro de usuário" +#: .\templates\register_user.html:61 +msgid "Choose your photo..." +msgstr "" + #: .\templates\register_user.html:71 -#, fuzzy -#| msgid "Chose your file ..." msgid "Choose the file ..." msgstr "Escolha o arquivo..." @@ -249,7 +253,7 @@ msgstr "Entrar" #: .\templates\registration\passwor_reset_complete.html:19 msgid "Your password was reseted successful" -msgstr "" +msgstr "Sua senha foi resetada com sucesso" #: .\templates\registration\passwor_reset_confirm.html:19 #: .\templates\registration\passwor_reset_done.html:18 @@ -389,9 +393,6 @@ msgstr "E-mail ou senha incorretos." #~ msgid "Manage Users" #~ msgstr "Gerenciar usuários" -#~ msgid "Manage Courses" -#~ msgstr "Gerenciar cursos" - #~ msgid "Category" #~ msgstr "Categoria" diff --git a/core/templates/guest.html b/core/templates/guest.html index 547b8a5..d76d4f6 100644 --- a/core/templates/guest.html +++ b/core/templates/guest.html @@ -64,24 +64,7 @@ @@ -107,21 +90,6 @@
    {% block breadcrumbs %} - -
    -
    -
    -
    -
    - - - -
    -
    -
    - {% endblock %} {% block render_breadcrumbs %}{% endblock %}
    @@ -137,7 +105,7 @@

    {{category.name}}

    - +
    {% for course in category.course_category.all %} @@ -150,6 +118,27 @@
    {% endfor %}
    +
    + +
    {% endblock %} @@ -161,4 +150,4 @@ {% endblock script_file %} - \ No newline at end of file + diff --git a/core/templates/register_user.html b/core/templates/register_user.html index 79a200f..68ae833 100644 --- a/core/templates/register_user.html +++ b/core/templates/register_user.html @@ -58,7 +58,7 @@ {% elif field.auto_id == 'id_image' %} {% render_field field class='form-control' %}
    - +
    - {% elif field.auto_id == 'id_is_staff' or field.auto_id == 'id_is_active' %} + {% elif field.auto_id == 'id_is_staff' or field.auto_id == 'id_is_active' %}
    {% elif field.auto_id == 'id_cpf' %} @@ -123,10 +123,10 @@ {% endif %} {% endfor %} -
    +
    -
    + @@ -136,4 +136,11 @@


    + {% endblock %} diff --git a/users/templates/users/index.html b/users/templates/users/index.html index 7a94e73..249b2a7 100644 --- a/users/templates/users/index.html +++ b/users/templates/users/index.html @@ -10,7 +10,7 @@ {% endblock %} {% block menu %} -
  • {% trans 'Add User' %}
  • + {% endblock %} {% block content %} diff --git a/users/views.py b/users/views.py index 1693129..1c3019c 100644 --- a/users/views.py +++ b/users/views.py @@ -39,7 +39,7 @@ class UsersListView(HasRoleMixin, LoginRequiredMixin, generic.ListView): search = self.request.GET.get('search', None) if search is None: - users = User.objects.exclude(username = self.request.user.username) + users = User.objects.all().order_by('name').exclude( username = self.request.user.username) else: users = User.objects.filter(Q(username = search) | Q(name = search) | Q(name__icontains = search) | Q(username__icontains = search)).exclude( username = self.request.user.username) @@ -67,9 +67,13 @@ class Create(HasRoleMixin, LoginRequiredMixin, generic.edit.CreateView): self.object.save() - messages.success(self.request, _('User created successfully!')) + messages.success(self.request, _('User ')+self.object.name+(' created successfully!')) return super(Create, self).form_valid(form) + def get_context_data (self, **kwargs): + context = super(Create, self).get_context_data(**kwargs) + context['title'] = _("Add User") + return context class Update(HasRoleMixin, LoginRequiredMixin, generic.UpdateView): @@ -96,7 +100,7 @@ class Update(HasRoleMixin, LoginRequiredMixin, generic.UpdateView): self.object.save() - messages.success(self.request, _('User edited successfully!')) + messages.success(self.request, _('User ')+self.object.name+(' updated successfully!')) return super(Update, self).form_valid(form) @@ -243,4 +247,3 @@ class UserViewSet(viewsets.ModelViewSet): queryset = User.objects.all() serializer_class = UserSerializer permissions_classes = (IsAuthenticatedOrReadOnly,) - -- libgit2 0.21.2