Commit d1e14f3fa05bb2e561449a6f59f490dd5ed8fd40
1 parent
6adb9412
Exists in
master
and in
5 other branches
Adjusting template [Issue: #13]
Showing
8 changed files
with
103 additions
and
47 deletions
Show diff stats
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-03 00:18-0300\n" | |
| 11 | +"POT-Creation-Date: 2016-09-05 20:28-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" | ... | ... |
app/views.py
| 1 | 1 | from django.shortcuts import render |
| 2 | 2 | from django.views.generic import TemplateView |
| 3 | 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 | 5 | from core.mixins import LogMixin |
| 8 | 6 | |
| 9 | 7 | from courses.models import Course |
| 10 | 8 | |
| 11 | 9 | class AppIndex(LoginRequiredMixin, LogMixin, TemplateView): |
| 12 | 10 | log_action = "Acessou home" |
| 11 | + login_url = reverse_lazy("core:home") | |
| 12 | + redirect_field_name = 'next' | |
| 13 | 13 | template_name = "home_professor.html" |
| 14 | 14 | |
| 15 | 15 | def render_to_response(self, context, **response_kwargs): | ... | ... |
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-03 00:18-0300\n" | |
| 11 | +"POT-Creation-Date: 2016-09-05 20:28-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" | ... | ... |
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-03 00:18-0300\n" | |
| 11 | +"POT-Creation-Date: 2016-09-05 20:28-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,7 +18,7 @@ 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:55 | |
| 21 | +#: courses/forms.py:11 courses/forms.py:25 courses/forms.py:58 | |
| 22 | 22 | #: courses/models.py:7 courses/models.py:20 courses/models.py:44 |
| 23 | 23 | #: courses/templates/category/index.html:38 |
| 24 | 24 | msgid "Name" |
| ... | ... | @@ -104,23 +104,23 @@ msgstr "" |
| 104 | 104 | msgid "Category which the course belongs" |
| 105 | 105 | msgstr "" |
| 106 | 106 | |
| 107 | -#: courses/forms.py:56 courses/models.py:46 | |
| 107 | +#: courses/forms.py:59 courses/models.py:46 | |
| 108 | 108 | msgid "Description" |
| 109 | 109 | msgstr "" |
| 110 | 110 | |
| 111 | -#: courses/forms.py:57 | |
| 111 | +#: courses/forms.py:60 | |
| 112 | 112 | msgid "Is it visible?" |
| 113 | 113 | msgstr "" |
| 114 | 114 | |
| 115 | -#: courses/forms.py:60 | |
| 115 | +#: courses/forms.py:63 | |
| 116 | 116 | msgid "Module's name" |
| 117 | 117 | msgstr "" |
| 118 | 118 | |
| 119 | -#: courses/forms.py:61 | |
| 119 | +#: courses/forms.py:64 | |
| 120 | 120 | msgid "Modules's description" |
| 121 | 121 | msgstr "" |
| 122 | 122 | |
| 123 | -#: courses/forms.py:62 | |
| 123 | +#: courses/forms.py:65 | |
| 124 | 124 | msgid "Is the module visible?" |
| 125 | 125 | msgstr "" |
| 126 | 126 | |
| ... | ... | @@ -176,7 +176,7 @@ msgstr "Curso" |
| 176 | 176 | #: courses/models.py:37 courses/templates/course/create.html:16 |
| 177 | 177 | #: courses/templates/course/delete.html:15 |
| 178 | 178 | #: courses/templates/course/filtered.html:8 |
| 179 | -#: courses/templates/course/index.html:15 | |
| 179 | +#: courses/templates/course/home.html:16 courses/templates/course/index.html:15 | |
| 180 | 180 | #: courses/templates/course/update.html:16 |
| 181 | 181 | #: courses/templates/course/view.html:15 |
| 182 | 182 | #: courses/templates/module/create.html:17 |
| ... | ... | @@ -204,9 +204,9 @@ msgstr "Modulos" |
| 204 | 204 | #: courses/templates/category/update.html:8 |
| 205 | 205 | #: courses/templates/category/view.html:7 |
| 206 | 206 | #: courses/templates/course/create.html:8 |
| 207 | -#: courses/templates/course/delete.html:7 courses/templates/course/index.html:7 | |
| 208 | -#: courses/templates/course/update.html:8 courses/templates/course/view.html:7 | |
| 209 | -#: courses/templates/module/create.html:8 | |
| 207 | +#: 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 | 210 | #: courses/templates/module/delete.html:7 courses/templates/module/index.html:7 |
| 211 | 211 | #: courses/templates/module/update.html:8 |
| 212 | 212 | msgid "Home" |
| ... | ... | @@ -303,6 +303,12 @@ msgstr "" |
| 303 | 303 | msgid "Categories:" |
| 304 | 304 | msgstr "" |
| 305 | 305 | |
| 306 | +#: courses/templates/course/home.html:9 | |
| 307 | +#, fuzzy | |
| 308 | +#| msgid "Course" | |
| 309 | +msgid "Home Course" | |
| 310 | +msgstr "Curso" | |
| 311 | + | |
| 306 | 312 | #: courses/templates/course/index.html:8 |
| 307 | 313 | msgid "Manage Courses" |
| 308 | 314 | msgstr "" | ... | ... |
logs/log_file_05-09-2016.txt
| ... | ... | @@ -42,3 +42,10 @@ |
| 42 | 42 | 05/09/2016 04:39:39 - test - Entrou no sistema |
| 43 | 43 | 05/09/2016 04:39:39 - test - Acessou home |
| 44 | 44 | 05/09/2016 04:40:28 - matheuslins - 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 | ... | ... |
users/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-03 00:18-0300\n" | |
| 11 | +"POT-Creation-Date: 2016-09-05 20:28-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" |
| ... | ... | @@ -30,7 +30,7 @@ msgstr "Entrar" |
| 30 | 30 | msgid "" |
| 31 | 31 | "Type a valid username. This fields should only contain letters, numbers and " |
| 32 | 32 | "the characteres: @/./+/-/_ ." |
| 33 | -msgstr "" | |
| 33 | +msgstr "Digite um nome de usuário válido. Esse campo deve conter apenas letras, números e os caracteres: @/./+/-/_ ." | |
| 34 | 34 | |
| 35 | 35 | #: users/models.py:16 |
| 36 | 36 | msgid "" |
| ... | ... | @@ -40,9 +40,9 @@ msgstr "" |
| 40 | 40 | |
| 41 | 41 | #: users/models.py:17 |
| 42 | 42 | msgid "Mail" |
| 43 | -msgstr "" | |
| 43 | +msgstr "Email" | |
| 44 | 44 | |
| 45 | -#: users/models.py:18 | |
| 45 | +#: users/models.py:18 users/templates/list_users.html:41 | |
| 46 | 46 | msgid "Name" |
| 47 | 47 | msgstr "Nome" |
| 48 | 48 | |
| ... | ... | @@ -72,7 +72,7 @@ msgstr "Imagem" |
| 72 | 72 | |
| 73 | 73 | #: users/models.py:23 |
| 74 | 74 | msgid "Birth Date" |
| 75 | -msgstr "" | |
| 75 | +msgstr "Data de nascimento" | |
| 76 | 76 | |
| 77 | 77 | #: users/models.py:24 |
| 78 | 78 | msgid "Phone" |
| ... | ... | @@ -80,15 +80,15 @@ msgstr "Telefone" |
| 80 | 80 | |
| 81 | 81 | #: users/models.py:25 users/templates/users/profile.html:42 |
| 82 | 82 | msgid "Cpf" |
| 83 | -msgstr "" | |
| 83 | +msgstr "Cpf" | |
| 84 | 84 | |
| 85 | 85 | #: users/models.py:26 |
| 86 | 86 | msgid "Type" |
| 87 | -msgstr "" | |
| 87 | +msgstr "Tipo" | |
| 88 | 88 | |
| 89 | 89 | #: users/models.py:26 |
| 90 | 90 | msgid "Professor" |
| 91 | -msgstr "" | |
| 91 | +msgstr "Professor" | |
| 92 | 92 | |
| 93 | 93 | #: users/models.py:26 |
| 94 | 94 | msgid "Student" |
| ... | ... | @@ -96,11 +96,11 @@ msgstr "Aluno" |
| 96 | 96 | |
| 97 | 97 | #: users/models.py:27 |
| 98 | 98 | msgid "Create Date" |
| 99 | -msgstr "" | |
| 99 | +msgstr "Data de criação" | |
| 100 | 100 | |
| 101 | 101 | #: users/models.py:28 |
| 102 | 102 | msgid "Administrador" |
| 103 | -msgstr "" | |
| 103 | +msgstr "Administrador" | |
| 104 | 104 | |
| 105 | 105 | #: users/models.py:29 |
| 106 | 106 | msgid "Active" |
| ... | ... | @@ -114,18 +114,17 @@ msgstr "Usuário" |
| 114 | 114 | msgid "Users" |
| 115 | 115 | msgstr "Usuários" |
| 116 | 116 | |
| 117 | -#: users/templates/list_users.html:8 users/templates/list_users.html:15 | |
| 118 | -#: users/templates/users/index.html:8 | |
| 119 | -msgid "Manage Users" | |
| 120 | -msgstr "Gerenciar Usuários" | |
| 121 | - | |
| 122 | -#: users/templates/list_users.html:14 users/templates/users/create.html:8 | |
| 117 | +#: users/templates/list_users.html:9 users/templates/users/create.html:8 | |
| 123 | 118 | #: users/templates/users/edit_profile.html:8 users/templates/users/index.html:7 |
| 124 | 119 | #: users/templates/users/profile.html:8 users/templates/users/update.html:8 |
| 125 | 120 | #: users/templates/users/view.html:7 |
| 126 | 121 | msgid "Home" |
| 127 | 122 | msgstr "Início" |
| 128 | 123 | |
| 124 | +#: users/templates/list_users.html:10 users/templates/users/index.html:8 | |
| 125 | +msgid "Manage Users" | |
| 126 | +msgstr "Gerenciar Usuários" | |
| 127 | + | |
| 129 | 128 | #: users/templates/list_users.html:23 |
| 130 | 129 | msgid "Add user" |
| 131 | 130 | msgstr "Adicionar usuário" |
| ... | ... | @@ -134,14 +133,36 @@ msgstr "Adicionar usuário" |
| 134 | 133 | msgid "Send email" |
| 135 | 134 | msgstr "Enviar e-mail" |
| 136 | 135 | |
| 136 | +#: users/templates/list_users.html:42 | |
| 137 | +#: users/templates/users/edit_profile.html:16 | |
| 138 | +#: users/templates/users/profile.html:9 users/templates/users/profile.html:16 | |
| 139 | +msgid "Profile" | |
| 140 | +msgstr "Perfil" | |
| 141 | + | |
| 142 | +#: users/templates/list_users.html:43 | |
| 143 | +msgid "Email" | |
| 144 | +msgstr "Email" | |
| 145 | + | |
| 146 | +#: users/templates/list_users.html:44 | |
| 147 | +msgid "Contact" | |
| 148 | +msgstr "Contato" | |
| 149 | + | |
| 150 | +#: users/templates/list_users.html:46 | |
| 151 | +msgid "Edit" | |
| 152 | +msgstr "Editar" | |
| 153 | + | |
| 154 | +#: users/templates/list_users.html:47 | |
| 155 | +msgid "Delete" | |
| 156 | +msgstr "Apagar" | |
| 157 | + | |
| 137 | 158 | #: users/templates/users/create.html:9 |
| 138 | 159 | msgid "New User" |
| 139 | -msgstr "" | |
| 160 | +msgstr "Novo usuário" | |
| 140 | 161 | |
| 141 | 162 | #: users/templates/users/create.html:16 users/templates/users/index.html:15 |
| 142 | 163 | #: users/templates/users/update.html:16 users/templates/users/view.html:15 |
| 143 | 164 | msgid "System Users" |
| 144 | -msgstr "" | |
| 165 | +msgstr "Usuários do sistema" | |
| 145 | 166 | |
| 146 | 167 | #: users/templates/users/create.html:19 users/templates/users/index.html:18 |
| 147 | 168 | #: users/templates/users/update.html:19 users/templates/users/view.html:18 |
| ... | ... | @@ -171,11 +192,6 @@ msgstr "" |
| 171 | 192 | msgid "Edit Profile" |
| 172 | 193 | msgstr "" |
| 173 | 194 | |
| 174 | -#: users/templates/users/edit_profile.html:16 | |
| 175 | -#: users/templates/users/profile.html:9 users/templates/users/profile.html:16 | |
| 176 | -msgid "Profile" | |
| 177 | -msgstr "" | |
| 178 | - | |
| 179 | 195 | #: users/templates/users/index.html:56 users/templates/users/profile.html:32 |
| 180 | 196 | #: users/templates/users/view.html:39 |
| 181 | 197 | msgid "Administrator" | ... | ... |
users/templates/list_users.html
| ... | ... | @@ -3,11 +3,6 @@ |
| 3 | 3 | {% load i18n %} |
| 4 | 4 | |
| 5 | 5 | {% block breadcrumbs %} |
| 6 | - <div class="row"> | |
| 7 | - <div class="col-md-12"> | |
| 8 | - <h4>{% trans 'Manage Users' %}</h4> | |
| 9 | - </div> | |
| 10 | - </div> | |
| 11 | 6 | <div class="row"> |
| 12 | 7 | <div class="col-md-12"> |
| 13 | 8 | <ul class="breadcrumb" style="margin-bottom: 5px;"> |
| ... | ... | @@ -19,12 +14,41 @@ |
| 19 | 14 | {% endblock %} |
| 20 | 15 | |
| 21 | 16 | {% 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> | |
| 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> | |
| 25 | 27 | </div> |
| 26 | 28 | {% endblock %} |
| 27 | 29 | |
| 28 | 30 | {% block content %} |
| 29 | 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 | + {% endif %} | |
| 30 | 54 | {% endblock %} | ... | ... |