This commit is contained in:
David Sedeño 2016-04-20 13:10:35 +00:00
commit e84903046d
3 changed files with 22 additions and 7 deletions

View file

@ -94,13 +94,23 @@
off_color: 'warning',
on_text: 'Yes',
off_text: 'No' }
- if @event.require_registration
%tr
%td
%b Registrations
%td
= @event.registrations.size
- if !@event.room.nil?
%tr
%td
%b Room
%td
= @event.room.name
%tr
%td
%b Room size
%td
= @event.room.size
- if !@event.start_time.nil?
%tr
%td

View file

@ -24,6 +24,8 @@
%b Speaker
%th
%b Pre-registration
%th
%b Registrations
%th
%b Highlight
%th
@ -90,7 +92,9 @@
off_color: 'warning',
on_text: 'Yes',
off_text: 'No' }
%td
- if event.require_registration
= event.registrations.size
%td{'data-order' => "#{event.is_highlight}"}
= check_box_tag @conference.short_title, event.id, event.is_highlight,
method: :patch, url: "/admin/conference/#{@conference.short_title}/program/events/#{event.id}?event[is_highlight]=",

View file

@ -21,11 +21,12 @@ describe 'admin/events/index' do
expect(rendered).to have_selector('table thead th:nth-of-type(3)', text: 'Submitter')
expect(rendered).to have_selector('table thead th:nth-of-type(4)', text: 'Speaker')
expect(rendered).to have_selector('table thead th:nth-of-type(5)', text: 'Pre-registration')
expect(rendered).to have_selector('table thead th:nth-of-type(6)', text: 'Highlight')
expect(rendered).to have_selector('table thead th:nth-of-type(7)', text: 'Type')
expect(rendered).to have_selector('table thead th:nth-of-type(8)', text: 'Track')
expect(rendered).to have_selector('table thead th:nth-of-type(9)', text: 'Difficulty')
expect(rendered).to have_selector('table thead th:nth-of-type(10)', text: 'State')
expect(rendered).to have_selector('table thead th:nth-of-type(6)', text: 'Registrations')
expect(rendered).to have_selector('table thead th:nth-of-type(7)', text: 'Highlight')
expect(rendered).to have_selector('table thead th:nth-of-type(8)', text: 'Type')
expect(rendered).to have_selector('table thead th:nth-of-type(9)', text: 'Track')
expect(rendered).to have_selector('table thead th:nth-of-type(10)', text: 'Difficulty')
expect(rendered).to have_selector('table thead th:nth-of-type(11)', text: 'State')
expect(conference.program.events.count).to eq 2
expect(rendered).to have_selector('table tr:nth-of-type(1) td:nth-of-type(1)', text: event1.id)