主界面

This commit is contained in:
huangjingquan 2013-08-11 15:27:34 +08:00
parent fcf9608dc9
commit 2db0b87e6e
14 changed files with 76 additions and 36 deletions

View File

@ -401,11 +401,9 @@ class UsersController < ApplicationController
###add by huang ###add by huang
def user_watchlist def user_watchlist
end end
###add by huang ###add by huang
def user_fanslist def user_fanslist
end end
private private

View File

@ -18,6 +18,7 @@
class WelcomeController < ApplicationController class WelcomeController < ApplicationController
caches_action :robots caches_action :robots
def index def index
@news = News.latest User.current @news = News.latest User.current
@projects = Project.latest User.current @projects = Project.latest User.current
@ -58,6 +59,13 @@ class WelcomeController < ApplicationController
end end
end end
end end
#add by huang
@memberships = @user.memberships.all(:conditions => Project.visible_condition(User.current))
events = Redmine::Activity::Fetcher.new(User.current, :author => @user).events(nil, nil, :limit => 20)
@events_by_day = events.group_by(&:event_date)
# #
end end

View File

@ -1,5 +1,4 @@
<h3><%=l(:label_administration)%></h3> <h3><%=l(:label_administration)%></h3>
<div id="admin-index"> <div id="admin-index">
<%= render :partial => 'no_data' if @no_configuration_data %> <%= render :partial => 'no_data' if @no_configuration_data %>
<%= render :partial => 'menu' %> <%= render :partial => 'menu' %>

View File

@ -1,6 +1,7 @@
<!--add by huang--> <!--add by huang-->
<div id="footer" style="margin-left:-5px;padding-top: 10px;clear: both;"> <div id="footer" style="margin-left:-5px;padding-top: 10px;clear: both;">
<div class="footer_color"><div class="bgr"> <div style="border-top:solid 1px #C6E9F1;width:940px;margin-left:auto;margin-right:auto;margin-bottom: 5px;margin-top: -10px;"></div>
<div class="footer_color"><div align="center">
Powered by <%= "Trustie Team "%> &copy; 2013 Powered by <%= "Trustie Team "%> &copy; 2013
</div></div> </div></div>
</div> </div>

View File

@ -1,7 +1,11 @@
<div id="top-menu" style="background-color: #15bccf;height:30px;margin-top: 10px;margin-bottom: 10px;"> <div id="top-menu" style="background-color: #15bccf;height:40px;margin-top: 10px;margin-bottom: 10px;">
<div style="float: left ">
<%=link_to image_tag("/images/logo.png",weight:"39px", height: "39px"), home_path %>
</div>
<div id="account"> <div id="account">
<%= render_menu :account_menu -%> <%= render_menu :account_menu -%>
</div> </div>
<%= content_tag('div', "#{l(:label_logged_as)} #{link_to_user(User.current, :format => :username)}".html_safe, :id => 'loggedas') if User.current.logged? %> <%= content_tag('div', "#{l(:label_logged_as)} #{link_to_user(User.current, :format => :username)}".html_safe, :id => 'loggedas') if User.current.logged? %>
<%= render_menu :top_menu if User.current.logged? || !Setting.login_required? -%> <%= render_menu :top_menu if User.current.logged? || !Setting.login_required? -%>
</div> </div>

View File

@ -46,7 +46,7 @@
</table> </table>
<div> <div>
<%= l(:label_user_watcher) %> (<strong class="font_small_watch"><%= User.watched_by(@user.id).count %></strong>) &nbsp; <%= l(:label_user_watcher) %> (<strong class="font_small_watch"><%=link_to User.watched_by(@user.id).count %></strong>) &nbsp;
<%= render :partial => "watchers/fans_num",:locals => {:fans_num => get_fans_num(@user) }%> <%= render :partial => "watchers/fans_num",:locals => {:fans_num => get_fans_num(@user) }%>
<span id="praise_tread" style="float:right;"> <%= render :partial => "/praise_tread/praise_tread",:locals => {:obj => @user,:show_flag => false,:user_id =>User.current.id}%> </span> <span id="praise_tread" style="float:right;"> <%= render :partial => "/praise_tread/praise_tread",:locals => {:obj => @user,:show_flag => false,:user_id =>User.current.id}%> </span>
</div> </div>

View File

