Render descriptions as Markdown

This commit is contained in:
ricola 2025-09-27 18:57:36 +02:00
parent 5fa73da51a
commit 481a643748
10 changed files with 42 additions and 12 deletions

View file

@ -4,7 +4,7 @@
<p><%= _("Closing date: %{date}" % { date: format_date_and_time(@vote.expire_on) }) %></p>
<% end %>
<p><%= @vote.description %></p>
<%= markdown(@vote.description) %>
<h2><%= _("Your ratings") %></h2>
@ -14,8 +14,8 @@
<% rating = @vote.ratings.find { |rating| rating.user == current_user and rating.candidate == candidate } %>
<% value = rating ? rating.value : 0 %>
<li>
<p><%= candidate.name %></p>
<p><%= candidate.description %></p>
<p><b><%= candidate.name %></b></p>
<%= markdown(candidate.description) %>
<ul>
<% settings.values.reverse.each do |v| %>
<li><input type="radio" name="<%= candidate.id %>" id="<%= candidate.id %>-<%= v[:id] %>" value="<%= v[:id] %>" <% if value == v[:id] %>checked<% end %>><label for="<%= candidate.id %>-<%= v[:id] %>" class="value-<%= v[:id] %>"><%= v[:label] %></label></li>