Files
grecia/app/views/communities/_subnav.html.erb
Juan Salvador Pérez García ba753f3649 Fixes #222
Community view shows the polls for the given proposal.
2018-07-17 17:59:12 +02:00

38 lines
1.1 KiB
Plaintext

<div class="row column communities-participant">
<ul class="tabs" data-tabs id="communities-show-tabs">
<li class="tabs-title is-active">
<%= link_to "#tab-participants" do %>
<h3>
<%= t("community.show.tab.participants") %>
<span class="js-comments-count">(<%= @participants.count %>)</span>
</h3>
<% end %>
</li>
<% if @community.proposal.present? %>
<li class="tabs-title">
<%= link_to '#tab-polls' do %>
<h3>
<%= t('.surveys') %>
<span class="js-comments-count">(<%= @community.proposal.polls.count %>)</span>
</h3>
<% end %>
</li>
<% end %>
</ul>
<div class="tabs-content" data-tabs-content="communities-show-tabs">
<div class="tabs-panel is-active" id="tab-participants">
<%= render partial: 'participant', collection: @participants %>
</div>
<% if @community.proposal.present? %>
<div class="tabs-panel" id="tab-polls">
<%= render partial: 'poll', collection: @community.proposal.polls %>
</div>
<% end %>
</div>
</div>