Merge pull request #716 from differentreality/abilities
Abilities: Minor changes & grooming
This commit is contained in:
commit
57610eb39e
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, DifficultyLevel, conference_id: conf_ids_for_cfp
|
||||||
can :manage, EmailSettings, 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 :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, CallForPaper, conference_id: conf_ids_for_cfp
|
||||||
can :manage, Commercial, commercialable_type: 'Event',
|
can :manage, Commercial, commercialable_type: 'Event',
|
||||||
commercialable_id: Event.where(conference_id: conf_ids_for_cfp).pluck(:id)
|
commercialable_id: Event.where(conference_id: conf_ids_for_cfp).pluck(:id)
|
||||||
|
|
|
||||||
|
|
@ -20,12 +20,9 @@
|
||||||
= @venue.country_name
|
= @venue.country_name
|
||||||
.row
|
.row
|
||||||
.col-md-12
|
.col-md-12
|
||||||
= link_to(edit_admin_conference_venue_path(@conference.short_title), class: 'btn btn-primary') do
|
= link_to 'Edit Venue', edit_admin_conference_venue_path(@conference.short_title), class: 'btn btn-primary', disabled: !(can? :edit, @conference.venue)
|
||||||
Edit Venue
|
= link_to 'Delete Venue', admin_conference_venue_path(@conference.short_title), method: 'delete', class: 'btn btn-danger', disabled: !(can? :edit, @conference.venue)
|
||||||
= link_to(admin_conference_venue_path(@conference.short_title), method: 'delete', class: 'btn btn-danger') do
|
|
||||||
Delete Venue
|
|
||||||
-else
|
-else
|
||||||
.row
|
.row
|
||||||
.col-md-12.text-right
|
.col-md-12.text-right
|
||||||
= link_to(new_admin_conference_venue_path(@conference.short_title), class: 'btn btn-primary') do
|
= link_to 'Create Venue', new_admin_conference_venue_path(@conference.short_title), class: 'btn btn-primary', disabled: !(can? :edit, @conference.venue)
|
||||||
Create Venue
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
- if can? :update, @conference
|
- if can? :update, @conference
|
||||||
%li{:class=> active_nav_li(edit_admin_conference_splashpage_path(@conference.short_title))}
|
%li{:class=> active_nav_li(edit_admin_conference_splashpage_path(@conference.short_title))}
|
||||||
= link_to 'Splashpage', 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))}"}
|
%li{:class=> "#{active_nav_li(admin_conference_venue_path(@conference.short_title))}"}
|
||||||
= link_to(admin_conference_venue_path(@conference.short_title)) do
|
= link_to(admin_conference_venue_path(@conference.short_title)) do
|
||||||
%span.fa.fa-road
|
%span.fa.fa-road
|
||||||
|
|
@ -59,14 +59,14 @@
|
||||||
- if can? :update, @conference.lodgings.build
|
- if can? :update, @conference.lodgings.build
|
||||||
%li{ class: active_nav_li(admin_conference_lodgings_path(@conference.short_title)) }
|
%li{ class: active_nav_li(admin_conference_lodgings_path(@conference.short_title)) }
|
||||||
= link_to 'Lodgings', admin_conference_lodgings_path(@conference.short_title)
|
= link_to 'Lodgings', admin_conference_lodgings_path(@conference.short_title)
|
||||||
|
- if can? :update, @conference.events.build
|
||||||
%li
|
%li
|
||||||
%a
|
%a
|
||||||
%span.fa.fa-calendar
|
%span.fa.fa-calendar
|
||||||
Program
|
Program
|
||||||
%ul
|
%ul
|
||||||
- if can? :update, @conference.events.build
|
%li{:class=> active_nav_li(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)
|
||||||
= link_to 'Events', admin_conference_events_path(@conference.short_title)
|
|
||||||
- if can? :update, CallForPaper.new(conference_id: @conference.id)
|
- if can? :update, CallForPaper.new(conference_id: @conference.id)
|
||||||
%li{:class=> "#{active_nav_li(admin_conference_call_for_paper_path(@conference.short_title))}"}
|
%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)
|
= 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 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, conference_public.call_for_paper) }
|
||||||
it{ should_not be_able_to(:manage, my_conference.venue) }
|
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, conference_public.venue) }
|
||||||
it{ should_not be_able_to(:manage, my_conference.lodgings.first) }
|
it{ should_not be_able_to(:manage, my_conference.lodgings.first) }
|
||||||
it{ should_not be_able_to(:manage, conference_public.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, my_conference.call_for_paper) }
|
||||||
it{ should_not be_able_to(:manage, conference_public.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(: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, conference_public.venue) }
|
||||||
it{ should_not be_able_to(:manage, my_conference.lodgings.first) }
|
it{ should_not be_able_to(:manage, my_conference.lodgings.first) }
|
||||||
it{ should_not be_able_to(:manage, conference_public.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, my_conference.call_for_paper) }
|
||||||
it{ should_not be_able_to(:manage, conference_public.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(: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, conference_public.venue) }
|
||||||
it{ should_not be_able_to(:manage, my_conference.lodgings.first) }
|
it{ should_not be_able_to(:manage, my_conference.lodgings.first) }
|
||||||
it{ should_not be_able_to(:manage, conference_public.lodgings.first) }
|
it{ should_not be_able_to(:manage, conference_public.lodgings.first) }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue