|
|
@ -1,47 +1,22 @@
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
|
|
// var flag = false;
|
|
|
|
|
|
|
|
// jQuery(document).ready(function($) {
|
|
|
|
|
|
|
|
// transpotUrl('#content');
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
// function submit_message_replay()
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// regexContent();//onkeyup传给kindeditor用不上了,所以只能放在这里
|
|
|
|
|
|
|
|
// if(flag)
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// message_content_editor.sync();//提交内容之前要sync,不然服务器端取不到值
|
|
|
|
|
|
|
|
// $("#message_form").submit();
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// function regexContent()
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// var content = message_content_editor.html();//$.trim($("#message_content").val());
|
|
|
|
|
|
|
|
// if(content.length ==0)
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// $("#message_content_span").text("<%= l(:label_reply_empty) %>");
|
|
|
|
|
|
|
|
// $("#message_content_span").css('color','#ff0000');
|
|
|
|
|
|
|
|
// flag = false;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// else
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// $("#message_content_span").text("<%= l(:label_field_correct) %>");
|
|
|
|
|
|
|
|
// $("#message_content_span").css('color','#008000');
|
|
|
|
|
|
|
|
// flag = true;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<div class="project_r_h">
|
|
|
|
<div class="project_r_h">
|
|
|
|
<h2 class="project_h2"><%= l(:label_board) %></h2>
|
|
|
|
<h2 class="project_h2">
|
|
|
|
|
|
|
|
<%= l(:label_board) %>
|
|
|
|
|
|
|
|
</h2>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="problem_main">
|
|
|
|
<div class="problem_main">
|
|
|
|
<div class="ping_dispic"><%= link_to image_tag(url_to_avatar(@topic.author),:width => '46',:height => '46'), user_path(@topic.author) %></div>
|
|
|
|
<div class="ping_dispic">
|
|
|
|
|
|
|
|
<%= link_to image_tag(url_to_avatar(@topic.author),:width => '46',:height => '46'), user_path(@topic.author) %>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="talk_txt fl">
|
|
|
|
<div class="talk_txt fl">
|
|
|
|
<p class="problem_tit fl fb" ><%= link_to @topic.subject, course_boards_path(@topic.course),title: @topic.subject.to_s %></p>
|
|
|
|
<p class="problem_tit fl fb" >
|
|
|
|
|
|
|
|
<%= link_to @topic.subject, course_boards_path(@topic.course),title: @topic.subject.to_s %>
|
|
|
|
|
|
|
|
</p>
|
|
|
|
<br/>
|
|
|
|
<br/>
|
|
|
|
<p>由<%= link_to_user_header @topic.author,false,:class=> 'problem_name' %> 添加于<%= format_time(@topic.created_on) %></p>
|
|
|
|
<p>
|
|
|
|
|
|
|
|
由<%= link_to_user_header @topic.author,false,:class=> 'problem_name' %>
|
|
|
|
|
|
|
|
添加于<%= format_time(@topic.created_on) %>
|
|
|
|
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- <a class="talk_edit fr">删除</a><a class="talk_edit fr">编辑</a><a class="talk_edit fr">置顶</a> -->
|
|
|
|
|
|
|
|
<%#= watcher_link(@topic, User.current) %>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<%= link_to(
|
|
|
|
<%= link_to(
|
|
|
|
l(:button_edit),
|
|
|
|
l(:button_edit),
|
|
|
|
{:action => 'edit', :id => @topic},
|
|
|
|
{:action => 'edit', :id => @topic},
|
|
|
@ -55,12 +30,12 @@
|
|
|
|
:class => 'talk_edit fr'
|
|
|
|
:class => 'talk_edit fr'
|
|
|
|
) if @message.course_destroyable_by?(User.current) %>
|
|
|
|
) if @message.course_destroyable_by?(User.current) %>
|
|
|
|
<div class="cl"></div>
|
|
|
|
<div class="cl"></div>
|
|
|
|
<div class="talk_info mb10"><%= textAreailizable(@topic, :content) %></div>
|
|
|
|
<div class="talk_info mb10"><%= @topic.content.html_safe %></div>
|
|
|
|
<div class="talk_info mb10"><%= link_to_attachments_course @topic, :author => false %></div>
|
|
|
|
<div class="talk_info mb10"><%= link_to_attachments_course @topic, :author => false %></div>
|
|
|
|
<!-- <a href="#" class=" link_file ml60">附件:爱覅俄方if.zip(27.5kB)</a>-->
|
|
|
|
<!-- <a href="#" class=" link_file ml60">附件:爱覅俄方if.zip(27.5kB)</a>-->
|
|
|
|
<div class="cl"></div>
|
|
|
|
<div class="cl"></div>
|
|
|
|
<% if User.current.logged? %>
|
|
|
|
<% if User.current.logged? %>
|
|
|
|
<%= toggle_link l(:button_reply), "reply", :focus => 'message_content',:class => 'talk_edit fr' %>
|
|
|
|
<%= toggle_link l(:button_reply), "reply", :focus => 'message_subject',:class => 'talk_edit fr' %>
|
|
|
|
<% else %>
|
|
|
|
<% else %>
|
|
|
|
<%= link_to l(:button_reply), signin_path,:class => 'talk_edit fr' %>
|
|
|
|
<%= link_to l(:button_reply), signin_path,:class => 'talk_edit fr' %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
@ -118,11 +93,11 @@
|
|
|
|
<div id="reply" style="display:none;">
|
|
|
|
<div id="reply" style="display:none;">
|
|
|
|
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message_form'} do |f| %>
|
|
|
|
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message_form'} do |f| %>
|
|
|
|
<%= render :partial => 'form_course', :locals => {:f => f, :replying => true} %>
|
|
|
|
<%= render :partial => 'form_course', :locals => {:f => f, :replying => true} %>
|
|
|
|
<%= link_to l(:button_submit),"#",:onclick => 'course_board_submit_message_replay();' ,:class => "blue_btn fl c_white" ,:style=>"margin-left: 50px;"%>
|
|
|
|
<%= link_to l(:button_submit),"javascript:void(0)",:onclick => 'course_board_submit_message_replay();' ,:class => "blue_btn fl c_white" ,:style=>"margin-left: 50px;"%>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<div id="preview" class="wiki"></div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
<ul class="wlist">
|
|
|
|
<ul class="wlist">
|
|
|
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
|
|
|
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
|
|
|
|
</ul>
|
|
|
|
</ul>
|
|
|
|