Rewrite views with Bootstrap
This commit is contained in:
parent
529f7118b1
commit
5a278fcddf
19 changed files with 424 additions and 279 deletions
|
|
@ -1,6 +1,15 @@
|
|||
<h1><%= _("Open vote") %></h1>
|
||||
<div class="mb-5">
|
||||
<h1><%= @vote.title %></h1>
|
||||
<ul class="list-unstyled">
|
||||
<li>
|
||||
<span class="badge bg-secondary"><%= _("Draft") %></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<p><%= _("Closing date: %{date}") % { date: format_date_and_time(@expire_on) } %></p>
|
||||
<div class="alert alert-warning mb-5">
|
||||
|
||||
<p><strong><%= _("Closing date: %{date}") % { date: format_date_and_time(@expire_on) } %></strong></p>
|
||||
|
||||
<p><%= _("The vote will automatically close on that date and the results will
|
||||
be sent to all users by email.") %></p>
|
||||
|
|
@ -8,21 +17,29 @@ be sent to all users by email.") %></p>
|
|||
<p><%= _("You won't be able to modify or delete this vote anymore after
|
||||
opening it.") %></p>
|
||||
|
||||
<form action="/votes/<%= @vote.secure_id %>/open" method="post">
|
||||
<button type="submit"><%= _("Open vote to participants") %></button>
|
||||
<form action="/votes/<%= @vote.secure_id %>/open" method="post" class="mb-3">
|
||||
<button type="submit" class="btn btn-primary"><%= _("Open vote to participants") %></button>
|
||||
</form>
|
||||
|
||||
<form action="/votes/<%= @vote.secure_id %>" method="get">
|
||||
<button type="submit"><%= _("Cancel") %></button>
|
||||
<button type="submit" class="btn btn-outline-secondary"><%= _("Cancel") %></button>
|
||||
</form>
|
||||
|
||||
<h2><%= @vote.title %></h2>
|
||||
</div>
|
||||
|
||||
<%= markdown(@vote.description) %>
|
||||
<div class="mb-5">
|
||||
<div class="lead">
|
||||
<%= markdown(@vote.description) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2><%= _("Candidates") %></h2>
|
||||
<h2 class="mb-4"><%= _("Candidates") %></h2>
|
||||
|
||||
<% @vote.candidates.each do |candidate| %>
|
||||
<h3><%= candidate.name %></h3>
|
||||
<%= markdown(candidate.description) %>
|
||||
<div class="card mb-4">
|
||||
<div class="card-body">
|
||||
<h3 class="mb-3"><%= candidate.name %></h3>
|
||||
<%= markdown(candidate.description) %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue