diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 891b533d6..b613cf489 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -477,6 +477,9 @@ update end def entry + # 顶部导航 + @project_menu_type = 5 + entry_and_raw(false) @content = @repository.cat(@path, @rev) @changesets_latest_coimmit = @g.commit(@project.gpid, @entry.try(:lastrev)) diff --git a/app/views/repositories/_top.html.erb b/app/views/repositories/_top.html.erb new file mode 100644 index 000000000..bc26ba2b0 --- /dev/null +++ b/app/views/repositories/_top.html.erb @@ -0,0 +1,5 @@ +

+
+ <%=link_to @project.owner, user_path(@project.owner), :class => "repository-title-dec" %> / <%= link_to @project.name, project_path(@project), :class => "repository-title-dec" %> +

+
\ No newline at end of file diff --git a/app/views/repositories/changes.html.erb b/app/views/repositories/changes.html.erb index 94abb04e5..de33f0469 100644 --- a/app/views/repositories/changes.html.erb +++ b/app/views/repositories/changes.html.erb @@ -1,26 +1,26 @@ <%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
-
-

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

-
+
+ <%= render :partial => "top" %> +
-
- <%= render :partial => 'navigation' %> -
-
- - <%= render :partial => 'link_to_functions' %> - - <%= render_properties(@properties) %> - -
- <%= render(:partial => 'revisions', :locals => {:project => @project, :path => @path , :revisions => @commits, :entry => @entry , :commits_pages => @commits_pages , :commits_count => @commits_count}) unless @commits.empty? %> -
+
+ <%= render :partial => 'navigation' %>
+
- <% content_for :header_tags do %> - <%= stylesheet_link_tag "scm" %> - <% end %> + <%#= render :partial => 'link_to_functions' %> - <% html_title(l(:label_change_plural)) -%> + <%= render_properties(@properties) %> + +
+ <%= render(:partial => 'revisions', :locals => {:project => @project, :path => @path , :revisions => @commits, :entry => @entry , :commits_pages => @commits_pages , :commits_count => @commits_count}) unless @commits.empty? %> +
+
+ + <% content_for :header_tags do %> + <%= stylesheet_link_tag "scm" %> + <% end %> + + <% html_title(l(:label_change_plural)) -%>
\ No newline at end of file diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index cf6ee0dc8..282df48c3 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -1,11 +1,7 @@ <%#= call_hook(:view_repositories_show_contextual, {:repository => @repository, :project => @project}) %>
-

-
- <%=link_to @project.owner, user_path(@project.owner), :class => "repository-title-dec" %> / <%= link_to @project.name, project_path(@project), :class => "repository-title-dec" %> -

-
+ <%= render :partial => "top" %>
<% if @entries.nil? %>