diff --git a/app/views/repositories/_breadcrumbs.html.erb b/app/views/repositories/_breadcrumbs.html.erb index ce6719d62..84111afeb 100644 --- a/app/views/repositories/_breadcrumbs.html.erb +++ b/app/views/repositories/_breadcrumbs.html.erb @@ -2,10 +2,11 @@ <%= 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 => "repository-title-dec" %> / - <%=link_to @project.owner, user_path(@project.owner) %> + <%=link_to @project.owner, user_path(@project.owner), :class => "repository-title-dec" %> diff --git a/app/views/repositories/_navigation.html.erb b/app/views/repositories/_navigation.html.erb index 024fad34c..2fdf00cef 100644 --- a/app/views/repositories/_navigation.html.erb +++ b/app/views/repositories/_navigation.html.erb @@ -5,26 +5,28 @@ <%#= link_to l(:label_statistics), {:action => 'stats', :id => @project, :repository_id => @repository.identifier_param}, :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', :class => "fl c_grey02"}) do -%> + + <% if !@repository.branches.nil? && @repository.branches.length > 0 -%> + <%= l(:label_branch) %>: + <%= select_tag :branch, options_for_select([''] + @repository.branches, @rev), :id => 'branch' %> + <% end -%> -<%= 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', :class => "fl c_grey02 ml5"}) do -%> - - <% if !@repository.branches.nil? && @repository.branches.length > 0 -%> - <%= l(:label_branch) %>: - <%= select_tag :branch, options_for_select([''] + @repository.branches, @rev), :id => 'branch' %> - <% end -%> + <% if !@repository.tags.nil? && @repository.tags.length > 0 -%> + | <%= l(:label_tag) %>: + <%= select_tag :tag, options_for_select([''] + @repository.tags, @rev), :id => 'tag' %> + <% end -%> - <% if !@repository.tags.nil? && @repository.tags.length > 0 -%> - | <%= l(:label_tag) %>: - <%= select_tag :tag, options_for_select([''] + @repository.tags, @rev), :id => 'tag' %> - <% end -%> + <%# if @repository.supports_all_revisions? %> + <%#= l(:label_revision) %> + <%#= text_field_tag 'rev', @rev, :size => 8 %> + <%# end %> + <% end -%> +
- <%# if @repository.supports_all_revisions? %> - | <%#= l(:label_revision) %>: - <%#= text_field_tag 'rev', @rev, :size => 8 %> - <%# end %> -<% end -%> diff --git a/app/views/repositories/_summary.html.erb b/app/views/repositories/_summary.html.erb index 1527abf49..3bd86cd45 100644 --- a/app/views/repositories/_summary.html.erb +++ b/app/views/repositories/_summary.html.erb @@ -7,7 +7,7 @@ - <%=link_to @changesets.count, {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev}, :class => "num text-emphasized" %> + <%=link_to @changesets.count, {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev}, :class => "num text-emphasized c_blue" %> commits @@ -15,7 +15,7 @@
  • - + <%= @repository.branches.count %> branches @@ -24,7 +24,7 @@
  • - <%=link_to @repository.committers.count, committers_repository_path(@repository) %> + <%=link_to @repository.committers.count, committers_repository_path(@repository), :class => "c_blue" %> contributors
  • diff --git a/app/views/repositories/changes.html.erb b/app/views/repositories/changes.html.erb index 302c839ba..d3834bb41 100644 --- a/app/views/repositories/changes.html.erb +++ b/app/views/repositories/changes.html.erb @@ -1,16 +1,19 @@ <%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %> -
    - <%= render :partial => 'navigation' %> +
    +

    <%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %>

    -

    <%= render :partial => 'breadcrumbs', :locals => { :path => @path, :kind => (@entry ? @entry.kind : nil), :revision => @rev } %>

    +
    + <%= render :partial => 'navigation' %> +
    +
    <%= render :partial => 'link_to_functions' %> <%= render_properties(@properties) %> -
    +
    <%= render(:partial => 'revisions', :locals => {:project => @project, :path => @path, :revisions => @changesets, :entry => @entry }) unless @changesets.empty? %>
    diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index 65609afc5..80f9ec979 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -1,22 +1,16 @@ <%= call_hook(:view_repositories_show_contextual, {:repository => @repository, :project => @project}) %>
    -

    版本库

    +

    <%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %>

    -
    - <%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %> - <%= render :partial => 'navigation' %> -
    + <%= render :partial => 'navigation' %>
    -
    -

    - <% if @repository.type.to_s=="Repository::Gitlab" %> + <% if @repository.type.to_s=="Repository::Gitlab" %> <%= @repos_url %> - <% else %> + <% else %> <%= h @repository.url %> - <% end %> -

    + <% end %>
    @@ -32,7 +26,45 @@ <%= render_properties(@properties) %> +<% if authorize_for('repositories', 'revisions') %> + <%# if @changesets && !@changesets.empty? %> +

    + <%= l(:label_latest_revision_plural) %> +

    + <%= render :partial => 'revisions', + :locals => {:project => @project, :path => @path, + :revisions => @changesets, :entry => nil} %> + <%# end %> +

    + <% has_branches = (!@repository.branches.nil? && @repository.branches.length > 0) + sep = '' %> + <% if @repository.supports_all_revisions? && @path.blank? %> + <%= link_to l(:label_view_all_revisions), {:action => 'revisions', :id => @project, + :repository_id => @repository.identifier_param}, + :class => "orange_u_btn" %> + <% sep = '|' %> + <% end %> + <% if @repository.supports_directory_revisions? && (has_branches || !@path.blank? || !@rev.blank?) %> + <%= sep %> + <%= link_to l(:label_view_revisions), + {:action => 'changes', + :path => to_path_param(@path), + :id => @project, + :repository_id => @repository.identifier_param, + :rev => @rev}, + :class => "orange_u_btn" %> + <% end %> +

    + <% if @repository.supports_all_revisions? %> + <% content_for :header_tags do %> + <%= auto_discovery_link_tag( + :atom, params.merge( + {:format => 'atom', :action => 'revisions', + :id => @project, :page => nil, :key => User.current.rss_key})) %> + <% end %> + <% end %> +<% end %>

    点击查看如何提交代码

    diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index 27bb66bbb..f383835bc 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -13,6 +13,7 @@ a:hover.lg-foot{ color:#787b7e;} /*右侧内容--动态*/ .project_r_h{ width:670px; height:40px; background:#eaeaea; margin-bottom:10px;} .project_h2{ background:#64bdd9; color:#fff; height:33px; width:90px; text-align:center; font-weight:normal; padding-top:7px; font-size:16px;} +.project_h2_repository{ background:#64bdd9; color:#fff; height:33px; width:auto; text-align:center; font-weight:normal; padding-top:7px; font-size:16px;} .project_h22{ background:#64bdd9; color:#fff; height:33px; width:124px; text-align:center; font-weight:normal; padding-top:7px; font-size:16px;} .project_r_box{ border:1px solid #e2e1e1; width:670px; margin-top:10px;} .project_h3 { color:#646464; font-size:14px; padding:0 10px; border-bottom:1px solid #e2e1e1;} diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 45580e95e..b254569f0 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -104,6 +104,7 @@ h4{ font-size:14px; color:#3b3b3b;} .mt8{ margin-top:8px;} .mt10{ margin-top:10px !important;} .mt30{ margin-top: 30px;} +.mt40{ margin-top: 40px;} .mt12 { margin-top:12px !important;} .mt15 {margin-top:15px;} .mt19 {margin-top:19px !important;} @@ -115,6 +116,8 @@ h4{ font-size:14px; color:#3b3b3b;} .mb20{ margin-bottom:20px;} .pl15{ padding-left:15px;} .pt5{ padding-top:5px;} +.pt10{ padding-top:10px;} +.pb5{ padding-bottom: 5px;} .w20{ width:20px;} .w40{width: 40px;} .w45{ width: 45px;} diff --git a/public/stylesheets/repository.css b/public/stylesheets/repository.css index 432ad1d9a..1a542d579 100644 --- a/public/stylesheets/repository.css +++ b/public/stylesheets/repository.css @@ -3,10 +3,10 @@ overflow: hidden; font-size: 18px; font-weight: bold; - color: #444; text-overflow: ellipsis; vertical-align: top; white-space: nowrap; + padding: 0px 10px; } .overall-summary{ position: relative; @@ -32,6 +32,7 @@ display: table; width: 100%; table-layout: fixed; + margin-top: 9px; } .numbers-summary li{ display: table-cell; @@ -53,4 +54,31 @@ text-decoration: none; text-rendering: auto; -moz-user-select: none; +} +.select2-container { + margin: 0px; + position: relative; + display: inline-block; + vertical-align: middle; +} + +.select2-container .select2-choice { + display: block; + height: 26px; + padding: 0px 0px 0px 8px; + overflow: hidden; + position: relative; + border: 1px solid #AAA; + white-space: nowrap; + line-height: 26px; + color: #444; + text-decoration: none; + border-radius: 4px; + background-clip: padding-box; + -moz-user-select: none; + background-color: #FFF; + background-image: linear-gradient(to top, #EEE 0%, #FFF 50%); +} +.repository-title-dec{ + color: #fff !important; } \ No newline at end of file