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

43 lines
1.5 KiB
Plaintext
Raw Normal View History

<%= 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" %>
<% end %>
2016-03-25 14:29:58 +08:00
<% if topics %>
<% 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%>");
});
</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} %>
<% end %>
<% end %>
<% if topics.count == 10 %>
<%= 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"%>
<% end %>
<% end%>