|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
<%= stylesheet_link_tag 'welcome' %>
|
|
|
|
|
<%= javascript_include_tag 'welcome' %>
|
|
|
|
|
<script type="text/javascript" language="javascript">
|
|
|
|
|
<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");
|
|
|
|
@ -60,49 +61,100 @@
|
|
|
|
|
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject">
|
|
|
|
|
<h3><strong>新开课程</strong></h3>
|
|
|
|
|
<span><%= link_to "更多>>", {:controller => 'projects', :action => 'course', :project_type => 1, :school_id => params[:school_id]} %></span>
|
|
|
|
|
<div class="d-p-projectlist-box">
|
|
|
|
|
<div class="d-p-projectlist-box">
|
|
|
|
|
<ul class="d-p-projectlist">
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<ul class="d-p-projectlist">
|
|
|
|
|
<% find_miracle_course(10, 7,params[:school_id]).map do |project| %>
|
|
|
|
|
<li class='<%= cycle("odd", "even") %>' title=<%=project.description.to_s%>>
|
|
|
|
|
<div class='avatar'>
|
|
|
|
|
<%= image_tag(get_course_avatar(project), :class => "avatar-4") %>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 上左下右 -->
|
|
|
|
|
<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='desc_item' >
|
|
|
|
|
<% if(find_miracle_course(10, 7,params[:school_id]).map.count == 0) %>
|
|
|
|
|
<h1></h1>
|
|
|
|
|
<p id="errorExplanation">
|
|
|
|
|
该学校未开设任何课程,您可以查看其他学校课程
|
|
|
|
|
</p>
|
|
|
|
|
<h1></h1>
|
|
|
|
|
<% find_all_hot_course(9).map do |project| %>
|
|
|
|
|
<li class='<%= cycle("odd", "even") %>' title=<%=project.description.to_s%>>
|
|
|
|
|
<div class='avatar'>
|
|
|
|
|
<%= image_tag(get_course_avatar(project), :class => "avatar-4") %>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 上左下右 -->
|
|
|
|
|
<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='desc_item' >
|
|
|
|
|
<span class=''>
|
|
|
|
|
<% 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 %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<% find_miracle_course(10, 7,params[:school_id]).map do |project| %>
|
|
|
|
|
<li class='<%= cycle("odd", "even") %>' title=<%=project.description.to_s%>>
|
|
|
|
|
<div class='avatar'>
|
|
|
|
|
<%= image_tag(get_course_avatar(project), :class => "avatar-4") %>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 上左下右 -->
|
|
|
|
|
<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='desc_item' >
|
|
|
|
|
<span class=''>
|
|
|
|
|
<% course = Course.find_by_extra(project.identifier) %>
|
|
|
|
|
<%= course.school.name.try(:gsub, /(.+)$/, '\1:') %>
|
|
|
|
|
<%= course.school.name.try(:gsub, /(.+)$/, '\1:') %>
|
|
|
|
|
</span>
|
|
|
|
|
<span class='font_bolder'>
|
|
|
|
|
<%= link_to(course.try(:teacher).try(:name), user_path(course.teacher)) %>
|
|
|
|
|
<%#=course.try(:teacher).try(:name)%>
|
|
|
|
|
<%#=course.try(:teacher).try(:name)%>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div class='desc_item' style="">
|
|
|
|
|
</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; reset_cycle %>
|
|
|
|
|
<div class='join_course_link'>
|
|
|
|
|
<% if !course_endTime_timeout?(project)%>
|
|
|
|
|
<div >
|
|
|
|
|
<%= join_in_course(project, User.current)%>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
<% end; reset_cycle %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
|
|
|
|
|
<h3 style="padding-bottom:px ;margin-left: 5px; color: #e8770d;">
|
|
|
|
|
<h3 style="padding-bottom:0px ;margin-left: 5px; color: #e8770d;">
|
|
|
|
|
<strong>问题和反馈动态</strong>
|
|
|
|
|
<%= link_to "我要提问" , newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
|
|
|
|
|
<%= link_to "我要反馈" , suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
|
|
|
|
@ -117,11 +169,11 @@
|
|
|
|
|
<%= link_to '['+topic.forum.name + ']',forum_path(topic.forum),:class => 'memo_Bar_title' %><%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;" %>
|
|
|
|
|
</span>
|
|
|
|
|
<br>
|
|
|
|
|
<span style="margin-left: 24px; color: rgb(172, 174, 177); white-space: nowrap; font-size: 9pt !important;;"><%= l(:field_updated_on) %><%=time_tag_welcome(topic_last_time topic)%>前</span>
|
|
|
|
|
<span style="margin-left: 24px; color: rgb(172, 174, 177); white-space: nowrap; font-size:9pt !important;;"><%= l(:field_updated_on) %><%=time_tag_welcome(topic_last_time topic)%>前</span>
|
|
|
|
|
<span style="margin-left: 8px; margin-bottom: 0px; color: rgb(172, 174, 177) !important; white-space: nowrap;">
|
|
|
|
|
由 <%= link_to topic.author ? topic.author : 'Anonymous', user_path(topic.author_id), :style => "font-size: 9pt !important; color: rgb(17, 102, 173);" %> 发表
|
|
|
|
|
</span>
|
|
|
|
|
<span style="float: right; color: rgb(172, 174, 177); white-space: nowrap; font-size: 9pt !important;;">回复(<%= link_to (topic.parent ? topic.parent.replies_count : topic.replies_count), topic.event_url %>)</span>
|
|
|
|
|
<span style="float: right; color: rgb(172, 174, 177); white-space: nowrap; font-size:9pt !important;;">回复(<%= link_to (topic.parent ? topic.parent.replies_count : topic.replies_count), topic.event_url %>)</span>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
<% end %>
|
|
|
|
|