From 456672c0b9b32376487e2c54ce64effa5517dcb6 Mon Sep 17 00:00:00 2001 From: taitus Date: Tue, 29 Aug 2017 13:00:18 +0200 Subject: [PATCH] Add partial with access button to community. --- app/views/budgets/investments/_investment_show.html.erb | 7 +------ app/views/communities/_access_button.html.erb | 6 ++++++ app/views/proposals/show.html.erb | 7 +------ 3 files changed, 8 insertions(+), 12 deletions(-) create mode 100644 app/views/communities/_access_button.html.erb diff --git a/app/views/budgets/investments/_investment_show.html.erb b/app/views/budgets/investments/_investment_show.html.erb index b72c295f2..c2d5c97db 100644 --- a/app/views/budgets/investments/_investment_show.html.erb +++ b/app/views/budgets/investments/_investment_show.html.erb @@ -123,12 +123,7 @@ <%= render 'follows/follow_button', follow: find_or_build_follow(current_user, investment) %> <% end %> - -

<%= t("community.sidebar.title") %>

-

- <%= t("community.sidebar.description") %> -

- <%= link_to t("community.sidebar.button_to_access"), community_path(investment.community_id), class: 'button hollow expanded' %> + <%= render 'communities/access_button', community_id: investment.community_id %> diff --git a/app/views/communities/_access_button.html.erb b/app/views/communities/_access_button.html.erb new file mode 100644 index 000000000..9c4d90a5e --- /dev/null +++ b/app/views/communities/_access_button.html.erb @@ -0,0 +1,6 @@ + +

<%= t("community.sidebar.title") %>

+

+ <%= t("community.sidebar.description") %> +

+<%= link_to t("community.sidebar.button_to_access"), community_path(community_id), class: 'button hollow expanded' %> diff --git a/app/views/proposals/show.html.erb b/app/views/proposals/show.html.erb index e47dbc226..1c22b715f 100644 --- a/app/views/proposals/show.html.erb +++ b/app/views/proposals/show.html.erb @@ -159,12 +159,7 @@ <%= render 'follows/follow_button', follow: find_or_build_follow(current_user, @proposal) %> <% end %> - -

<%= t("community.sidebar.title") %>

-

- <%= t("community.sidebar.description") %> -

- <%= link_to t("community.sidebar.button_to_access"), community_path(@proposal.community_id), class: 'button hollow expanded' %> + <%= render 'communities/access_button', community_id: @proposal.community_id %>