28 lines
579 B
Text
28 lines
579 B
Text
<h1><%= @vote.title %></h1>
|
|
|
|
<p><%= @vote.description %></p>
|
|
|
|
<h2>Candidates</h2>
|
|
|
|
<ul>
|
|
<% @vote.candidates.each do |candidate| %>
|
|
<li>
|
|
<p><%= candidate.name %></p>
|
|
<p><%= candidate.description %></p>
|
|
</li>
|
|
<% end %>
|
|
</ul>
|
|
|
|
<h2>New candidate</h2>
|
|
|
|
<form action="/votes/<%= @vote.secure_id %>/candidates" method="post">
|
|
<p>
|
|
<label for="name">Name</label>
|
|
<input type="text" name="name">
|
|
</p>
|
|
<p>
|
|
<label for="description">Description</label>
|
|
<input type="text" name="description">
|
|
</p>
|
|
<button type="submit">Add new candidate</button>
|
|
</form>
|