Add booths to admin sidebar
This commit is contained in:
parent
835859e350
commit
834e9d96e4
4 changed files with 15 additions and 1 deletions
|
|
@ -90,6 +90,10 @@ module Admin
|
||||||
update_state(:cancel, 'Booth is canceled')
|
update_state(:cancel, 'Booth is canceled')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def confirm
|
||||||
|
update_state(:confirm, 'Booth successfully confirmed')
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def update_state(transition, notice)
|
def update_state(transition, notice)
|
||||||
|
|
|
||||||
|
|
@ -42,3 +42,8 @@
|
||||||
%li= link_to 'Cancel booth',
|
%li= link_to 'Cancel booth',
|
||||||
cancel_admin_conference_booth_path(@conference.short_title, booth),
|
cancel_admin_conference_booth_path(@conference.short_title, booth),
|
||||||
method: :patch, id: "cancel_booth_#{booth.id}"
|
method: :patch, id: "cancel_booth_#{booth.id}"
|
||||||
|
|
||||||
|
- if booth.transition_possible? :confirm
|
||||||
|
%li= link_to 'Confirm booth',
|
||||||
|
confirm_admin_conference_booth_path(@conference.short_title, booth),
|
||||||
|
method: :patch, id: "confirm_booth_#{booth.id}"
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,11 @@
|
||||||
- if can? :update, @conference.tickets.build
|
- if can? :update, @conference.tickets.build
|
||||||
%li{class: active_nav_li(admin_conference_tickets_path(@conference.short_title)) }
|
%li{class: active_nav_li(admin_conference_tickets_path(@conference.short_title)) }
|
||||||
= link_to 'Tickets', admin_conference_tickets_path(@conference.short_title)
|
= link_to 'Tickets', admin_conference_tickets_path(@conference.short_title)
|
||||||
|
- if can? :manage, @conference.booths
|
||||||
|
%li
|
||||||
|
= link_to admin_conference_booths_path(@conference.short_title) do
|
||||||
|
%span.fa.fa-shopping-bag
|
||||||
|
Booths
|
||||||
- if (can? :manage, @conference.targets.build) || (can? :manage, @conference.campaigns.build)
|
- if (can? :manage, @conference.targets.build) || (can? :manage, @conference.campaigns.build)
|
||||||
%li
|
%li
|
||||||
%a
|
%a
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,7 @@ Osem::Application.routes.draw do
|
||||||
patch :reset
|
patch :reset
|
||||||
patch :to_reject
|
patch :to_reject
|
||||||
patch :cancel
|
patch :cancel
|
||||||
|
patch :confirm
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue