2014-04-23 21:20:03 +08:00
|
|
|
<%= stylesheet_link_tag 'welcome' %>
|
2014-04-26 09:03:25 +08:00
|
|
|
<%= javascript_include_tag 'welcome' %>
|
2014-05-10 15:33:18 +08:00
|
|
|
<script type="text/javascript" language="javascript" xmlns="http://www.w3.org/1999/html">
|
2014-04-23 21:20:03 +08:00
|
|
|
|
|
|
|
$(function(){
|
|
|
|
$("#main").find("a").attr("target", "_blank");
|
|
|
|
});
|
|
|
|
|
|
|
|
// 给主页用户弹新页面
|
|
|
|
$(document).ready(function($) {
|
|
|
|
$("#loggedas").find("a").attr("target", "_blank");
|
|
|
|
//$("#content .tabs_new~ .pagination").find("a").removeAttr("target");
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<div class='top_bar'>
|
|
|
|
<div id="identifier-pannel" style="display:none">
|
|
|
|
<%= image_tag '/images/qrweixin.jpg', size: '150x150', alt: 'trustie', class: "weixin" %>
|
|
|
|
<div class="weixin-content">微信扫码</div>
|
|
|
|
</div>
|
|
|
|
<div class="main-content-bar">
|
2014-04-25 09:29:18 +08:00
|
|
|
<div style="float: left">
|
2014-04-29 09:49:51 +08:00
|
|
|
<%= image_tag(@logoLink, size:'75x75') %>
|
2014-04-25 09:29:18 +08:00
|
|
|
|
2014-04-29 09:49:51 +08:00
|
|
|
</div>
|
2014-05-09 11:47:41 +08:00
|
|
|
<div class="course welcome_left" >
|
2014-04-29 09:49:51 +08:00
|
|
|
<br />
|
|
|
|
<span class="font_welcome_school"> <% if params[:school_id].nil? and User.current.user_extensions.school.nil? %>
|
|
|
|
<% else%>
|
|
|
|
<% if params[:school_id] == "0" %>
|
2014-04-25 09:29:18 +08:00
|
|
|
<% else %>
|
2014-04-29 09:49:51 +08:00
|
|
|
<% if params[:school_id].nil? %>
|
2014-05-09 14:18:38 +08:00
|
|
|
<%= link_to School.find(User.current.user_extensions.school.id).name, options={:action => 'course',:school_id => User.current.user_extensions.school.id}, html_options={:class => 'font_welcome_school',:method => 'get'}%>
|
2014-04-29 09:49:51 +08:00
|
|
|
<br />
|
|
|
|
<% else %>
|
2014-05-09 14:18:38 +08:00
|
|
|
<%= link_to School.find(params[:school_id]).name ,options={:action => 'course',:school_id => params[:school_id]}, html_options={:class => 'font_welcome_school',:method => 'get'}%>
|
2014-04-29 09:49:51 +08:00
|
|
|
<br />
|
|
|
|
<% end %>
|
2014-04-25 09:29:18 +08:00
|
|
|
<% end %>
|
2014-04-29 09:49:51 +08:00
|
|
|
<% end %> </span>
|
2014-04-25 09:29:18 +08:00
|
|
|
<span class="font_welcome_trustie"><%= l(:label_welcome_trustie) %><%= l(:label_welcome_trustie_course) %> </span>
|
|
|
|
<% if params[:school_id].nil? and User.current.user_extensions.school.nil? %>
|
2014-04-29 09:49:51 +08:00
|
|
|
<span class="font_welcome_tdescription">, <%= l(:label_welcome_trustie_course_description) %></span>
|
2014-04-25 09:29:18 +08:00
|
|
|
<% else %>
|
|
|
|
<% if params[:school_id] == "0" %>
|
2014-04-29 09:49:51 +08:00
|
|
|
<span class="font_welcome_tdescription">, <%= l(:label_welcome_trustie_course_description) %></span>
|
2014-04-25 09:29:18 +08:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2014-04-29 09:49:51 +08:00
|
|
|
</div>
|
|
|
|
<div class="search-bar">
|
|
|
|
<%= render :partial => "search_project", :locals => {:project_type => Project::ProjectType_course}%>
|
|
|
|
</div>
|
|
|
|
<div style="clear: both;"></div>
|
2014-04-23 21:20:03 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div style="clear:both"></div>
|
|
|
|
|
|
|
|
|
|
|
|
<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>
|
2014-05-10 15:33:18 +08:00
|
|
|
<div class="d-p-projectlist-box">
|
|
|
|
<ul class="d-p-projectlist">
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
2014-04-23 21:20:03 +08:00
|
|
|
<ul class="d-p-projectlist">
|
2014-05-10 15:33:18 +08:00
|
|
|
<% 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 %>>
|
|
|
|
<div class='avatar'>
|
|
|
|
<img src="<%=school.logo_link %>" width="65" height="65">
|
|
|
|
</div>
|
|
|
|
<div class='text_nowrap' style="padding-left: 15px; padding-top: 8px">
|
|
|
|
[<%=school.province %>]
|
|
|
|
<%= link_to( "#{school.name}", :school_id =>"#{school.id}")%>
|
|
|
|
</div>
|
|
|
|
<div class='text_nowrap' style="padding-left: 15px; padding-top: 8px">
|
|
|
|
<span class=''>
|
|
|
|
<a href="/project/course?project_type=1">课程</a> 数: <%=school.courses.count %>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<div class='join_course_link'>
|
|
|
|
</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' >
|
2014-04-23 21:20:03 +08:00
|
|
|
<span class=''>
|
|
|
|
<% course = Course.find_by_extra(project.identifier) %>
|
2014-05-10 15:33:18 +08:00
|
|
|
<%= course.school.name.try(:gsub, /(.+)$/, '\1:') %>
|
2014-04-23 21:20:03 +08:00
|
|
|
</span>
|
|
|
|
<span class='font_bolder'>
|
|
|
|
<%= link_to(course.try(:teacher).try(:name), user_path(course.teacher)) %>
|
2014-05-10 15:33:18 +08:00
|
|
|
<%#=course.try(:teacher).try(:name)%>
|
2014-04-23 21:20:03 +08:00
|
|
|
</span>
|
2014-05-10 15:33:18 +08:00
|
|
|
</div>
|
|
|
|
<!-- <div class='desc_item' style="">
|
2014-04-23 21:20:03 +08:00
|
|
|
<span class='font_lighter' title=<%#=project.description.to_s%>><%#=project.description.truncate(25, omission: '...')%></span>
|
|
|
|
</div> -->
|
2014-05-10 15:33:18 +08:00
|
|
|
<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 %>
|
2014-04-23 21:20:03 +08:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
|
2014-05-10 15:33:18 +08:00
|
|
|
<h3 style="padding-bottom:0px ;margin-left: 5px; color: #e8770d;">
|
2014-04-23 21:20:03 +08:00
|
|
|
<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" }%>
|
|
|
|
</h3>
|
|
|
|
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", forums_path %></span>
|
|
|
|
<div class="d-p-projectlist-box">
|
|
|
|
<ul class="d-p-projectlist">
|
|
|
|
<% find_new_forum_topics(10).each do |topic|%>
|
|
|
|
<li class="message-brief-intro" style="min-height: 65px; line-height:2em; ">
|
|
|
|
<div style="display: inline-block; width: 100%;">
|
2014-05-09 14:49:03 +08:00
|
|
|
<span class="memo_activity" style="color:gray; display: inline-block; margin-bottom:6px; background: url('/images/list-icon.png') no-repeat scroll ;background-position: left center;">
|
|
|
|
<%= 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;" %>
|
2014-04-23 21:20:03 +08:00
|
|
|
</span>
|
|
|
|
<br>
|
2014-05-10 15:33:18 +08:00
|
|
|
<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>
|
2014-04-23 21:20:03 +08:00
|
|
|
<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>
|
2014-05-10 15:33:18 +08:00
|
|
|
<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>
|
2014-04-23 21:20:03 +08:00
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
2014-04-25 16:08:00 +08:00
|
|
|
<div class="hidden" style="width:100%;">
|
2014-04-23 21:20:03 +08:00
|
|
|
<div style="width:600px;margin:0px auto;margin-top:80px;">
|
|
|
|
<table style="width:600px;font-size:15px; color: #e8770d;">
|
|
|
|
<tr>
|
|
|
|
<td><strong>当前网站状态</strong></td>
|
|
|
|
<td>活跃课程: <%=@courseCount%></td>
|
|
|
|
<td>高校: 2个</td>
|
|
|
|
<td>教师: <%=@teacherCount%> 名</td>
|
|
|
|
<td>学生: <%=@studentCount%> 名<td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</div>
|
2014-04-04 21:43:06 +08:00
|
|
|
</div>
|