From eb1f8acbd39f2b2cceb45d67f78b4c25a7c54e6e Mon Sep 17 00:00:00 2001 From: whimlex Date: Fri, 17 Apr 2015 11:14:55 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=BA=93=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/repositories/_breadcrumbs.html.erb | 13 +++++++------ app/views/repositories/_navigation.html.erb | 6 +++--- app/views/repositories/show.html.erb | 2 +- public/stylesheets/project.css | 14 ++++++++++++++ 4 files changed, 25 insertions(+), 10 deletions(-) diff --git a/app/views/repositories/_breadcrumbs.html.erb b/app/views/repositories/_breadcrumbs.html.erb index b4ffa4d87..780cb47cb 100644 --- a/app/views/repositories/_breadcrumbs.html.erb +++ b/app/views/repositories/_breadcrumbs.html.erb @@ -1,7 +1,8 @@ -<%= link_to(@repository.identifier.present? ? h(@repository.identifier) : 'root', - :action => 'show', :id => @project, +<%= link_to @repository.identifier.present? ? h(@repository.identifier) : 'root', + {:action => 'show', :id => @project, :repository_id => @repository.identifier_param, - :path => nil, :rev => @rev) %> + :path => nil, :rev => @rev }, + :class=>"fl c_blue f14 fb" %> <% dirs = path.split('/') if 'file' == kind @@ -14,7 +15,7 @@ link_path << "#{dir}" %> / <%= link_to h(dir), :action => 'show', :id => @project, :repository_id => @repository.identifier_param, - :path => to_path_param(link_path), :rev => @rev %> + :path => to_path_param(link_path), :rev => @rev %> <% end %> <% if filename %> / <%= link_to h(filename), @@ -24,8 +25,8 @@ <% # @rev is revsion or Git and Mercurial branch or tag. # For Mercurial *tip*, @rev and @changeset are nil. - rev_text = @changeset.nil? ? @rev : format_revision(@changeset) + rev_text = @changeset.nil? ? "master" : format_revision(@changeset) %> -<%= "@ #{h rev_text}" unless rev_text.blank? %> +

<%= "@ #{h rev_text}" unless rev_text.blank? %>

<% html_title(with_leading_slash(path)) -%> diff --git a/app/views/repositories/_navigation.html.erb b/app/views/repositories/_navigation.html.erb index d288cbe19..d8ce218eb 100644 --- a/app/views/repositories/_navigation.html.erb +++ b/app/views/repositories/_navigation.html.erb @@ -1,17 +1,17 @@ <% content_for :header_tags do %> <%= javascript_include_tag 'repository_navigation' %> <% end %> - + <%= link_to l(:label_statistics), {:action => 'stats', :id => @project, :repository_id => @repository.identifier_param}, - :class => 'icon icon-stats' if @repository.supports_all_revisions? %> + :class => 'mt3 c_blue fl' if @repository.supports_all_revisions? %> <%= form_tag({:action => controller.action_name, :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => nil}, - {:method => :get, :id => 'revision_selector'}) do -%> + {:method => :get, :id => 'revision_selector', :class => "fl c_grey02 ml5"}) do -%> <% if !@repository.branches.nil? && @repository.branches.length > 0 -%> | <%= l(:label_branch) %>: diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index e15820d96..5ddea4e60 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -3,7 +3,7 @@

版本库

-
+
<%= render :partial => 'breadcrumbs', :locals => { :path => @path, :kind => 'dir', :revision => @rev } %> <%= render :partial => 'navigation' %> diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index 2f08af6d6..9249130ee 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -139,6 +139,7 @@ a:hover.c_dblue{ color: #0781b4;} .c_dblue{ color:#3e6d8e;} .w90{width:90px;} .ml10{margin-left:10px;} +.ml20{margin-left:20px;} .resource{ width:670px;} .re_top{width:660px; height:40px; background:#eaeaea; padding:5px;} .re_top input{ float:left;} @@ -446,6 +447,8 @@ img.ui-datepicker-trigger { .repos_files ul li{ float:left; padding-left:10px; height:26px;} .repos_files ul:hover{ background:#ffffdd;} .repos_t_c li{ text-align:center;} +.pic_stats{display:block; background:url(../images/public_icon.png) 0px -548px no-repeat; width:20px; height:15px;} + /* 里程碑 */ .roadmap_box{ background:#f8f8f8; width:648px; padding:10px; margin-top:5px; border:1px solid #ddd; color:#555;} @@ -511,6 +514,17 @@ p.percent { font-size: 0.9em; } +.repositorytitle { + float: left; + white-space: nowrap; + line-height: 1.4em; + padding-top: 5px; + font-size: 12px; +} +.repositorytitle select{ width: 110px; height: 21px; } + + + /*导出*/ a.atom { background: url(../images/feed.png) no-repeat 1px 50%; padding: 2px 0px 3px 16px; } p.other-formats { text-align: right; font-size:0.9em; color: #666; } From c2c9660a46abcb5b95abbf58c7009cfe784c017d Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 17 Apr 2015 11:15:27 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=BE=97=E5=88=86?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/projects/_project_score_index.html.erb | 2 +- app/views/projects/_show_projects_score.html.erb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/projects/_project_score_index.html.erb b/app/views/projects/_project_score_index.html.erb index 7a3022f44..f10c6b3e7 100644 --- a/app/views/projects/_project_score_index.html.erb +++ b/app/views/projects/_project_score_index.html.erb @@ -1,6 +1,6 @@ -<%= l(:label_projects_score) %> +
<%= l(:label_projects_score) %>
= <%= l(:label_issue_score) %> + <%= l(:label_news_score) %> + <%= l(:label_file_score) %> + <%= l(:label_code_submit_score) %> + <%= l(:label_topic_score) %>
= <%= format("%.2f" , issue_score(project)).to_i %> + <%= format("%.2f" , news_score(project)).to_i %> + diff --git a/app/views/projects/_show_projects_score.html.erb b/app/views/projects/_show_projects_score.html.erb index 57af1f138..68ba2f12a 100644 --- a/app/views/projects/_show_projects_score.html.erb +++ b/app/views/projects/_show_projects_score.html.erb @@ -4,16 +4,16 @@
- + From 0607cf326c6aaefec999ada5efbc2ff018b0dfa1 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 17 Apr 2015 11:42:23 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=BA=93=E9=87=8C?= =?UTF-8?q?=E9=9D=A2=E9=A1=B5=E9=9D=A2=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/repositories/revisions.html.erb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/repositories/revisions.html.erb b/app/views/repositories/revisions.html.erb index 184674637..b1b69d624 100644 --- a/app/views/repositories/revisions.html.erb +++ b/app/views/repositories/revisions.html.erb @@ -1,7 +1,8 @@

<%= l(:label_repository_plural) %>

-
+
+

<%= l(:label_revision_plural) %>

<%= form_tag( {:controller => 'repositories', :action => 'revision', :id => @project, :repository_id => @repository.identifier_param}, @@ -12,7 +13,7 @@ <% end %>
-

<%= l(:label_revision_plural) %>

+ <%= render :partial => 'revisions', :locals => {:project => @project,
<%= image_tag(url_to_avatar(@project), :class => 'avatar2') %> - +
<%= @project.name %>
<%= @project.name %>
- +
<%= l(:label_projects_score) %>
<%= l(:label_projects_score) %>
<%= format("%.2f" , project_scores(@project) ).to_i %>