diff --git a/amadeus/locale/pt_BR/LC_MESSAGES/django.po b/amadeus/locale/pt_BR/LC_MESSAGES/django.po index e101ecd..43110f2 100644 --- a/amadeus/locale/pt_BR/LC_MESSAGES/django.po +++ b/amadeus/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: 2017-04-09 21:59-0300\n" +"POT-Creation-Date: 2017-04-11 19:17-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,107 +18,107 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: .\local_settings.py:107 .\settings.py:179 +#: amadeus/settings.py:179 msgid "Portuguese" msgstr "" -#: .\local_settings.py:108 .\settings.py:180 +#: amadeus/settings.py:180 msgid "English" msgstr "" -#: .\templates\base.html:93 +#: amadeus/templates/base.html:93 msgid "Search for subjects and resources" msgstr "Buscar por assuntos ou recursos" -#: .\templates\base.html:106 .\templates\base.html:111 +#: amadeus/templates/base.html:106 amadeus/templates/base.html:111 msgid "Language Selector" msgstr "" -#: .\templates\base.html:152 +#: amadeus/templates/base.html:152 msgid "Profile" msgstr "Perfil" -#: .\templates\base.html:153 +#: amadeus/templates/base.html:153 msgid "Edit Profile" msgstr "Editar Perfil" -#: .\templates\base.html:154 +#: amadeus/templates/base.html:154 msgid "Change Password" msgstr "Alterar Senha" -#: .\templates\base.html:155 +#: amadeus/templates/base.html:155 msgid "Delete Account" msgstr "Remover Conta" -#: .\templates\base.html:156 +#: amadeus/templates/base.html:156 msgid "Logout" msgstr "Sair" -#: .\templates\base.html:161 +#: amadeus/templates/base.html:161 msgid "settings" msgstr "configurações" -#: .\templates\base.html:164 +#: amadeus/templates/base.html:164 msgid "Settings" msgstr "Configurações" -#: .\templates\base.html:167 +#: amadeus/templates/base.html:167 msgid "Manage Users" msgstr "Gerenciar Usuários" -#: .\templates\base.html:168 +#: amadeus/templates/base.html:168 msgid "Manage Categories" msgstr "Gerenciar Categorias" -#: .\templates\base.html:169 +#: amadeus/templates/base.html:169 msgid "Manage News" msgstr "Gerenciar Notícias" -#: .\templates\base.html:176 +#: amadeus/templates/base.html:176 msgid "System" msgstr "Sistema" -#: .\templates\base.html:183 +#: amadeus/templates/base.html:183 msgid "Mail Sender" msgstr "Remetente de Email" -#: .\templates\base.html:184 +#: amadeus/templates/base.html:184 msgid "Security" msgstr "Segurança" -#: .\templates\base.html:185 +#: amadeus/templates/base.html:185 msgid "Theme" msgstr "Temas" -#: .\templates\base.html:186 +#: amadeus/templates/base.html:186 #, fuzzy #| msgid "Web Conference Settings" msgid "Web Conference" msgstr "Web conferência" -#: .\templates\base.html:206 .\templates\base.html:261 +#: amadeus/templates/base.html:206 amadeus/templates/base.html:261 msgid "Subjects" msgstr "Assuntos" -#: .\templates\base.html:211 .\templates\base.html:266 +#: amadeus/templates/base.html:211 amadeus/templates/base.html:266 msgid "Mural" msgstr "" -#: .\templates\base.html:217 .\templates\base.html:272 +#: amadeus/templates/base.html:217 amadeus/templates/base.html:272 msgid "Messages" msgstr "Mensagens" -#: .\templates\base.html:223 .\templates\base.html:278 +#: amadeus/templates/base.html:223 amadeus/templates/base.html:278 #, fuzzy #| msgid "Pendencias" msgid "Pendencies" msgstr "Pendências" -#: .\templates\base.html:231 .\templates\base.html:286 +#: amadeus/templates/base.html:231 amadeus/templates/base.html:286 msgid "Analytics" msgstr "Analytics" -#: .\templates\recover_pass_email_template.html:7 +#: amadeus/templates/recover_pass_email_template.html:7 #, python-format msgid "" "You're receiving this email because you requested a password reset for your " @@ -127,11 +127,11 @@ msgstr "" "Você está recebendo esse email porque você solicitou uma alteração de senha " "para a sua conta em %(site_name)s." -#: .\templates\recover_pass_email_template.html:9 +#: amadeus/templates/recover_pass_email_template.html:9 msgid "Please go to the following page and choose a new password:" msgstr "Por favor vá até a seguinte página e escolha uma nova senha:" -#: .\templates\recover_pass_email_template.html:15 +#: amadeus/templates/recover_pass_email_template.html:15 #, python-format msgid "The %(site_name)s team" msgstr "Time %(site_name)s" diff --git a/amadeus/static/js/pendencies.js b/amadeus/static/js/pendencies.js index 404f134..0f34aca 100644 --- a/amadeus/static/js/pendencies.js +++ b/amadeus/static/js/pendencies.js @@ -300,6 +300,8 @@ function searchHistory(panel_id) { var items = $("#history_table_" + panel_id).children(":visible").length; + holder.jPages("destroy"); + if (items > 10) { holder.jPages({ containerID : "history_table_" + panel_id, @@ -382,7 +384,10 @@ function metaFunctions() { popover.popover('hide'); }); - save.on("click", function () { + save.on("click", function (e) { + e.preventDefault(); + e.stopImmediatePropagation(); + var meta = datetime.data('date'), url = form.attr('action'), method = form.attr('method'), diff --git a/categories/locale/pt_BR/LC_MESSAGES/django.po b/categories/locale/pt_BR/LC_MESSAGES/django.po index fbed5e0..403a64d 100644 --- a/categories/locale/pt_BR/LC_MESSAGES/django.po +++ b/categories/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: 2017-04-06 22:17-0300\n" +"POT-Creation-Date: 2017-04-11 19:18-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/chat/locale/pt_BR/LC_MESSAGES/django.po b/chat/locale/pt_BR/LC_MESSAGES/django.po index 5dae9a5..c8885e1 100644 --- a/chat/locale/pt_BR/LC_MESSAGES/django.po +++ b/chat/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: 2017-04-06 22:17-0300\n" +"POT-Creation-Date: 2017-04-11 19:17-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,6 +17,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" + #: chat/forms.py:19 msgid "This field is required." msgstr "Esse campo é obrigatório." @@ -29,7 +30,9 @@ msgstr "A imagem é muito grande. Ela deve possuir 5MB ou menos." msgid "" "Select a valid file. The file must posses one of this extensions: .jpg, ." "png, .gif" -msgstr "Selecione um arquivo válido. O arquivo deve possuir uma das extensões a seguir: .jpg, .png, .gif" +msgstr "" +"Selecione um arquivo válido. O arquivo deve possuir uma das extensões a " +"seguir: .jpg, .png, .gif" #: chat/models.py:25 msgid "User One" diff --git a/file_link/locale/pt_BR/LC_MESSAGES/django.po b/file_link/locale/pt_BR/LC_MESSAGES/django.po index c89e91a..459a054 100644 --- a/file_link/locale/pt_BR/LC_MESSAGES/django.po +++ b/file_link/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: 2017-04-06 22:17-0300\n" +"POT-Creation-Date: 2017-04-11 19:18-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/goals/locale/pt_BR/LC_MESSAGES/django.po b/goals/locale/pt_BR/LC_MESSAGES/django.po index 8dad57d..27c5698 100644 --- a/goals/locale/pt_BR/LC_MESSAGES/django.po +++ b/goals/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: 2017-04-06 22:17-0300\n" +"POT-Creation-Date: 2017-04-11 19:17-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/links/locale/pt_BR/LC_MESSAGES/django.po b/links/locale/pt_BR/LC_MESSAGES/django.po index 6975509..af41e27 100644 --- a/links/locale/pt_BR/LC_MESSAGES/django.po +++ b/links/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: 2017-04-06 22:17-0300\n" +"POT-Creation-Date: 2017-04-11 19:17-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/log/locale/pt_BR/LC_MESSAGES/django.po b/log/locale/pt_BR/LC_MESSAGES/django.po index 72a8bc2..2f08d47 100644 --- a/log/locale/pt_BR/LC_MESSAGES/django.po +++ b/log/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: 2017-04-06 22:17-0300\n" +"POT-Creation-Date: 2017-04-11 19:18-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/mailsender/locale/pt_BR/LC_MESSAGES/django.po b/mailsender/locale/pt_BR/LC_MESSAGES/django.po index ac7a184..0660d23 100644 --- a/mailsender/locale/pt_BR/LC_MESSAGES/django.po +++ b/mailsender/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: 2017-04-06 22:17-0300\n" +"POT-Creation-Date: 2017-04-11 19:17-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/mural/locale/pt_BR/LC_MESSAGES/django.po b/mural/locale/pt_BR/LC_MESSAGES/django.po index eefc664..b5d55b7 100644 --- a/mural/locale/pt_BR/LC_MESSAGES/django.po +++ b/mural/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: 2017-04-06 22:17-0300\n" +"POT-Creation-Date: 2017-04-11 19:17-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -150,48 +150,60 @@ msgstr "Marcar Usuário" msgid "No results found." msgstr "Nenhum resultado encontrado." -#: mural/templates/mural/_view.html:22 -#: mural/templates/mural/_view_comment.html:22 +#: mural/templates/mural/_view.html:17 +#: mural/templates/mural/_view_comment.html:18 +#: mural/templates/mural/delete.html:16 +msgid "Close" +msgstr "Fechar" + +#: mural/templates/mural/_view.html:30 +#: mural/templates/mural/_view_comment.html:31 +msgid "See Profile" +msgstr "" + +#: mural/templates/mural/_view.html:33 +#: mural/templates/mural/_view_comment.html:34 +msgid "Send Message" +msgstr "" + +#: mural/templates/mural/_view.html:52 +#: mural/templates/mural/_view_comment.html:52 #: mural/templates/mural/list_category.html:59 #: mural/templates/mural/list_subject.html:58 #: mural/templates/mural/subject_view.html:39 msgid "Edit" msgstr "Editar" -#: mural/templates/mural/_view.html:24 -#: mural/templates/mural/_view_comment.html:24 +#: mural/templates/mural/_view.html:54 +#: mural/templates/mural/_view_comment.html:54 #: mural/templates/mural/list_category.html:61 #: mural/templates/mural/list_subject.html:60 #: mural/templates/mural/subject_view.html:41 msgid "Remove" msgstr "Remover" -#: mural/templates/mural/_view.html:36 -#: mural/templates/mural/_view_comment.html:31 +#: mural/templates/mural/_view.html:66 +#: mural/templates/mural/_view_comment.html:61 msgid "In" msgstr "Em" -#: mural/templates/mural/_view.html:47 +#: mural/templates/mural/_view.html:77 msgid "See complete post" msgstr "Ver postagem completa" -#: mural/templates/mural/_view.html:50 +#: mural/templates/mural/_view.html:80 msgid "See more comments..." msgstr "Ver mais comentários..." -#: mural/templates/mural/_view.html:61 +#: mural/templates/mural/_view.html:91 msgid "Make a comment..." msgstr "Faça um comentário..." -#: mural/templates/mural/_view_comment.html:14 +#: mural/templates/mural/_view_comment.html:44 msgctxt "view" msgid "Comment" msgstr "Comentou" -#: mural/templates/mural/delete.html:16 -msgid "Close" -msgstr "Fechar" - #: mural/templates/mural/delete.html:17 msgid "Delete" msgstr "Deletar" @@ -310,22 +322,34 @@ msgstr "Grupos" msgid "Mural" msgstr "Mural" -#: mural/templatetags/mural_filters.py:12 +#: mural/templatetags/mural_filters.py:17 msgid "(Edited)" msgstr "(Editado)" -#: mural/templatetags/mural_filters.py:30 mural/views.py:1226 +#: mural/templatetags/mural_filters.py:35 mural/views.py:1226 msgid "Unfavorite" msgstr "Desfavoritar" -#: mural/templatetags/mural_filters.py:32 mural/views.py:1230 +#: mural/templatetags/mural_filters.py:37 mural/views.py:1230 msgid "Favorite" msgstr "Favoritar" -#: mural/templatetags/mural_filters.py:106 +#: mural/templatetags/mural_filters.py:111 msgid "about" msgstr "sobre" +#: mural/templatetags/mural_filters.py:136 +msgid "Online" +msgstr "" + +#: mural/templatetags/mural_filters.py:138 +msgid "Away" +msgstr "" + +#: mural/templatetags/mural_filters.py:140 +msgid "Offline" +msgstr "" + #: mural/views.py:154 #, python-format msgid "%s has made a post in General" diff --git a/news/locale/pt_BR/LC_MESSAGES/django.po b/news/locale/pt_BR/LC_MESSAGES/django.po index 28f747d..a95b4b8 100644 --- a/news/locale/pt_BR/LC_MESSAGES/django.po +++ b/news/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: 2017-04-09 13:24-0300\n" +"POT-Creation-Date: 2017-04-11 19:18-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,81 +18,106 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: .\forms.py:22 +#: news/forms.py:22 msgid "This field is required" msgstr "Este campo é obrigatório." -#: .\forms.py:33 +#: news/forms.py:33 msgid "The image is too large. It should have less than 5MB." msgstr "A imagem é muito grande. Ela deve ter menos que 5MB." -#: .\forms.py:36 +#: news/forms.py:36 msgid "This field is required." msgstr "Este campo é obrigatório." -#: .\models.py:15 +#: news/models.py:15 msgid "File not supported." msgstr "Arquivo não suportado" -#: .\models.py:18 +#: news/models.py:18 msgid "Title" msgstr "Título" -#: .\models.py:19 +#: news/models.py:19 msgid "Slug" msgstr "" -#: .\models.py:20 +#: news/models.py:20 msgid "News Image" msgstr "Imagem de apresentação da notícia" -#: .\models.py:21 +#: news/models.py:21 msgid "News Content" msgstr "Conteúdo da notícia" -#: .\models.py:22 +#: news/models.py:22 msgid "Create Date" msgstr "Data de criação" -#: .\models.py:23 +#: news/models.py:23 msgid "Creator" msgstr "Autor" -#: .\models.py:25 .\models.py:26 +#: news/models.py:25 news/models.py:26 msgid "News" msgstr "Notícia" -#: .\templates\news\_form.html:12 +#: news/templates/news/_form.html:12 msgid "Choose your photo..." msgstr "Escolha a foto" -#: .\templates\news\_form.html:59 +#: news/templates/news/_form.html:59 msgid "Save" msgstr "Salvar" -#: .\templates\news\_form.html:62 +#: news/templates/news/_form.html:62 msgid "Cancel" msgstr "Cancelar" -#: .\templates\news\create.html:7 +#: news/templates/news/create.html:7 msgid "Register News" msgstr "Cadastrar notícia" -#: .\templates\news\list.html:7 +#: news/templates/news/list.html:7 news/views.py:47 msgid "Manage News" msgstr "Gerenciar notícias" -#: .\templates\news\list.html:31 -msgid "Create news" +#: news/templates/news/list.html:34 +msgid "Search..." +msgstr "" + +#: news/templates/news/list.html:45 news/views.py:74 +msgid "Create News" +msgstr "Criar notícia" + +#: news/templates/news/list.html:59 +msgid "Edit" +msgstr "" + +#: news/templates/news/list.html:60 +msgid "Delete" +msgstr "" + +#: news/templates/news/list.html:71 +msgid "No news found" +msgstr "" + +#: news/templates/news/update.html:7 news/views.py:92 +#, fuzzy +#| msgid "Create News" +msgid "Update News" msgstr "Criar notícia" -#: .\views.py:50 +#: news/views.py:22 +msgid "Visualize News" +msgstr "" + +#: news/views.py:68 news/views.py:86 msgid "News successfully created!" msgstr "Notícia criada com sucesso" -#: .\views.py:55 -msgid "Create News" -msgstr "Criar notícia" +#~ msgid "Create news" +#~ msgstr "Criar notícia" #~ msgid "There is already a news with this name" #~ msgstr "Já existe uma notícia com esse nome" diff --git a/notifications/cron.py b/notifications/cron.py index a877a0d..a2b52d4 100644 --- a/notifications/cron.py +++ b/notifications/cron.py @@ -3,6 +3,9 @@ from django_cron import CronJobBase, Schedule from .utils import set_notifications +from log.models import Log +from users.models import User + class Notify(CronJobBase): RUN_EVERY_MINS = 1440 # every day @@ -11,6 +14,22 @@ class Notify(CronJobBase): def do(self): set_notifications() + + admins = User.objects.filter(is_staff = True) + + if admins.count() > 0: + admin = admins[0] + + log = Log(component = "notifications", action = "cron", resource = "notifications", user = str(admin), user_id = admin.id, user_email = admin.email, context = {}) + log.save() + def notification_cron(): - set_notifications() \ No newline at end of file + set_notifications() + + admins = User.objects.filter(is_staff = True) + + if admins.count() > 0: + admin = admins[0] + + Log.objects.create(component = "notifications", action = "cron", resource = "notifications", user = str(admin), user_id = admin.id, user_email = admin.email, context = {}) \ No newline at end of file diff --git a/notifications/locale/pt_BR/LC_MESSAGES/django.po b/notifications/locale/pt_BR/LC_MESSAGES/django.po index 5e2246b..f4786d5 100644 --- a/notifications/locale/pt_BR/LC_MESSAGES/django.po +++ b/notifications/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: 2017-04-06 22:17-0300\n" +"POT-Creation-Date: 2017-04-11 19:18-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -127,62 +127,72 @@ msgstr "Sua meta é realizar essa tarefa em" msgid "Task finished in" msgstr "Tarefa finalizada em" -#: notifications/templates/notifications/_view.html:36 +#: notifications/templates/notifications/_view.html:37 msgid "of the participants already realized this task." msgstr "dos participantes já realizaram essa tarefa." -#: notifications/templates/notifications/_view.html:48 +#: notifications/templates/notifications/_view.html:50 msgid "Access the task" msgstr "Acessar a Tarefa" -#: notifications/templates/notifications/_view.html:50 +#: notifications/templates/notifications/_view.html:52 msgid "Realize the task" msgstr "Realizar a Tarefa" -#: notifications/templates/notifications/_view.html:55 +#: notifications/templates/notifications/_view.html:57 msgid "or" msgstr "ou" -#: notifications/templates/notifications/_view.html:58 +#: notifications/templates/notifications/_view.html:60 msgid "Define goal to realization" msgstr "Definir meta para realização" -#: notifications/templates/notifications/_view.html:60 +#: notifications/templates/notifications/_view.html:62 msgid "Define new goal" msgstr "Definir nova meta" -#: notifications/templates/notifications/_view.html:82 +#: notifications/templates/notifications/_view.html:84 msgid "Save Goal" msgstr "Salvar Meta" -#: notifications/templates/notifications/_view.html:85 +#: notifications/templates/notifications/_view.html:87 msgid "Cancel" msgstr "Cancelar" -#: notifications/templates/notifications/index.html:20 +#: notifications/templates/notifications/index.html:19 +#: notifications/templates/notifications/subject.html:13 +msgid "This pendencies list is updated every 24 hours. Last update was in:" +msgstr "Esta lista de pendências é atualizada a cada 24 horas. A última atualização ocorreu em:" + +#: notifications/templates/notifications/index.html:19 +#: notifications/templates/notifications/subject.html:13 +msgid "Not determined" +msgstr "Não Determinado" + +#: notifications/templates/notifications/index.html:21 msgid "You got pendencies in the following subjects" msgstr "Você possui pendências nos seguintes assuntos" -#: notifications/templates/notifications/index.html:38 -#: notifications/templates/notifications/subject.html:31 +#: notifications/templates/notifications/index.html:39 +#: notifications/templates/notifications/subject.html:32 msgid "Actual Pendencies" msgstr "Pendências Atuais" -#: notifications/templates/notifications/index.html:39 -#: notifications/templates/notifications/subject.html:32 +#: notifications/templates/notifications/index.html:40 +#: notifications/templates/notifications/subject.html:33 msgid "Notifications History" msgstr "Histórico de Notificações" -#: notifications/templates/notifications/index.html:69 +#: notifications/templates/notifications/index.html:70 msgid "You do not posses any pendency." msgstr "Você não possui nenhuma pendência." -#: notifications/templates/notifications/subject.html:23 -#: notifications/views.py:198 +#: notifications/templates/notifications/subject.html:24 +#: notifications/views.py:204 msgid "Pendencies" msgstr "Pendências" -#: notifications/templates/notifications/subject.html:44 +#: notifications/templates/notifications/subject.html:46 msgid "You do not posses any pendency in this subject" msgstr "Você não possui nenhuma pendência nesse assunto" @@ -210,37 +220,37 @@ msgstr "Meta definida para realização da tarefa: %s" msgid "New goal defined to task realization: %s" msgstr "Nova meta definida para realização da tarefa: %s" -#: notifications/views.py:69 notifications/views.py:148 +#: notifications/views.py:69 notifications/views.py:154 #, python-format msgid "%s - Pendencies" msgstr "%s - Pendências" -#: notifications/views.py:282 +#: notifications/views.py:294 msgid "No goal date received" msgstr "Nenhuma data para meta recebida" -#: notifications/views.py:289 +#: notifications/views.py:301 msgid "Could not identify the notification" msgstr "Não foi possível identificar a notificação" -#: notifications/views.py:296 +#: notifications/views.py:308 msgid "The goal date should be equal or after today's date" msgstr "" "A meta de realização da tarefa deve ser uma data igual ou posterior à data " "atual" -#: notifications/views.py:299 +#: notifications/views.py:311 msgid "The goal date should be equal or before subject's date" msgstr "" "A meta de realização da tarefa deve ser uma data igual ou anterior à data " "final do assunto" -#: notifications/views.py:311 +#: notifications/views.py:323 #, python-format msgid "Your new goal to realize the task %s is %s" msgstr "Sua nova meta para realizar a tarefa %s é %s" -#: notifications/views.py:313 +#: notifications/views.py:325 #, python-format msgid "Your goal to realize the task %s is %s" msgstr "Sua meta para realizar a tarefa %s é %s" diff --git a/notifications/templates/notifications/_view.html b/notifications/templates/notifications/_view.html index 29f2134..93d1ca0 100644 --- a/notifications/templates/notifications/_view.html +++ b/notifications/templates/notifications/_view.html @@ -33,7 +33,9 @@

