|
|
|
@ -58,7 +58,6 @@
|
|
|
|
|
/*border-radius: 10px;*/
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
<div class="lz">
|
|
|
|
|
<!-- 在这里添加赞和踩-->
|
|
|
|
|
<span id="praise_tread" style="float: right"> <%= render :partial => "/praise_tread/praise_tread",:locals => {:obj => @topic,:show_flag => true,:user_id =>User.current.id,:horizontal => true}%> </span>
|
|
|
|
@ -132,24 +131,24 @@
|
|
|
|
|
<td>
|
|
|
|
|
<div class="contextual-borad">
|
|
|
|
|
<%= link_to(
|
|
|
|
|
"引用",
|
|
|
|
|
{:action => 'quote', :id => message},
|
|
|
|
|
:remote => true,
|
|
|
|
|
:method => 'get',
|
|
|
|
|
:title => l(:button_quote)) if !@topic.locked? && authorize_for('messages', 'reply') %>
|
|
|
|
|
l(:button_quote),
|
|
|
|
|
{:action => 'quote', :id => message},
|
|
|
|
|
:remote => true,
|
|
|
|
|
:method => 'get',
|
|
|
|
|
:title => l(:button_quote)) if !@topic.locked? && authorize_for('messages', 'reply') %>
|
|
|
|
|
<%= link_to(
|
|
|
|
|
#image_tag('edit.png'),
|
|
|
|
|
"编辑",
|
|
|
|
|
{:action => 'edit', :id => message},
|
|
|
|
|
:title => l(:button_edit)
|
|
|
|
|
#image_tag('edit.png'),
|
|
|
|
|
l(:button_edit),
|
|
|
|
|
{:action => 'edit', :id => message},
|
|
|
|
|
:title => l(:button_edit)
|
|
|
|
|
) if message.course_editable_by?(User.current) %>
|
|
|
|
|
<%= link_to(
|
|
|
|
|
#image_tag('delete.png'),
|
|
|
|
|
"删除",
|
|
|
|
|
{:action => 'destroy', :id => message},
|
|
|
|
|
:method => :post,
|
|
|
|
|
:data => {:confirm => l(:text_are_you_sure)},
|
|
|
|
|
:title => l(:button_delete)
|
|
|
|
|
#image_tag('delete.png'),
|
|
|
|
|
l(:button_delete),
|
|
|
|
|
{:action => 'destroy', :id => message},
|
|
|
|
|
:method => :post,
|
|
|
|
|
:data => {:confirm => l(:text_are_you_sure)},
|
|
|
|
|
:title => l(:button_delete)
|
|
|
|
|
) if message.course_destroyable_by?(User.current) %>
|
|
|
|
|
</div></td>
|
|
|
|
|
</tr>
|
|
|
|
@ -175,10 +174,11 @@
|
|
|
|
|
<% end %>
|
|
|
|
|
<% if !@topic.locked? && authorize_for_course('messages', 'reply') %>
|
|
|
|
|
<div id="reply" style="display:none;">
|
|
|
|
|
|
|
|
|
|
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
|
|
|
|
<%= render :partial => 'form', :locals => {:f => f, :replying => true} %>
|
|
|
|
|
<%= submit_tag l(:button_submit) %>
|
|
|
|
|
<%= preview_link({:controller => 'messages', :action => 'preview', :board_id => @board}, 'message-form') %>
|
|
|
|
|
<%#= preview_link({:controller => 'messages', :action => 'preview', :board_id => @board}, 'message-form') %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<div id="preview" class="wiki"></div>
|
|
|
|
|
</div>
|
|
|
|
@ -190,4 +190,9 @@
|
|
|
|
|
jQuery(document).ready(function($) {
|
|
|
|
|
transpotUrl('#content');
|
|
|
|
|
});
|
|
|
|
|
// function regexContent()
|
|
|
|
|
// {
|
|
|
|
|
// var content = trim($("#message_content").val());
|
|
|
|
|
// alert(content);
|
|
|
|
|
// }
|
|
|
|
|
</script>
|