Project

General

Profile

Feature #5328 ยป repo_menu.diff

Jean-Baptiste Barth, 2010-04-15 19:02

View differences:

app/controllers/repositories_controller.rb
24 24

  
25 25
class RepositoriesController < ApplicationController
26 26
  menu_item :repository
27
  menu_item :settings, :only => :edit
27 28
  default_search_scope :changesets
28 29
  
29 30
  before_filter :find_repository, :except => :edit
......
43 44
      @repository.attributes = params[:repository]
44 45
      @repository.save
45 46
    end
46
    render(:update) {|page| page.replace_html "tab-content-repository", :partial => 'projects/settings/repository'}
47
    render(:update) do |page|
48
      page.replace_html "tab-content-repository", :partial => 'projects/settings/repository'
49
      if @repository && !@project.repository
50
        @project.reload #needed to reload association
51
        page.replace_html "main-menu", render_main_menu(@project)
52
      end
53
    end
47 54
  end
48 55
  
49 56
  def committers
    (1-1/1)