用户项目图片更新

代码重构
tab小bug解决
This commit is contained in:
huangjingquan 2013-08-07 11:29:00 +08:00
parent d5cc2246a9
commit cb6fe2e7df
9 changed files with 87 additions and 65 deletions

View File

@ -12,7 +12,7 @@
<%= form_for "tag_for_save",:remote=>true,:url=>tag_path, <%= form_for "tag_for_save",:remote=>true,:url=>tag_path,
:update => "tags_show", :update => "tags_show",
:complete => '$("#put-tag-form-issue").hide();' do |f| %> :complete => '$("#put-tag-form-issue").hide();' do |f| %>
<%= f.text_field :name ,:id => "name-issue"%> <%= f.text_field :name ,:id => "name-issue",:size=>"30" %>
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%> <%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%> <%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
<%= f.submit "add"%> <%= f.submit "add"%>
@ -30,7 +30,7 @@
<%= form_for "tag_for_save",:remote=>true,:url=>tag_path, <%= form_for "tag_for_save",:remote=>true,:url=>tag_path,
:update => "tags_show", :update => "tags_show",
:complete => '$("#put-tag-form").hide();' do |f| %> :complete => '$("#put-tag-form").hide();' do |f| %>
<%= f.text_field :name ,:id => "name"%> <%= f.text_field :name ,:id => "name",:size=>"28"%>
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%> <%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%> <%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
<%= f.submit "add"%> <%= f.submit "add"%>

View File

