app/controllers/contract_controller.rb
# Adds a new contract and redirects to the contract editor - this happens
# via get / post 
Adds a new contract and redirects to the contract editor - this happens
via get / post
Adds a new contract and redirects to the contract editor - this happens via get / post
def new
    clear_contract
    set_meta :tab2=>:new
		privs = Contract.privileges(@user)
		if privs[:create] == false
			redir_error(TinyException::NOPRIVILEGES, @user)
			return
		end
		@contract = Contract.new :term => Setting.new_contract_term_default
  end
def new clear_contract set_meta :tab2 => :new privs = Contract . privileges ( @user ) if privs [ :create ] == false redir_error ( TinyException :: NOPRIVILEGES , @user ) return end @contract = Contract . new :term => Setting . new_contract_term_default end
Adds a new contract and redirects to the contract editor - this happens
via get / post
Adds a new contract and redirects to the contract editor - this happens via get / post
# clear the contract instance in the controller and in the session # check for create privileges # find the first "semester" term with nearest credit date as default term