2015-12-18 15:02:36 +08:00
|
|
|
<%= content_for(:header_tags) do %>
|
|
|
|
<%= import_ke(enable_at: false, prettify: false) %>
|
2016-02-01 14:50:45 +08:00
|
|
|
<%= javascript_include_tag "create_kindeditor" %>
|
2015-12-18 15:02:36 +08:00
|
|
|
<% end %>
|
2016-03-25 14:29:58 +08:00
|
|
|
<% if topics %>
|
2015-12-18 15:02:36 +08:00
|
|
|
<% topics.each do |topic| %>
|
|
|
|
<script>
|
|
|
|
function expand_reply(container, btnid) {
|
|
|
|
var target = $(container);
|
|
|
|
var btn = $(btnid);
|
|
|
|
if (btn.data('init') == '0') {
|
|
|
|
btn.data('init', 1);
|
|
|
|
btn.html('收起回复');
|
|
|
|
target.show();
|
|
|
|
} else {
|
|
|
|
btn.data('init', 0);
|
|
|
|
btn.html('展开更多');
|
|
|
|
target.hide();
|
|
|
|
target.eq(0).show();
|
|
|
|
target.eq(1).show();
|
|
|
|
target.eq(2).show();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function expand_reply_input(id) {
|
|
|
|
$(id).toggle();
|
|
|
|
}
|
|
|
|
|
|
|
|
$(function () {
|
2016-01-29 16:55:07 +08:00
|
|
|
sd_create_editor_from_data(<%= topic.id%>, null, "100%", "<%=topic.class.to_s%>");
|
2015-12-18 15:02:36 +08:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
<% if topic %>
|
2016-03-25 14:29:58 +08:00
|
|
|
<%= render :partial => 'users/course_message', :locals => {:activity => topic, :user_activity_id => topic.id, :is_course => 1, :is_board=>1} %>
|
2015-12-18 15:02:36 +08:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% if topics.count == 10 %>
|
2015-12-22 15:14:03 +08:00
|
|
|
<%= link_to "点击展开更多",boards_topic_path(@board, :course_id => @board.course.id ,:page => page),:id => "show_more_course_topic",:remote => "true",:class => "loadMore mt10 f_grey"%>
|
2015-12-18 15:02:36 +08:00
|
|
|
<% end %>
|
|
|
|
<% end%>
|
|
|
|
|