This commit is contained in:
jomo
2013-10-21 05:45:54 +02:00
parent 49b2231047
commit bfe9a1e6f5
14 changed files with 107 additions and 46 deletions

View File

@@ -0,0 +1,18 @@
<%= link_to @forum.group, @forum.group %> → <%= link_to @forum, @forum %> → New thread
<h1>New thread</h1>
<%= simple_form_for @thread do |f|%>
<div id="form_labels">
<%= f.label :title %>
<%= f.label :sticky if mod? %>
<%= f.label :locked if mod? %>
<%= f.label :content, "Text" %>
</div>
<div id="form_inputs">
<%= f.input :title, placeholder: "Title" %>
<%= f.input :sticky, as: :select, collection: [["No", false], ["Yes", true]], include_blank: false if mod? %>
<%= f.input :locked, as: :select, collection: [["No", false], ["Yes", true]], include_blank: false if mod? %>
<%= f.input :content, placeholder: "Text" %>
</div>
<%= f.submit "Create forum", class: "btn blue" %><br>
Yea i know this is ugly :D
<% end %>