Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

37 lines (29 sloc) 1.143 kB
<% @followers ||= []%>
<% if current_user -%>
<div id="message_box">
<% opts = message_post.new_record? ? { :url => forum_message_posts_path(@forum) } : { :url => forum_message_post_path(@forum, message_post), :method => :put } %>
<%= form_for message_post, opts do |f| %>
<%= f.error_messages %>
<%= f.hidden_field(:forum_id) %>
<%= f.hidden_field(:thread_id) %>
<%if( !message_post.new_record? || !@followers.include?(current_user) )%>
<p>Email updates to me: <%= f.check_box :to_user_id, :value => 1 %></p>
<%end%>
<p>Subject: <%= f.text_field :subject %></p>
<p><%= f.text_area :body, :cols => 60, :rows => 10 %></p>
<p><%= submit_tag "Post it!" %></p>
<% end %>
</div>
<script type="text/javascript">
//<![CDATA[
CKEDITOR.replace( 'message_post[body]',
{
uiColor : '#819033',
filebrowserUploadUrl : '<%= upload_handler_user_path(current_user) %>'
});
//]]>
</script>
<% else -%>
<p><em>If you were <%= link_to "logged in", login_path %> you could post.</em></p>
<% end -%>
<div style="clear:both"></div>
Jump to Line
Something went wrong with that request. Please try again.