Display sponsor pages only if sponsorship levels are defined

This commit is contained in:
Nishanth Vijayan 2016-05-16 01:08:06 +05:30
parent 02487be6fb
commit e83b2c3a90
2 changed files with 8 additions and 1 deletions

View file

@ -107,7 +107,7 @@
- if can? :update, @conference.sponsorship_levels.build
%li{:class=> "#{active_nav_li(admin_conference_sponsorship_levels_path(@conference.short_title))}" }
= link_to 'Sponsorship Levels', admin_conference_sponsorship_levels_path(@conference.short_title)
- if can? :update, @conference.sponsors.build
- if !@conference.sponsorship_levels.empty? && @conference.sponsorship_levels.first.persisted? && (can? :update, @conference.sponsors.build)
%li{:class=> active_nav_li(admin_conference_sponsors_path(@conference.short_title))}
= link_to 'Sponsors', admin_conference_sponsors_path(@conference.short_title)
- if can? :update, @conference.tickets.build