From eb1f8acbd39f2b2cceb45d67f78b4c25a7c54e6e Mon Sep 17 00:00:00 2001 From: whimlex Date: Fri, 17 Apr 2015 11:14:55 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=BA=93=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=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; }