|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
<%= stylesheet_link_tag 'welcome' %>
|
|
|
|
|
<%= javascript_include_tag 'welcome' %>
|
|
|
|
|
<script type="text/javascript" language="javascript" xmlns="http://www.w3.org/1999/html">
|
|
|
|
|
<script type="text/javascript" language="javascript" xmlns="http://www.w3.org/1999/html"
|
|
|
|
|
xmlns="http://www.w3.org/1999/html">
|
|
|
|
|
|
|
|
|
|
$(function(){
|
|
|
|
|
$("#main").find("a").attr("target", "_blank");
|
|
|
|
@ -69,25 +70,45 @@
|
|
|
|
|
<% if(find_miracle_course(10, 7,params[:school_id]).map.count == 0) %>
|
|
|
|
|
<h1></h1>
|
|
|
|
|
<p id="errorExplanation">
|
|
|
|
|
未开设任何课程,您可以查看其他学校课程
|
|
|
|
|
<br/>
|
|
|
|
|
该学校未开设任何课程,您可以查看其他学校课程
|
|
|
|
|
</p>
|
|
|
|
|
<h1></h1>
|
|
|
|
|
<% find_maxmin_course_school(0,9).each do |school| %>
|
|
|
|
|
<li class='<%= cycle("odd", "even") %>' title=<%=school.name.to_s %>>
|
|
|
|
|
<% find_all_hot_course(9).map do |project| %>
|
|
|
|
|
<li class='<%= cycle("odd", "even") %>' title=<%=project.description.to_s%>>
|
|
|
|
|
<div class='avatar'>
|
|
|
|
|
<img src="<%=school.logo_link %>" width="65" height="65">
|
|
|
|
|
<%= image_tag(get_course_avatar(project), :class => "avatar-4") %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class='text_nowrap' style="padding-left: 15px; padding-top: 8px">
|
|
|
|
|
[<%=school.province %>]
|
|
|
|
|
<%= link_to( "#{school.name}", :school_id =>"#{school.id}")%>
|
|
|
|
|
<!-- 上左下右 -->
|
|
|
|
|
<div class='desc_item text_nowrap' >
|
|
|
|
|
[<%= get_course_term project %>]
|
|
|
|
|
<%= link_to( project.name, project_path(project.id), :class => "d-g-blue d-p-project-name",:title => "#{project.name}" )%>
|
|
|
|
|
(<%= link_to "#{studentCount(project)}人", project_member_path(project, :role => 2) ,:course =>'1' %>)
|
|
|
|
|
<% files_count = (project.attachments.count.to_i+Version.joins(:project).where("projects.id=#{project.id}").count.to_i).to_s %>
|
|
|
|
|
(<%=link_to "#{files_count}份", project_files_path(project) %>资料)
|
|
|
|
|
</div>
|
|
|
|
|
<div class='text_nowrap' style="padding-left: 15px; padding-top: 8px">
|
|
|
|
|
<div class='desc_item' >
|
|
|
|
|
<span class=''>
|
|
|
|
|
<a href="/project/course?project_type=1">课程</a> 数: <%=school.courses.count %>
|
|
|
|
|
<% course = Course.find_by_extra(project.identifier)%>
|
|
|
|
|
<% if(course.school == nil) %>
|
|
|
|
|
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= course.school.name.try(:gsub, /(.+)$/, '\1:') %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</span>
|
|
|
|
|
<span class='font_bolder'>
|
|
|
|
|
<%= link_to(course.try(:teacher).try(:name), user_path(course.teacher)) %>
|
|
|
|
|
<%#=course.try(:teacher).try(:name)%>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div class='desc_item' style="">
|
|
|
|
|
<span class='font_lighter' title=<%#=project.description.to_s%>><%#=project.description.truncate(25, omission: '...')%></span>
|
|
|
|
|
</div> -->
|
|
|
|
|
<div class='join_course_link'>
|
|
|
|
|
<% if !course_endTime_timeout?(project)%>
|
|
|
|
|
<div >
|
|
|
|
|
<%= join_in_course(project, User.current)%>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
<% end %>
|
|
|
|
|