mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
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')
|
||||
end
|
||||
|
||||
def confirm
|
||||
update_state(:confirm, 'Booth successfully confirmed')
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def update_state(transition, notice)
|
||||
|
|
|
|||
|
|
@ -42,3 +42,8 @@
|
|||
%li= link_to 'Cancel booth',
|
||||
cancel_admin_conference_booth_path(@conference.short_title, booth),
|
||||
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
|
||||
%li{class: active_nav_li(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)
|
||||
%li
|
||||
%a
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ Osem::Application.routes.draw do
|
|||
patch :reset
|
||||
patch :to_reject
|
||||
patch :cancel
|
||||
patch :confirm
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue