主界面

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

@ -400,12 +400,10 @@ class UsersController < ApplicationController
end
###add by huang
def user_watchlist
def user_watchlist
end
###add by huang
def user_fanslist
def user_fanslist
end
private

View File

@ -18,6 +18,7 @@
class WelcomeController < ApplicationController
caches_action :robots
def index
@news = News.latest User.current
@projects = Project.latest User.current
@ -58,6 +59,13 @@ class WelcomeController < ApplicationController
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

View File

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

View File

@ -1,6 +1,7 @@
<!--add by huang-->
<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
</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">
<%= render_menu :account_menu -%>
</div>
<%= 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? -%>
</div>

View File

@ -46,7 +46,7 @@
</table>
<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) }%>
<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>

View File

@ -141,14 +141,13 @@
<!--add by huang-->
<div style="height:200px;">
<div class="welcone_left">
<table width="300px">
<tr><td><span class="font_welcome_trustie">Trustieforge</span> <span class="font_welcome_Cdescription">是一个社交化的项目管理、软件开发和众包平台。</span></td></tr>
<table width="350px">
<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,
software development and software crowdsourcing.</td></tr>
</table>
</div>
</div>
<table>
<tr><td>
<%= call_hook :view_account_login_top %>
@ -190,6 +189,23 @@
</td>
</tr>
</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 %>
</div>
@ -207,25 +223,26 @@
<div>
<table width="700" border="0" align="center" style="padding-top: 100px">
<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><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><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 align="center">
<!-- <tr align="center">
<td><p class="font_welcome"><%= l(:label_create_new_projects) %></p></td>
<td>&nbsp;</td>
<td><p class="font_welcome"><%= l(:label_call_for_bids) %></p></td>
<td>&nbsp;</td>
<td><p class="font_welcome"><%= l(:label_create_course) %></p></td>
</tr>
<tr align="center" class="font_lighter" >
<td>添加描述添加描述添加描述添加描述...</td>
</tr> -->
<tr align="center" class="font_lighter2" >
<td>创建新项目,让我们开启一次神奇的开源之旅!</td>
<td>&nbsp;</td>
<td>添加描述添加描述添加描述添加描述...</td>
<td>为你所想,发布需求,体验答案找上门的兴奋感觉!</td>
<td>&nbsp;</td>
<td>添加描述添加描述添加描述添加描述...</td>
<td>课程小社区,创建新课程,让我们共同分享多到想不到的公共资源!</td>
</tr>
</table>
</div>
@ -238,18 +255,18 @@
<div style="padding-top: 30px">
<table width="700" border="0" 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><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><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 align="center" class="font_lighter">
<td>互信、分享互信、分享互信、分享互信、分享互信、分享互信、分享互信、分享互信、分享...</td>
<tr align="center" class="font_lighter2">
<td>七嘴八舌,汇聚众人智慧,为您排忧解难!</td>
<td>&nbsp;</td>
<td>最新动态,最新动态,最新动态,最新动态,最新动态,最新动态,最新动态,最新动态,最新动态,...</td>
<td>实时了解项目的最新动态,掌握最新项目咨询!</td>
<td>&nbsp;</td>
<td>我们的历程,我们的历程,我们的历程,我们的历程,我们的历程,我们的历程,我们的历程,我们的历程,...</td>
<td>在这里您可以可以看见任何一个版本的工程!</td>
</tr>
</table>
</div></div>

View File

@ -1146,7 +1146,7 @@ zh:
label_commit_on: 次提交
label_follow_people: 个关注者
label_member_since: 加入trustie2
label_contribute_to: 参与了%{project_count}个项目:
label_contribute_to: 参与了 %{project_count} 个项目:
label_total_commit: 共%{total_commit}次提交
label_upload_profile: 上传头像
label_type_as: 类型为
@ -1225,4 +1225,4 @@ zh:
label_about_requirement: 对需求:
label_about_issue: 对问题:
label_quote_my_words: 对我的话进行了引用
label_have_respond: 进行了反馈
label_have_respond: 进行了反馈

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*/
/**/
.welcome_images{
width: 200px;
height: 200px;
}
ul.list_watch{list-style-type:none;
height:auto;
border-bottom: 1px dashed rgb(204, 204, 204);
@ -146,6 +151,12 @@ ul.tool li{list-style-type:none;
font-size:12px;
}
.font_lighter2{
font-family:微软雅黑;
color:#9a9a9a;
font-size:12px;
}
.font_lighter_welcome{
color:#acaeb1;
font-size:12px;

View File

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