{% trans 'Task finished in' %}: {{ notification.task.limit_date }}

{% endif %} - {{ notification|done_percent|floatformat:2 }}% {% trans 'of the participants already realized this task.' %} + {% if notification|done_percent >= 30 %} + {{ notification|done_percent|floatformat:2 }}% {% trans 'of the participants already realized this task.' %} + {% endif %}
diff --git a/notifications/templates/notifications/index.html b/notifications/templates/notifications/index.html index ed8004b..26d2289 100644 --- a/notifications/templates/notifications/index.html +++ b/notifications/templates/notifications/index.html @@ -16,6 +16,7 @@ {% block content %} +
{% trans 'This pendencies list is updated every 24 hours. Last update was in:' %} {{ last_update|default:_('Not determined') }}
{% if notifications.count > 0 %}

{% trans 'You got pendencies in the following subjects' %}:

diff --git a/notifications/templates/notifications/subject.html b/notifications/templates/notifications/subject.html index d3fe8eb..fb78e47 100644 --- a/notifications/templates/notifications/subject.html +++ b/notifications/templates/notifications/subject.html @@ -10,6 +10,7 @@ {% endblock %} {% block content %} +
{% trans 'This pendencies list is updated every 24 hours. Last update was in:' %} {{ last_update|default:_('Not determined') }}
{% if subject.visible %}
@@ -34,6 +35,7 @@
{% if not history %} + {% if notifications.count > 0 %} {% include 'notifications/_view.html' %} diff --git a/notifications/utils.py b/notifications/utils.py index 2a9f625..128e9c6 100644 --- a/notifications/utils.py +++ b/notifications/utils.py @@ -2,6 +2,8 @@ from datetime import date from django.utils import timezone from django.db.models import Q from dateutil.parser import parse +from datetime import datetime +from django.utils import formats from log.models import Log from pendencies.models import Pendencies @@ -99,8 +101,28 @@ def get_order_by(order): return ["meta"] def is_date(string): - try: - parse(string) - return True - except ValueError: - return False \ No newline at end of file + try: + parse(string) + return True + except ValueError: + return False + +def strToDate(string): + correct_format = formats.get_format("SHORT_DATE_FORMAT") + correct_format = correct_format.split('/') + correct_format = ["%" + x for x in correct_format] + + slash_format = '/'.join(correct_format) + hiphen_format = '-'.join(correct_format) + + try: + search_date = datetime.strptime(string, slash_format) + search_date = timezone.make_aware(search_date, timezone.get_current_timezone()) + except ValueError: + try: + search_date = datetime.strptime(string, hiphen_format) + search_date = timezone.make_aware(search_date, timezone.get_current_timezone()) + except ValueError: + search_date = datetime.fromtimestamp(0) + + return search_date \ No newline at end of file diff --git a/notifications/views.py b/notifications/views.py index 7bfb737..24051cd 100644 --- a/notifications/views.py +++ b/notifications/views.py @@ -23,7 +23,7 @@ from log.decorators import log_decorator, log_decorator_ajax import time from .models import Notification -from .utils import get_order_by, is_date +from .utils import get_order_by, is_date, strToDate class SubjectNotifications(LoginRequiredMixin, LogMixin, generic.ListView): log_component = 'pendencies' @@ -70,6 +70,13 @@ class SubjectNotifications(LoginRequiredMixin, LogMixin, generic.ListView): context['subject'] = subject context['total'] = self.total + update_pendencies = Log.objects.filter(action = "cron", component = "notifications").order_by('-datetime') + + if update_pendencies.count() > 0: + last_update = update_pendencies[0] + + context['last_update'] = last_update.datetime + self.log_context['subject_id'] = subject.id self.log_context['subject_name'] = subject.name self.log_context['subject_slug'] = subject.slug @@ -125,8 +132,7 @@ class SubjectHistory(LoginRequiredMixin, LogMixin, generic.ListView): queries |= Q(level = search) if is_date(search): - search_date = parser.parse(search) - search_date = timezone.make_aware(search_date, timezone.get_current_timezone()) + search_date = strToDate(search) queries |= Q(creation_date = search_date) queries |= Q(task__limit_date = search_date) @@ -197,6 +203,13 @@ class IndexView(LoginRequiredMixin, generic.ListView): context['title'] = _('Pendencies') + update_pendencies = Log.objects.filter(action = "cron", component = "notifications").order_by('-datetime') + + if update_pendencies.count() > 0: + last_update = update_pendencies[0] + + context['last_update'] = last_update.datetime + cat = self.kwargs.get('slug', None) if cat: @@ -246,8 +259,7 @@ class AjaxHistory(LoginRequiredMixin, generic.ListView): queries |= Q(level = search) if is_date(search): - search_date = parser.parse(search) - search_date = timezone.make_aware(search_date, timezone.get_current_timezone()) + search_date = strToDate(search) queries |= Q(creation_date = search_date) queries |= Q(task__limit_date = search_date) diff --git a/pdf_file/locale/pt_BR/LC_MESSAGES/django.po b/pdf_file/locale/pt_BR/LC_MESSAGES/django.po index 07ab3eb..ad9fa30 100644 --- a/pdf_file/locale/pt_BR/LC_MESSAGES/django.po +++ b/pdf_file/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: 2017-04-06 22:17-0300\n" +"POT-Creation-Date: 2017-04-11 19:18-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/pendencies/locale/pt_BR/LC_MESSAGES/django.po b/pendencies/locale/pt_BR/LC_MESSAGES/django.po index c946bb4..f622bd2 100644 --- a/pendencies/locale/pt_BR/LC_MESSAGES/django.po +++ b/pendencies/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: 2017-04-08 18:18-0300\n" +"POT-Creation-Date: 2017-04-11 19:17-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,28 +18,31 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: forms.py:49 forms.py:52 forms.py:55 forms.py:128 forms.py:131 forms.py:134 -#: forms.py:137 +#: pendencies/forms.py:49 pendencies/forms.py:52 pendencies/forms.py:55 +#: pendencies/forms.py:128 pendencies/forms.py:131 pendencies/forms.py:134 +#: pendencies/forms.py:137 msgid "This field is required." msgstr "Esse campo é obrigatório." -#: forms.py:60 forms.py:142 +#: pendencies/forms.py:60 pendencies/forms.py:142 msgid "This input should be filled with a date equal or before the End Date." msgstr "" "Esse campo deve ser preenchido com uma data igual ou anterior à Data Final." -#: forms.py:61 forms.py:143 forms.py:149 +#: pendencies/forms.py:61 pendencies/forms.py:143 pendencies/forms.py:149 msgid "This input should be filled with a date equal or after the Begin Date." msgstr "" "Esse campo deve ser preenchido com uma data igual ou posterior à Data " "Inicial." -#: forms.py:68 forms.py:78 forms.py:162 forms.py:172 forms.py:182 +#: pendencies/forms.py:68 pendencies/forms.py:78 pendencies/forms.py:162 +#: pendencies/forms.py:172 pendencies/forms.py:182 msgid "This input should be filled with a date equal or after today's date." msgstr "" "Esse campo deve ser preenchido com uma data igual ou posterior à data atual." -#: forms.py:71 forms.py:81 forms.py:165 forms.py:175 forms.py:185 +#: pendencies/forms.py:71 pendencies/forms.py:81 pendencies/forms.py:165 +#: pendencies/forms.py:175 pendencies/forms.py:185 #, python-format msgid "" "This input should be filled with a date equal or after the subject begin " @@ -48,7 +51,8 @@ msgstr "" "Esse campo deve ser preenchido com uma data igual ou posterior à data " "inicial do assunto.(\"%s\")" -#: forms.py:74 forms.py:84 forms.py:168 forms.py:178 forms.py:188 +#: pendencies/forms.py:74 pendencies/forms.py:84 pendencies/forms.py:168 +#: pendencies/forms.py:178 pendencies/forms.py:188 #, python-format msgid "" "This input should be filled with a date equal or before the subject end date." @@ -57,18 +61,18 @@ msgstr "" "Esse campo deve ser preenchido com uma data igual ou anterior à data final " "do assunto.(\"%s\")" -#: forms.py:148 forms.py:154 +#: pendencies/forms.py:148 pendencies/forms.py:154 msgid "This input should be filled with a date equal or before the Limit Date." msgstr "" "Esse campo deve ser preenchido com uma data igual ou anterior à Data Final." -#: forms.py:155 +#: pendencies/forms.py:155 msgid "This input should be filled with a date equal or after the End Date." msgstr "" "Esse campo deve ser preenchido com uma data igual ou posterior à Data " "Inicial." -#: forms.py:196 forms.py:200 forms.py:204 +#: pendencies/forms.py:196 pendencies/forms.py:200 pendencies/forms.py:204 #, python-format msgid "" "This input should be filled with a date equal or before the goals submission " @@ -77,50 +81,50 @@ msgstr "" "Esse campo deve ser preenchido com uma data igual ou anterior à data final " "do assunto.(\"%s\")" -#: models.py:8 +#: pendencies/models.py:8 msgid "Action" msgstr "Ação" -#: models.py:8 +#: pendencies/models.py:8 msgid "Visualize" msgstr "Visualizar" -#: models.py:8 +#: pendencies/models.py:8 msgid "Create" msgstr "Criar" -#: models.py:8 +#: pendencies/models.py:8 msgid "Answer" msgstr "Responder" -#: models.py:8 +#: pendencies/models.py:8 msgid "Access" msgstr "Acessar" -#: models.py:8 +#: pendencies/models.py:8 msgid "Participate" msgstr "Participar" -#: models.py:8 +#: pendencies/models.py:8 msgid "Finish" msgstr "Fim" -#: models.py:8 +#: pendencies/models.py:8 msgid "Submit" msgstr "Enviar" -#: models.py:9 +#: pendencies/models.py:9 msgid "Begin Date" msgstr "Data Inicial" -#: models.py:10 +#: pendencies/models.py:10 msgid "End Date" msgstr "Data Final" -#: models.py:11 +#: pendencies/models.py:11 msgid "Limit Date" msgstr "Data Limite" -#: models.py:12 +#: pendencies/models.py:12 msgid "Resource" msgstr "Recurso" diff --git a/reports/locale/pt_BR/LC_MESSAGES/django.po b/reports/locale/pt_BR/LC_MESSAGES/django.po index fe2d70f..ab51ad3 100644 --- a/reports/locale/pt_BR/LC_MESSAGES/django.po +++ b/reports/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: 2017-04-06 22:17-0300\n" +"POT-Creation-Date: 2017-04-11 19:18-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/security/locale/pt_BR/LC_MESSAGES/django.po b/security/locale/pt_BR/LC_MESSAGES/django.po index d7295ac..61e1d9a 100644 --- a/security/locale/pt_BR/LC_MESSAGES/django.po +++ b/security/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: 2017-04-06 22:17-0300\n" +"POT-Creation-Date: 2017-04-11 19:17-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/students_group/locale/pt_BR/LC_MESSAGES/django.po b/students_group/locale/pt_BR/LC_MESSAGES/django.po index 025f82c..0036b49 100644 --- a/students_group/locale/pt_BR/LC_MESSAGES/django.po +++ b/students_group/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: 2017-04-06 22:17-0300\n" +"POT-Creation-Date: 2017-04-11 19:18-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/subjects/locale/pt_BR/LC_MESSAGES/django.po b/subjects/locale/pt_BR/LC_MESSAGES/django.po index 3b12f5d..8bb5361 100644 --- a/subjects/locale/pt_BR/LC_MESSAGES/django.po +++ b/subjects/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: 2017-04-06 22:17-0300\n" +"POT-Creation-Date: 2017-04-11 19:18-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -26,7 +26,7 @@ msgstr "Tags" msgid "There is another subject with this name, try another one." msgstr "Já existe um assunto com esse nome, tente outro." -#: subjects/forms.py:76 subjects/forms.py:179 +#: subjects/forms.py:76 msgid "This date must be today or after" msgstr "Essa data deve ser hoje ou depois disso" diff --git a/themes/locale/pt_BR/LC_MESSAGES/django.po b/themes/locale/pt_BR/LC_MESSAGES/django.po index 6ee0c72..6bb7550 100644 --- a/themes/locale/pt_BR/LC_MESSAGES/django.po +++ b/themes/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: 2017-04-06 22:17-0300\n" +"POT-Creation-Date: 2017-04-11 19:17-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/topics/locale/pt_BR/LC_MESSAGES/django.po b/topics/locale/pt_BR/LC_MESSAGES/django.po index 0078ef2..d2125e6 100644 --- a/topics/locale/pt_BR/LC_MESSAGES/django.po +++ b/topics/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: 2017-04-06 22:17-0300\n" +"POT-Creation-Date: 2017-04-11 19:18-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 7be59a9..55b1235 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: 2017-04-06 22:17-0300\n" +"POT-Creation-Date: 2017-04-11 19:17-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -153,11 +153,11 @@ msgstr "Não é administrador" msgid "Choose your photo..." msgstr "Escolha sua foto..." -#: users/templates/users/_form.html:70 +#: users/templates/users/_form.html:76 msgid "Save" msgstr "Salvar" -#: users/templates/users/_form.html:73 users/templates/users/modal_crop.html:24 +#: users/templates/users/_form.html:79 users/templates/users/modal_crop.html:24 msgid "Cancel" msgstr "Cancelar" @@ -198,7 +198,7 @@ msgstr "Recuperar" #: users/templates/users/forgot_password.html:75 #: users/templates/users/new_password.html:80 -#: users/templates/users/register.html:92 +#: users/templates/users/register.html:93 msgid "Back" msgstr "Voltar" @@ -275,7 +275,7 @@ msgstr "Estudante em" msgid "User Register" msgstr "Cadastro de Usuário" -#: users/templates/users/register.html:89 +#: users/templates/users/register.html:90 msgid "Register" msgstr "Cadastrar" diff --git a/webconference/locale/pt_BR/LC_MESSAGES/django.po b/webconference/locale/pt_BR/LC_MESSAGES/django.po index eb8e848..a907ada 100644 --- a/webconference/locale/pt_BR/LC_MESSAGES/django.po +++ b/webconference/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: 2017-04-06 22:17-0300\n" +"POT-Creation-Date: 2017-04-11 19:18-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/webpage/locale/pt_BR/LC_MESSAGES/django.po b/webpage/locale/pt_BR/LC_MESSAGES/django.po index c72ea0a..36f4282 100644 --- a/webpage/locale/pt_BR/LC_MESSAGES/django.po +++ b/webpage/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: 2017-04-06 22:17-0300\n" +"POT-Creation-Date: 2017-04-11 19:18-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/youtube_video/locale/pt_BR/LC_MESSAGES/django.po b/youtube_video/locale/pt_BR/LC_MESSAGES/django.po index 4bd38dd..a8fc148 100644 --- a/youtube_video/locale/pt_BR/LC_MESSAGES/django.po +++ b/youtube_video/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: 2017-04-06 22:17-0300\n" +"POT-Creation-Date: 2017-04-11 19:17-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" -- libgit2 0.21.2