Note this rule does still allow us to add new lines after opening tags; it just makes sure that if we do, we also add it in closing tags. Likewise, if we don't add it in the opening tag, it forces us not to add it in the closing tag either. I don't have a strong preference about either style; in these cases I've chosen the latter because it seemed more common in our code.
71 lines
2.5 KiB
Plaintext
71 lines
2.5 KiB
Plaintext
<% provide :title do %><%= @debate.title %><% end %>
|
|
<% content_for :canonical do %>
|
|
<%= render "shared/canonical", href: debate_url(@debate) %>
|
|
<% end %>
|
|
|
|
<% cache [locale_and_user_status(@debate), @debate, @debate.author, Flag.flagged?(current_user, @debate), @debate_votes] do %>
|
|
<div class="debate-show">
|
|
<div id="<%= dom_id(@debate) %>" class="row">
|
|
<div class="small-12 medium-9 column">
|
|
<%= back_link_to %>
|
|
|
|
<h1><%= @debate.title %></h1>
|
|
<% if @debate.conflictive? %>
|
|
<div data-alert class="callout alert margin-top">
|
|
<strong><%= t("debates.show.flag") %></strong>
|
|
</div>
|
|
<% end %>
|
|
|
|
<div class="debate-info">
|
|
<%= render "/shared/author_info", resource: @debate %>
|
|
|
|
<span class="bullet"> • </span>
|
|
<%= l @debate.created_at.to_date %>
|
|
<span class="bullet"> • </span>
|
|
<span class="icon-comments"></span>
|
|
<%= link_to t("debates.show.comments", count: @debate.comments_count), "#comments" %>
|
|
<span class="bullet"> • </span>
|
|
<span class="js-flag-actions">
|
|
<%= render "shared/flag_actions", flaggable: @debate %>
|
|
</span>
|
|
</div>
|
|
|
|
<%= auto_link_already_sanitized_html wysiwyg(@debate.description) %>
|
|
|
|
<%= render "shared/tags", taggable: @debate %>
|
|
|
|
<%= render "relationable/related_content", relationable: @debate %>
|
|
|
|
<div class="js-moderator-debate-actions margin">
|
|
<%= render "actions", debate: @debate %>
|
|
</div>
|
|
</div>
|
|
|
|
<aside class="small-12 medium-3 column">
|
|
<% if current_user && @debate.editable_by?(current_user) %>
|
|
<div class="sidebar-divider"></div>
|
|
<h2><%= t("debates.show.author") %></h2>
|
|
<%= link_to edit_debate_path(@debate), class: "button hollow expanded" do %>
|
|
<span class="icon-edit"></span>
|
|
<%= t("debates.show.edit_debate_link") %>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<div class="sidebar-divider"></div>
|
|
<h2><%= t("votes.supports") %></h2>
|
|
<div id="<%= dom_id(@debate) %>_votes">
|
|
<%= render "debates/votes", debate: @debate %>
|
|
</div>
|
|
<%= render "shared/social_share",
|
|
share_title: t("debates.show.share"),
|
|
title: @debate.title,
|
|
url: debate_url(@debate),
|
|
description: @debate.title,
|
|
mobile: @debate.title %>
|
|
</aside>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
|
|
<%= render "comments" %>
|