osem-fcy/app/views/admin/cfps/index.html.haml
2018-12-19 13:18:24 -08:00

47 lines
1.5 KiB
Text

.row
.col-md-12
.page-header
%h1 Call for Papers
%p.text-muted
Call for people to submit events to your conference
- if @program.cfps
.row
.col-md-12
%table.table.table-hover#tickets
%thead
%th Type
%th Start Date
%th End Date
%th Description
%th Days Left
%th Actions
%tbody
- @program.cfps.each do |cfp|
%tr
%td
= link_to cfp.cfp_type.capitalize,
admin_conference_program_cfp_path(@conference, cfp)
%td
= cfp.start_date.strftime('%A, %B %-d. %Y')
%td
= cfp.end_date.strftime('%A, %B %-d. %Y')
%td
%p
= truncate(cfp.description)
%td
= pluralize(cfp.remaining_days, 'day')
%td
.btn-group
= link_to 'Edit',
edit_admin_conference_program_cfp_path(@conference, cfp),
method: :get, class: 'btn btn-primary'
= link_to 'Delete',
admin_conference_program_cfp_path(@conference, cfp),
method: 'delete', class: 'btn btn-danger',
data: { confirm: 'Are you sure?' }
- if can? :new, @program.cfps.new
.row
.col-md-12.text-right
= link_to 'Create Call for Papers',
new_admin_conference_program_cfp_path(@conference),
class: 'btn btn-primary'