Fix community access text.

This commit is contained in:
taitus
2017-09-01 13:09:36 +02:00
parent 62003b3000
commit d8e9aad331
4 changed files with 8 additions and 4 deletions

View File

@@ -35,4 +35,8 @@ module CommunitiesHelper
end
end
def community_access_text(community)
community.from_proposal? ? t("community.sidebar.description.proposal") : t("community.sidebar.description.investment")
end
end

View File

@@ -123,7 +123,7 @@
<%= render 'follows/follow_button', follow: find_or_build_follow(current_user, investment) %>
<% end %>
<%= render 'communities/access_button', community_id: investment.community_id %>
<%= render 'communities/access_button', community: investment.community %>
</aside>
</div>

View File

@@ -2,7 +2,7 @@
<div class="sidebar-divider"></div>
<h2><%= t("community.sidebar.title") %></h2>
<p>
<%= t("community.sidebar.description") %>
<%= community_access_text(community) %>
</p>
<%= link_to t("community.sidebar.button_to_access"), community_path(community_id), class: 'button hollow expanded' %>
<%= link_to t("community.sidebar.button_to_access"), community_path(community.id), class: 'button hollow expanded' %>
<% end %>

View File

@@ -159,7 +159,7 @@
<%= render 'follows/follow_button', follow: find_or_build_follow(current_user, @proposal) %>
<% end %>
<%= render 'communities/access_button', community_id: @proposal.community_id %>
<%= render 'communities/access_button', community: @proposal.community %>
</aside>
</div>