Out of the usability issues I've experienced when using Consul Democracy, the biggest one has arguably been the fact that the link to edit a proposal opens in a new tab. I guess the reasoning behind it is that the page to edit a proposal is not part of the proposals dashboard, but what the hell! Imagine if every link to edit something opened in a new tab... So we're reducing the impact of this nonsense by opening most dashboard links in the same window; for now, we're still opening in a new window links to download files and links that might point to external websites. We'll address those ones in the future.
37 lines
1.5 KiB
Plaintext
37 lines
1.5 KiB
Plaintext
<div id="<%= dom_id(poll) %>" class="small-12 medium-6 large-4 column end">
|
|
<div class="poll-card" data-equalizer-watch="poll-cards">
|
|
<h4><%= link_to poll.title, proposal_poll_path(proposal, poll) %></h4>
|
|
<span class="small">
|
|
<%= l(poll.starts_at.to_date) %> - <%= l(poll.ends_at.to_date) %>
|
|
</span>
|
|
|
|
<p class="margin-top">
|
|
<strong><%= t("dashboard.polls.poll.responses", count: poll.answer_count) %></strong>
|
|
</p>
|
|
|
|
<div class="small-12 column small-centered margin-top">
|
|
<% if poll.starts_at.to_date >= Date.current %>
|
|
<%= link_to t("dashboard.polls.poll.edit_poll"),
|
|
edit_proposal_dashboard_poll_path(proposal, poll), class: "button hollow" %>
|
|
<% else %>
|
|
<%= link_to t("dashboard.polls.poll.view_results"),
|
|
results_proposal_poll_path(proposal, poll),
|
|
class: "button" %>
|
|
<% end %>
|
|
</div>
|
|
|
|
<%= form_for poll, remote: true,
|
|
data: { type: :json },
|
|
url: proposal_dashboard_poll_path(proposal, poll) do |f| %>
|
|
<%= f.check_box :results_enabled, class: "js-submit-on-change" %>
|
|
<% end %>
|
|
<p class="help-text"><%= t("dashboard.polls.poll.show_results_help") %></p>
|
|
|
|
<%= link_to t("dashboard.polls.poll.delete"),
|
|
proposal_dashboard_poll_path(proposal, poll),
|
|
method: :delete,
|
|
"data-confirm": t("dashboard.polls.poll.alert_notice"),
|
|
class: "delete" %>
|
|
</div>
|
|
</div>
|