Merge pull request #1026 from ChrisBr/csv_export

Implements csv export of registrations
This commit is contained in:
Henne Vogelsang 2016-06-02 15:46:17 +02:00
commit 2cc37290bc
2 changed files with 5 additions and 0 deletions

View file

@ -0,0 +1,4 @@
- headers = ['Name', 'Email']
= CSV.generate_line headers
- @registrations.each do |registration|
= CSV.generate_line([registration.name, registration.email])

View file

@ -6,6 +6,7 @@
= "(#{@registrations.length})" if @registrations
.btn-group.pull-right
- if can? :read, Registration
= link_to 'Export CSV', admin_conference_registrations_path(@conference.short_title, format: :csv), class: 'btn btn-success'
= link_to 'Export PDF', admin_conference_registrations_path(@conference.short_title, format: :pdf), class: 'btn btn-success'
= link_to 'Export XLS', {format: :xlsx}, class: 'btn btn-success'
%p.text-muted