diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-08-17 14:26:13 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-08-17 14:26:13 +0000 |
commit | a4d7a03b142889510c910cfb983a818f61653c11 (patch) | |
tree | 3cf877dde3d246a4961bdfbf1da4f03af4d0c287 | |
parent | 6fb80efdae9a748e5a87ebe0e8608135e6ba4ccd (diff) | |
download | redmine-a4d7a03b142889510c910cfb983a818f61653c11.tar.gz redmine-a4d7a03b142889510c910cfb983a818f61653c11.zip |
SCM browser:
* don't show repository commits when showing a subfolder
* remove obsolete view browse.rhtml
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2843 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/controllers/repositories_controller.rb | 10 | ||||
-rw-r--r-- | app/views/repositories/browse.rhtml | 12 | ||||
-rw-r--r-- | app/views/repositories/show.rhtml | 4 |
3 files changed, 9 insertions, 17 deletions
diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index bddaa77d8..d5e1352a1 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -1,5 +1,5 @@ -# redMine - project management software -# Copyright (C) 2006-2007 Jean-Philippe Lang +# Redmine - project management software +# Copyright (C) 2006-2009 Jean-Philippe Lang # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -72,7 +72,9 @@ class RepositoriesController < ApplicationController @entries ? render(:partial => 'dir_list_content') : render(:nothing => true) else show_error_not_found and return unless @entries - @changesets = @repository.latest_changesets(@path, @rev) + if @path.blank? + @changesets = @repository.latest_changesets(@path, @rev) + end @properties = @repository.properties(@path, @rev) render :action => 'show' end @@ -108,7 +110,7 @@ class RepositoriesController < ApplicationController show_error_not_found and return unless @entry # If the entry is a dir, show the browser - browse and return if @entry.is_dir? + show and return if @entry.is_dir? @content = @repository.cat(@path, @rev) show_error_not_found and return unless @content diff --git a/app/views/repositories/browse.rhtml b/app/views/repositories/browse.rhtml deleted file mode 100644 index fc769aa22..000000000 --- a/app/views/repositories/browse.rhtml +++ /dev/null @@ -1,12 +0,0 @@ -<div class="contextual"> -<%= render :partial => 'navigation' %> -</div> - -<h2><%= render :partial => 'breadcrumbs', :locals => { :path => @path, :kind => 'dir', :revision => @rev } %></h2> - -<%= render :partial => 'dir_list' %> -<%= render_properties(@properties) %> - -<% content_for :header_tags do %> -<%= stylesheet_link_tag "scm" %> -<% end %> diff --git a/app/views/repositories/show.rhtml b/app/views/repositories/show.rhtml index aae6571f0..a3057ddaa 100644 --- a/app/views/repositories/show.rhtml +++ b/app/views/repositories/show.rhtml @@ -10,7 +10,9 @@ <%= render :partial => 'dir_list' %> <% end %> -<% if !@changesets.empty? && authorize_for('repositories', 'revisions') %> +<%= render_properties(@properties) %> + +<% if @changesets && !@changesets.empty? && authorize_for('repositories', 'revisions') %> <h3><%= l(:label_latest_revision_plural) %></h3> <%= render :partial => 'revisions', :locals => {:project => @project, :path => '', :revisions => @changesets, :entry => nil }%> <p><%= link_to l(:label_view_all_revisions), :action => 'revisions', :id => @project %></p> |