2014-01-24 15:01:15 +08:00
|
|
|
|
<script type="text/javascript" language="javascript">
|
2013-08-16 22:53:28 +08:00
|
|
|
|
function clearInfo(id, content) {
|
|
|
|
|
var text = $('#' + id);
|
|
|
|
|
if (text.val() == content) {
|
|
|
|
|
$('#' + id).val('');
|
|
|
|
|
}
|
|
|
|
|
}
|
2013-12-28 10:48:10 +08:00
|
|
|
|
|
|
|
|
|
$(function(){
|
2014-01-03 10:29:29 +08:00
|
|
|
|
$("#main").find("a").attr("target", "_blank");
|
2013-12-28 10:48:10 +08:00
|
|
|
|
});
|
|
|
|
|
|
2013-08-16 22:53:28 +08:00
|
|
|
|
function showInfo(id, content) {
|
|
|
|
|
var text = $('#' + id);
|
|
|
|
|
if (text.val() == '') {
|
|
|
|
|
$('#' + id).val(content);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
2014-01-24 15:45:13 +08:00
|
|
|
|
|
2013-12-23 19:45:51 +08:00
|
|
|
|
|
2014-01-24 15:01:15 +08:00
|
|
|
|
<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){
|
2014-01-24 15:43:35 +08:00
|
|
|
|
ele.style.top = 0 + "px";
|
2014-01-24 15:01:15 +08:00
|
|
|
|
ele.style.display= 'block';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
window.attachEvent('onscroll' , function (){
|
|
|
|
|
|
|
|
|
|
var ieScrollTop=window.pageYOffset || d.documentElement.scrollTop || d.body.scrollTop;
|
|
|
|
|
|
2014-01-24 15:43:35 +08:00
|
|
|
|
ele.style.top = 0 + "px";
|
2014-01-24 15:01:15 +08:00
|
|
|
|
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';
|
2014-01-24 15:43:35 +08:00
|
|
|
|
ele.style.top = 0 +'px';
|
2014-01-24 15:01:15 +08:00
|
|
|
|
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" >
|
|
|
|
|
<span class="font_welcome_trustie"><%= l(:label_welcome_trustie) %> </span><span class="font_welcome_tdescription">, <%= l(:label_welcome_trustie_description) %></span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="search-bar">
|
|
|
|
|
<%= render :partial => "search_bar"%>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="clear: both;"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div style="clear:both"></div>
|
|
|
|
|
|
|
|
|
|
|
2013-11-21 17:11:55 +08:00
|
|
|
|
<%= stylesheet_link_tag 'welcome' %>
|
2013-12-28 10:48:10 +08:00
|
|
|
|
|
2013-11-27 15:37:43 +08:00
|
|
|
|
|
2013-12-28 10:48:10 +08:00
|
|
|
|
<div class="left" style="float: left; min-height: 470px; width: 48%;">
|
|
|
|
|
<ul class="welcome-message-list">
|
2013-12-28 13:14:38 +08:00
|
|
|
|
<div class="forum-topic" style="height: 25px; width: 98%; margin-left: 6px;">
|
|
|
|
|
<h3 style="color: rgb(21, 188, 207);"><strong>贴吧动态</strong></h3>
|
2014-02-24 10:40:45 +08:00
|
|
|
|
<span style="margin-top: -30px;float: right; display: block;"><%= link_to "更多>>", forums_path %></span>
|
2013-12-23 19:45:51 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="welcome-box-list-new">
|
|
|
|
|
<% find_new_forum_topics(8).each do |topic|%>
|
|
|
|
|
<li class="message-brief-intro" style="min-height: 25px;padding-bottom:3px;">
|
|
|
|
|
<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;">
|
2013-12-26 19:57:40 +08:00
|
|
|
|
<%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;", :target => "_blank" %>
|
2013-12-23 19:45:51 +08:00
|
|
|
|
</span>
|
|
|
|
|
<br>
|
2013-12-28 10:48:10 +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>
|
2013-12-23 19:45:51 +08:00
|
|
|
|
<span style="margin-left: 8px; margin-bottom: 0px; color: rgb(172, 174, 177) !important; white-space: nowrap;">
|
2013-12-26 19:57:40 +08:00
|
|
|
|
由 <%= link_to topic.author ? topic.author : 'Anonymous', user_path(topic.author_id), :style => "font-size: 9pt !important; color: rgb(17, 102, 173);", :target => "_blank" %> 发表
|
2013-12-23 19:45:51 +08:00
|
|
|
|
</span>
|
2013-12-28 13:33:04 +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, :target => "_blank" %>)</span>
|
2013-12-23 19:45:51 +08:00
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
<% end %>
|
2013-11-27 15:37:43 +08:00
|
|
|
|
</div>
|
|
|
|
|
</ul>
|
2013-12-23 19:45:51 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
2013-12-28 10:48:10 +08:00
|
|
|
|
<div class="right" style="float: right; min-height: 470px; width: 48%; ">
|
|
|
|
|
<ul class="user-welcome-message-list">
|
2013-12-28 13:14:38 +08:00
|
|
|
|
<h3 style="color: rgb(21, 188, 207)"><strong>用户动态</strong></h3>
|
2013-12-26 19:57:40 +08:00
|
|
|
|
<span style="margin-top: -30px;float: right; display: block;"><%= link_to "更多>>", { :controller => 'users', :action => 'index'}, :target => "_blank" %></span>
|
2013-12-23 19:45:51 +08:00
|
|
|
|
<div class="user-message-box-list">
|
|
|
|
|
<% find_all_activities.each do |event| %>
|
|
|
|
|
<li style="display: block;height:60px; padding-bottom: 4px;">
|
|
|
|
|
<div class="inner-right" style="float: left; height: 100%; ">
|
|
|
|
|
<%= image_tag url_to_avatar(event.event_author), :class => "avatar-3" %>
|
|
|
|
|
</div>
|
2014-01-03 21:36:47 +08:00
|
|
|
|
|
2013-12-23 19:45:51 +08:00
|
|
|
|
<div class="inner-right" style="float: right; width:86%; height: 100%; ">
|
2013-12-26 19:57:40 +08:00
|
|
|
|
<span style="color: green;"><%= link_to event.event_author, (user_path(event.event_author) if event.event_author), :style => "color:green;", :target => "_blank" %></span><%= show_user_content event %>
|
2014-01-06 19:29:18 +08:00
|
|
|
|
<p style="margin-top: 4px;"><span style="color: rgb(172, 174, 177)"><%= l(:field_updated_on) %><%= time_tag_welcome event.event_datetime %>前</span> <span style="float: right; color: rgb(172, 174, 177);"><%= show_event_reply event %></span></p>
|
2013-12-23 19:45:51 +08:00
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
2013-12-28 10:48:10 +08:00
|
|
|
|
|
2013-11-27 15:37:43 +08:00
|
|
|
|
|
|
|
|
|
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject">
|
2013-12-23 19:45:51 +08:00
|
|
|
|
<h3 style="margin-left: 5px; color: #e8770d;"><strong>热门项目</strong></h3>
|
2013-12-26 19:57:40 +08:00
|
|
|
|
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", { :controller => 'projects', :action => 'index', :project_type => 0}, :target => "_blank" %></span>
|
2013-12-23 19:45:51 +08:00
|
|
|
|
<div class="d-p-projectlist-box">
|
2013-11-28 16:14:23 +08:00
|
|
|
|
<ul class="d-p-projectlist">
|
|
|
|
|
<% find_all_hot_project.map do |project| break if(project == find_all_hot_project[15]) %>
|
|
|
|
|
<li style="background-image:none;">
|
2013-11-28 17:22:24 +08:00
|
|
|
|
<div style="float: left;">
|
|
|
|
|
<%= image_tag url_to_avatar(project), :class => "avatar-4" %>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="float: left; margin-left: 10px; width: 360px;">
|
|
|
|
|
<p class="layout">
|
2013-12-26 19:57:40 +08:00
|
|
|
|
<span style="display: inline-block; width: 250px;"><%= link_to( project.name, project_path(project.id), :class => "d-g-blue d-p-project-name", :title => "#{project.name}", :target => "_blank" )%></span>
|
2013-12-03 08:42:54 +08:00
|
|
|
|
<%= content_tag "span", show_grade(project),
|
2013-12-05 15:26:29 +08:00
|
|
|
|
:style => "cursor: pointer; display: inline-block; float: right; color: #ec6300; ",
|
2013-12-03 08:42:54 +08:00
|
|
|
|
:title => "项目得分,综合考虑了项目的各项活动,反映了该项目的活跃程度",
|
|
|
|
|
:class => "tooltip",
|
2013-12-16 19:08:00 +08:00
|
|
|
|
:id => "tooltip-#{project.id}" %>
|
2013-11-28 17:22:24 +08:00
|
|
|
|
</p>
|
|
|
|
|
<p class="layout-1" >
|
2013-11-29 10:48:16 +08:00
|
|
|
|
<%= content_tag "span", project.description.truncate(50, omission: '...'), :class => "d-p-project-intro" , :title => project.description %>
|
2013-11-28 17:22:24 +08:00
|
|
|
|
</p>
|
|
|
|
|
</div>
|
2013-11-27 15:37:43 +08:00
|
|
|
|
</li>
|
2013-11-28 16:14:23 +08:00
|
|
|
|
<% end %>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
2013-11-28 08:34:20 +08:00
|
|
|
|
</div>
|
2013-12-05 15:26:29 +08:00
|
|
|
|
|
2013-11-27 15:37:43 +08:00
|
|
|
|
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
|
2013-12-05 15:26:29 +08:00
|
|
|
|
<h3 style="margin-left: 5px; color: #e8770d;"><strong>热门课程</strong></h3>
|
2013-12-26 19:57:40 +08:00
|
|
|
|
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", {:controller => 'projects', :action => 'course', :project_type => 1, :project_sort_type => 1}, :target => "_blank" %></span>
|
2013-11-28 16:14:23 +08:00
|
|
|
|
<div class="d-p-projectlist-box">
|
|
|
|
|
<ul class="d-p-projectlist">
|
2013-12-05 15:26:29 +08:00
|
|
|
|
<% find_all_hot_course.map do |project| break if(project == find_all_hot_course[5]) %>
|
2013-11-28 16:14:23 +08:00
|
|
|
|
<li style="background-image:none;">
|
2013-12-05 15:26:29 +08:00
|
|
|
|
<div style="float: left;">
|
|
|
|
|
<% if get_avatar?(project)%>
|
|
|
|
|
<%= image_tag(url_to_avatar(project), :class => "avatar-4") %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= image_tag('../images/avatars/Project/course.jpg', :class => "avatar-4") %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="float: left; margin-left: 10px; width: 360px;">
|
2013-11-28 16:14:23 +08:00
|
|
|
|
<p class="layout">
|
2013-12-26 19:57:40 +08:00
|
|
|
|
<%= link_to( project.name, project_path(project.id), :class => "d-g-blue d-p-project-name",:title => "#{project.name}", :target => "_blank" )%>
|
|
|
|
|
<span style="cursor: pointer; display: inline-block; float: right; color: #ec6300; white-space: nowrap;">学生人数:<%= link_to "#{studentCount(project)}", project_member_path(project, :role => 2) ,:course =>'1', :target => "_blank" %></span>
|
2013-11-28 16:14:23 +08:00
|
|
|
|
</p>
|
|
|
|
|
<p class="layout-1" >
|
2013-12-05 15:26:29 +08:00
|
|
|
|
<%= content_tag "span", project.description.truncate(50, omission: '...'), :class => "d-p-project-intro" , :title => project.description %>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
2013-11-28 16:14:23 +08:00
|
|
|
|
</li>
|
|
|
|
|
<% end %>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
2013-11-28 08:34:20 +08:00
|
|
|
|
</div>
|
2013-11-27 15:37:43 +08:00
|
|
|
|
|
2013-12-05 15:26:29 +08:00
|
|
|
|
|
|
|
|
|
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
|
2013-12-07 09:47:54 +08:00
|
|
|
|
<h3 style="margin-left: 5px; color: color: (51, 119, 51);"><strong>热门竞赛</strong></h3>
|
2013-12-26 19:57:40 +08:00
|
|
|
|
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", {:controller => 'bids', :action => 'contest', :project_type => 1}, :target => "_blank" %></span>
|
2013-11-28 16:14:23 +08:00
|
|
|
|
<div class="d-p-projectlist-box">
|
|
|
|
|
<ul class="d-p-projectlist">
|
2013-12-05 15:26:29 +08:00
|
|
|
|
<% find_all_hot_contest.map do |contest| break if(contest == find_all_hot_contest[5]) %>
|
2013-11-28 16:14:23 +08:00
|
|
|
|
<li style="background-image:none;">
|
|
|
|
|
<p class="layout">
|
2013-12-05 15:26:29 +08:00
|
|
|
|
<span style = "background: url('/images/007.gif') no-repeat scroll ;background-position: left center;"><%= link_to( contest.name, respond_path(contest.id), :class => "d-g-blue d-p-project-name", :title => "#{contest.name}",
|
2013-12-26 19:57:40 +08:00
|
|
|
|
:style => "margin-left: 28px;", :target => "_blank") %></span>
|
2013-11-28 16:14:23 +08:00
|
|
|
|
</p>
|
|
|
|
|
<p class="layout-1" >
|
2013-12-05 15:26:29 +08:00
|
|
|
|
<%= content_tag "span", contest.description.truncate(50, omission: '...'), :class => "d-p-project-intro" , :title => contest.description %>
|
|
|
|
|
</p>
|
2013-11-28 16:14:23 +08:00
|
|
|
|
</li>
|
|
|
|
|
<% end %>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
2013-11-28 08:34:20 +08:00
|
|
|
|
</div>
|
2013-12-05 15:26:29 +08:00
|
|
|
|
|
|
|
|
|
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
|
2013-12-23 19:45:51 +08:00
|
|
|
|
<h3 style="margin-left: 5px; color: color: (51, 119, 51);"><strong>热门众包</strong></h3>
|
2013-12-26 19:57:40 +08:00
|
|
|
|
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", {:controller => 'bids', :action => 'index'}, :target => "_blank" %></span>
|
2013-11-28 16:14:23 +08:00
|
|
|
|
<div class="d-p-projectlist-box">
|
|
|
|
|
<ul class="d-p-projectlist">
|
2013-12-05 15:26:29 +08:00
|
|
|
|
<% find_all_hot_bid.map do |bid| break if(bid == find_all_hot_bid[5]) %>
|
2013-11-28 16:14:23 +08:00
|
|
|
|
<li style="background-image:none;">
|
|
|
|
|
<p class="layout">
|
2013-12-05 15:26:29 +08:00
|
|
|
|
<span style = "background: url('/images/007.gif') no-repeat scroll ;background-position: left center;"><%= link_to( bid.name, respond_path(bid.id), :class => "d-g-blue d-p-project-name", :title => "#{bid.name}",
|
2013-12-26 19:57:40 +08:00
|
|
|
|
:style => "margin-left: 28px;", :target => "_blank") %></span>
|
2013-11-28 16:14:23 +08:00
|
|
|
|
</p>
|
|
|
|
|
<p class="layout-1" >
|
2013-12-05 15:26:29 +08:00
|
|
|
|
<%= content_tag "span", bid.description.truncate(50, omission: '...'), :class => "d-p-project-intro" , :title => bid.description %>
|
2013-11-28 16:14:23 +08:00
|
|
|
|
</p>
|
|
|
|
|
</li>
|
|
|
|
|
<% end %>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
2013-11-28 08:34:20 +08:00
|
|
|
|
</div>
|
2013-12-05 15:26:29 +08:00
|
|
|
|
|
|
|
|
|
|
2013-11-27 15:37:43 +08:00
|
|
|
|
|
2013-11-30 09:29:02 +08:00
|
|
|
|
<div class="clr">
|
2013-11-21 17:11:55 +08:00
|
|
|
|
</div>
|
2013-11-27 15:37:43 +08:00
|
|
|
|
|
2013-08-16 22:53:28 +08:00
|
|
|
|
|
2013-11-21 17:11:55 +08:00
|
|
|
|
<br/><br/><br/><br/><br/><br/><br/>
|
2013-11-28 18:27:18 +08:00
|
|
|
|
<div style="padding-top: 40px"></div>
|
2013-08-16 22:53:28 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|