From c24320fda5130d6782a0e9c0b97060d5f92ab51e Mon Sep 17 00:00:00 2001 From: nieguanghui Date: Sat, 3 Aug 2013 16:54:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=A0=B7=E5=BC=8F=E6=94=B9?= =?UTF-8?q?=E8=BF=9B=EF=BC=8C=E6=97=B6=E9=97=B4=E6=98=BE=E7=A4=BA=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E8=B0=83=E6=95=B4=EF=BC=8C=E9=A2=9C=E8=89=B2=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/queries_helper.rb | 65 +++++- app/views/issues/_list.html.erb | 206 +++++++++--------- app/views/projects/_project.html.erb | 14 +- app/views/projects/member.html.erb | 2 +- app/views/users/index.html.erb | 2 +- config/locales/zh.yml | 9 +- .../stylesheets/application.css | 37 ++-- 7 files changed, 200 insertions(+), 135 deletions(-) diff --git a/app/helpers/queries_helper.rb b/app/helpers/queries_helper.rb index 2de6b0c90..f36d2ea94 100644 --- a/app/helpers/queries_helper.rb +++ b/app/helpers/queries_helper.rb @@ -94,6 +94,7 @@ module QueriesHelper when 'String' if column.name == :subject link_to(h(value), :controller => 'issues', :action => 'show', :id => issue) + h(value) elsif column.name == :description issue.description? ? content_tag('div', textilizable(issue, :description), :class => "wiki") : '' else @@ -106,9 +107,9 @@ module QueriesHelper when 'Fixnum' if column.name == :id link_to value, issue_path(issue) - elsif column.name == :done_ratio + elsif column.name == :done_ratio progress_bar(value, :width => '80px') - else + else value.to_s end when 'Float' @@ -125,6 +126,7 @@ module QueriesHelper l(:general_text_No) when 'Issue' value.visible? ? link_to_issue(value) : "##{value.id}" + "##{value.id}" when 'IssueRelation' other = value.other_issue(issue) content_tag('span', @@ -134,6 +136,65 @@ module QueriesHelper h(value) end end + + #Added by nie + def column_content_new(column, issue) + value = column.value(issue) + if value.is_a?(Array) + value.collect {|v| column_value(column, issue, v)}.compact.join(', ').html_safe + else + column_value_new(column, issue, value) + end + end + + def column_value_new(column, issue, value) + case value.class.name + when 'String' + if column.name == :subject + #link_to(h(value), :controller => 'issues', :action => 'show', :id => issue) + h(value) + elsif column.name == :description + issue.description? ? content_tag('div', textilizable(issue, :description), :class => "wiki") : '' + else + h(value) + end + when 'Time' + format_time(value) + when 'Date' + format_date(value) + when 'Fixnum' + #if column.name == :id + # link_to value, issue_path(issue) + # elsif column.name == :done_ratio + # progress_bar(value, :width => '80px') + # else + value.to_s + # end + when 'Float' + sprintf "%.2f", value + when 'User' + link_to_user value + when 'Project' + link_to_project value + when 'Version' + link_to(h(value), :controller => 'versions', :action => 'show', :id => value) + when 'TrueClass' + l(:general_text_Yes) + when 'FalseClass' + l(:general_text_No) + when 'Issue' + #value.visible? ? link_to_issue(value) : "##{value.id}" + "##{value.id}" + when 'IssueRelation' + other = value.other_issue(issue) + content_tag('span', + (l(value.label_for(issue)) + " " + link_to_issue(other, :subject => false, :tracker => false)).html_safe, + :class => value.css_classes_for(issue)) + else + h(value) + end + end + #end def csv_content(column, issue) value = column.value(issue) diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb index ab14360f2..53d85bd22 100644 --- a/app/views/issues/_list.html.erb +++ b/app/views/issues/_list.html.erb @@ -1,109 +1,111 @@ <%= form_tag({}) do -%> <%= hidden_field_tag 'back_url', url_for(params), :id => nil %>
- + + + +
<% end -%> diff --git a/app/views/projects/_project.html.erb b/app/views/projects/_project.html.erb index 2bd9c3330..340b25d02 100644 --- a/app/views/projects/_project.html.erb +++ b/app/views/projects/_project.html.erb @@ -1,11 +1,9 @@ +
- <%= tag('img', {:src => '../images/logo-only_med.png', :class => 'img_ta'}, false, false) %> + <%= image_tag(url_to_avatar(project), :class => "avatar2") %>
-

- Claimed by <%= content_tag('a', project.name) %> | Analyzed about 11 hours ago -

<%= textilizable(project.short_description, :project => project) %>

@@ -24,12 +22,6 @@ <%= content_tag('a', "#{@project.repository.nil? ? '0' : @project.repository.changesets.count }") %><%= content_tag('span', l(:label_commit_on)) %>

-
@@ -51,7 +43,7 @@
- <%= tag('img', {:src => "../images/user.png"}, false, false) %> + <%= tag('img', {:src => "/images/sidebar/tags.png"}, false, false) %> <%= render :partial => 'layouts/tag_name', :locals => {:obj => @project,:object_flag => "2",:non_list_all => true }%>
diff --git a/app/views/projects/member.html.erb b/app/views/projects/member.html.erb index 2be9a2dac..cc5e40f8b 100644 --- a/app/views/projects/member.html.erb +++ b/app/views/projects/member.html.erb @@ -10,7 +10,7 @@ <% next if member.new_record? %> <% unless member.created_on.nil? %> - <%= content_tag "p", "#{format_time(member.created_on)}#{l(:label_member_since)}", :class => "float_right member_since" %> + <%= content_tag "p", "#{format_date(member.created_on)}#{l(:label_member_since)}", :class => "float_right member_since" %> <% end %> <%= member.user.nil? ? '' : (link_to image_tag(url_to_avatar(member.user), :class => 'avatar'), :class => "avatar") %> <%= content_tag "div", link_to_user(member.principal), :class => "nomargin avatar_name" %> diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index efbd435bb..cf19ee30b 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -96,7 +96,7 @@
<% for user in @users -%>
- <%= content_tag "p", "#{date_format_local(user.created_on)}#{l(:label_member_since)}", :class => "float_right member_since" %> + <%= content_tag "p", "#{format_date(user.created_on)}#{l(:label_member_since)}", :class => "float_right member_since" %> <%= get_avatar?(user) ? (link_to image_tag(avatar_image(user), :class => 'avatar'), :class => "avatar") : (link_to image_tag("/images/12_50.png", :class => 'avatar'), :class => "avatar") %> <%= content_tag "div", link_to_user(user), :class => "nomargin avatar_name" %> <%= content_tag "div", content_tag("p", user.firstname), :class => "clear avatar_name" %> diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 846b9b65e..1cd32883d 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1113,7 +1113,6 @@ zh: field_closed_on: Closed setting_default_projects_tracker_ids: Default trackers for new projects label_total_time: 合计 - label_create_time: 创建时间 #Customer added! label_current_contributors: 位当前贡献者 label_lines_of_code: 行代码 @@ -1130,8 +1129,12 @@ zh: label_status_as: 状态为 label_priority_as: 优先级为 label_member_list: 成员列表 - - #added by liuping + label_author_name: 由%{author_name}发表了 + label_comments_count: (%{count}条评论) + label_post_on: 发表了 + label_find_all_comments: 查看所有评论 + label_updated_time_on: " 更新于 %{value} " + #added by liuping button_unfollow: 取消关注 button_follow: 关注 label_delete_confirm: 确认删除? diff --git a/public/themes/redpenny-master/stylesheets/application.css b/public/themes/redpenny-master/stylesheets/application.css index 1dc9744b9..36517df0d 100644 --- a/public/themes/redpenny-master/stylesheets/application.css +++ b/public/themes/redpenny-master/stylesheets/application.css @@ -1082,6 +1082,7 @@ div.wiki-description { /*text-overflow: ellipsis; -o-text-overflow: ellipsis;*/ } + .information { margin-top: 0px; margin-left: 607px; @@ -1199,10 +1200,6 @@ a.img-tag3{ width: 908px; margin-bottom: 5px; } - -.add-info a { - margin-left: 60px; -} .main-language { float: left; height: 18px; @@ -1425,9 +1422,10 @@ div.autoscroll li.hascontextmenu-1{ display: block; margin-bottom: -1px; margin-left: 10px; - padding: 8px 10px 10px 10px;/*by young*/ - border: 1px solid rgb(229,229,229); + padding: 8px 10px 0px 10px;/*by young*/ + border-bottom: 1px dashed rgb(229,229,229); width: 600px;/*by young*/ + height: auto; } .hascontextmenu-1 a { @@ -1435,14 +1433,11 @@ div.autoscroll li.hascontextmenu-1{ } div.autoscroll li.id { position: relative; - top: 2px; - float: right; - margin-left: 12px; font-size: 13px; } div.autoscroll li.id a { - color: rgb(153, 153, 153); + color: rgb(172, 174, 177); } div.autoscroll li.subject { @@ -1455,10 +1450,10 @@ div.autoscroll li.subject a{ color: rgb(51, 51, 51); } div.autoscroll ul.list-group-item-meta{ - font-size: 11px; + font-size: 12px; line-height: 17px; overflow: hidden; - color: rgb(153, 153, 153); + color: rgb(172, 174, 177); } div.autoscroll ul.list-group-item-meta li { @@ -1468,18 +1463,30 @@ div.autoscroll ul.list-group-item-meta li { div.autoscroll li.tracker, div.autoscroll li.status, div.autoscroll li.priority{ color: rgb(51, 51, 51); - font: 10px/1.4 Helvetica,arial,freesans,clean,sans-serif; + font: 13px/1.4 Helvetica,arial,freesans,clean,sans-serif; } -div.autoscroll ul.list-group-item-meta a { - color: rgb(51, 51, 51); +div.autoscroll ul.list-group-item-meta { + margin-bottom: 10px; } li.issue img.img-tag-issues { float: left; height: 24px; width: 24px; + margin-top: -4px; } +div.issue-list-description { + margin-left: 0px; + color: rgb(72, 72, 72); + overflow: hiddedn; + word-wrap: nowrap; + font-size: small; +} + +div.find-comment-class { + float: right; +} /* */