diff --git a/app/assets/images/collective_avatar.png b/app/assets/images/collective_avatar.png
new file mode 100644
index 000000000..d27809245
Binary files /dev/null and b/app/assets/images/collective_avatar.png differ
diff --git a/app/assets/stylesheets/debates.scss b/app/assets/stylesheets/debates.scss
index 2ee296f70..5ca0559ec 100644
--- a/app/assets/stylesheets/debates.scss
+++ b/app/assets/stylesheets/debates.scss
@@ -552,6 +552,10 @@
background: $comment-level-5;
padding: rem-calc(6) rem-calc(12);
}
+ @elseif $n == "1" {
+ background: none;
+ padding: rem-calc(6) rem-calc(12);
+ }
@else {
background: $comment-official;
padding: rem-calc(6) rem-calc(12);
diff --git a/app/assets/stylesheets/participacion.scss b/app/assets/stylesheets/participacion.scss
index f95b7462b..eb512ad3f 100644
--- a/app/assets/stylesheets/participacion.scss
+++ b/app/assets/stylesheets/participacion.scss
@@ -193,6 +193,8 @@ header {
.locale {
float: none;
+ height: rem-calc(48);
+ padding-top: rem-calc(3);
text-align: center;
@media (min-width: 480px) {
@@ -201,7 +203,9 @@ header {
}
.external-links {
- @extend .locale;
+ float: none;
+ padding: rem-calc(12) 0;
+ text-align: center;
@media (min-width: 480px) {
float: right;
@@ -274,7 +278,11 @@ header {
font-size: rem-calc(14);
}
- ul li, ul li:hover:not(.has-form) > a {
+ ul li > a.button:hover, .top-bar-section ul li > a.button:focus {
+ background-color: #007095 !important;
+ }
+
+ ul li, ul li:hover:not(.has-form) > a:not(.button) {
line-height: $line-height;
@media (min-width: $small-breakpoint) {
@@ -284,24 +292,28 @@ header {
}
}
- li:not(.has-form) a:not(.button) {
- background: none;
- color: white;
+ ul {
+ margin-right: rem-calc(12);
- @media (min-width: $small-breakpoint) {
+ li:not(.has-form) a:not(.button) {
+ background: none;
+ color: white;
+
+ @media (min-width: $small-breakpoint) {
+ line-height: $line-height*4;
+ }
+
+ &:hover {
+ background: none;
+ color: $link-hover;
+ }
+ }
+
+ li.active:not(.has-form) a:not(.button) {
+ background: none;
+ height: rem-calc(96);
line-height: $line-height*4;
}
-
- &:hover {
- background: none;
- color: $link-hover;
- }
- }
-
- li.active:not(.has-form) a:not(.button) {
- background: none;
- height: rem-calc(96);
- line-height: $line-height*4;
}
}
@@ -309,7 +321,6 @@ header {
color: white;
font-size: rem-calc(14);
height: rem-calc(72);
- padding: rem-calc(12) 0;
@media (min-width: 480px) {
height: rem-calc(48);
@@ -477,6 +488,12 @@ footer {
font-weight: bolder;
}
}
+
+ form {
+ .button {
+ margin-top: rem-calc(24);
+ }
+ }
}
// 08. Forms
@@ -550,10 +567,6 @@ form {
margin-bottom: 0 !important;
}
}
-
- .button {
- margin-top: rem-calc(24);
- }
}
// 09. Alerts
@@ -652,7 +665,7 @@ form {
}
}
-img.initialjs-avatar {
+img.initialjs-avatar, img.avatar {
border-radius: rem-calc(1000);
position: relative;
}
diff --git a/app/assets/stylesheets/variables.scss b/app/assets/stylesheets/variables.scss
index 839385778..93107e3d2 100644
--- a/app/assets/stylesheets/variables.scss
+++ b/app/assets/stylesheets/variables.scss
@@ -67,14 +67,14 @@ $alert-color: #A94442;
// 05. Levels
// - - - - - - - - - - - - - - - - - - - - - - - - -
-$level-1: #43AC6A;
+$level-1: #1ABC9C;
$level-2: #43AC6A;
$level-3: #43AC6A;
$level-4: #43AC6A;
$level-5: #F08A24;
$author: #008CCF;
-$association: #222222;
+$association: #C0392B;
$comment-author: rgba(45,144,248,.15);
$comment-official: rgba(70,219,145,.3);
diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb
index b692ce32e..dbb31863e 100644
--- a/app/controllers/welcome_controller.rb
+++ b/app/controllers/welcome_controller.rb
@@ -2,7 +2,7 @@ class WelcomeController < ApplicationController
skip_authorization_check
def index
- @featured_debates = Debate.includes(:tags).limit(9)
+ @featured_debates = Debate.includes(:tags).limit(3)
set_debate_votes(@featured_debates)
end
diff --git a/app/views/comments/_comment.html.erb b/app/views/comments/_comment.html.erb
index ea6912094..16aa2e73c 100644
--- a/app/views/comments/_comment.html.erb
+++ b/app/views/comments/_comment.html.erb
@@ -5,7 +5,11 @@
<%= t("debates.comment.deleted") %>
<% else %>
- <%= avatar_image(comment.user, size: 32, class: 'left') %>
+ <% if comment.user.organization? %>
+ <%= image_tag("collective_avatar.png", size: 32, class: "avatar left") %>
+ <% else %>
+ <%= avatar_image(comment.user, size: 32, class: "left") %>
+ <% end %>
<% if comment.user.hidden? %>
<% end %>
@@ -27,7 +31,7 @@
<% if comment.user.verified_organization? %>
•
- <%= t("shared.organization") %>
+ <%= t("shared.collective") %>
<% end %>
<% if comment.user_id == @debate.author_id %>
@@ -39,7 +43,9 @@
• <%= time_ago_in_words(comment.created_at) %>
- <% if comment.user.official? %>
+ <% if comment.user.official? && comment.user_id == @debate.author_id %>
+
+ <% elsif comment.user.official? %>
<% elsif comment.user_id == @debate.author_id %>
diff --git a/app/views/debates/index.html.erb b/app/views/debates/index.html.erb
index 92df365f0..59d11f37c 100644
--- a/app/views/debates/index.html.erb
+++ b/app/views/debates/index.html.erb
@@ -5,18 +5,6 @@
<%= t("debates.index.showing") %>
-
-
@@ -85,6 +79,13 @@
<% if user_signed_in? %>
<%= render 'comments/form', {parent: @debate, toggeable: false} %>
+ <% else %>
+
+
+ <%= t("debates.show.login_to_comment",
+ signin: link_to(t("votes.signin"), new_user_session_path),
+ signup: link_to(t("votes.signup"), new_user_registration_path)).html_safe %>
+
<% end %>
<%= render @comments %>
diff --git a/app/views/users/registrations/new.html.erb b/app/views/users/registrations/new.html.erb
index c39c5f5f1..775e035f3 100644
--- a/app/views/users/registrations/new.html.erb
+++ b/app/views/users/registrations/new.html.erb
@@ -4,6 +4,10 @@
<%= t("devise_views.users.registrations.new.title") %>
<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
<%= render 'shared/errors', resource: resource %>
+
+ <%= link_to t("devise_views.users.registrations.new.organization_signup"), new_organization_registration_path %>
+
+
<%= f.text_field :first_name, autofocus: true,
diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb
index ada595c02..15dceb233 100644
--- a/app/views/welcome/index.html.erb
+++ b/app/views/welcome/index.html.erb
@@ -1,7 +1,7 @@
-
<%= t("welcome.featured_debates") %>
+ <%= t("welcome.last_debates") %>
diff --git a/config/locales/devise_views.en.yml b/config/locales/devise_views.en.yml
index e5a1ec48d..6ddf4414a 100644
--- a/config/locales/devise_views.en.yml
+++ b/config/locales/devise_views.en.yml
@@ -59,10 +59,11 @@ en:
password_label: "Password"
password_confirmation_label: "Confirm password"
submit: "Sign up"
+ organization_signup: "Do you represent an organization / group?"
organizations:
registrations:
new:
- title: "Sign up as organization"
+ title: "Sign up as organization / collective"
organization_name_label: "Organization name"
email_label: "Email"
password_label: "Password"
@@ -86,7 +87,7 @@ en:
login: "Log in"
signup: "Sign up"
signin_with_provider: "Sign in with %{provider}"
- organization_signup: "Sign up as an organization"
+ organization_signup: "Sign up as an organization / collective"
new_password: "Forgot your password?"
new_confirmation: "Didn't receive confirmation instructions?"
new_unlock: "Didn't receive unlock instructions?"
diff --git a/config/locales/devise_views.es.yml b/config/locales/devise_views.es.yml
index c44ddfb31..afec30f73 100644
--- a/config/locales/devise_views.es.yml
+++ b/config/locales/devise_views.es.yml
@@ -59,10 +59,11 @@ es:
password_label: "Contraseña"
password_confirmation_label: "Confirmar contraseña"
submit: "Registrarse"
+ organization_signup: "¿Representas a una organización / colectivo?"
organizations:
registrations:
new:
- title: "Registrarse como organización"
+ title: "Registrarse como organización / colectivo"
organization_name_label: "Nombre de la organización"
email_label: "Email"
password_label: "Contraseña"
@@ -85,7 +86,7 @@ es:
links:
login: "Entrar"
signup: "Registrarse"
- organization_signup: "Registro para organizaciones"
+ organization_signup: "Registro para organizaciones / colectivos"
signin_with_provider: "Entrar con %{provider}"
new_password: "¿Olvidaste tu contraseña?"
new_confirmation: "¿No has recibido instrucciones para confirmar tu cuenta?"
diff --git a/config/locales/en.yml b/config/locales/en.yml
index a2ea265f3..5618532f0 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -32,14 +32,12 @@ en:
debates:
index:
create_debate: Create a debate
- showing: You are seeing
+ showing: You are seeing debates
tag: with the topic
- filter_debates: debates
- filter_initiatives: initiatives
- filter_debates_and_initiatives: debates and initiatives
filter_news: the newest
filter_votes: the most voted
filter_rated: the best rated
+ filter_topic: "You are seeing %{number} debates with the topic '%{topic}'"
debate:
debate: Debate
comments:
@@ -82,7 +80,7 @@ en:
one: 1 Comment
other: "%{count} Comments"
leave_comment: Write a comment
- login_to_comment: Log in to participate
+ login_to_comment: "You need to %{signin} or %{signup} to comment."
edit_debate_link: Edit
share: Share
edit:
@@ -137,7 +135,7 @@ en:
shared:
tags_cloud:
tags: Topics
- organization: Organization
+ collective: Collective
mailer:
comment:
subject: Someone has commented on your debate
@@ -148,4 +146,4 @@ en:
manage:
all: "You are not authorized to %{action} %{subject}."
welcome:
- featured_debates: Features debates
+ last_debates: Last debates
diff --git a/config/locales/es.yml b/config/locales/es.yml
index 8d24181c4..66c483456 100644
--- a/config/locales/es.yml
+++ b/config/locales/es.yml
@@ -32,14 +32,11 @@ es:
debates:
index:
create_debate: Crea un debate
- showing: "Estás viendo"
- tag: "con el tema"
- filter_debates: debates
- filter_initiatives: iniciativas
- filter_debates_and_initiatives: debates e iniciativas
+ showing: "Estás viendo los debates"
filter_news: "más nuevos"
filter_votes: "más votados"
filter_rated: mejor valorados
+ filter_topic: "Estás viendo %{number} debates con el tema '%{topic}'"
debate:
debate: Debate
comments:
@@ -82,7 +79,7 @@ es:
one: 1 Comentario
other: "%{count} Comentarios"
leave_comment: Deja tu comentario
- login_to_comment: Entra para participar
+ login_to_comment: "Necesitas %{signin} o %{signup} para comentar."
edit_debate_link: Editar
share: Compartir
edit:
@@ -137,7 +134,7 @@ es:
shared:
tags_cloud:
tags: Temas
- organization: Organización
+ collective: Colectivo
mailer:
comment:
subject: Alguien ha comentado en tu debate
@@ -148,4 +145,4 @@ es:
manage:
all: "No tienes permiso para realizar la acción '%{action}' sobre %{subject}."
welcome:
- featured_debates: Debates destacados
+ last_debates: Úlitmos debates
diff --git a/db/seeds.rb b/db/seeds.rb
index 7a5bbdc8d..23fdec799 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -1,8 +1,8 @@
# Names for the moderation console, as a hint for moderators
# to know better how to assign users with official positions
Setting.create(key: 'official_level_0_name', value: 'No cargo público')
-Setting.create(key: 'official_level_1_name', value: 'Organización Municipal')
-Setting.create(key: 'official_level_2_name', value: 'Funcionariado')
+Setting.create(key: 'official_level_1_name', value: 'Funcionariado')
+Setting.create(key: 'official_level_2_name', value: 'Organización Municipal')
Setting.create(key: 'official_level_3_name', value: 'Directores generales')
Setting.create(key: 'official_level_4_name', value: 'Concejales')
-Setting.create(key: 'official_level_5_name', value: 'Alcaldes')
\ No newline at end of file
+Setting.create(key: 'official_level_5_name', value: 'Alcaldesa')
\ No newline at end of file