diff --git a/lib/assets/js/comment-form-animation.js b/lib/assets/js/comment-form-animation.js index 83c1ef2f1..5ee42e74f 100644 --- a/lib/assets/js/comment-form-animation.js +++ b/lib/assets/js/comment-form-animation.js @@ -16,7 +16,7 @@ function showForm(button) { $(document).click(function(event) { if(!$(event.target).closest('#commentform').length && !$(event.target).closest('#button-create').length) { var commentform = document.getElementById("commentform"); - if(commentform.className == "show") { + if(commentform && commentform.className == "show") { button = document.getElementsByClassName('fas fa-times')[0]; makeFormDisappear(commentform, button); } diff --git a/lib/scss/6_components/_conversations.scss b/lib/scss/6_components/_conversations.scss index ee3fbe523..308a270d6 100644 --- a/lib/scss/6_components/_conversations.scss +++ b/lib/scss/6_components/_conversations.scss @@ -11,6 +11,7 @@ $profile-label-clear-color: #30BFD3 !default; .ConversationList { @extend .Container; + max-width: 100%; p { padding: 0 $spacing-unit / 3; diff --git a/lib/scss/6_components/generic/_page-header.scss b/lib/scss/6_components/generic/_page-header.scss index 4b39e8e84..eacdc8e32 100644 --- a/lib/scss/6_components/generic/_page-header.scss +++ b/lib/scss/6_components/generic/_page-header.scss @@ -41,6 +41,13 @@ $header-box-shadow-lower: 0 -2px 4px 0 rgba(0, 0, 0, 0.2) !default; &-topIcon { cursor: pointer; + display: none; + } + + @media only screen and (max-width: 960px) { + &-topIcon { + display: block; + } } // Elements diff --git a/lib/scss/6_components/generic/_page.scss b/lib/scss/6_components/generic/_page.scss index 3e8b9fbb3..eca2e0526 100644 --- a/lib/scss/6_components/generic/_page.scss +++ b/lib/scss/6_components/generic/_page.scss @@ -23,6 +23,26 @@ $page-title-font-size: 1.1 * $font-size-h1 !default; } } + &-content-container { + display: flex; + + .NavMenu { + position: fixed; + } + } + + @media only screen and (min-width: 960px) { + &-content.logged-in, #docs { + padding-left: 400px !important; + } + } + + @media only screen and (max-width: 960px) { + .NavMenu-fixed { + display: none; + } + } + &-mainContainer { background: $page-background-image; background-size: contain; diff --git a/locale/pt_BR/LC_MESSAGES/django.mo b/locale/pt_BR/LC_MESSAGES/django.mo index e71eb3d4b..9687aa12e 100644 Binary files a/locale/pt_BR/LC_MESSAGES/django.mo and b/locale/pt_BR/LC_MESSAGES/django.mo differ diff --git a/locale/pt_BR/LC_MESSAGES/django.po b/locale/pt_BR/LC_MESSAGES/django.po index fef498d11..4b37a5ed1 100644 --- a/locale/pt_BR/LC_MESSAGES/django.po +++ b/locale/pt_BR/LC_MESSAGES/django.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-11-06 16:51+0000\n" -"PO-Revision-Date: 2018-11-06 15:03-0200\n" +"POT-Creation-Date: 2018-11-14 03:05+0000\n" +"PO-Revision-Date: 2018-11-14 01:09-0200\n" "Last-Translator: Fábio Mendes \n" "Language-Team: \n" "Language: pt_BR\n" @@ -837,23 +837,33 @@ msgstr "promovido?" msgid "Promoted conversations appears in the main /conversations/ endpoint." msgstr "Conversas promovidas aparecem no mural principal /conversations." -#: src/ej_conversations/models/conversation.py:82 +#: src/ej_conversations/models/conversation.py:71 +msgid "hidden?" +msgstr "oculta?" + +#: src/ej_conversations/models/conversation.py:74 +msgid "" +"Hidden conversations does not appears in boards or in the main /" +"conversations/ endpoint." +msgstr "Conversas ocultas não aparecem no mural principal /conversations/" + +#: src/ej_conversations/models/conversation.py:90 msgid "Can publish promoted conversations" msgstr "Pode publicar conversas promovidas" -#: src/ej_conversations/models/conversation.py:83 +#: src/ej_conversations/models/conversation.py:91 msgid "Can moderate comments in any conversation" msgstr "Pode moderar comentários em qualquer conversa" -#: src/ej_conversations/models/conversation.py:98 +#: src/ej_conversations/models/conversation.py:106 msgid "User does not have permission to create a promoted conversation." msgstr "Usuário não tem permissão para criar uma conversa promovida." -#: src/ej_conversations/models/conversation.py:153 +#: src/ej_conversations/models/conversation.py:161 msgid "automatically rejected" msgstr "rejeitado automaticamente" -#: src/ej_conversations/models/conversation.py:242 +#: src/ej_conversations/models/conversation.py:250 msgid "No comments available for this user" msgstr "Não há comentários disponíveis para esse usuário" @@ -888,7 +898,7 @@ msgstr "Criado em" msgid "non-moderated comments cannot receive votes" msgstr "comentários não-moderados não podem receber votos" -#: src/ej_conversations/roles.py:76 +#: src/ej_conversations/roles.py:76 src/ej_conversations/roles.py:140 #: src/ej_conversations/routes/conversations.py:85 msgid "login" msgstr "entrar" @@ -1394,23 +1404,38 @@ msgstr "endereço de email" msgid "User token" msgstr "Token do usuário" -#: src/ej_users/routes.py:71 +#: src/ej_users/routes.py:69 msgid "Invalid email or password" msgstr "Email ou senha inválidos" -#: src/ej_users/routes.py:160 +#: src/ej_users/routes.py:151 msgid "Please reset your password" msgstr "Por favor reset sua senha" -#: src/ej/templates/jinja2/base.jinja2:87 +#: src/ej_users/routes.py:198 +#, python-brace-format +msgid "" +"\n" +" Hello! You can use the following link to reset your password:\n" +" {link}\n" +" Thanks,\n" +" Your friends at Empurrando Juntos." +msgstr "" +"\n" +" Olá! Você pode usar o seguinte link para resetar sua senha:\n" +" {link}\n" +" Obrigada,\n" +" Suas amigas da Empurrando Juntas." + +#: src/ej/templates/jinja2/base.jinja2:88 msgid "EJ - A platform of social participation." msgstr "EJ - Uma plataforma para participação social." -#: src/ej/templates/jinja2/base.jinja2:96 +#: src/ej/templates/jinja2/base.jinja2:97 msgid "EJ - A platform of social participacion." msgstr "EJ - Uma plataforma para participação social." -#: src/ej/templates/jinja2/base.jinja2:134 +#: src/ej/templates/jinja2/base.jinja2:142 msgid "Please override the \"content\" block of your template!" msgstr "Por favor substitua o bloco \"content\" do seu template!" @@ -1432,31 +1457,32 @@ msgstr "Começar agora!" msgid "LOGIN" msgstr "ENTRAR" -#: src/ej/templates/jinja2/components/generic/page_header.jinja2:64 +#: src/ej/templates/jinja2/components/generic/page_header.jinja2:65 +#: src/ej/templates/jinja2/components/generic/page_header.jinja2:69 msgid "Back" msgstr "Voltar" -#: src/ej/templates/jinja2/components/generic/page_header.jinja2:69 -#: src/ej/templates/jinja2/components/generic/page_header.jinja2:85 +#: src/ej/templates/jinja2/components/generic/page_header.jinja2:74 +#: src/ej/templates/jinja2/components/generic/page_header.jinja2:90 msgid "Site logo" msgstr "Logo do site" -#: src/ej/templates/jinja2/components/generic/page_header.jinja2:72 -#: src/ej/templates/jinja2/components/generic/page_header.jinja2:79 +#: src/ej/templates/jinja2/components/generic/page_header.jinja2:77 +#: src/ej/templates/jinja2/components/generic/page_header.jinja2:84 msgid "Navigation menu" msgstr "Menu de navegação" -#: src/ej/templates/jinja2/components/generic/page_header.jinja2:102 -#: src/ej/templates/jinja2/components/generic/page_header.jinja2:103 -#: src/ej/templates/jinja2/components/generic/page_header.jinja2:104 +#: src/ej/templates/jinja2/components/generic/page_header.jinja2:107 +#: src/ej/templates/jinja2/components/generic/page_header.jinja2:108 +#: src/ej/templates/jinja2/components/generic/page_header.jinja2:109 #: src/ej_rocketchat/jinja2/ej_rocketchat/iframe.jinja2:2 #: src/ej_rocketchat/jinja2/ej_rocketchat/intro.jinja2:3 msgid "Panel" msgstr "Painel" -#: src/ej/templates/jinja2/components/generic/page_header.jinja2:108 -#: src/ej/templates/jinja2/components/generic/page_header.jinja2:109 -#: src/ej/templates/jinja2/components/generic/page_header.jinja2:110 +#: src/ej/templates/jinja2/components/generic/page_header.jinja2:113 +#: src/ej/templates/jinja2/components/generic/page_header.jinja2:114 +#: src/ej/templates/jinja2/components/generic/page_header.jinja2:115 #: src/ej/templates/jinja2/components/generic/page_menu.jinja2:30 msgid "Profile" msgstr "Perfil" @@ -2001,11 +2027,11 @@ msgstr "para ver {}." msgid "CREATE COMMENT" msgstr "CRIAR COMENTÁRIO" -#: src/ej_conversations/jinja2/ej_conversations/detail.jinja2:39 +#: src/ej_conversations/jinja2/ej_conversations/detail.jinja2:40 msgid "{}/{} comment{}." msgstr "{}/{} commentário{}." -#: src/ej_conversations/jinja2/ej_conversations/detail.jinja2:40 +#: src/ej_conversations/jinja2/ej_conversations/detail.jinja2:41 msgid "{} waiting moderation." msgstr "{} aguardando moderação." @@ -2190,6 +2216,20 @@ msgstr "Registre agora!" msgid "or sign up through other networks" msgstr "ou entre usando outras redes" +#: src/ej_users/jinja2/ej_users/recover-password-message.jinja2:2 +msgid "" +"Hello !\n" +" You can use the following link to reset your password:\n" +" {{ link }}\n" +" Thanks,\n" +" Your friends at Empurrando Juntos." +msgstr "" +"Olá !\n" +" Você pode usar o seguinte link para resetar sua senha:\n" +" {{ link }}\n" +" Obrigada,\n" +" Suas amigas da Empurrando Juntas." + #: src/ej_users/jinja2/ej_users/recover-password.jinja2:3 #: src/ej_users/jinja2/ej_users/remove-account.jinja2:2 msgid "Reset password" @@ -2329,14 +2369,6 @@ msgstr "Atualizar" #~ "Exemplo: Prezado usuário, seu comentário foi rejeitado porque contém " #~ "conteúdo discriminatório." -#, fuzzy -#~ msgid "" -#~ "Hello ! \n" -#~ " You can use the following link to reset your password:" -#~ msgstr "" -#~ "Esqueceu sua senha? Insira seu endereço de e-mail abaixo, e nós vamos lhe " -#~ "enviar uma mensagem com instruções para recriar sua senha." - #~ msgid "Create conversation" #~ msgstr "Criar conversa" diff --git a/src/ej/settings/__init__.py b/src/ej/settings/__init__.py index fc8b9e274..0862b1be6 100644 --- a/src/ej/settings/__init__.py +++ b/src/ej/settings/__init__.py @@ -92,6 +92,16 @@ class Conf(ThemesConf, # 'REGISTER_SERIALIZER': 'ej_users.serializers.RegistrationSerializer' # } + # Use this variable to change the ej environment during the docker build step. + ENVIRONMENT = 'local' + + if (ENVIRONMENT == 'production'): + EMAIL_BACKEND = 'anymail.backends.mailgun.EmailBackend'; + # the api key will be informed during the docker build step. + ANYMAIL = {'MAILGUN_API_KEY': ''}; + DEFAULT_FROM_EMAIL = "Empurrando Juntos " + HOSTNAME = 'https://ejplatform.org' + Conf.save_settings(globals()) diff --git a/src/ej/templates/jinja2/base.jinja2 b/src/ej/templates/jinja2/base.jinja2 index d10c30ae5..f98f886cd 100644 --- a/src/ej/templates/jinja2/base.jinja2 +++ b/src/ej/templates/jinja2/base.jinja2 @@ -1,6 +1,6 @@ {% from 'components/generic/page_header.jinja2' import page_header %} {% from 'components/generic/page_top-header.jinja2' import page_top_header %} -{% from 'components/generic/page_menu.jinja2' import sidebar %} +{% from 'components/generic/page_menu.jinja2' import menu with context %} {% set javascript_enabled = request.COOKIES.get('javascriptEnabled', 'No Cookie') if request else True %} {% set target_context = request.GET.target|default('all') if request else 'all' %} @@ -9,6 +9,7 @@ {% set page_title = page_title|default(content_title or settings.EJ_PAGE_TITLE) %} {% set hide_footer = hide_footer|default(False) %} {% set enable_navbar = enable_navbar|default(True) %} +{% set logged_in = request and request.user and request.user.is_authenticated %} {% if target == 'all' %} @@ -116,27 +117,35 @@
{% endif %} - {# MAIN BLOCK #} - {% block main %} - -
- {% if content_title %} -

{{ content_title }}

{% endif %} - {% if content is defined %} - {{ content }} - {% else %} - {% block content %} - {% if content_html %} -
- {{ content_html|safe }} -
- {% else %} -

{{ _('Please override the "content" block of your template!') }}

- {% endif %} - {% endblock %} +
+
- {% endblock %} +
+ + {# MAIN BLOCK #} + {% block main %} + +
+ {% if content_title %} +

{{ content_title }}

{% endif %} + {% if content is defined %} + {{ content }} + {% else %} + {% block content %} + {% if content_html %} +
+ {{ content_html|safe }} +
+ {% else %} +

{{ _('Please override the "content" block of your template!') }}

+ {% endif %} + {% endblock %} + {% endif %} +
+ {% endblock %} + {% endblock %} diff --git a/src/ej/templates/jinja2/components/generic/page_header.jinja2 b/src/ej/templates/jinja2/components/generic/page_header.jinja2 index 7785c6f1f..ed4c83f4f 100644 --- a/src/ej/templates/jinja2/components/generic/page_header.jinja2 +++ b/src/ej/templates/jinja2/components/generic/page_header.jinja2 @@ -35,11 +35,12 @@ @@ -61,10 +62,15 @@ {% endblock %}