Fix community access text.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 %>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user