rails 4 and tons of stuff
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<p id="markdown-note">Note: You can use <%= link_to "Markdown", "https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet", target: "_blank" %>!</p>
|
||||
<%= simple_form_for [@thread.forum, @thread] do |f|%>
|
||||
<%= f.input :title, label: false %>
|
||||
<%= f.hidden_field :content, label: false, input_html: {class: "full-width vertical"} %>
|
||||
<%= f.text_area :content, label: false, input_html: {class: "full-width vertical"} %>
|
||||
<%= f.submit "Update thread", class: "btn blue left" %>
|
||||
<% end %>
|
||||
<%= button_to "Delete thread", [@thread.forum, @thread], :method => "delete", :confirm => "Delete thread & comments forever?", class: "btn red right" %>
|
||||
@@ -1,6 +1,6 @@
|
||||
<%= link_to @forum.group, forumgroup_path(@forum.group) %> → <%= link_to @forum, @forum %> → New thread
|
||||
<%= link_to @thread.forum.group, forumgroup_path(@thread.forum.group) %> → <%= link_to @thread.forum, @thread.forum %> → New thread
|
||||
<h1>New thread</h1>
|
||||
<%= form_for [@forum, @thread] do |f|%>
|
||||
<%= form_for @thread do |f|%>
|
||||
<table>
|
||||
<% if mod? %>
|
||||
<tr>
|
||||
@@ -16,6 +16,6 @@
|
||||
<div id="form_inputs">
|
||||
<%= f.text_field :title, placeholder: "Title" %>
|
||||
</div>
|
||||
<%= f.hidden_field :content, placeholder: "Text" %>
|
||||
<%= f.text_area :content, placeholder: "Text" %>
|
||||
<p><%= f.submit "Create thread", class: "btn blue" %></p>
|
||||
<% end %>
|
||||
@@ -8,7 +8,7 @@
|
||||
<div class="items">
|
||||
<div class="item content">
|
||||
<h2 class="headline"><%= link_to truncate(@thread.title, length: 60, omission: " …"), p %></h2>
|
||||
<%= Sanitize.clean(GitHub::Markdown.render_gfm(@thread.content), Sanitize::Config::RELAXED).html_safe %>
|
||||
<%= Sanitize.clean(render_md(@thread.content), Sanitize::Config::RELAXED).html_safe %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user