mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Add booths to non admin
This commit is contained in:
parent
033dbe4c40
commit
32c5af2a17
22 changed files with 426 additions and 86 deletions
|
|
@ -7,9 +7,13 @@ module Admin
|
|||
|
||||
def show; end
|
||||
|
||||
def new; end
|
||||
def new
|
||||
@url = admin_conference_booths_path(@conference.short_title)
|
||||
end
|
||||
|
||||
def create
|
||||
@url = admin_conference_booths_path(@conference.short_title)
|
||||
|
||||
@booth = @conference.booths.new(booth_params)
|
||||
|
||||
@booth.submitter = current_user
|
||||
|
|
@ -23,9 +27,13 @@ module Admin
|
|||
end
|
||||
end
|
||||
|
||||
def edit; end
|
||||
def edit
|
||||
@url = admin_conference_booth_path(@conference.short_title, @booth.id)
|
||||
end
|
||||
|
||||
def update
|
||||
@url = admin_conference_booth_path(@conference.short_title, @booth.id)
|
||||
|
||||
@booth.update_attributes(booth_params)
|
||||
|
||||
if @booth.save
|
||||
|
|
@ -38,16 +46,6 @@ module Admin
|
|||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
if @booth.destroy
|
||||
redirect_to admin_conference_booths_path,
|
||||
notice: 'Booth successfully destroyed.'
|
||||
else
|
||||
redirect_to admin_conference_booths_path,
|
||||
error: "Booth couldn't be deleted. #{@booth.errors.full_messages.join('. ')}."
|
||||
end
|
||||
end
|
||||
|
||||
def accept
|
||||
update_state(:accept, 'Booth accepted!')
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue