diff --git a/app/helpers/communities_helper.rb b/app/helpers/communities_helper.rb index b8b7e7d35..9e2b77b9c 100644 --- a/app/helpers/communities_helper.rb +++ b/app/helpers/communities_helper.rb @@ -26,4 +26,13 @@ module CommunitiesHelper end end + def community_back_link_path(community) + if community.from_proposal? + proposal_path(community.proposal) + else + investment = Budget::Investment.where(community_id: community.id).first + budget_investment_path(investment.budget_id, investment) + end + end + end diff --git a/app/views/communities/show.html.erb b/app/views/communities/show.html.erb index 6b07595ec..8190ff6b6 100644 --- a/app/views/communities/show.html.erb +++ b/app/views/communities/show.html.erb @@ -3,6 +3,7 @@
+ <%= back_link_to community_back_link_path(@community) %>

<%= community_text(@community) %>

<%= community_title(@community) %>

<%= community_description(@community) %>

diff --git a/app/views/topics/_topics.html.erb b/app/views/topics/_topics.html.erb index 40e024ac2..f74fa573f 100644 --- a/app/views/topics/_topics.html.erb +++ b/app/views/topics/_topics.html.erb @@ -39,8 +39,10 @@ <% if user_signed_in? %> <%= t("community.show.create_first_community_topic.first_theme_not_logged_in") %> <% else %> - <%= t("community.show.create_first_community_topic.sub_first_theme", - link: link_to(t("community.show.create_first_community_topic.sign_link", - org_name: setting['org_name']), new_user_session_path)).html_safe %> +
+ <%= t("community.show.create_first_community_topic.sub_first_theme", + link: link_to(t("community.show.create_first_community_topic.sign_link", + org_name: setting['org_name']), new_user_session_path)).html_safe %> +
<% end %> <% end %> diff --git a/config/locales/en/community.yml b/config/locales/en/community.yml index 50512b573..37b7ea74f 100644 --- a/config/locales/en/community.yml +++ b/config/locales/en/community.yml @@ -2,15 +2,17 @@ en: community: sidebar: title: Community - description: Join the community of users, give your opinion. + description: + proposal: Participate in the user community of this proposal. + investment: Participate in the user community of this investment. button_to_access: Access the community show: title: proposal: Proposal community investment: Budget Investment community description: - proposal: Participate in the community of this proposal - investment: Participate in the community of this budget investment + proposal: Participate in the community of this proposal. An active community can help to improve the content of the proposal and boost its dissemination to get more support. + investment: Participate in the community of this budget investment. An active community can help to improve the content of the budget investment and boost its dissemination to get more support. create_first_community_topic: first_theme_not_logged_in: No issue yet available, participate creating the first one. Click on the create new topic button. first_theme: Create the first community topic diff --git a/config/locales/es/community.yml b/config/locales/es/community.yml index 4da6d8674..196cd4c50 100644 --- a/config/locales/es/community.yml +++ b/config/locales/es/community.yml @@ -2,15 +2,17 @@ es: community: sidebar: title: Comunidad - description: Participa en la comunidad de usuarios, da tu opinión. + description: + proposal: Participa en la comunidad de usuarios de esta propuesta. + investment: Participa en la comunidad de usuarios de este proyecto de inversión. button_to_access: Acceder a la comunidad show: title: proposal: Comunidad de la propuesta investment: Comunidad del presupuesto participativo description: - proposal: Participa en la comunidad de esta propuesta - investment: Participa en la comunidad de este presupuesto participativo + proposal: Participa en la comunidad de esta propuesta. Una comunidad activa puede ayudar a mejorar el contenido de la propuesta así como a dinamizar su difusión para conseguir más apoyos. + investment: Participa en la comunidad de este proyecto de inversión. Una comunidad activa puede ayudar a mejorar el contenido del proyecto de inversión así como a dinamizar su difusión para conseguir más apoyos. create_first_community_topic: first_theme_not_logged_in: Aún no hay ningun tema disponible, participa creando el primero. Haz click en el botón crear nuevo tema. first_theme: Crea el primer tema de la comunidad