35 lines
1.0 KiB
Plaintext
35 lines
1.0 KiB
Plaintext
<% title "New Thread: #{@thread.forum.name}" %>
|
|
|
|
<%
|
|
labels = [["Label", nil]]
|
|
Label.order(:name).each do |l|
|
|
labels << [l.name, l.id]
|
|
end
|
|
%>
|
|
|
|
<%= link_to @thread.forum.group, forumgroup_path(@thread.forum.group) %> → <%= link_to @thread.forum, @thread.forum %> → New thread
|
|
<h1>New thread</h1>
|
|
<%= form_for @thread do |f|%>
|
|
<table>
|
|
<% if mod? %>
|
|
<tr>
|
|
<td><%= f.label :sticky %></td>
|
|
<td><%= f.check_box :sticky %></td>
|
|
</tr>
|
|
<tr>
|
|
<td><%= f.label :locked %></td>
|
|
<td><%= f.check_box :locked %></td>
|
|
</tr>
|
|
<% end %>
|
|
</table>
|
|
<div class="table-cell">
|
|
<%= f.select :label_id, labels, {}, class: "auto-width" %>
|
|
</div>
|
|
<div class="table-cell full-width">
|
|
<%= f.text_field :title, placeholder: "Title" %>
|
|
</div>
|
|
<%= render partial: "md_editor", locals: {name: "forumthread[content]", content: @thread.content} %>
|
|
<%= f.hidden_field :forum_id %>
|
|
<p><%= f.submit "Create thread", class: "btn blue left" %></p>
|
|
<div class="clear"></div>
|
|
<% end %> |