|
|
|
@ -94,30 +94,30 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$(function(){
|
|
|
|
|
var x = 10;
|
|
|
|
|
var y = 20;
|
|
|
|
|
$("span.tooltip").mouseover(function(e){
|
|
|
|
|
this.myTitle = this.title;
|
|
|
|
|
this.title = "";
|
|
|
|
|
var tooltip = "<div id='tooltip' style='background-color: red; position: absolute;'>" + this.myTitle + "</div>";
|
|
|
|
|
$("body").append(tooltip);
|
|
|
|
|
$("#tooltip")
|
|
|
|
|
.css({
|
|
|
|
|
"top": (e.pageY + y) + "px",
|
|
|
|
|
"left": (e.pageX + x) + "px"
|
|
|
|
|
}).show("fast");
|
|
|
|
|
}).mouseout(function(){
|
|
|
|
|
this.title = this.myTitle;
|
|
|
|
|
$("#tooltip").remove();
|
|
|
|
|
}).mousemove(function(e){
|
|
|
|
|
$("#tooltip")
|
|
|
|
|
.css({
|
|
|
|
|
"top": (e.pageY + y) + "px",
|
|
|
|
|
"left": (e.pageX + x) + "px"
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
// $(function(){
|
|
|
|
|
// var x = 10;
|
|
|
|
|
// var y = 20;
|
|
|
|
|
// $("span.tooltip").mouseover(function(e){
|
|
|
|
|
// this.myTitle = this.title;
|
|
|
|
|
// this.title = "";
|
|
|
|
|
// var tooltip = "<div id='tooltip' style=' position: absolute;'><div class='arrow bottom right'></div>" + this.myTitle + "</div>";
|
|
|
|
|
// $("body").append(tooltip);
|
|
|
|
|
// $("#tooltip")
|
|
|
|
|
// .css({
|
|
|
|
|
// "top": (e.pageY + y) + "px",
|
|
|
|
|
// "left": (e.pageX + x) + "px"
|
|
|
|
|
// }).show("fast");
|
|
|
|
|
// }).mouseout(function(){
|
|
|
|
|
// this.title = this.myTitle;
|
|
|
|
|
// $("#tooltip").remove();
|
|
|
|
|
// }).mousemove(function(e){
|
|
|
|
|
// $("#tooltip")
|
|
|
|
|
// .css({
|
|
|
|
|
// "top": (e.pageY + y) + "px",
|
|
|
|
|
// "left": (e.pageX + x) + "px"
|
|
|
|
|
// });
|
|
|
|
|
// });
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
// $('li').mouseover(function(){
|
|
|
|
|
// var id=$(this).attr('id');
|
|
|
|
@ -132,16 +132,18 @@
|
|
|
|
|
|
|
|
|
|
<div class="left" style="float: left; height: 445px; width: 50%;">
|
|
|
|
|
<ul class="welcome-message-list" style="width: 90%; ">
|
|
|
|
|
<h3 style="color: rgb(21, 188, 207)"><strong>论坛热帖</strong></h3>
|
|
|
|
|
<h3 style="color: rgb(21, 188, 207);margin-left: 8px;"><strong>论坛热帖</strong></h3>
|
|
|
|
|
<div class="welcome-box-list">
|
|
|
|
|
<% find_hot_forum_topics.each do |topic|%>
|
|
|
|
|
<li class="message-brief-intro" style="min-height: 25px;">
|
|
|
|
|
<div style="display: inline-block;">
|
|
|
|
|
<span style="color:gray; display: inline-block; background: url('/images/list-icon.png') no-repeat scroll ;background-position: left center;"> <%= link_to topic.subject.truncate(25, omission: '...'), forum_memo_path(topic.forum_id,topic.id), :class => "gray" %></span>
|
|
|
|
|
<span style="margin-left: 20px; color: green !important; white-space: nowrap;">
|
|
|
|
|
<%= link_to topic.author, user_path(topic.author), :style => "color: rgb(72,72,72);"%>
|
|
|
|
|
<div style="display: inline-block; width: 100%;">
|
|
|
|
|
<span style="color:gray; display: inline-block; background: url('/images/list-icon.png') no-repeat scroll ;background-position: left center;"> <%= link_to topic.subject.truncate(30, omission: '...'), forum_memo_path(topic.forum_id,topic.id), :class => "gray" , :style => "font-size: 10pt !important;"%></span>
|
|
|
|
|
<br>
|
|
|
|
|
<span style="margin-left: 20px; color: rgb(172, 174, 177); white-space: nowrap; font-size: 9pt !important;;"><%= time_tag_welcome topic.created_at %>前</span>
|
|
|
|
|
<span style="margin-left: 5px; color: rgb(172, 174, 177) !important; white-space: nowrap;">
|
|
|
|
|
由<%= link_to topic.author, user_path(topic.author), :style => "font-size: 9pt !important; color: rgb(17, 102, 173);"%>发表
|
|
|
|
|
</span>
|
|
|
|
|
<span style="margin-left:20px; color:rgb(72,72,72); white-space: nowrap;"><%= time_tag_welcome topic.created_at %>前</span>
|
|
|
|
|
<span style="float: right; color: rgb(172, 174, 177); white-space: nowrap; font-size: 9pt !important;;">回复(<%= link_to topic.replies_count, forum_memo_path(topic.forum_id,topic.id) %>)</span>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
<% end %>
|
|
|
|
@ -149,7 +151,7 @@
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="right" style="float: right; margin-right: -10px; height: 445px; width: 50%; ">
|
|
|
|
|
<div class="right" style="float: right; margin-right: -20px; height: 445px; width: 50%; ">
|
|
|
|
|
<ul class="user-welcome-message-list" style="width: 80%; margin-top: 0px;">
|
|
|
|
|
<h3 style="margin-left: -5px; color: rgb(21, 188, 207)"><strong>用户动态</strong></h3>
|
|
|
|
|
<div class="user-message-box-list">
|
|
|
|
@ -159,9 +161,9 @@
|
|
|
|
|
<%= image_tag url_to_avatar(event.event_author), :class => "avatar-3" %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="inner-right" style="float: right; width:86%; height: 100%; ">
|
|
|
|
|
<span style="color: green;"><%= link_to event.event_author, user_path(event.event_author), :style => "color:green;" %></span><!-- 发表了<%= find_all_event_type event %>:<span style="color: blue;"><%= link_to truncate(event.event_title, length: 30, omission:'...'), event.event_url %>
|
|
|
|
|
<span style="color: green;"><%= link_to event.event_author, (user_path(event.event_author) if event.event_author), :style => "color:green;" %></span><!-- 发表了<%= find_all_event_type event %>:<span style="color: blue;"><%= link_to truncate(event.event_title, length: 30, omission:'...'), event.event_url %>
|
|
|
|
|
</span> --><%= show_user_content event %>
|
|
|
|
|
<p><span style="color: rgb(172, 174, 177)"><%= time_tag_welcome event.event_datetime %>前</span> <!-- <span>评论(4)</span></p> -->
|
|
|
|
|
<p><span style="color: rgb(172, 174, 177)"><%= time_tag_welcome event.event_datetime %>前</span> <span style="float: right; color: rgb(172, 174, 177);"><%= show_event_reply event %></span></p>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
<% end %>
|
|
|
|
@ -170,7 +172,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject">
|
|
|
|
|
<h2>热门项目</h2>
|
|
|
|
|
<h3 style="margin-left: 5px; color: #e8770d;"><strong>热门项目</strong></h2>
|
|
|
|
|
<div class="d-p-projectlist-box">
|
|
|
|
|
<ul class="d-p-projectlist">
|
|
|
|
|
<% find_all_hot_project.map do |project| break if(project == find_all_hot_project[15]) %>
|
|
|
|
@ -183,7 +185,7 @@
|
|
|
|
|
<%= link_to( project.name, project_path(project.project_id), :class => "d-g-blue d-p-project-name", :title => "#{project.name}")%>
|
|
|
|
|
<!-- <span style="cursor: help; display: inline-block; float: right; color: #ec6300; background: url('/images/score.png') no-repeat scroll ;background-position: left center;" title="项目得分,综合考虑了项目的各项活动,反映了该项目的活跃程度" class="tooltip-#{project.project_id}"><%= show_grade project %></span> -->
|
|
|
|
|
<%= content_tag "span", show_grade(project),
|
|
|
|
|
:style => "cursor: help; display: inline-block; float: right; color: #ec6300; ",
|
|
|
|
|
:style => "cursor: pointer; display: inline-block; float: right; color: #ec6300; ",
|
|
|
|
|
:title => "项目得分,综合考虑了项目的各项活动,反映了该项目的活跃程度",
|
|
|
|
|
:class => "tooltip",
|
|
|
|
|
:id => "tooltip-#{project.project_id}" %>
|
|
|
|
@ -197,61 +199,74 @@
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
|
|
|
|
|
<h2>热门竞赛</h2>
|
|
|
|
|
<h3 style="margin-left: 5px; color: #e8770d;"><strong>热门课程</strong></h3>
|
|
|
|
|
<div class="d-p-projectlist-box">
|
|
|
|
|
<ul class="d-p-projectlist">
|
|
|
|
|
<% find_all_hot_contest.map do |contest| break if(contest == find_all_hot_contest[5]) %>
|
|
|
|
|
<% find_all_hot_course.map do |project| break if(project == find_all_hot_course[5]) %>
|
|
|
|
|
<li style="background-image:none;">
|
|
|
|
|
<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;">
|
|
|
|
|
<p class="layout">
|
|
|
|
|
<%= link_to( contest.name, respond_path(contest.id), :class => "d-g-blue d-p-project-name", :title => "#{contest.name}")%>
|
|
|
|
|
<%= link_to( project.name, project_path(project.project_id), :class => "d-g-blue d-p-project-name",:title => "#{project.name}")%>
|
|
|
|
|
</p>
|
|
|
|
|
<p class="layout-1" >
|
|
|
|
|
<%= content_tag "span", contest.description.truncate(50, omission: '...'), :class => "d-p-project-intro" , :title => contest.description %>
|
|
|
|
|
</p>
|
|
|
|
|
<%= content_tag "span", project.description.truncate(50, omission: '...'), :class => "d-p-project-intro" , :title => project.description %>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
<% end %>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
|
|
|
|
|
<h2>热门众包</h2>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
|
|
|
|
|
<h3 style="margin-left: 5px; color: rgb(21, 188, 207);"><strong>热门竞赛</strong></h3>
|
|
|
|
|
<div class="d-p-projectlist-box">
|
|
|
|
|
<ul class="d-p-projectlist">
|
|
|
|
|
<% find_all_hot_bid.map do |bid| break if(bid == find_all_hot_bid[5]) %>
|
|
|
|
|
<% find_all_hot_contest.map do |contest| break if(contest == find_all_hot_contest[5]) %>
|
|
|
|
|
<li style="background-image:none;">
|
|
|
|
|
<p class="layout">
|
|
|
|
|
<%= link_to( bid.name, respond_path(bid.id), :class => "d-g-blue d-p-project-name", :title => "#{bid.name}")%>
|
|
|
|
|
<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}",
|
|
|
|
|
:style => "margin-left: 28px;") %></span>
|
|
|
|
|
</p>
|
|
|
|
|
<p class="layout-1" >
|
|
|
|
|
<%= content_tag "span", bid.description.truncate(50, omission: '...'), :class => "d-p-project-intro" , :title => bid.description %>
|
|
|
|
|
</p>
|
|
|
|
|
<%= content_tag "span", contest.description.truncate(50, omission: '...'), :class => "d-p-project-intro" , :title => contest.description %>
|
|
|
|
|
</p>
|
|
|
|
|
</li>
|
|
|
|
|
<% end %>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
|
|
|
|
|
<h2>热门课程</h2>
|
|
|
|
|
|
|
|
|
|
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
|
|
|
|
|
<h3 style="margin-left: 5px; color: rgb(21, 188, 207);"><strong>热门众包</strong></h3>
|
|
|
|
|
<div class="d-p-projectlist-box">
|
|
|
|
|
<ul class="d-p-projectlist">
|
|
|
|
|
<% find_all_hot_course.map do |project| break if(project == find_all_hot_course[5]) %>
|
|
|
|
|
<% find_all_hot_bid.map do |bid| break if(bid == find_all_hot_bid[5]) %>
|
|
|
|
|
<li style="background-image:none;">
|
|
|
|
|
<p class="layout">
|
|
|
|
|
<%= link_to( project.name, project_path(project.project_id), :class => "d-g-blue d-p-project-name",:title => "#{project.name}")%>
|
|
|
|
|
<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}",
|
|
|
|
|
:style => "margin-left: 28px;")%></span>
|
|
|
|
|
</p>
|
|
|
|
|
<p class="layout-1" >
|
|
|
|
|
<%= content_tag "span", project.description.truncate(50, omission: '...'), :class => "d-p-project-intro" , :title => project.description %>
|
|
|
|
|
<%= content_tag "span", bid.description.truncate(50, omission: '...'), :class => "d-p-project-intro" , :title => bid.description %>
|
|
|
|
|
</p>
|
|
|
|
|
</li>
|
|
|
|
|
<% end %>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="clr">
|
|
|
|
|
</div>
|
|
|
|
|