Files
grecia/app/views/dashboard/community.html.erb
Juan Salvador Pérez García 2ca9a38915 Dashboard navigation enhancements
Dashboard links that bring the user outside the dashboard will be open
in a separate tab
2018-09-14 16:45:02 +02:00

40 lines
1.5 KiB
Plaintext

<% content_for :action_title, t("dashboard.menu.community") %>
<div class="row">
<div class="small-12 large-9 column">
<%= link_to t("dashboard.community.access_community"), community_path(proposal.community), class: 'button hollow', target: '_blank' %>
<% unless proposal.community.latest_activity.nil? %>
<p class="help-text"><%= t("dashboard.community.latest_activity", at: l(proposal.community.latest_activity.to_date)) %></p>
<% end %>
</div>
<div class="small-12 large-1 column community-totals">
<span class="fi-torsos-all"></span>
&nbsp;<strong><%= number_with_delimiter(proposal.community.participants_count, delimiter: '.') %></strong>
<p><%= t("dashboard.community.participants") %></p>
</div>
<div class="small-12 large-1 column community-totals">
<span class="fi-comment-quotes"></span>
&nbsp;<strong><%= number_with_delimiter(proposal.community.debates_count, delimiter: '.') %></strong>
<p><%= t("dashboard.community.debates") %></p>
</div>
<div class="small-12 large-1 column community-totals">
<span class="fi-comments"></span>
&nbsp;<strong><%= number_with_delimiter(proposal.community.comments_count, delimiter: '.') %></strong>
<p><%= t("dashboard.community.comments") %></p>
</div>
</div>
<% if proposal.community.comments.any? %>
<div class="action-title">
<h5><%= t("dashboard.community.latest_comments") %></h5>
<hr>
</div>
<ul>
<%= render partial: 'comment', collection: proposal.community.comments.sort_by_newest.limit(5) %>
</ul>
<% end %>