2014-03-26 08:24:12 +08:00
|
|
|
|
<%= stylesheet_link_tag 'welcome' %>
|
2014-02-22 09:44:14 +08:00
|
|
|
|
<script type="text/javascript" language="javascript">
|
|
|
|
|
function clearInfo(id, content) {
|
|
|
|
|
var text = $('#' + id);
|
|
|
|
|
if (text.val() == content) {
|
|
|
|
|
$('#' + id).val('');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$(function(){
|
|
|
|
|
$("#main").find("a").attr("target", "_blank");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function showInfo(id, content) {
|
|
|
|
|
var text = $('#' + id);
|
|
|
|
|
if (text.val() == '') {
|
|
|
|
|
$('#' + id).val(content);
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-03-28 14:55:34 +08:00
|
|
|
|
// 给主页用户弹新页面
|
|
|
|
|
$(document).ready(function($) {
|
|
|
|
|
$("#loggedas").find("a").attr("target", "_blank");
|
|
|
|
|
//$("#content .tabs_new~ .pagination").find("a").removeAttr("target");
|
|
|
|
|
});
|
2014-02-22 09:44:14 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
(function (){
|
|
|
|
|
window.onload = function(){
|
|
|
|
|
function fixedBar(id, options){
|
|
|
|
|
var ele = document.getElementById(id);
|
|
|
|
|
if(!ele) return;
|
|
|
|
|
if(/msie (\d+\.\d+)/i.test(navigator.userAgent)){
|
|
|
|
|
var pageHeight=window.innerHeight;
|
|
|
|
|
var d=document;
|
|
|
|
|
if(typeof pageHeight!="number"){
|
|
|
|
|
if(document.compatMode=="CSS1Compat"){
|
|
|
|
|
pageHeight=document.documentElement.clientHeight;
|
|
|
|
|
}else{
|
|
|
|
|
pageHeight=document.body.clientHeight;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
var ieScrollTop=window.pageYOffset || d.documentElement.scrollTop || d.body.scrollTop;
|
|
|
|
|
if(options.addclass) ele.className = options.addclass;
|
|
|
|
|
ele.style.position= 'absolute';
|
|
|
|
|
|
|
|
|
|
if(options.show){
|
|
|
|
|
ele.style.top = 0 + "px";
|
|
|
|
|
ele.style.display= 'block';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
window.attachEvent('onscroll' , function (){
|
|
|
|
|
|
|
|
|
|
var ieScrollTop=window.pageYOffset || d.documentElement.scrollTop || d.body.scrollTop;
|
|
|
|
|
|
|
|
|
|
ele.style.top = 0 + "px";
|
|
|
|
|
if(options.autoHidden){
|
|
|
|
|
if(ieScrollTop==0){
|
|
|
|
|
ele.style.display="none";
|
|
|
|
|
}else{
|
|
|
|
|
ele.style.display="block";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}else{
|
|
|
|
|
var ele = document.getElementById(id);
|
|
|
|
|
if(typeof pageHeight!="number"){
|
|
|
|
|
if(document.compatMode=="CSS1Compat"){
|
|
|
|
|
pageHeight=document.documentElement.clientHeight;
|
|
|
|
|
}else{
|
|
|
|
|
pageHeight=document.body.clientHeight;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(options.show) ele.style.display= 'block';
|
|
|
|
|
ele.style.top = 0 +'px';
|
|
|
|
|
window.addEventListener('scroll',function (){
|
|
|
|
|
if(options.autoHidden){
|
|
|
|
|
if(baidu.page.getScrollTop()==0){
|
|
|
|
|
ele.style.display="none";
|
|
|
|
|
}else{
|
|
|
|
|
ele.style.display="block";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fixedBar('backTopBtn' , {autoHidden: true, top : 186});
|
|
|
|
|
fixedBar('identifier-pannel' , {autoHidden: false , top : 956 , show : true});
|
|
|
|
|
}
|
|
|
|
|
})();
|
|
|
|
|
</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">
|
|
|
|
|
<div class="welcome_left" >
|
2014-03-25 21:24:17 +08:00
|
|
|
|
<span class="font_welcome_trustie"><%= l(:label_welcome_trustie) %><%= l(:label_welcome_trustie_course) %> </span><span class="font_welcome_tdescription">, <%= l(:label_welcome_trustie_course_description) %></span>
|
2014-02-22 09:44:14 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="search-bar">
|
2014-03-25 16:53:11 +08:00
|
|
|
|
<%= render :partial => "search_project", :locals => {:project_type => Project::ProjectType_course}%>
|
2014-02-22 09:44:14 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div style="clear: both;"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div style="clear:both"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject">
|
2014-03-28 17:08:34 +08:00
|
|
|
|
<h3><strong>新开课程</strong></h3>
|
|
|
|
|
<span><%= link_to "更多>>", {:controller => 'projects', :action => 'course', :project_type => 1} %></span>
|
2014-02-22 09:44:14 +08:00
|
|
|
|
<div class="d-p-projectlist-box">
|
|
|
|
|
<ul class="d-p-projectlist">
|
2014-03-08 11:08:48 +08:00
|
|
|
|
<% find_miracle_course(10, 7).map do |project| %>
|
2014-03-28 17:08:34 +08:00
|
|
|
|
<li class='<%= cycle("odd", "even") %>' title=<%=project.description.to_s%>>
|
|
|
|
|
<div class='avatar'>
|
2014-03-12 17:09:26 +08:00
|
|
|
|
<%= image_tag(get_course_avatar(project), :class => "avatar-4") %>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 上左下右 -->
|
2014-03-28 17:08:34 +08:00
|
|
|
|
<div class='desc_item text_nowrap' >
|
2014-03-27 10:53:45 +08:00
|
|
|
|
[<%= get_course_term project %>]
|
2014-03-12 17:09:26 +08:00
|
|
|
|
<%= 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' %>)
|
2014-04-02 08:22:02 +08:00
|
|
|
|
<% 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) %>资料)
|
2014-03-12 17:09:26 +08:00
|
|
|
|
</div>
|
2014-03-28 17:08:34 +08:00
|
|
|
|
<div class='desc_item' >
|
2014-03-27 17:12:35 +08:00
|
|
|
|
<span class=''>
|
|
|
|
|
<% course = Course.find_by_extra(project.identifier) %>
|
|
|
|
|
<%= course.teacher.user_extensions.occupation.try(:gsub, /(.+)$/, '\1:') %>
|
2014-03-27 10:53:45 +08:00
|
|
|
|
</span>
|
2014-03-27 17:12:35 +08:00
|
|
|
|
<span class='font_bolder'>
|
|
|
|
|
<%= link_to(course.try(:teacher).try(:name), user_path(course.teacher)) %>
|
|
|
|
|
<%#=course.try(:teacher).try(:name)%>
|
2014-03-27 10:53:45 +08:00
|
|
|
|
</span>
|
2014-03-12 17:09:26 +08:00
|
|
|
|
</div>
|
2014-03-27 10:53:45 +08:00
|
|
|
|
<!-- <div class='desc_item' style="">
|
|
|
|
|
<span class='font_lighter' title=<%#=project.description.to_s%>><%#=project.description.truncate(25, omission: '...')%></span>
|
|
|
|
|
</div> -->
|
2014-03-28 17:08:34 +08:00
|
|
|
|
<div class='join_course_link'>
|
2014-03-17 22:43:38 +08:00
|
|
|
|
<% if !course_endTime_timeout?(project)%>
|
2014-03-27 10:53:45 +08:00
|
|
|
|
<div >
|
2014-03-12 17:09:26 +08:00
|
|
|
|
<%= join_in_course(project, User.current)%>
|
2014-03-27 10:53:45 +08:00
|
|
|
|
</div>
|
2014-03-17 22:43:38 +08:00
|
|
|
|
<% end %>
|
2014-03-12 17:09:26 +08:00
|
|
|
|
</div>
|
2014-02-22 09:44:14 +08:00
|
|
|
|
</li>
|
2014-03-12 17:09:26 +08:00
|
|
|
|
<% end; reset_cycle %>
|
2014-02-22 09:44:14 +08:00
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2014-03-27 10:53:45 +08:00
|
|
|
|
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject hidden" style="float: right;">
|
2014-02-24 10:40:45 +08:00
|
|
|
|
|
2014-02-22 09:44:14 +08:00
|
|
|
|
<div class="web_status">
|
|
|
|
|
<h3 style="margin-left: 5px; color: #e8770d;"><strong>当前网站状态</strong></h3>
|
|
|
|
|
<table>
|
|
|
|
|
<tbody>
|
|
|
|
|
<tr>
|
2014-04-04 21:30:40 +08:00
|
|
|
|
<td>课程总量: <%#=@course.count%></td>
|
|
|
|
|
<td>教师数量: <%#=@teacher.count%></td>
|
2014-02-22 09:44:14 +08:00
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2014-04-04 21:30:40 +08:00
|
|
|
|
<td>用户总量: <%#=User.count%></td>
|
|
|
|
|
<td>学生数量: <%#=@student.count%></td>
|
2014-02-22 09:44:14 +08:00
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2014-04-04 21:30:40 +08:00
|
|
|
|
<td>资源总量: <%#=Attachment.count%></td>
|
2014-02-22 09:44:14 +08:00
|
|
|
|
<td> </td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
2014-03-27 10:53:45 +08:00
|
|
|
|
<div class='hidden' style="text-align: right; padding-right: 20px">
|
2014-02-24 10:40:45 +08:00
|
|
|
|
<%= link_to "意见反馈" , suggestion_send_path, {:class => 'orangeButton', :style => "color: #EEEEEE" }%>
|
2014-02-22 09:44:14 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2014-03-27 10:53:45 +08:00
|
|
|
|
<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;">
|
2014-02-24 10:40:45 +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>
|
2014-02-22 09:44:14 +08:00
|
|
|
|
<div class="d-p-projectlist-box">
|
|
|
|
|
<ul class="d-p-projectlist">
|
2014-03-27 10:53:45 +08:00
|
|
|
|
<% find_new_forum_topics(10).each do |topic|%>
|
|
|
|
|
<li class="message-brief-intro" style="min-height: 65px; line-height:2em; ">
|
2014-02-24 10:40:45 +08:00
|
|
|
|
<div style="display: inline-block; width: 100%;">
|
|
|
|
|
<span 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.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: 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>
|
|
|
|
|
</div>
|
2014-02-22 09:44:14 +08:00
|
|
|
|
</li>
|
|
|
|
|
<% end %>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2014-02-24 10:40:45 +08:00
|
|
|
|
<div class="clearfix"></div>
|
2014-02-22 09:44:14 +08:00
|
|
|
|
|
2014-04-04 21:43:06 +08:00
|
|
|
|
<div style="width:100%;">
|
|
|
|
|
<div style="width:600px;margin:0px auto;margin-top:80px;">
|
|
|
|
|
<table style="width:600px;font-size:15px; color: #e8770d;">
|
2014-04-04 17:21:07 +08:00
|
|
|
|
<tr>
|
|
|
|
|
<td><strong>当前网站状态</strong></td>
|
2014-04-04 21:30:40 +08:00
|
|
|
|
<td>活跃课程: <%=@courseCount%></td>
|
|
|
|
|
<td>高校: 2个</td>
|
|
|
|
|
<td>教师: <%=@teacherCount%> 名</td>
|
|
|
|
|
<td>学生: <%=@studentCount%> 名<td>
|
2014-04-04 17:21:07 +08:00
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
2014-04-04 21:43:06 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|