Files
grecia/app/views/polls/_poll_header.html.erb
Javi Martín 2aabf79fb4 Rename methods to add auto links to HTML
The name `safe_html_with_links` was confusing and could make you think
it takes care of making the HTML safe. So I've renamed it in a way that
makes it a bit more intuitive that it expects its input to be already
sanitized.

I've changed `text_with_links` as well so now the two method names
complement each other.
2019-10-08 18:46:20 +02:00

34 lines
992 B
Plaintext

<div class="expanded no-margin-top polls-show-header">
<div class="row">
<div class="small-12 medium-9 column padding">
<% if @poll.related.nil? %>
<%= back_link_to polls_path, t("polls.show.back") %>
<% else %>
<%= link_to t("polls.poll_header.back_to_proposal"), [@poll.related] %>
<% end %>
<h1><%= @poll.name %></h1>
<%= auto_link_already_sanitized_html simple_format(@poll.summary) %>
<% if @poll.geozones.any? %>
<ul class="no-bullet margin-top tags">
<% @poll.geozones.each do |g| %>
<li class="inline-block"><span><%= g.name %></span></li>
<% end %>
</ul>
<% end %>
</div>
<aside class="small-12 medium-3 column margin-top">
<%= render "shared/social_share",
share_title: t("shared.share"),
title: @poll.name,
url: poll_url(@poll),
description: @poll.name,
mobile: @poll.name
%>
</aside>
</div>
</div>