2016-06-30 10:44:11 +08:00
|
|
|
|
<%= content_for(:header_tags) do %>
|
|
|
|
|
<%= import_ke(enable_at: false, prettify: false, init_activity: true) %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
$(function() {
|
|
|
|
|
sd_create_editor_from_data(<%= @syllabus.id %>, null, "100%", "<%= @syllabus.class.to_s %>");
|
|
|
|
|
});
|
|
|
|
|
</script>
|
2016-06-29 10:45:56 +08:00
|
|
|
|
<div class="RightBanner" >
|
|
|
|
|
<p >课程信息</p>
|
|
|
|
|
</div>
|
2016-06-30 10:44:11 +08:00
|
|
|
|
<% if @syllabus.des_status == 1 && @syllabus.courses.empty? %>
|
|
|
|
|
<div class="syllabusbox_tishi">
|
2016-06-29 10:45:56 +08:00
|
|
|
|
<% if User.current == @syllabus.user %>
|
2016-06-30 10:44:11 +08:00
|
|
|
|
<p >您建立的课程还未创建班级,请
|
2016-07-01 15:25:30 +08:00
|
|
|
|
<%= link_to "新建班级", new_course_path(:host=> Setting.host_course, :syllabus_id => @syllabus.id), :class => "syllabusbox_a_blue", :target => '_blank'%>
|
2016-06-30 10:44:11 +08:00
|
|
|
|
</p>
|
|
|
|
|
<% elsif User.current.user_extensions && User.current.user_extensions.identity == 0 && User.current.allowed_to?(:add_course, nil, :global => true)%>
|
|
|
|
|
<p >本课程下还未创建班级,请
|
2016-07-01 15:25:30 +08:00
|
|
|
|
<%= link_to "新建班级", new_course_path(:host=> Setting.host_course, :syllabus_id => @syllabus.id), :class => "syllabusbox_a_blue", :target => '_blank'%>
|
2016-06-30 10:44:11 +08:00
|
|
|
|
</p>
|
|
|
|
|
<% else %>
|
|
|
|
|
<p >本课程下还未创建班级,敬请期待。
|
|
|
|
|
</p>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<div class="<%=@syllabus.des_status == 0 ? 'HomeWork' : 'syllabusbox'%>">
|
|
|
|
|
<% if @syllabus.des_status == 0%>
|
|
|
|
|
<% if User.current == @syllabus.user %>
|
|
|
|
|
<p class="syllabus_info_tishi">您建立的课程尚未填写课程大纲,请完善您的<%=link_to '课程大纲', edit_syllabus_path(@syllabus), :class => 'syllabusbox_a_blue' %>!</p>
|
2016-06-29 10:45:56 +08:00
|
|
|
|
<% else %>
|
|
|
|
|
<p class="syllabus_info_tishi"><%=@syllabus.user.show_name %>老师尚未完成课程大纲的编写,敬请期待。</p>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<div class="syllabuscon">
|
2016-06-30 10:44:11 +08:00
|
|
|
|
<%=@syllabus.description.html_safe %>
|
2016-06-29 10:45:56 +08:00
|
|
|
|
<div class="mt10" style="font-weight:normal;">
|
|
|
|
|
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @syllabus} %>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2016-06-30 10:44:11 +08:00
|
|
|
|
<% if User.current.logged? && User.current == @syllabus.user%>
|
|
|
|
|
<div class="homepagePostSetting" style="margin:10px;">
|
|
|
|
|
<ul>
|
|
|
|
|
<li class="homepagePostSettingIcon">
|
|
|
|
|
<ul class="homepagePostSettiongText">
|
|
|
|
|
<li><%=link_to '编辑', edit_syllabus_path(@syllabus), :class => 'postOptionLink'%></li>
|
2016-07-01 16:25:52 +08:00
|
|
|
|
<li><%=link_to '删除', delete_des_syllabus_path(@syllabus), :class => 'postOptionLink', :confirm => l(:text_are_you_sure)%></li>
|
2016-06-30 10:44:11 +08:00
|
|
|
|
</ul>
|
|
|
|
|
</li>
|
2016-06-29 10:45:56 +08:00
|
|
|
|
</ul>
|
2016-06-30 10:44:11 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<% end %>
|
2016-07-01 11:11:53 +08:00
|
|
|
|
<div class="fr fontGrey2">更新时间:<%=format_time @syllabus.updated_at %><div></div></div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<% end %>
|
2016-06-29 10:45:56 +08:00
|
|
|
|
|
2016-06-30 10:44:11 +08:00
|
|
|
|
<% count=@syllabus.journals_for_messages.count %>
|
|
|
|
|
<div class="homepagePostReply">
|
|
|
|
|
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => @syllabus, :user_activity_id => @syllabus.id} %>
|
|
|
|
|
|
|
|
|
|
<% comments = @syllabus.journals_for_messages.reorder("created_on desc").limit(3) %>
|
|
|
|
|
<% if count > 0 %>
|
|
|
|
|
<div class="" id="reply_div_<%= @syllabus.id %>">
|
|
|
|
|
<%= render :partial => 'users/all_replies', :locals => {:comments => comments}%>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
|
|
|
|
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= @syllabus.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div>
|
|
|
|
|
<div class="homepagePostReplyInputContainer mb10">
|
|
|
|
|
<% if User.current.logged? %>
|
|
|
|
|
<div nhname='new_message_<%= @syllabus.id%>' style="display:none;">
|
|
|
|
|
<%= form_for('new_form',:url => {:controller => 'words', :action => 'leave_syllabus_message', :id => @syllabus.id},:method => "post") do |f|%>
|
|
|
|
|
<div nhname='toolbar_container_<%= @syllabus.id%>'></div>
|
|
|
|
|
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @syllabus.id%>' name="comment"></textarea>
|
|
|
|
|
<a id="new_message_submit_btn_<%= @syllabus.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<p nhname='contentmsg_<%= @syllabus.id%>'></p>
|
|
|
|
|
<% end%>
|
|
|
|
|
</div>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= render :partial => "users/show_unlogged" %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div>
|
2016-06-29 10:45:56 +08:00
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div><!--回复框 用正式版样式-->
|
|
|
|
|
</div><!--HomeWork end-->
|