@ -20,7 +20,7 @@
<div id="wrapper"> <div id="wrapper">
<div id="wrapper2"> <div id="wrapper2">
<div id="wrapper3"> <div id="wrapper3">
<%=render :partial => 'layouts/base_header'%> <%= render :partial => 'layouts/base_header'%>
<div id="main"> <div id="main">
<!--project page--> <!--project page-->
@ -32,13 +32,14 @@
<tr> <tr>
<td><%= link_to image_tag(avatar_image(@project), :class => 'avatar') %></td> <td><%= link_to image_tag(avatar_image(@project), :class => 'avatar') %></td>
<td align="center"> <td align="center">
<div class="info_font"><%= textilizable @project.name %></div> <div class="info_font">
<%= textilizable @project.name %>
</div>
<div> <div>
<% if @project.watched_by?(User.current) %> <% if @project.watched_by?(User.current) %>
<%= watcher_link(@project, User.current) %> <%= watcher_link(@project, User.current) %>
<% end %> <% end %>
</div> </div></td>
</td>
</tr> </tr>
</table> </table>
<!--tags--> <!--tags-->
@ -60,9 +61,9 @@
<td class="font_index"><%= @project.issues.count %></td> <td class="font_index"><%= @project.issues.count %></td>
<td class="font_index"><%= @project.attachments.count %></td> <td class="font_index"><%= @project.attachments.count %></td>
<tr> <tr>
<td align="center" width="80px"><strong><%= link_to('成员 ', project_member_path(@project), :class => 'project_infor_tag') %></strong></td> <td align="center" width="80px"><strong> <%= link_to(l(:label_member), project_member_path(@project), :class => 'project_infor_tag') %></strong></td>
<td align="center" width="80px"><strong><%= link_to('缺陷 ', project_issues_path(@project), :class => 'project_infor_tag') %></strong></td> <td align="center" width="80px"><strong> <%= link_to(l(:label_project_defect), project_issues_path(@project), :class => 'project_infor_tag') %></strong></td>
<td align="center" width="80px"><strong><%= link_to('文件 ', project_files_path(@project), :class => 'project_infor_tag') %></strong></td> <td align="center" width="80px"><strong> <%= link_to(l(:label_attachment), project_files_path(@project), :class => 'project_infor_tag') %></strong></td>
</tr> </tr>
</table> </table>
<div class="user_underline"></div> <div class="user_underline"></div>
@ -71,7 +72,7 @@
<!--description--> <!--description-->
<div class="inf_user_context"> <div class="inf_user_context">
<div class="font_title_left"> <div class="font_title_left">
概述<!-- <%= l(:label_project_overview) %> --> <%= l(:label_project_overview) %>
</div> </div>
<div class="user_underline2"></div> <div class="user_underline2"></div>
<div style="padding-bottom: 8px"> <div style="padding-bottom: 8px">
@ -79,7 +80,7 @@
<%= textilizable @project.description %> <%= textilizable @project.description %>
</div> </div>
<div class="created_on_project"> <div class="created_on_project">
<strong style="color: #31a0d5">创建时间</strong><%= @project.created_on %> <strong style="color: #31a0d5"><%= l(:label_create_time) %></strong><%= @project.created_on %>
</div> </div>
</div> </div>
<div class="user_underline"></div> <div class="user_underline"></div>
@ -88,20 +89,28 @@
<!--tool--> <!--tool-->
<div class="tool"> <div class="tool">
<div class="font_title_left"> <div class="font_title_left">
工具<!-- <%= l(:label_project_tool)%> --> <%= l(:label_project_tool)%>
</div> </div>
<div class="user_underline2"></div> <div class="user_underline2"></div>
<table class="font_tool"> <table class="font_tool">
<tr> <tr>
<td align="left" width="60px" valign="center"><img src="/images/sidebar/tool_tag.png" width="15" height="15"/><%= link_to l(:project_module_documents),project_documents_path(@project) %></td> <td align="left" width="60px" valign="center"><img src="/images/sidebar/tool_tag.png" width="15" height="15"/>
<td align="left" width="60px" valign="center"><img src="/images/sidebar/tool_tag.png" width="15" height="15"/><%= link_to l(:project_module_wiki),project_wiki_path(@project) %></td> <%= link_to l(:project_module_documents),project_documents_path(@project) %></td>
<td align="left" width="60px" valign="center"><img src="/images/sidebar/tool_tag.png" width="15" height="15"/>
<%= link_to l(:project_module_wiki),project_wiki_path(@project) %></td>
</tr> </tr>
<tr> <tr>
<td align="left" width="190px" valign="left"><img src="/images/sidebar/tool_tag.png" width="15" height="15"/><%= link_to l(:project_module_calendar),project_calendar_path(@project) %></td> <td align="left" width="190px" valign="left"><img src="/images/sidebar/tool_tag.png" width="15" height="15"/>
<td align="left" width="190px" valign="left"><img src="/images/sidebar/tool_tag.png" width="15" height="15"/><%= link_to l(:project_module_gantt) ,project_gantt_path(@project) %></td> <%= link_to l(:project_module_calendar),project_calendar_path(@project) %>
</td>
<td align="left" width="190px" valign="left"><img src="/images/sidebar/tool_tag.png" width="15" height="15"/>
<%= link_to l(:project_module_gantt) ,project_gantt_path(@project) %>
</td>
</tr> </tr>
<tr> <tr>
<td align="left" width="190px" valign="left"><img src="/images/sidebar/tool_tag.png" width="15" height="15"/><%= link_to l(:project_module_boards) ,project_boards_path(@project) %></td> <td align="left" width="190px" valign="left"><img src="/images/sidebar/tool_tag.png" width="15" height="15"/>
<%= link_to l(:project_module_boards) ,project_boards_path(@project) %>
</td>
</tr> </tr>
</table> </table>
</div> </div>
@ -118,7 +127,7 @@
<%= render_flash_messages %> <%= render_flash_messages %>
</div> </div>
<%=render :partial => 'layouts/base_footer'%> <%= render :partial => 'layouts/base_footer'%>
</div> </div>
<div id="ajax-indicator" style="display:none;"> <div id="ajax-indicator" style="display:none;">

View File

