Add index view for the cfp and modify existing ones

Add cfp_type to the form partial
Refactor Cfps#show to use partials for the different cfp types
Modify the rest of the view, where the cfp was used
This commit is contained in:
AEtherC0r3 2017-05-31 21:03:15 +03:00 committed by Stella Rouzi
parent c3eb178546
commit 2bff918556
10 changed files with 107 additions and 67 deletions

View file

@ -67,8 +67,8 @@
- if @conference.program
%ul
- if can? :update, Cfp.new(program_id: @conference.program.id)
%li{class: active_nav_li(admin_conference_program_cfp_path(@conference.short_title))}
= link_to 'Call for Papers', admin_conference_program_cfp_path(@conference.short_title)
%li{class: active_nav_li(admin_conference_program_cfps_path(@conference.short_title))}
= link_to 'Call for Papers', admin_conference_program_cfps_path(@conference.short_title)
- if can? :update, @conference.program.events.build
%li{class: active_nav_li(admin_conference_program_events_path(@conference.short_title))}
= link_to 'Events', admin_conference_program_events_path(@conference.short_title)