Add back link on community show. Add styles on login to create topic.

This commit is contained in:
taitus
2017-09-01 12:46:39 +02:00
parent 47f897840a
commit 62003b3000
5 changed files with 25 additions and 9 deletions

View File

@@ -26,4 +26,13 @@ module CommunitiesHelper
end end
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 end

View File

@@ -3,6 +3,7 @@
<div class="jumbo light"> <div class="jumbo light">
<div class="row"> <div class="row">
<div class="small-12 column"> <div class="small-12 column">
<%= back_link_to community_back_link_path(@community) %>
<h2><%= community_text(@community) %></h2> <h2><%= community_text(@community) %></h2>
<p class="lead"> <%= community_title(@community) %> </p> <p class="lead"> <%= community_title(@community) %> </p>
<p><%= community_description(@community) %> </p> <p><%= community_description(@community) %> </p>

View File

@@ -39,8 +39,10 @@
<% if user_signed_in? %> <% if user_signed_in? %>
<%= t("community.show.create_first_community_topic.first_theme_not_logged_in") %> <%= t("community.show.create_first_community_topic.first_theme_not_logged_in") %>
<% else %> <% else %>
<%= t("community.show.create_first_community_topic.sub_first_theme", <div class="callout primary">
link: link_to(t("community.show.create_first_community_topic.sign_link", <%= t("community.show.create_first_community_topic.sub_first_theme",
org_name: setting['org_name']), new_user_session_path)).html_safe %> link: link_to(t("community.show.create_first_community_topic.sign_link",
org_name: setting['org_name']), new_user_session_path)).html_safe %>
</div>
<% end %> <% end %>
<% end %> <% end %>

View File

@@ -2,15 +2,17 @@ en:
community: community:
sidebar: sidebar:
title: Community 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 button_to_access: Access the community
show: show:
title: title:
proposal: Proposal community proposal: Proposal community
investment: Budget Investment community investment: Budget Investment community
description: description:
proposal: Participate in the community of this proposal 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 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: 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_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 first_theme: Create the first community topic

View File

@@ -2,15 +2,17 @@ es:
community: community:
sidebar: sidebar:
title: Comunidad 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 button_to_access: Acceder a la comunidad
show: show:
title: title:
proposal: Comunidad de la propuesta proposal: Comunidad de la propuesta
investment: Comunidad del presupuesto participativo investment: Comunidad del presupuesto participativo
description: description:
proposal: Participa en la comunidad de esta propuesta 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 presupuesto participativo 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: 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_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 first_theme: Crea el primer tema de la comunidad