修复两个导航栏丢失问题、版本库=》查看差别,没有对应的文件或修订版本时报错问题

This commit is contained in:
z9hang 2014-08-06 15:03:43 +08:00
parent 05186c8590
commit 0eca547ec5
3 changed files with 12 additions and 1 deletions

View File

@ -206,8 +206,15 @@ class RepositoriesController < ApplicationController
@repository.committer_ids = params[:committers].values.inject({}) {|h, c| h[c.first] = c.last; h}
flash[:notice] = l(:notice_successful_update)
redirect_to settings_project_path(@project, :tab => 'repositories')
elsif request.get?
respond_to do |format|
format.html{
render :layout => "project_base"
}
end
end
end
def destroy
@ -414,7 +421,10 @@ class RepositoriesController < ApplicationController
Digest::MD5.hexdigest("#{@path}-#{@rev}-#{@rev_to}-#{@diff_type}-#{current_language}")
unless read_fragment(@cache_key)
@diff = @repository.diff(@path, @rev, @rev_to)
show_error_not_found unless @diff
unless @diff
show_error_not_found
return
end
end
@changeset = @repository.find_changeset_by_name(@rev)

View File

View File

@ -16,6 +16,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class CodeReviewController < ApplicationController
layout "project_base"
unloadable
before_filter :find_project, :authorize, :find_user, :find_setting, :find_repository