diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss
index 9673cdc88..5f2af37c9 100644
--- a/app/assets/stylesheets/layout.scss
+++ b/app/assets/stylesheets/layout.scss
@@ -1977,6 +1977,14 @@ table {
}
}
+.public_interest {
+ margin-top: $line-height;
+
+ .column{
+ padding-left: 0;
+ }
+}
+
// 18. Banners
// -----------
diff --git a/app/models/follow.rb b/app/models/follow.rb
index a7ca4a76b..aef8715ff 100644
--- a/app/models/follow.rb
+++ b/app/models/follow.rb
@@ -21,8 +21,10 @@ class Follow < ActiveRecord::Base
def self.interests_by(user)
interests = []
user.follows.each do |follow|
- follow.followable.tags.each do |tag|
- interests << tag.name
+ if follow.followable.present?
+ follow.followable.tags.each do |tag|
+ interests << tag.name
+ end
end
end
return interests.uniq
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index 045a5bd63..fd2526172 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -47,10 +47,17 @@
<% end %>
<% if @user.public_interests || @authorized_current_user %>
-
- <% @interests.each do |interest| %>
- <%= interest %>
- <% end %>
+
+
<%= t('account.show.public_interests_title_list') %>
+ <% @interests.in_groups_of(10, false) do |interests_group| %>
+
+
+ <% interests_group.each do |interest| %>
+ - <%= interest %>
+ <% end %>
+
+
+ <% end %>
<% end %>
diff --git a/config/locales/en/general.yml b/config/locales/en/general.yml
index b2ec63d06..12d191be4 100644
--- a/config/locales/en/general.yml
+++ b/config/locales/en/general.yml
@@ -14,6 +14,7 @@ en:
phone_number_label: Phone number
public_activity_label: Keep my list of activities public
public_interests_label: Keep my interests public
+ public_interests_title_list: List of interests
save_changes_submit: Save changes
subscription_to_website_newsletter_label: Receive by email website relevant information
email_on_direct_message_label: Receive emails about direct messages
@@ -648,6 +649,9 @@ en:
budget_investments:
one: 1 Investment
other: "%{count} Investments"
+ follows:
+ one: 1 Following
+ other: "%{count} Following"
no_activity: User has no public activity
no_private_messages: "This user doesn't accept private messages."
private_activity: This user decided to keep the activity list private
diff --git a/config/locales/es/general.yml b/config/locales/es/general.yml
index e149f1bc4..2f095233a 100644
--- a/config/locales/es/general.yml
+++ b/config/locales/es/general.yml
@@ -14,6 +14,7 @@ es:
phone_number_label: Teléfono
public_activity_label: Mostrar públicamente mi lista de actividades
public_interests_label: Mostrar públicamente mis intereses
+ public_interests_title_list: Lista de intereses
save_changes_submit: Guardar cambios
subscription_to_website_newsletter_label: Recibir emails con información interesante sobre la web
email_on_direct_message_label: Recibir emails con mensajes privados
@@ -648,6 +649,9 @@ es:
budget_investments:
one: 1 Proyecto de presupuestos participativos
other: "%{count} Proyectos de presupuestos participativos"
+ follows:
+ one: 1 Siguiendo
+ other: "%{count} Siguiendo"
no_activity: Usuario sin actividad pública
no_private_messages: "Este usuario no acepta mensajes privados."
private_activity: Este usuario ha decidido mantener en privado su lista de actividades