@ -45,7 +45,8 @@
</tr> </tr>
</table> </table>
<div> <div>
关注 (<strong class="font_small_watch"><%= User.watched_by(@user.id).count %></strong>) &nbsp;粉丝 (<strong class="font_small_watch"><%= @user.watcher_users.count %></strong>) <%= l(:label_user_watcher) %> (<strong class="font_small_watch"><%= User.watched_by(@user.id).count %></strong>) &nbsp;
<%= l(:label_user_fans) %> (<strong class="font_small_watch"><%= @user.watcher_users.count %></strong>)
</div> </div>
</div> </div>
<div class="user_underline"></div> <div class="user_underline"></div>
@ -53,13 +54,13 @@
<div class="inf_user_context"> <div class="inf_user_context">
<table style="font-family:微软雅黑"> <table style="font-family:微软雅黑">
<tr> <tr>
<td class="font_lighter_sidebar">加入时间:</td><td><%= format_date(@user.created_on) %></td> <td class="font_lighter_sidebar"><%= l(:label_user_joinin) %></td><td><%= format_date(@user.created_on) %></td>
</tr> </tr>
<tr> <tr>
<td class="font_lighter_sidebar">最近登录:</td><td><%= format_date(@user.last_login_on) %></td> <td class="font_lighter_sidebar"><%= l(:label_user_login) %></td><td><%= format_date(@user.last_login_on) %></td>
</tr> </tr>
<tr> <tr>
<td class="font_lighter_sidebar">邮件地址:</td><td><%= mail_to(h(@user.mail), nil, :encode => 'javascript') %></td> <td class="font_lighter_sidebar"><%= l(:label_user_mail) %></td><td><%= mail_to(h(@user.mail), nil, :encode => 'javascript') %></td>
</tr> </tr>
</table> </table>
@ -69,7 +70,7 @@
<div class="user_fans"> <div class="user_fans">
<div class="font_title_left"> <div class="font_title_left">
<strong>关注(<%= link_to User.watched_by(@user.id).count, home_path %>)</strong> <strong><%= l(:label_user_watcher) %>(<%= link_to User.watched_by(@user.id).count %>)</strong>
</div> </div>
<div class="left_wf"> <div class="left_wf">
@ -86,9 +87,8 @@
<!--fans--> <!--fans-->
<div class="user_fans"> <div class="user_fans">
<div class="font_title_left"> <div class="font_title_left">
<strong>粉丝(<%= link_to @user.watcher_users.count, home_path %>)</strong> <strong><%= l(:label_user_fans) %>(<%= link_to @user.watcher_users.count %>)</strong>
</div> </div>
<!-- <div class="user_underline"></div> -->
<div class="left_wf"> <div class="left_wf">
<table> <table>
<tr> <tr>
@ -100,13 +100,12 @@
</div> </div>
</div> </div>
<div class="user_underline"></div> <div class="user_underline"></div>
<!--扩充 y有待增加-->
</div> </div>
</div> </div>
</div> </div>
<div id="content" style="padding-top: 0px;"> <div id="content" style="padding-top: 0px;">
<div class="tabs"> <div class="tabs_new">
<%= render_menu :user_menu %> <%= render_menu :user_menu %>
</div> </div>
<%= yield %> <%= yield %>

View File

