调整主页界面显示
This commit is contained in:
parent
10177618f0
commit
f2d392de1d
|
@ -108,7 +108,7 @@ module WelcomeHelper
|
|||
# or
|
||||
searchStudent(project).count
|
||||
end
|
||||
def find_new_forum_topics limit=9
|
||||
def find_new_forum_topics limit=7
|
||||
Memo.where('memos.parent_id IS NULL').reorder('memos.created_at DESC').limit(limit)
|
||||
# activity = Redmine::Activity::Fetcher.new(nil)
|
||||
# activity.scope=['memos']
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!--add by huang-->
|
||||
<div style="height:220px;">
|
||||
<div style="height:200px;">
|
||||
<div class="welcome_left" style="margin-top: 60px">
|
||||
<table width="388px">
|
||||
<tr><td><span class="font_welcome_trustie"><%= l(:label_welcome_trustie) %> </span><span class="font_welcome_tdescription">, <%= l(:label_welcome_trustie_description) %></span></td></tr>
|
||||
|
@ -205,7 +205,7 @@
|
|||
<%= stylesheet_link_tag 'welcome' %>
|
||||
<div class="body_resize">
|
||||
|
||||
<div class="left" style="float: left; height: 445px; width: 50%;">
|
||||
<div class="left" style="float: left; height: 445px; width: 50%; margin-left: 30px;">
|
||||
<ul class="welcome-message-list" style="width: 90%; ">
|
||||
<div class="forum-topic" style="height: 25px;">
|
||||
<h3 style="color: rgb(21, 188, 207);margin-left: 8px;"><strong>论坛动态</strong></h3>
|
||||
|
@ -220,6 +220,7 @@
|
|||
<a href="#">更多主题</a>
|
||||
</li>
|
||||
</ul> -->
|
||||
<span style="margin-top: -30px;float: right; display: block;"><%= link_to "更多>>", forums_path %></span>
|
||||
</div>
|
||||
<!-- <div class="welcome-box-list">
|
||||
<% find_hot_forum_topics.each do |topic|%>
|
||||
|
@ -240,16 +241,16 @@
|
|||
</div> -->
|
||||
|
||||
<div class="welcome-box-list-new">
|
||||
<% find_new_forum_topics.each do |topic|%>
|
||||
<li class="message-brief-intro" style="min-height: 25px;">
|
||||
<% 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; background: url('/images/list-icon.png') no-repeat scroll ;background-position: left center;">
|
||||
<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: 20px; 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: 5px; 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 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.replies_count, topic.event_url %>)</span>
|
||||
</div>
|
||||
|
@ -259,19 +260,19 @@
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
<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;">
|
||||
<div class="right" style="float: right; margin-right: 10px; height: 445px; width: 45%; ">
|
||||
<ul class="user-welcome-message-list" style="width: 94%; margin-top: 0px;">
|
||||
<h3 style="margin-left: -5px; color: rgb(21, 188, 207)"><strong>用户动态</strong></h3>
|
||||
<div class="user-message-box-list">
|
||||
<% find_all_activities.each do |event| %>
|
||||
<li style="display: block;height:60px;">
|
||||
<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>
|
||||
<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) 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 style="float: right; color: rgb(172, 174, 177);"><%= show_event_reply event %></span></p>
|
||||
<p style="margin-top: 4px;"><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 %>
|
||||
|
@ -280,7 +281,8 @@
|
|||
</div>
|
||||
|
||||
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject">
|
||||
<h3 style="margin-left: 5px; color: #e8770d;"><strong>热门项目</strong></h2>
|
||||
<h3 style="margin-left: 5px; color: #e8770d;"><strong>热门项目</strong></h2>
|
||||
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", { :controller => 'projects', :action => 'index', :project_type => 0} %></span>
|
||||
<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]) %>
|
||||
|
@ -290,7 +292,7 @@
|
|||
</div>
|
||||
<div style="float: left; margin-left: 10px; width: 360px;">
|
||||
<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="display: inline-block; width: 250px;"><%= link_to( project.name, project_path(project.project_id), :class => "d-g-blue d-p-project-name", :title => "#{project.name}")%></span>
|
||||
<!-- <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: pointer; display: inline-block; float: right; color: #ec6300; ",
|
||||
|
@ -310,6 +312,7 @@
|
|||
|
||||
<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} %></span>
|
||||
<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]) %>
|
||||
|
@ -339,6 +342,7 @@
|
|||
|
||||
<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} %></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]) %>
|
||||
|
@ -358,6 +362,7 @@
|
|||
|
||||
<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 => 'index'} %></span>
|
||||
<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]) %>
|
||||
|
|
|
@ -129,7 +129,7 @@ ul.welcome-message-list{
|
|||
}
|
||||
.d-p-index-hotproject{
|
||||
width: 48%;
|
||||
margin-top: 30px;
|
||||
margin-top: 40px;
|
||||
float: left;
|
||||
}
|
||||
ul.d-p-index-hdright{
|
||||
|
@ -198,6 +198,7 @@ p.layout {
|
|||
|
||||
.right ul li {
|
||||
margin-bottom: 6px;
|
||||
border-bottom: 1px dashed rgb(229,229,229);
|
||||
}
|
||||
|
||||
.avatar-3 {
|
||||
|
@ -206,7 +207,7 @@ p.layout {
|
|||
margin-top: 5px;
|
||||
}
|
||||
.message-brief-intro a.gray{
|
||||
color: #07a;
|
||||
color: rgb(17, 102, 173);
|
||||
}
|
||||
|
||||
.message-brief-intro a.gray:visited{
|
||||
|
@ -302,9 +303,3 @@ div#tooltip::after {
|
|||
border-bottom: 1px solid #FFFFFF;
|
||||
border-right: 1px solid #FFFFFF;
|
||||
}
|
||||
{
|
||||
border-top: 1px solid #717171;
|
||||
border-left: 1px solid #717171;
|
||||
border-bottom: 1px solid #FFFFFF;
|
||||
border-right: 1px solid #FFFFFF;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue