socialforge/app/views/boards/_form_project.html.erb

102 lines
3.6 KiB
Plaintext
Raw Normal View History

2015-05-18 14:53:01 +08:00
<style>
2015-06-16 12:01:06 +08:00
/*.comment{*/
/*position: relative;*/
/*width: 330px;*/
/*padding: 10px;*/
/*}*/
/*.comment .ke-toolbar{*/
/*position: absolute;*/
/*bottom: -18px;*/
/*}*/
2015-05-18 14:53:01 +08:00
</style>
<%= error_messages_for 'message' %>
<% replying ||= false %>
<% extra_option = replying ? { readonly: true} : { maxlength: 200 } %>
<% if replying %>
2015-05-26 14:18:42 +08:00
<li style="display: none;">
<label><span class="c_red">*</span>&nbsp;<%= l(:field_subject) %>&nbsp;&nbsp;</label>
2015-05-23 16:02:41 +08:00
<%= f.text_field :subject, { size: 60, id: "message_subject#{f.object.id}",:class=>"talk_input w585", :nhname=>'inputsubject' }.merge(extra_option) %>
2015-05-23 16:02:41 +08:00
<p nhname="subjectmsg" class="ml55"></p>
</li>
<% else %>
<li>
<label><span class="c_red">*</span>&nbsp;<%= l(:field_subject) %>&nbsp;&nbsp;</label>
2015-05-23 16:02:41 +08:00
<%= f.text_field :subject, { size: 60, id: "message_subject#{f.object.id}", :class=>"talk_input w585", :nhname=>'inputsubject' }.merge(extra_option) %>
2015-05-23 16:02:41 +08:00
<p nhname="subjectmsg" class="ml55"></p>
</li>
<% end %>
<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>
2015-05-26 14:18:42 +08:00
<div nhname="quote_show" id="message_quote" class="wiki" style="width: 100%;word-break: break-all;word-wrap: break-word;"></div>
2015-06-12 10:09:47 +08:00
<div class="cl"></div>
<% unless replying %>
<label class="fl ml3" ><span class="c_red">*</span>&nbsp;<%= l(:field_description) %>&nbsp;</label>
<% end %>
2015-05-26 14:18:42 +08:00
<%= text_area :quote,:quote,:style => 'display:none',:nhname=>"quote_input" %>
2015-05-26 17:43:23 +08:00
<div class="content <%= replying ? '':'ml55' %>">
<% if replying%>
2015-05-18 14:53:01 +08:00
2015-05-19 14:26:42 +08:00
<%= f.text_area :content,
2015-05-18 14:53:01 +08:00
:width => '89%',
:height => 300,
2015-05-19 14:26:42 +08:00
:id => "message_content#{f.object.id}",
2015-05-23 16:02:41 +08:00
:nhname => 'textarea',
2015-05-18 14:53:01 +08:00
:onkeyup => "regexContent('#{f.object.id}');",
:class => 'talk_text fl',
:placeholder => "最多3000个汉字(或6000个英文字符)",
2015-05-19 14:26:42 +08:00
:maxlength => 5000 %>
2015-05-18 14:53:01 +08:00
<% else %>
2015-05-26 15:01:11 +08:00
<input nhname="init_content_val" value="<%=topic.content%>" type="hidden"/>
2015-05-19 14:26:42 +08:00
<%= f.text_area :content,
2015-05-18 14:53:01 +08:00
:width => '90%',
:height => 300,
:class => 'talk_text fl',
2015-05-19 14:26:42 +08:00
:editor_id => "message_content#{f.object.id}_edit",
:id => "message_content#{f.object.id}",
2015-05-18 14:53:01 +08:00
:onkeyup => "regexContent('#{f.object.id}');",
:class => 'talk_text fl',
2015-05-23 16:02:41 +08:00
:nhname => 'textarea',
2015-05-18 14:53:01 +08:00
:placeholder => "最多3000个汉字(或6000个英文字符)",
2015-05-19 14:26:42 +08:00
:maxlength => 5000 %>
2015-05-18 14:53:01 +08:00
<% end %>
2015-05-18 14:53:01 +08:00
</div>
<div class="cl"></div>
2015-05-25 15:19:42 +08:00
<% if replying%>
<p nhname="contentmsg"></p>
<% else %>
<p nhname="contentmsg" class="ml55"></p>
<%end %>
</li>
<div class="cl"></div>
<li>
<% unless replying %>
<div class="fl ml3" style="padding-left: 52px;">
<%= render :partial => 'attachments/form_project', :locals => {:container => topic,:isReply => @isReply} %>
</div>
<% end %>
</li>
<li >
<div class="cl"></div>
</li>