@ -5,22 +5,23 @@
<% unless news.summary.blank? %></td><td><span class="fontligher"><%=h news.summary %></span><% end %></td> <% unless news.summary.blank? %></td><td><span class="fontligher"><%=h news.summary %></span><% end %></td>
<td><span class="author"><%= authoring news.created_on, news.author %></span></td></tr></table></p>--> <td><span class="author"><%= authoring news.created_on, news.author %></span></td></tr></table></p>-->
<table width="660px" border="0" align="center"> <table width="660px" border="0" align="center">
<tr> <tr>
<td colspan="2" valign="top" width="50" ><img src="/images/new/news.png" width="40" height="40"/></td> <td colspan="2" valign="top" width="50" ><img src="/images/new/news.png" width="40" height="40"/></td>
<td><table width="580px" border="0"> <td><table width="580px" border="0">
<tr> <tr>
<td colspan="2" valign="top"><strong> <%=link_to news.author,news_path(news)%></strong> <a class="font_lighter">分享了</a> <%= link_to h(news.title), news_path(news) %></td> <td colspan="2" valign="top"><strong> <%=link_to news.author,news_path(news)%></strong>
<a class="font_lighter"><%= l(:label_project_newshare) %></a> <%= link_to h(news.title), news_path(news) %>
</td>
</tr> </tr>
<tr> <tr>
<td colspan="2" width="580px" ><p class="font_description"><%=h news.description%></p></td> <td colspan="2" width="580px" ><p class="font_description"><%=h news.description%></p></td>
</tr> </tr>
<tr> <tr>
<td align="left"><a class="font_lighter"> <%= news.created_on %></a></td> <td align="left"><a class="font_lighter"> <%= news.created_on %></a></td>
<td width="200" align="right" class="a"><%= link_to"查看其他评论",news_path(news)%><%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count > 0 %></td> <td width="200" align="right" class="a"><%= link_to l(:label_project_newother),news_path(news)%>
<%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count > 0 %>
</td>
</tr> </tr>
</table></td> </table></td>
</tr> </tr>

View File

@ -33,7 +33,7 @@
<% end %> <% end %>
<% end %> --> <% end %> -->
<!--add by huang--> <!--add by huang :list news-->
<div style="padding-top: 15px"> <div style="padding-top: 15px">
<% if @newss.empty? %> <% if @newss.empty? %>
<p class="nodata"><%= l(:label_no_data) %></p> <p class="nodata"><%= l(:label_no_data) %></p>
@ -44,14 +44,14 @@
<td colspan="2" valign="top" width="50" ><%= image_tag(url_to_avatar(news.author), :class => "avatar") %></td> <td colspan="2" valign="top" width="50" ><%= image_tag(url_to_avatar(news.author), :class => "avatar") %></td>
<td><table width="580px" border="0"> <td><table width="580px" border="0">
<tr> <tr>
<td colspan="2" valign="top"><strong><%=link_to_user(news.author)if news.respond_to?(:author) %></strong> <a class="font_lighter">分享了</a> <%= link_to h(news.title), news_path(news) %></td> <td colspan="2" valign="top"><strong><%=link_to_user(news.author)if news.respond_to?(:author) %></strong> <a class="font_lighter"><%= l(:label_project_newshare)%></a> <%= link_to h(news.title), news_path(news) %></td>
</tr> </tr>
<tr> <tr>
<td colspan="2" width="580px" ><span class="font_description"><%= textilizable(news, :description) %></span></td> <td colspan="2" width="580px" ><span class="font_description"><%= textilizable(news, :description) %></span></td>
</tr> </tr>
<tr> <tr>
<td align="left"><a class="font_lighter"> <%= news.created_on %></a></td> <td align="left"><a class="font_lighter"> <%= news.created_on %></a></td>
<td width="200" align="right" class="a"><%= link_to"查看其他评论",news_path(news)%><%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count >= 0 %></td> <td width="200" align="right" class="a"><%= link_to l(:label_project_newother),news_path(news)%><%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count >= 0 %></td>
</tr> </tr>
</table></td> </table></td>
</tr> </tr>

View File

