2015-04-03 11:19:15 +08:00
|
|
|
|
<%= javascript_include_tag "/assets/kindeditor/kindeditor" %>
|
2015-03-26 15:55:07 +08:00
|
|
|
|
<%= error_messages_for 'message' %>
|
|
|
|
|
<% replying ||= false %>
|
|
|
|
|
<% extra_option = replying ? { readonly: true} : { maxlength: 200 } %>
|
|
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
<label><span class="c_red">*</span> <%= l(:field_subject) %> :</label>
|
|
|
|
|
<% if replying %>
|
|
|
|
|
<%= f.text_field :subject, { size: 60, id: "message_subject",:class=>"talk_input w585" }.merge(extra_option) %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= f.text_field :subject, { size: 60, id: "message_subject", onkeyup: "regexSubject();",:class=>"talk_input w585" }.merge(extra_option) %>
|
|
|
|
|
<% end %>
|
2015-03-27 16:55:23 +08:00
|
|
|
|
<p id="subject_span" class="ml55"></p>
|
2015-03-26 15:55:07 +08:00
|
|
|
|
</li>
|
|
|
|
|
<li class="ml60 mb5">
|
|
|
|
|
<% 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 %>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<div id="message_quote" class="wiki" style="width: 100%;word-break: break-all;word-wrap: break-word;"></div>
|
2015-04-08 17:25:52 +08:00
|
|
|
|
<label class="fl" >
|
|
|
|
|
<span class="c_red">*</span>
|
|
|
|
|
<%= l(:field_description) %> :
|
|
|
|
|
</label>
|
2015-03-26 15:55:07 +08:00
|
|
|
|
<%= text_area :quote,:quote,:style => 'display:none' %>
|
2015-04-03 11:19:15 +08:00
|
|
|
|
<%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
|
|
|
|
|
<% if replying %>
|
|
|
|
|
<%= f.kindeditor :content, :editor_id => 'message_content_editor',
|
|
|
|
|
:width => '89%',
|
|
|
|
|
:height => 300,
|
|
|
|
|
:input_html => { :id => 'message_content',
|
|
|
|
|
:class => 'talk_text fl',
|
|
|
|
|
:maxlength => 5000 }%>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= f.kindeditor :content, :editor_id => 'message_content_editor',
|
|
|
|
|
:owner_id => @message.nil? ? 0: @message.id,
|
|
|
|
|
:owner_type => OwnerTypeHelper::MESSAGE,
|
2015-04-10 15:01:33 +08:00
|
|
|
|
:width => '90%',
|
2015-04-03 11:19:15 +08:00
|
|
|
|
:height => 300,
|
|
|
|
|
:class => 'talk_text fl',
|
|
|
|
|
:input_html => { :id => 'message_content',
|
|
|
|
|
:class => 'talk_text fl',
|
|
|
|
|
:maxlength => 5000 }%>
|
|
|
|
|
<% end %>
|
2015-03-26 15:55:07 +08:00
|
|
|
|
<div class="cl"></div>
|
2015-03-27 16:55:23 +08:00
|
|
|
|
<p id="message_content_span" class="ml55"></p>
|
2015-03-26 15:55:07 +08:00
|
|
|
|
</li>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<li>
|
2015-04-15 14:29:35 +08:00
|
|
|
|
<label class="fl mt10"> <%= l(:label_attachment_plural) %> :</label>
|
|
|
|
|
<div class="fl mt10">
|
2015-03-27 17:42:28 +08:00
|
|
|
|
<%= render :partial => 'attachments/form_course', :locals => {:container => @message,:isReply => @isReply} %>
|
|
|
|
|
</div>
|
2015-03-26 15:55:07 +08:00
|
|
|
|
</li>
|
|
|
|
|
<li >
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</li>
|