@ -141,14 +141,13 @@
<!--add by huang--> <!--add by huang-->
<div style="height:200px;"> <div style="height:200px;">
<div class="welcone_left"> <div class="welcone_left">
<table width="300px"> <table width="350px">
<tr><td><span class="font_welcome_trustie">Trustieforge</span> <span class="font_welcome_Cdescription">是一个社交化的项目管理、软件开发和众包平台。</span></td></tr> <tr><td><span class="font_welcome_trustie">Trustieforge</span>
<span class="font_welcome_Cdescription">是一个社交化的项目管理、软件开发和众包平台。</span></td></tr>
<tr><td class="font_welcome_Edescription">Trustieforge is a socialized collaboration platform for project management, <tr><td class="font_welcome_Edescription">Trustieforge is a socialized collaboration platform for project management,
software development and software crowdsourcing.</td></tr> software development and software crowdsourcing.</td></tr>
</table> </table>
</div> </div>
<table> <table>
<tr><td> <tr><td>
<%= call_hook :view_account_login_top %> <%= call_hook :view_account_login_top %>
@ -190,6 +189,23 @@
</td> </td>
</tr> </tr>
</table> </table>
<% else %>
<div>
<table>
<tr><td class="font_welcome_Cdescription">欢迎 <strong class="font_small_watch"><%=User.current.name%></strong> 加入trustie!</td></tr>
<tr><td align="center"><span><%= image_tag(url_to_avatar(User.current), :class => 'avatar') %></span></td></tr>
<tr><td><%= l(:label_user_watcher) %> (<strong class="font_small_watch"><%= User.watched_by(User.current).count %></strong>)
<%= render :partial => "watchers/fans_num",:locals => {:fans_num => get_fans_num(User.current) }%></td></tr>
<tr><td><% unless User.current.memberships.empty? %>
<%= l(:label_contribute_to, :project_count => "#{User.current.memberships.count}") %>
<% for member in User.current.memberships %>
<%= link_to_project(member.project) %><%= (User.current.memberships.last == member) ? '' : '' %>
<% end %>
<% end %></td></tr>
</table>
</div>
<% end %> <% end %>
<% end %> <% end %>
</div> </div>
@ -207,25 +223,26 @@
<div> <div>
<table width="700" border="0" align="center" style="padding-top: 100px"> <table width="700" border="0" align="center" style="padding-top: 100px">
<tr align="center"> <tr align="center">
<td><a href="/projects"><img src="/images/welcome/1.png" width="200" height="200" /></td> <td><%= link_to image_tag("/images/welcome/1.png", weight:"200px", height:"200px"), :controller => 'projects', :action => 'index' %></td>
<td width="50">&nbsp;</td> <td width="50">&nbsp;</td>
<td><a href="/bids"><img src="/images/welcome/2.png" width="200" height="200" /></td> <td><%= link_to image_tag("/images/welcome/2.png", weight:"200px", height:"200px"), :controller => 'bids', :action => 'index' %></td>
<td width="50">&nbsp;</td> <td width="50">&nbsp;</td>
<td><img src="/images/welcome/3.png" width="200" height="200" /></td> <td><%= link_to image_tag("/images/welcome/3.png", weight:"200px", height:"200px") %></td>
</tr> </tr>
<tr align="center"> <!-- <tr align="center">
<td><p class="font_welcome"><%= l(:label_create_new_projects) %></p></td> <td><p class="font_welcome"><%= l(:label_create_new_projects) %></p></td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td><p class="font_welcome"><%= l(:label_call_for_bids) %></p></td> <td><p class="font_welcome"><%= l(:label_call_for_bids) %></p></td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td><p class="font_welcome"><%= l(:label_create_course) %></p></td> <td><p class="font_welcome"><%= l(:label_create_course) %></p></td>
</tr> </tr> -->
<tr align="center" class="font_lighter" > <tr align="center" class="font_lighter2" >
<td>添加描述添加描述添加描述添加描述...</td> <td>创建新项目,让我们开启一次神奇的开源之旅!</td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td>添加描述添加描述添加描述添加描述...</td> <td>为你所想,发布需求,体验答案找上门的兴奋感觉!</td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td>添加描述添加描述添加描述添加描述...</td> <td>课程小社区,创建新课程,让我们共同分享多到想不到的公共资源!</td>
</tr> </tr>
</table> </table>
</div> </div>
@ -238,18 +255,18 @@
<div style="padding-top: 30px"> <div style="padding-top: 30px">
<table width="700" border="0" align="center" > <table width="700" border="0" align="center" >
<tr class="font_welcome" align="center" > <tr class="font_welcome" align="center" >
<td><img src="/images/welcome/discuss.png" width="30" height="26" /><span style="vertical-align: top"><%= l(:project_module_boards) %></span></td> <td><%= image_tag("/images/welcome/discuss.png", weight:"30px", height: "26px") %><span style="vertical-align: top"><%= l(:label_board) %></span></td>
<td width="50">&nbsp;</td> <td width="50">&nbsp;</td>
<td><img src="/images/welcome/news.png" width="30" height="26" /><span style="vertical-align: top"><%= l(:label_news) %></span></td> <td><%= image_tag("/images/welcome/news.png", weight:"30px", height: "26px") %><span style="vertical-align: top"><%= l(:label_news) %></span></td>
<td width="50">&nbsp;</td> <td width="50">&nbsp;</td>
<td><img src="/images/welcome/boards.png" width="30" height="26" /><span style="vertical-align: top"><%= l(:label_milestone) %></span></td> <td><%= image_tag("/images/welcome/boards.png", weight:"30px", height: "26px") %><span style="vertical-align: top"><%= l(:label_milestone) %></span></td>
</tr> </tr>
<tr align="center" class="font_lighter"> <tr align="center" class="font_lighter2">
<td>互信、分享互信、分享互信、分享互信、分享互信、分享互信、分享互信、分享互信、分享...</td> <td>七嘴八舌,汇聚众人智慧,为您排忧解难!</td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td>最新动态,最新动态,最新动态,最新动态,最新动态,最新动态,最新动态,最新动态,最新动态,...</td> <td>实时了解项目的最新动态,掌握最新项目咨询!</td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td>我们的历程,我们的历程,我们的历程,我们的历程,我们的历程,我们的历程,我们的历程,我们的历程,...</td> <td>在这里您可以可以看见任何一个版本的工程!</td>
</tr> </tr>
</table> </table>
</div></div> </div></div>

