|
|
|
@ -22,7 +22,7 @@
|
|
|
|
|
<!-- 发布新帖部分 -->
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<div class=" talklist_box" >
|
|
|
|
|
<div class="talk_new ml15 mb10" id="about_newtalk" style="display:<%= !@flag.nil? && @flag=='true' ? 'block' : 'none' %>;">
|
|
|
|
|
<div class="talk_new ml15 mb10" name="containerxxoo" id="about_newtalk" style="display:<%= !@flag.nil? && @flag=='true' ? 'block' : 'none' %>;">
|
|
|
|
|
<ul>
|
|
|
|
|
<%= render :partial => 'project_new_topic' %>
|
|
|
|
|
</ul>
|
|
|
|
@ -41,6 +41,7 @@
|
|
|
|
|
|
|
|
|
|
<p class="talkmain_tit fl fb break_word"> <%= h(topic.subject) %></p>
|
|
|
|
|
<% if topic.editable_by?(User.current) %>
|
|
|
|
|
|
|
|
|
|
<a href="javascript:void(0)" onclick="show_newtalk1('#about_newtalk<%= topic.id%>');" style="color: #426e9a;float: right;
|
|
|
|
|
margin-right: 10px;"><%= l(:button_edit) %></a>
|
|
|
|
|
<% end %>
|
|
|
|
@ -81,7 +82,7 @@
|
|
|
|
|
<%= l(:label_activity_time)%>: <%= format_time topic.created_on %>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<%= toggle_link l(:button_reply), "reply" + topic.id.to_s, :focus => 'message_content',:class => ' c_dblue fr' %>
|
|
|
|
|
<%= toggle_link l(:button_reply), "reply" + topic.id.to_s, :focus => "about_newtalk#{topic.id}",:class => ' c_dblue fr' %>
|
|
|
|
|
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
|
|
|
|
@ -98,12 +99,12 @@
|
|
|
|
|
<% if !topic.locked? && authorize_for('messages', 'reply') %>
|
|
|
|
|
<em class="talkWrapArrow"></em>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<div class="talkConIpt ml15 mb10" style="display: none" id="reply<%= topic.id %>">
|
|
|
|
|
<%= form_for reply, :as => :reply, :url => {:controller=>'messages',:action => 'reply', :id => topic.id, :board_id => topic.board_id, :is_board => 'true'}, :html => {:multipart => true, :id => 'message_form' + topic.id.to_s} do |f| %>
|
|
|
|
|
<div class="talkConIpt ml15 mb10" style="display: none" name="containerxxoo" id="reply<%= topic.id %>">
|
|
|
|
|
<%= form_for reply, :as => :reply, :url => {:controller=>'messages',:action => 'reply', :id => topic.id, :board_id => topic.board_id, :is_board => 'true'}, :html => {:multipart => true, :id => 'message_form' + topic.id.to_s, :name=>'message-form'} do |f| %>
|
|
|
|
|
|
|
|
|
|
<%= render :partial => 'form_project', :locals => {:f => f, :replying => true} %>
|
|
|
|
|
<%= toggle_link l(:button_cancel), "reply" + topic.id.to_s, :focus => 'message_content',:class => 'grey_btn fr ml10' %>
|
|
|
|
|
<a href="#" onclick="$('#message_form<%= topic.id%>').submit();" class="blue_btn fr " style=""><%= l(:label_memo_create)%></a>
|
|
|
|
|
<a href="javascript:(0)" name="submitbtn" class="blue_btn fr " style=""><%= l(:label_memo_create)%></a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
@ -142,6 +143,16 @@
|
|
|
|
|
:title => l(:button_delete),
|
|
|
|
|
:class => ' c_dblue fr'
|
|
|
|
|
) if message.course_destroyable_by?(User.current) %>
|
|
|
|
|
<%= link_to(
|
|
|
|
|
l(:button_quote),
|
|
|
|
|
{:controller => 'messages', :action => 'quote', :id => message.id, :board_id => message.board_id, :is_board => 'true'},
|
|
|
|
|
:class => ' c_dblue fr',
|
|
|
|
|
:style => 'margin-right: 10px;',
|
|
|
|
|
:remote => true,
|
|
|
|
|
:method => 'get',
|
|
|
|
|
:onclick => "$('#reply#{topic.id}').slideToggle(); return false;",
|
|
|
|
|
:focus => "about_newtalk#{topic.id}",
|
|
|
|
|
:title => l(:button_quote)) if !topic.locked? && authorize_for('messages', 'reply') %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
|
|
|
|
@ -169,8 +180,18 @@
|
|
|
|
|
:method => :post,
|
|
|
|
|
:data => {:confirm => l(:text_are_you_sure)},
|
|
|
|
|
:title => l(:button_delete),
|
|
|
|
|
|
|
|
|
|
:class => ' c_dblue fr'
|
|
|
|
|
) if message.course_destroyable_by?(User.current) %>
|
|
|
|
|
<%= link_to(
|
|
|
|
|
l(:button_quote),
|
|
|
|
|
{:controller => 'messages', :action => 'quote', :id => message.id, :board_id => message.board_id, :is_board => 'true'},
|
|
|
|
|
:remote => true,
|
|
|
|
|
:method => 'get',
|
|
|
|
|
:focus => "about_newtalk#{topic.id}",
|
|
|
|
|
:class => ' c_dblue fr',
|
|
|
|
|
:style => 'margin-right: 10px;',
|
|
|
|
|
:title => l(:button_quote)) if !topic.locked? && authorize_for('messages', 'reply') %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
|
|
|
|
@ -216,4 +237,34 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
//submitProjectsBoard()
|
|
|
|
|
KindEditor.ready(function(K){
|
|
|
|
|
$("div[name='containerxxoo']").each(function(){
|
|
|
|
|
var container=$(this);
|
|
|
|
|
|
|
|
|
|
var textarea= $("textarea[name='content']",container);
|
|
|
|
|
var editor = K.create(textarea, {
|
|
|
|
|
resizeType : 1,
|
|
|
|
|
allowPreviewEmoticons : false,
|
|
|
|
|
allowImageUpload : false,
|
|
|
|
|
width:"89%",
|
|
|
|
|
items : ['emoticons']
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$("a[name='submitbtn']",container).click(function(){
|
|
|
|
|
textarea[0].value = editor.html();
|
|
|
|
|
var id = textarea[0].id.toString().substr(15);
|
|
|
|
|
|
|
|
|
|
if(this.parentNode.name == 'message-form') {
|
|
|
|
|
this.parentNode.submit();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
this.parentNode.parentNode.submit();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
</script>
|