Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Commit

Permalink
Merge pull request #640 from ejplatform/1.3-release-candidate
Browse files Browse the repository at this point in the history
1.3 release candidate
  • Loading branch information
pablodiegoss authored Nov 16, 2018
2 parents 3d06dbb + f81ef92 commit 4d01c84
Show file tree
Hide file tree
Showing 27 changed files with 275 additions and 105 deletions.
2 changes: 1 addition & 1 deletion lib/assets/js/comment-form-animation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
1 change: 1 addition & 0 deletions lib/scss/6_components/_conversations.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ $profile-label-clear-color: #30BFD3 !default;

.ConversationList {
@extend .Container;
max-width: 100%;

p {
padding: 0 $spacing-unit / 3;
Expand Down
7 changes: 7 additions & 0 deletions lib/scss/6_components/generic/_page-header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 20 additions & 0 deletions lib/scss/6_components/generic/_page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Binary file modified locale/pt_BR/LC_MESSAGES/django.mo
Binary file not shown.
100 changes: 66 additions & 34 deletions locale/pt_BR/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>\n"
"Language-Team: \n"
"Language: pt_BR\n"
Expand Down Expand Up @@ -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"

Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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!"

Expand All @@ -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"
Expand Down Expand Up @@ -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."

Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"

Expand Down
10 changes: 10 additions & 0 deletions src/ej/settings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>"
HOSTNAME = 'https://ejplatform.org'



Conf.save_settings(globals())
Expand Down
51 changes: 30 additions & 21 deletions src/ej/templates/jinja2/base.jinja2
Original file line number Diff line number Diff line change
@@ -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' %}
Expand 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' %}
<!DOCTYPE html>
Expand Down Expand Up @@ -116,27 +117,35 @@
<div class="Page-mainContainer">
{% endif %}

{# MAIN BLOCK #}
{% block main %}

<main class="Page-content" {{ salt_attr()|safe }}>
{% if content_title %}
<div class="Page-title"><h1>{{ content_title }}</h1></div>{% endif %}
{% if content is defined %}
{{ content }}
{% else %}
{% block content %}
{% if content_html %}
<div class="Container">
{{ content_html|safe }}
</div>
{% else %}
<p>{{ _('Please override the "content" block of your template!') }}</p>
{% endif %}
{% endblock %}
<div class="Page-content-container">
<div class="NavMenu-fixed">
{% if logged_in and request.path != '/home/' %}
{{ menu(request.user) }}
{% endif %}
</main>
{% endblock %}
</div>

{# MAIN BLOCK #}
{% block main %}

<main class="Page-content {{ 'logged-in' if logged_in else '' }}" {{ salt_attr()|safe }}>
{% if content_title %}
<div class="Page-title"><h1>{{ content_title }}</h1></div>{% endif %}
{% if content is defined %}
{{ content }}
{% else %}
{% block content %}
{% if content_html %}
<div class="Container">
{{ content_html|safe }}
</div>
{% else %}
<p>{{ _('Please override the "content" block of your template!') }}</p>
{% endif %}
{% endblock %}
{% endif %}
</main>
{% endblock %}
</div>


{% endblock %}
Expand Down
22 changes: 14 additions & 8 deletions src/ej/templates/jinja2/components/generic/page_header.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@
<script type="text/javascript">
// this function controls the open/close button of "conversations dropdown on page_menu
function openDropDown(openDiv) {
let element = document.getElementsByClassName(openDiv);
if (element[0].style.display === "inline")
element[0].style.display = "none";
let elements = document.getElementsByClassName(openDiv);
let element = ((elements.length > 1) ? elements[1] : elements[0]);
if (element.style.display === "inline")
element.style.display = "none";
else
element[0].style.display = "inline";
element.style.display = "inline";
}
</script>

Expand All @@ -61,10 +62,15 @@
{% endblock %}
<nav class="Header-topNav">
{% if request.path not in ['/start/', '/conversations/', '/home/'] %}
<a title="{{ _('Back') }}" class="Header-topIcon" onclick="history.back()">
<i class="fa fa-chevron-left"></i>
</a>

{% if not '/conversations/' in request.path %}
<a title="{{ _('Back') }}" class="Header-topIcon" onclick="history.back()">
<i class="fa fa-chevron-left"></i>
</a>
{% else %}
<a href="{{request.path.split('/conversations/')[0] + '/conversations/'}}" title="{{ _('Back') }}" class="Header-topIcon">
<i class="fa fa-chevron-left"></i>
</a>
{% endif %}
{% call link(href='/', class="Header-ejLogo") %}
<img src="/static/img/logo/logo.svg" alt="{{_('Site logo')}}">
{% endcall %}
Expand Down
2 changes: 1 addition & 1 deletion src/ej/templates/jinja2/pages/home.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<div><img src="/static/img/home/cellphone.png" alt="" /></div>
</div>

<p>{{ action_button(_('Create a conversation'), '/conversations/add')}}</p>
<p>{{ action_button(_('Create a conversation'), '/profile/boards/add')}}</p>
</div>

<div id="HomeCommercial-documentation">
Expand Down
2 changes: 1 addition & 1 deletion src/ej_boards/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
@urlpatterns.route('<model:board>/conversations/')
def conversation_list(request, board):
user = request.user
conversations = board.conversations.all()
conversations = board.conversations.filter(is_hidden=False)
board_user = board.owner
boards = []
boards_count = 0
Expand Down
Loading

0 comments on commit 4d01c84

Please sign in to comment.