View File

@ -1146,7 +1146,7 @@ zh:
label_commit_on: 次提交 label_commit_on: 次提交
label_follow_people: 个关注者 label_follow_people: 个关注者
label_member_since: 加入trustie2 label_member_since: 加入trustie2
label_contribute_to: 参与了%{project_count}个项目: label_contribute_to: 参与了 %{project_count} 个项目:
label_total_commit: 共%{total_commit}次提交 label_total_commit: 共%{total_commit}次提交
label_upload_profile: 上传头像 label_upload_profile: 上传头像
label_type_as: 类型为 label_type_as: 类型为

BIN
public/images/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

View File

@ -11,6 +11,11 @@ h4 {border-bottom: 1px dotted #bbb;}
/*new by huang*/ /*new by huang*/
/**/ /**/
.welcome_images{
width: 200px;
height: 200px;
}
ul.list_watch{list-style-type:none; ul.list_watch{list-style-type:none;
height:auto; height:auto;
border-bottom: 1px dashed rgb(204, 204, 204); border-bottom: 1px dashed rgb(204, 204, 204);
@ -146,6 +151,12 @@ ul.tool li{list-style-type:none;
font-size:12px; font-size:12px;
} }
.font_lighter2{
font-family:微软雅黑;
color:#9a9a9a;
font-size:12px;
}
.font_lighter_welcome{ .font_lighter_welcome{
color:#acaeb1; color:#acaeb1;
font-size:12px; font-size:12px;

View File

@ -376,16 +376,17 @@ ul.projects li.root
#top-menu ul #top-menu ul
{ {
padding:0px 1px /*控制顶层导航宽度*/ margin-left: 60px; /*add by huang*/
padding-right: 1px;
} }
#top-menu li,#top-menu #loggedas #top-menu li,#top-menu #loggedas
{ {
/*by young*/ /*by young*/
padding-top: 4px; padding-top: 10px;
color:#fff; color:#fff;
line-height:21px; line-height:21px;
margin-right:4px margin-right:1px
} }
#top-menu li a #top-menu li a
@ -393,7 +394,7 @@ ul.projects li.root
/*by young*/ /*by young*/
color:#fff; color:#fff;
font-weight:6px; font-weight:6px;
padding:4px 5px padding:4px 3px
} }
#top-menu li a:hover #top-menu li a:hover
@ -484,6 +485,7 @@ ul.projects li.root
margin:4px 20px 20px; margin:4px 20px 20px;
padding-bottom:15px; padding-bottom:15px;
text-align:left text-align:left
font-size: 18px;
} }
#footer a:hover #footer a:hover