socialforge/app/views/messages/_form.html.erb

39 lines
1.5 KiB
Plaintext
Raw Normal View History

2013-08-01 10:33:49 +08:00
<%= error_messages_for 'message' %>
<% replying ||= false %>
2014-01-09 09:15:58 +08:00
<div class="box ph10_5">
2013-08-01 10:33:49 +08:00
<!--[form:message]-->
2014-07-01 16:56:23 +08:00
<p><label for="message_subject"><%= l(:field_subject) %><span class="required"> *&nbsp;&nbsp;</span></label><br />
2014-01-09 09:15:58 +08:00
<%= f.text_field :subject,:size => 60, :style => "width: 99%;", :id => "message_subject" %><!--by young-->
</p>
<p>
2013-08-01 10:33:49 +08:00
<% unless replying %>
<% if @message.safe_attribute? 'sticky' %>
<%= f.check_box :sticky %> <%= label_tag 'message_sticky', l(:label_board_sticky) %>
<% end %>
<% if @message.safe_attribute? 'locked' %>
<%= f.check_box :locked %> <%= label_tag 'message_locked', l(:label_board_locked) %>
<% end %>
<% end %>
</p>
<% if !replying && !@message.new_record? && @message.safe_attribute?('board_id') %>
<p><label><%= l(:label_board) %></label><br />
2014-06-18 16:45:33 +08:00
<%# modify by nwb%>
<% if @message.project %>
<%= f.select :board_id, boards_options_for_select(@message.project.boards) %></p>
<% elsif @message.course %>
<%= f.select :board_id, boards_options_for_select(@message.course.boards) %></p>
<% end %>
2013-08-01 10:33:49 +08:00
<% end %>
<p>
<%= label_tag "message_content", l(:description_message_content), :class => "hidden-for-sighted" %>
2014-01-09 08:34:30 +08:00
<%= f.text_area :content, :cols => 80, :rows => 13, :class => 'wiki-edit', :id => 'message_content' %></p>
2013-08-01 10:33:49 +08:00
<%= wikitoolbar_for 'message_content' %>
<!--[eoform:message]-->
<p><%= l(:label_attachment_plural) %><br />
<%= render :partial => 'attachments/form', :locals => {:container => @message} %></p>
</div>