@ -34,7 +34,7 @@
<%= textilizable(comment.comments) %> <%= textilizable(comment.comments) %>
<% end if @comments.any? %> <% end if @comments.any? %>
</div> --> </div> -->
<!--add by huang--> <!--add by huang: show subnew-->
<div id="comments" style="margin-bottom:16px;"> <div id="comments" style="margin-bottom:16px;">
<h3 class="comments"><%= l(:label_comment_plural) %></h3> <h3 class="comments"><%= l(:label_comment_plural) %></h3>
<% @comments.each do |comment| %> <% @comments.each do |comment| %>
@ -44,7 +44,8 @@
<td colspan="2" valign="top" width="50" ><%= image_tag(url_to_avatar(comment.author), :class => "avatar")%></td> <td colspan="2" valign="top" width="50" ><%= image_tag(url_to_avatar(comment.author), :class => "avatar")%></td>
<td><table width="580px" border="0"> <td><table width="580px" border="0">
<tr> <tr>
<td colspan="2" valign="top"><strong><%=link_to_user(comment.author) if comment.respond_to?(:author) %></strong> <a class="font_lighter">添加了</a><%= l(:label_comment_plural) %></td> <td colspan="2" valign="top"><strong><%=link_to_user(comment.author) if comment.respond_to?(:author) %>
</strong> <a class="font_lighter"><%= l(:label_project_newadd) %></a><%= l(:label_comment_plural) %></td>
</tr> </tr>
<tr> <tr>
<td colspan="2" width="580px" ><p class="font_description"> <%= textilizable(comment.comments) %></p></td> <td colspan="2" width="580px" ><p class="font_description"> <%= textilizable(comment.comments) %></p></td>

View File

@ -6,7 +6,7 @@
<li class="line_under"> <li class="line_under">
<table width="660" border="0" align="center"> <table width="660" border="0" align="center">
<tr> <tr>
<td colspan="2" valign="top" width="50" ><img src="/images/new/logo.png" width="40" height="40"/></td> <td colspan="2" valign="top" width="50" ><%= link_to image_tag(url_to_avatar(membership.project), :class => 'avatar') %></td>
<td> <td>
<table width="580" border="0"> <table width="580" border="0">
<tr> <tr>
@ -31,6 +31,6 @@
<% end %> <% end %>
</ul> </ul>
<% else %> <% else %>
暂无项目,赶快去<%= link_to"新建",:controller=>'projects',:action=>'new'%> <%= l(:label_prohect_unadd) %><%= link_to"新建",:controller=>'projects',:action=>'new'%>
<% end %> <% end %>
<%= call_hook :view_account_left_bottom, :user => @user %></div> <%= call_hook :view_account_left_bottom, :user => @user %></div>

View File

@ -761,10 +761,22 @@ zh:
label_user_edit: "修改资料" label_user_edit: "修改资料"
label_user_info: "个人简介" #huang 添加 label_user_info: "个人简介" #huang 添加
label_user_watcher: "关注" # huang添加的 label_user_watcher: "关注" # huang添加的
label_user_fans: "粉丝"
label_user_commits: "代码提交" label_user_commits: "代码提交"
label_user_watchered: "被关注" # huang添加的 label_user_watchered: "被关注" # huang添加的
label_user_newfeedback: "留言" ## huang添加的 label_user_newfeedback: "留言" ## huang添加的
#。。 label_user_login: "最后登录:"
label_user_mail: "邮件地址:"
label_user_joinin: "加入时间:"
label_project_overview: "概述"
label_project_tool: "工具"
label_project_defect: "缺陷"
label_project_newother: "查看其他评论"
label_project_newshare: "分享了"
label_project_newadd: "添加了"
label_prohect_unadd: "暂无项目,赶快去创建吧!"
#end by huang
label_user_mail_option_selected: "收取选中项目的所有通知..." label_user_mail_option_selected: "收取选中项目的所有通知..."
label_user_mail_option_none: "不收取任何通知" label_user_mail_option_none: "不收取任何通知"
label_user_mail_option_only_my_events: "只收取我跟踪或参与的项目的通知" label_user_mail_option_only_my_events: "只收取我跟踪或参与的项目的通知"

View File

@ -196,7 +196,7 @@ ul.tool li{list-style-type:none;
margin:0px 0px 0px 0px; margin:0px 0px 0px 0px;
height: auto; height: auto;
background-color:#fff; background-color:#fff;
padding-bottom:5px; padding-bottom:0px;
} }
.user_private{ .user_private{
padding-left:8px; padding-left:8px;