From 6aa2052c7fec0cf1edf9b118610e57944114e19e Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 12 Jan 2017 10:11:42 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=BA=93=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E6=94=B9=E7=89=88=E5=8F=8Ashow=E9=A1=B5=E9=9D=A2=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_projects.html.erb | 2 +- app/views/repositories/_dir_list.html.erb | 14 ++-- .../repositories/_dir_list_content.html.erb | 2 +- .../repositories/_latest_commit.html.erb | 22 ++---- app/views/repositories/_navigation.html.erb | 5 +- app/views/repositories/show.html.erb | 63 ++++++++-------- public/stylesheets/css/gantt.css | 40 +++++------ public/stylesheets/css/project.css | 72 ++++++++++++++++++- 8 files changed, 140 insertions(+), 80 deletions(-) diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index 985cdacf4..6f32a9ea9 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -9,7 +9,7 @@ <%= favicon %> <%= javascript_heads %> <%= heads_for_theme %> - <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common','css/structure','scm','css/public', 'css/project','css/popup','repository','css/gantt', 'css/calendar', 'css/moduel' %> + <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common','css/structure','scm','css/public', 'css/project','css/popup','repository','css/gantt', 'css/calendar', 'css/moduel', 'css/font-awesome' %> <%= call_hook :view_layouts_base_html_head %> <%= yield :header_tags -%> diff --git a/app/views/repositories/_dir_list.html.erb b/app/views/repositories/_dir_list.html.erb index 395bf2860..6543885be 100644 --- a/app/views/repositories/_dir_list.html.erb +++ b/app/views/repositories/_dir_list.html.erb @@ -3,15 +3,13 @@ <% unless @path.blank? %> - - - - 返回上级目录 - + + + + + <%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %> + - - - <% end %> diff --git a/app/views/repositories/_dir_list_content.html.erb b/app/views/repositories/_dir_list_content.html.erb index d69c3af04..b45305e30 100644 --- a/app/views/repositories/_dir_list_content.html.erb +++ b/app/views/repositories/_dir_list_content.html.erb @@ -22,7 +22,7 @@ <% end %> <%= link_to h(ent_name), {:action => (entry.is_dir? ? 'show' : 'entry'), :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(ent_path), :rev => @rev}, - :class => (entry.is_dir? ? 'icon icon-folder' : "icon icon-file #{Redmine::MimeType.css_class_of(ent_name)}")%> + :class => (entry.is_dir? ? 'old-icon old-icon-folder' : "old-icon old-icon-file #{Redmine::MimeType.css_class_of(ent_name)}")%>
diff --git a/app/views/repositories/_latest_commit.html.erb b/app/views/repositories/_latest_commit.html.erb index 650d9e90a..204196442 100644 --- a/app/views/repositories/_latest_commit.html.erb +++ b/app/views/repositories/_latest_commit.html.erb @@ -1,25 +1,11 @@
<% if @changesets_latest_coimmit %> - <% if !user_commit_rep(@changesets_latest_coimmit.author_email).nil? %> - <%= image_tag(url_to_avatar(user_commit_rep(@changesets_latest_coimmit.author_email)), :width => "25", :height => "25", :class => "fl portraitRadius mt2 ml4 mr5") %> - -
提交于 <%= time_tag(@changesets_latest_coimmit.try(:time)) %> 前:
-
<%= @changesets_latest_coimmit.message %>
-
- <% else %> - -
提交于<%= time_tag(@changesets_latest_coimmit.try(:time)) %>:
-
<%= @changesets_latest_coimmit.message %>
-
- <%end%> + <%= image_tag(url_to_avatar(user_commit_rep(@changesets_latest_coimmit.try(:author_email))), :width => "25", :height => "25", :class => "fl portraitRadius mt2 ml4 mr5") %> + <%= link_to_user_mail(@changesets_latest_coimmit.try(:author_email), "fb fontGrey3 mr5 fl hidden maxwidth150 ml5") %> +
提交于 <%= time_tag(@changesets_latest_coimmit.try(:time)) %> 前:
+
<%= @changesets_latest_coimmit.message %>
<% end %> <% if @entry && @entry.kind == 'file' %> <%= render :partial => 'link_to_functions' %> - <% else %> - <%= @repository.branches.count %> 个分支 <% end %> - - <%=link_to "#{choise_commit_count(@changesets_all_count, @g_project.commit_count.to_i)} 提交", {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev, :page => 1 ,:commit_count =>"#{@changesets_all_count}"} %> - -
\ No newline at end of file diff --git a/app/views/repositories/_navigation.html.erb b/app/views/repositories/_navigation.html.erb index bf7c19879..25b17b220 100644 --- a/app/views/repositories/_navigation.html.erb +++ b/app/views/repositories/_navigation.html.erb @@ -17,8 +17,9 @@ {:method => :get, :id => 'revision_selector'}) do -%> <% if !@repository.branches.nil? && @repository.branches.length > 0 -%> - <%= l(:label_branch) %>: - <%= select_tag :branch, options_for_select(@repository.branches, @rev), :id => 'branch' %> + + <%= select_tag :branch, options_for_select(@repository.branches, @rev), :id => 'branch', :class => "pro-fenzhi-select fl" %> + <% end -%> <%# if !@repository.tags.nil? && @repository.tags.length > 0 -%> diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index 282df48c3..1d4537415 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -1,8 +1,5 @@ <%#= call_hook(:view_repositories_show_contextual, {:repository => @repository, :project => @project}) %>
-
- <%= render :partial => "top" %> -
<% if @entries.nil? %> <%# 未提交代码提示 %> @@ -20,33 +17,43 @@
<% else %> - <%= render :partial => 'navigation' %> -
克隆网址:
- - - - <% unless @entries.nil? %> - ZIP下载 - <% if User.current.member_of?(@project) && @project.is_public? %> - <% if quality_analysis(User.current.try(:login), @repository.id).nil? %> - <%= link_to "质量分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "1"), :remote => true, :class => "btn_zipdown fr" %> - <% else %> - <%= link_to "重新分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "2"), :remote => true, :class => "btn_zipdown fr" %> - <% end %> - <% end %> - <% end %> - <% unless QualityAnalysis.where(:project_id => @project.id).first.nil? %> - <%= link_to "代码分析结果", project_quality_analysis_path(:project_id => @project.id), :class => "btn_zipdown fr" %> - <% end %> +
    +
  • + <%=link_to "#{choise_commit_count(@changesets_all_count, @g_project.commit_count.to_i)}", + {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, + :rev => @rev, :page => 1 ,:commit_count =>"#{@changesets_all_count}"}, :class => "linkBlue fb" %> 提交 +
  • +
  • + <%= @repository.branches.count %>分支 +
  • +
  • + <%=link_to "贡献统计", stats_repository_project_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, + :creator => @creator, :default_branch => @g_default_branch ) %> +
  • +
