Add styles and translations for users interests.
This commit is contained in:
committed by
Senén Rodero Rodríguez
parent
313b78978d
commit
14ec4f5315
@@ -1977,6 +1977,14 @@ table {
|
||||
}
|
||||
}
|
||||
|
||||
.public_interest {
|
||||
margin-top: $line-height;
|
||||
|
||||
.column{
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// 18. Banners
|
||||
// -----------
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -47,10 +47,17 @@
|
||||
<% end %>
|
||||
|
||||
<% if @user.public_interests || @authorized_current_user %>
|
||||
<div id="public_interests">
|
||||
<% @interests.each do |interest| %>
|
||||
<%= interest %>
|
||||
<% end %>
|
||||
<div id="public_interests" class="public-interests">
|
||||
<h4><%= t('account.show.public_interests_title_list') %></h4>
|
||||
<% @interests.in_groups_of(10, false) do |interests_group| %>
|
||||
<div class="small-4 column end">
|
||||
<ul class="no-bullet">
|
||||
<% interests_group.each do |interest| %>
|
||||
<li> <small><%= interest %></small> </li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user