mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Venue has show action, not index. Make the ability to schedule an Event more clear.
This commit is contained in:
parent
24f0625be1
commit
8ffa8b1e86
4 changed files with 11 additions and 14 deletions
|
|
@ -154,7 +154,7 @@ class Ability
|
|||
can :manage, DifficultyLevel, conference_id: conf_ids_for_cfp
|
||||
can :manage, EmailSettings, conference_id: conf_ids_for_cfp
|
||||
can :manage, Room, conference_id: conf_ids_for_cfp
|
||||
can :index, Venue, conference_id: conf_ids_for_cfp
|
||||
can :show, Venue, conference_id: conf_ids_for_cfp
|
||||
can :manage, CallForPaper, conference_id: conf_ids_for_cfp
|
||||
can :manage, Commercial, commercialable_type: 'Event',
|
||||
commercialable_id: Event.where(conference_id: conf_ids_for_cfp).pluck(:id)
|
||||
|
|
|
|||
|
|
@ -20,12 +20,9 @@
|
|||
= @venue.country_name
|
||||
.row
|
||||
.col-md-12
|
||||
= link_to(edit_admin_conference_venue_path(@conference.short_title), class: 'btn btn-primary') do
|
||||
Edit Venue
|
||||
= link_to(admin_conference_venue_path(@conference.short_title), method: 'delete', class: 'btn btn-danger') do
|
||||
Delete Venue
|
||||
= link_to 'Edit Venue', edit_admin_conference_venue_path(@conference.short_title), class: 'btn btn-primary', disabled: !(can? :edit, @conference.venue)
|
||||
= link_to 'Delete Venue', admin_conference_venue_path(@conference.short_title), method: 'delete', class: 'btn btn-danger', disabled: !(can? :edit, @conference.venue)
|
||||
-else
|
||||
.row
|
||||
.col-md-12.text-right
|
||||
= link_to(new_admin_conference_venue_path(@conference.short_title), class: 'btn btn-primary') do
|
||||
Create Venue
|
||||
= link_to 'Create Venue', new_admin_conference_venue_path(@conference.short_title), class: 'btn btn-primary', disabled: !(can? :edit, @conference.venue)
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
- if can? :update, @conference
|
||||
%li{:class=> active_nav_li(edit_admin_conference_splashpage_path(@conference.short_title))}
|
||||
= link_to 'Splashpage', admin_conference_splashpage_path(@conference.short_title)
|
||||
- if can? :index, Venue.new(conference_id: @conference.id)
|
||||
- if can? :show, Venue.new(conference_id: @conference.id)
|
||||
%li{:class=> "#{active_nav_li(admin_conference_venue_path(@conference.short_title))}"}
|
||||
= link_to(admin_conference_venue_path(@conference.short_title)) do
|
||||
%span.fa.fa-road
|
||||
|
|
@ -59,14 +59,14 @@
|
|||
- if can? :update, @conference.lodgings.build
|
||||
%li{ class: active_nav_li(admin_conference_lodgings_path(@conference.short_title)) }
|
||||
= link_to 'Lodgings', admin_conference_lodgings_path(@conference.short_title)
|
||||
- if can? :update, @conference.events.build
|
||||
%li
|
||||
%a
|
||||
%span.fa.fa-calendar
|
||||
Program
|
||||
%ul
|
||||
- if can? :update, @conference.events.build
|
||||
%li{:class=> active_nav_li(admin_conference_events_path(@conference.short_title))}
|
||||
= link_to 'Events', admin_conference_events_path(@conference.short_title)
|
||||
%li{:class=> active_nav_li(admin_conference_events_path(@conference.short_title))}
|
||||
= link_to 'Events', admin_conference_events_path(@conference.short_title)
|
||||
- if can? :update, CallForPaper.new(conference_id: @conference.id)
|
||||
%li{:class=> "#{active_nav_li(admin_conference_call_for_paper_path(@conference.short_title))}"}
|
||||
= link_to 'Call for Papers', admin_conference_call_for_paper_path(@conference.short_title)
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ describe 'User' do
|
|||
it{ should be_able_to(:manage, my_conference.call_for_paper) }
|
||||
it{ should_not be_able_to(:manage, conference_public.call_for_paper) }
|
||||
it{ should_not be_able_to(:manage, my_conference.venue) }
|
||||
it{ should be_able_to(:index, my_conference.venue) }
|
||||
it{ should be_able_to(:show, my_conference.venue) }
|
||||
it{ should_not be_able_to(:manage, conference_public.venue) }
|
||||
it{ should_not be_able_to(:manage, my_conference.lodgings.first) }
|
||||
it{ should_not be_able_to(:manage, conference_public.lodgings.first) }
|
||||
|
|
@ -235,7 +235,7 @@ describe 'User' do
|
|||
it{ should_not be_able_to(:manage, my_conference.call_for_paper) }
|
||||
it{ should_not be_able_to(:manage, conference_public.call_for_paper) }
|
||||
it{ should_not be_able_to(:manage, my_conference.venue) }
|
||||
it{ should_not be_able_to(:index, my_conference.venue) }
|
||||
it{ should_not be_able_to(:show, my_conference.venue) }
|
||||
it{ should_not be_able_to(:manage, conference_public.venue) }
|
||||
it{ should_not be_able_to(:manage, my_conference.lodgings.first) }
|
||||
it{ should_not be_able_to(:manage, conference_public.lodgings.first) }
|
||||
|
|
@ -294,7 +294,7 @@ describe 'User' do
|
|||
it{ should_not be_able_to(:manage, my_conference.call_for_paper) }
|
||||
it{ should_not be_able_to(:manage, conference_public.call_for_paper) }
|
||||
it{ should_not be_able_to(:manage, my_conference.venue) }
|
||||
it{ should_not be_able_to(:index, my_conference.venue) }
|
||||
it{ should_not be_able_to(:show, my_conference.venue) }
|
||||
it{ should_not be_able_to(:manage, conference_public.venue) }
|
||||
it{ should_not be_able_to(:manage, my_conference.lodgings.first) }
|
||||
it{ should_not be_able_to(:manage, conference_public.lodgings.first) }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue