|
|
|
@ -135,120 +135,59 @@
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
|
|
|
|
|
<h3 style="margin-left: 5px; color: #e8770d;"><strong>我的课程</strong></h3>
|
|
|
|
|
<span style="margin-top: -20px;float: right; display: block;"><%= (link_to "更多>>", {:controller => 'projects', :action => 'course', :project_type => 1, :project_sort_type => 1}) if User.current.login? %></span>
|
|
|
|
|
<div class="d-p-projectlist-box">
|
|
|
|
|
<ul class="d-p-projectlist" style="height:200px;">
|
|
|
|
|
<%if !User.current.login?%>
|
|
|
|
|
<li style="background-image:none;">
|
|
|
|
|
请<%=link_to "登录", signin_path %>后查看
|
|
|
|
|
</li>
|
|
|
|
|
<%else%>
|
|
|
|
|
<% find_all_hot_course(2).map do |project| %>
|
|
|
|
|
<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( 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>
|
|
|
|
|
</p>
|
|
|
|
|
<p class="layout-1" >
|
|
|
|
|
<%= content_tag "span", project.description.truncate(50, omission: '...'), :class => "d-p-project-intro" , :title => project.description %>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end -%>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="web_status">
|
|
|
|
|
<h3 style="margin-left: 5px; color: #e8770d;"><strong>当前网站状态</strong></h3>
|
|
|
|
|
<table>
|
|
|
|
|
<tbody>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>课程总量: 15</td>
|
|
|
|
|
<td>教师数量: 6</td>
|
|
|
|
|
<td>课程总量: <%=@course.count%></td>
|
|
|
|
|
<td>教师数量: <%=@teacher.count%></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>用户总量: 810</td>
|
|
|
|
|
<td>学生数量: 233</td>
|
|
|
|
|
<td>用户总量: <%=User.count%></td>
|
|
|
|
|
<td>学生数量: <%=@student.count%></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>资源总量: 0810</td>
|
|
|
|
|
<td>资源总量: <%=Attachment.count%></td>
|
|
|
|
|
<td> </td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
<div style="text-align: right; padding-right: 20px">
|
|
|
|
|
<%= link_to "意见反馈" , '#', {:class => 'orangeButton', :style => "color: #EEEEEE" }%>
|
|
|
|
|
<%= link_to "意见反馈" , suggestion_send_path, {:class => 'orangeButton', :style => "color: #EEEEEE" }%>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject">
|
|
|
|
|
<h3 style="margin-left: 5px; color: #e8770d;"><strong>热门项目</strong></h3>
|
|
|
|
|
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", { :controller => 'projects', :action => 'index', :project_type => 0}, :target => "_blank" %></span>
|
|
|
|
|
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="margin-top: 20px; float: right;">
|
|
|
|
|
<h3 style="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" }%>
|
|
|
|
|
</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_all_hot_project(6).map do |project| %>
|
|
|
|
|
<li style="background-image:none;">
|
|
|
|
|
<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">
|
|
|
|
|
<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>
|
|
|
|
|
<%= content_tag "span", show_grade(project),
|
|
|
|
|
:style => "cursor: pointer; display: inline-block; float: right; color: #ec6300; ",
|
|
|
|
|
:title => "项目得分,综合考虑了项目的各项活动,反映了该项目的活跃程度",
|
|
|
|
|
:class => "tooltip",
|
|
|
|
|
:id => "tooltip-#{project.id}" %>
|
|
|
|
|
</p>
|
|
|
|
|
<p class="layout-1" >
|
|
|
|
|
<%= 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;">
|
|
|
|
|
<h3 style="margin-left: 5px; color: color: (51, 119, 51);"><strong>热门竞赛</strong></h3>
|
|
|
|
|
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", {:controller => 'bids', :action => 'contest', :project_type => 1}, :target => "_blank" %></span>
|
|
|
|
|
<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]) %>
|
|
|
|
|
<li style="background-image:none;">
|
|
|
|
|
<p class="layout">
|
|
|
|
|
<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;", :target => "_blank") %></span>
|
|
|
|
|
</p>
|
|
|
|
|
<p class="layout-1" >
|
|
|
|
|
<%= content_tag "span", contest.description.truncate(50, omission: '...'), :class => "d-p-project-intro" , :title => contest.description %>
|
|
|
|
|
</p>
|
|
|
|
|
<% find_new_forum_topics(4).each do |topic|%>
|
|
|
|
|
<li class="message-brief-intro" style="min-height: 20px;padding-bottom:3px; line-height:1.23em; ">
|
|
|
|
|
<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>
|
|
|
|
|
</li>
|
|
|
|
|
<% end %>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="clr">
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<br/><br/><br/><br/><br/><br/><br/>
|
|
|
|
|
<div style="padding-top: 40px"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|