forum previews working
This commit is contained in:
34
app/views/forum_topics/_form.html.erb
Normal file
34
app/views/forum_topics/_form.html.erb
Normal file
@@ -0,0 +1,34 @@
|
||||
<div id="form-content">
|
||||
<%= error_messages_for("forum_topic") %>
|
||||
|
||||
<%= simple_form_for(@forum_topic) do |f| %>
|
||||
<%= f.input :title %>
|
||||
|
||||
<%= f.simple_fields_for :original_post do |pf| %>
|
||||
<% unless @forum_topic.new_record? %>
|
||||
<%= hidden_field_tag "forum_topic[original_post_attributes][topic_id]", @forum_topic.id %>
|
||||
<% end %>
|
||||
<%= pf.input :body, :input_html => {:id => "forum_post_body"} %>
|
||||
<% end %>
|
||||
|
||||
<% if CurrentUser.is_moderator? %>
|
||||
<%= f.input :is_sticky %>
|
||||
<%= f.input :is_locked %>
|
||||
<% end %>
|
||||
|
||||
<%= f.button :submit, "Submit" %>
|
||||
<%= f.button :submit, "Preview" %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div id="form-aside">
|
||||
<div id="preview">
|
||||
<div class="content dtext">
|
||||
|
||||
</div>
|
||||
<p><a href="#" name="toggle-preview">Hide</a></p>
|
||||
</div>
|
||||
<div id="dtext-help">
|
||||
<%= render "dtext/help" %>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user