mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-29 05:51:22 +00:00
775f5682a4
Improved articles styling Improved bbcode to html formatting HTML and CSS refactorings Moved Extra into concerns Changed repo URL to read-only for deploys Fixes quotes in comments
31 lines
924 B
Text
31 lines
924 B
Text
<div class="article">
|
|
<h1><%= namelink article %></h1>
|
|
|
|
<div class="content">
|
|
<% if article.text_coding == Article::CODING_HTML %>
|
|
<%= article.text.html_safe %>
|
|
<% else %>
|
|
<%= article.text_parsed.html_safe %>
|
|
<% end %>
|
|
</div>
|
|
|
|
<div class="author">
|
|
<%= namelink(article.user) %> on <%= longtime article.created_at %>
|
|
</div>
|
|
|
|
<div class="comments">
|
|
<%= link_to article do %>
|
|
<%= icon 'comments' %> Comments (<%= article.comments.count %>)
|
|
<% end %>
|
|
</div>
|
|
|
|
<div class="actions">
|
|
<% if article.can_update? cuser %>
|
|
<%= link_to 'Edit', edit_article_path(article), class: 'button tiny' %>
|
|
<% end %>
|
|
<% if article.can_destroy? cuser %>
|
|
<%= link_to 'Destroy', article, confirm: 'Are you sure?', method: :delete, class: 'button tiny' %>
|
|
<% end %>
|
|
<%= link_to "History", article_versions_path(article), class: 'button tiny' %>
|
|
</div>
|
|
</div>
|