View questions now is View results and redirects to results in public view. Fixed flaky spec that was making the tests fail. Added missing specs for polls feature as well as poll model.
44 lines
1.5 KiB
Plaintext
44 lines
1.5 KiB
Plaintext
<div class="column poll-card" id="<%= dom_id(poll) %>">
|
|
<div class="card">
|
|
<div class="card-section">
|
|
<p class="text-right">
|
|
<a href='#' class="button round hollow clipboard-btn" data-clipboard-text="<%= poll_url(poll) %>">
|
|
<i class="fi-clipboard-notes"></i>
|
|
</a>
|
|
</p>
|
|
<h4 class="text-center"><%= poll.title %></h4>
|
|
<p class="text-center">
|
|
<%= t('.published_on') %>
|
|
<%= l(poll.starts_at.to_date) %>
|
|
</p>
|
|
</div>
|
|
|
|
<div class="card-section text-center">
|
|
<strong><%= t('.responses', count: poll.questions.count) %></strong>
|
|
</div>
|
|
|
|
<div class="card-section text-center">
|
|
<% if poll.incoming? %>
|
|
<%= link_to t('.edit_poll'), edit_proposal_dashboard_poll_path(proposal, poll), class: 'button hollow' %>
|
|
<% else %>
|
|
<%= link_to t('.view_results'), results_poll_path(poll), class: 'button', target: '_blank' %>
|
|
<% end %>
|
|
</div>
|
|
<div class="card-section">
|
|
<p>
|
|
<%= best_in_place poll,
|
|
:results_enabled,
|
|
as: :checkbox,
|
|
url: proposal_dashboard_poll_url(proposal, poll),
|
|
collection: {
|
|
false: raw('<input type="checkbox">'),
|
|
true: raw('<input type="checkbox" checked>')
|
|
} %>
|
|
<strong><%= t('.show_results') %></strong>
|
|
</p>
|
|
<p class="help-text"><%= t('.show_results_help') %></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|