+
+
+ <%= render :partial => 'navigation' %> +
+ ZIP下载 + <% if User.current.member_of?(@project) && @project.is_public? %> + <% if quality_analysis(User.current.try(:login), @repository.id).nil? %> + <%= link_to "质量分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "1"), :remote => true, :class => "btn_zipdown fl ml10" %> + <% else %> + <%= link_to "重新分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "2"), :remote => true, :class => "btn_zipdown fl ml10" %> + <% end %> + <% end %> + <% unless QualityAnalysis.where(:project_id => @project.id).first.nil? %> + <%= link_to "代码分析结果", project_quality_analysis_path(:project_id => @project.id), :class => "btn_zipdown fl ml10" %> + <% end %> -
- <%=link_to "代码统计", stats_repository_project_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :creator => @creator, :default_branch => @g_default_branch ), :class => "fl vl_zip" %> -
-
- -
- <%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %> +
+ + + +
+
<%= render :partial => 'latest_commit' %>
diff --git a/public/stylesheets/css/gantt.css b/public/stylesheets/css/gantt.css index d0ab0e4f2..cf5090834 100644 --- a/public/stylesheets/css/gantt.css +++ b/public/stylesheets/css/gantt.css @@ -71,7 +71,7 @@ dt.project { background-image: url(/images/projects.png); } dt.time-entry { background-image: url(/images/time.png); } /***** Icons *****/ -.icon { +.old-icon { background-position: 0% 50%; background-repeat: no-repeat; font-family: '微软雅黑'; /*modify by men*/ @@ -97,7 +97,7 @@ dt.time-entry { background-image: url(/images/time.png); } .icon-save { background-image: url(/images/save.png); } .icon-cancel { background-image: url(/images/cancel.png); } .icon-multiple { background-image: url(/images/table_multiple.png); } -.icon-folder { background-image: url(/images/folder.png); } +.old-icon-folder { background-image: url(/images/folder.png); } .open .icon-folder { background-image: url(/images/folder_open.png); } .icon-package { background-image: url(/images/package.png); } .icon-user { background-image: url(/images/user.png); } @@ -126,24 +126,24 @@ dt.time-entry { background-image: url(/images/time.png); } .icon-passwd { background-image: url(/images/textfield_key.png); } .icon-test { background-image: url(/images/bullet_go.png); } -.icon-file { background-image: url(/images/files/default.png); } -.icon-file.text-plain { background-image: url(/images/files/text.png); } -.icon-file.text-x-c { background-image: url(/images/files/c.png); } -.icon-file.text-x-csharp { background-image: url(/images/files/csharp.png); } -.icon-file.text-x-java { background-image: url(/images/files/java.png); } -.icon-file.text-x-javascript { background-image: url(/images/files/js.png); } -.icon-file.text-x-php { background-image: url(/images/files/php.png); } -.icon-file.text-x-ruby { background-image: url(/images/files/ruby.png); } -.icon-file.text-xml { background-image: url(/images/files/xml.png); } -.icon-file.text-css { background-image: url(/images/files/css.png); } -.icon-file.text-html { background-image: url(/images/files/html.png); } -.icon-file.image-gif { background-image: url(/images/files/image.png); } -.icon-file.image-jpeg { background-image: url(/images/files/image.png); } -.icon-file.image-png { background-image: url(/images/files/image.png); } -.icon-file.image-tiff { background-image: url(/images/files/image.png); } -.icon-file.application-pdf { background-image: url(/images/files/pdf.png); } -.icon-file.application-zip { background-image: url(/images/files/zip.png); } -.icon-file.application-x-gzip { background-image: url(/images/files/zip.png); } +.old-icon-file { background-image: url(/images/files/default.png); } +.old-icon-file.text-plain { background-image: url(/images/files/text.png); } +.old-icon-file.text-x-c { background-image: url(/images/files/c.png); } +.old-icon-file.text-x-csharp { background-image: url(/images/files/csharp.png); } +.old-icon-file.text-x-java { background-image: url(/images/files/java.png); } +.old-icon-file.text-x-javascript { background-image: url(/images/files/js.png); } +.old-icon-file.text-x-php { background-image: url(/images/files/php.png); } +.old-icon-file.text-x-ruby { background-image: url(/images/files/ruby.png); } +.old-icon-file.text-xml { background-image: url(/images/files/xml.png); } +.old-icon-file.text-css { background-image: url(/images/files/css.png); } +.old-icon-file.text-html { background-image: url(/images/files/html.png); } +.old-icon-file.image-gif { background-image: url(/images/files/image.png); } +.old-icon-file.image-jpeg { background-image: url(/images/files/image.png); } +.old-icon-file.image-png { background-image: url(/images/files/image.png); } +.old-icon-file.image-tiff { background-image: url(/images/files/image.png); } +.old-icon-file.application-pdf { background-image: url(/images/files/pdf.png); } +.old-icon-file.application-zip { background-image: url(/images/files/zip.png); } +.old-icon-file.application-x-gzip { background-image: url(/images/files/zip.png); } img.gravatar { padding: 2px; diff --git a/public/stylesheets/css/project.css b/public/stylesheets/css/project.css index 2adcd0b4b..1779db81d 100644 --- a/public/stylesheets/css/project.css +++ b/public/stylesheets/css/project.css @@ -223,7 +223,7 @@ p.percent { float: left; white-space: nowrap; line-height: 1.4em; - padding-top: 5px; + /*padding-top: 5px;*/ font-size: 12px; } .repositorytitle select{ width: 110px; height: 21px; } @@ -1074,4 +1074,72 @@ a:hover.btn_newpro_grey,a:active.btn_newpro_grey{ background: #eaeaea;} .my_issues_form_filter{ position: absolute; top:0; right: 0;} .my_issues_form_filter select{ width:70px; height:30px; border:none; font-size:14px; border:none;border-right:none; color: #888; font-size: 12px; line-height: 30px; text-align:center} .my_issues_form_filter select.issues_filter_select_min{width:50px; } -.my_issues_form_filter select{appearance:none;-moz-appearance:none;-webkit-appearance:none;} \ No newline at end of file +.my_issues_form_filter select{appearance:none;-moz-appearance:none;-webkit-appearance:none;} + + +/* 版本库分析20170103byLB*/ +#conbox {font-size: 12px; width:100%;} +#tags {padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px; height: 30px} +#tags li { float: left; margin-right: 1px; height:30px;} +#tags li a {float:left; padding:5px 25px; display: block; text-align:center;border:1px solid #dbdbdb; border-bottom:none;-webkit-border-radius:3px;-moz-border-radius:3px;-o-border-radius:3px;border-radius:3px; background: #f2f2f2;font-size: 14px; } +#tags li.emptyTag {background: none transparent scroll repeat 0% 0%; width: 4px} +#tags li.selectTag {background-position: left top; margin-bottom: -2px; position: relative; height: 25px} +#tags li.selectTag a {background:#fff; color: #333; } +#tagContent {border: #ddd 1px solid; background-color: #fff;} +.tagContent {display: none; color: #474747; } +#tagContent div.selectTag {display: block} +a.pro_new_tabbtn{padding: 3px 10px; font-size: 12px;line-height: 20px; background-image: linear-gradient(#fcfcfc, #eee); border: 1px solid #d5d5d5;border-radius: 3px; color: #333;} +a.pro_new_tabbtn_act { background-image: linear-gradient(#666, #848484); color: #fff;} +.momalselect{border:1px solid #e5e5e5; height:30px; light-height:30px;} +.new_roadmap_table_nobg thead tr th{ border-bottom:1px solid #e5e5e5; font-weight: bold; color: #333;} +.new_roadmap_table_nobg tbody tr td{ line-height: normal;} +.sy_class_users_st img { width: 30px;height: 30px; border: 1px solid #fff; border-radius: 50px; } +a.sy_class_users_st_name { display: inline-block; width: 70px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden;} +.new-conbox{ width: 1000px; } +.icons-commit-list{ display: block; width: 15px; height: 15px; background: url(../images/new_project/icons-commint.png) 0px -1px no-repeat } +.icons-commit-list:hover,.icons-commit-list:active{background: url(../images/new_project/icons-commint.png) -33px -1px no-repeat } +.icons-commit-graph{ display: block; width: 18px; height: 15px; background: url(../images/new_project/icons-commint.png) 0 -31px no-repeat } +.icons-commit-graph:hover,.icons-commit-graph:active{background: url(../images/new_project/icons-commint.png) -33px -31px no-repeat } +.sonar-top{border-bottom:1px solid #e5e5e5; padding:10px; } +.sonar-con{ padding:15px; width: 968px; color: #666; line-height: 1.9;} +.sonar-con-left{ text-align: center;} +.sonar-con-top{margin:15px; width: 100%;} +.sonar-con-map{ margin:15px; margin-top:0; padding:15px; border:1px solid #e5e5e5; width: 938px;} +.level {display: inline-block;width: 80px; height: 24px; line-height: 24px;border-radius: 24px; box-sizing: border-box;color: #fff; text-align: center; text-shadow: 0 0 1px rgba(0,0,0,.35);} +.level-A{background-color: #00aa00;} +.level-B{background-color: #80cc00;} +.level-C{background-color: #ffee00; color: #333;} +.level-D{background-color: #f77700;} +.level-E {background-color: #ee0000;} +.level-OK {background-color: #85bb43;} +.level-ERROR {background-color: #d4333f;} +.level-box{ width:800px; margin:30px auto;} +.level-box li{ float: left; margin-right: 25px;} +.sonar-show-box{ width: 350px; height: 24px;} +.sonar-show-box span{ display:inline-block; height: 20px; color:#666; line-height: 20px; text-align: center;} +.sonar-25 { width: 25%;} +.sonar-35 { width: 35%;} +.sonar-40 { width: 40%;} +.sonar-bg-lgreen{ background:#eee;} +.sonar-bg-green{ background:#ddd;} +.sonar-bg-dgreen{ background:#ccc;} +.sonar-shuju-box{ width: 300px; padding:5px 0; border-left:1px solid #ddd; min-height: 118px;} +.t-c{ text-align:center;} +td.t-l{ text-align:left;} +td.t-r{ text-align:right;} +.sonar-shuju-table{ background: none; margin-left: 40px; margin-right: 40px;} +.sonar-shuju-table td{ width:100px;} +.fontGreen{ color:#85bb43;} +.pro-top-info{border:1px solid #eee; } +.pro-top-info li{ width:295px; padding:10px 15px; font-size: 14px; float: left; text-align: center;} +.pro-top-info li:hover{ background:#f2f2f2;} +a.btn_zipdown{ display:block; height:25px; width:80px; text-align: center; line-height: 25px; border: 1px solid #dddddd; background-image: linear-gradient(#FCFCFC, #EEE); + color: #7f7f7f; -webkit-border-radius:3px;-moz-border-radius:3px;-o-border-radius:3px;border-radius:3px; margin-left: 5px;} +a:hover.btn_zipdown{color:#269ac9;} +label.pro-fenzhi-label{ height:25px; line-height: 25px; border: 1px solid #dddddd; background-image: linear-gradient(#FCFCFC, #EEE);color: #7f7f7f;border-radius:3px; border-top-right-radius: 0; + border-bottom-right-radius: 0; display: inline-block; text-align: center; padding:0 15px; border-right: none;} +select.pro-fenzhi-select{ height: 27px; line-height: 27px; color: #666;} +input.pro-fenzhi-input { height: 25px; line-height: 25px; color: #666; width:300px;} +a.pro-fenzhi-a{height:25px; line-height: 25px; border: 1px solid #dddddd; background-image: linear-gradient(#FCFCFC, #EEE);color: #7f7f7f;border-radius:3px; border-top-left-radius: 0; + border-bottom-right-radius: 0; display: inline-block; text-align: center; padding:0 5px; border-left: none;} +a:hover.pro-fenzhi-a{color:#3b94d6;} \ No newline at end of file