Files
grecia/app/views/pages/custom_page.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

28 lines
691 B
Plaintext

<%= content_for :body_class, "custom-page" %>
<% provide :title do %><%= @custom_page.title %><% end %>
<div class="row margin-top">
<div class="small-12 medium-9 column">
<h1><%= @custom_page.title %></h1>
<% if @custom_page.subtitle.present? %>
<h2><%= @custom_page.subtitle %></h2>
<% end %>
<%= auto_link_already_sanitized_html AdminWYSIWYGSanitizer.new.sanitize(@custom_page.content) %>
</div>
<% if @custom_page.print_content_flag %>
<div class="small-12 medium-3 column">
<%= render "/shared/print" %>
</div>
<% end %>
<% if @cards.any? %>
<div class="small-12 column">
<%= render "cards" %>
</div>
<% end %>
</div>