First checkin

This commit is contained in:
Matt Barringer 2013-01-07 09:04:09 +01:00
parent f207e2c8b7
commit 90b30db9e8
260 changed files with 37349 additions and 0 deletions

View file

@ -0,0 +1,48 @@
.row-fluid
.span12
.pull-right{:style=>"margin-top:20px; margin-bottom:20px;"}
= link_to "Export PDF", admin_conference_registrations_path(@conference.short_title, :format => :pdf), :class => "btn btn-success"
.row-fluid
.span12
%table.table.table-striped.table-bordered.table-hover
%thead
%th
%b Last Name
%th
%b First Name
%th
%b Public Name
%th
%b Email
%th
%b Attending Social Events
%th
%b Attending With Partner
%th
%b Arrival Date
%th
%b Departure Date
%th
%th
- @registrations.each do |registration|
%tr
%td
= registration.last_name
%td
= registration.first_name
%td
= registration.public_name
%td
= registration.email
%td
= registration.attending_social_events
%td
= registration.attending_social_events_with_partner
%td
= registration.arrival
%td
= registration.departure
%td
= link_to "Edit", "#", :class => "btn btn-primary"
%td
= link_to "Delete", "#", :class => "btn btn-danger", :confirm => "Really delete registration for #{registration.public_name}?"

View file

@ -0,0 +1,38 @@
prawn_document(:force_download=>true, :filename => @pdf_filename) do |pdf|
table_array = []
header_array = [" ",
"Last Name",
"First Name",
"Public Name",
"Email",
"Attending Social Events",
"Attending With Partner",
"Arrival Date",
"Departure Date"]
table_array << header_array
@registrations.each do |registration|
row = []
row << ""
row << registration.last_name
row << registration.first_name
row << registration.public_name
row << registration.email
if registration.attending_social_events
row << "X"
else
row << " "
end
if registration.attending_social_events_with_partner.to_s
row << "X"
else
row << " "
end
row << registration.arrival
row << registration.departure
table_array << row
end
pdf.text "#{@conference.title} Registrations", :font_size => 25
pdf.table table_array, :header => true, :cell_style => {:size => 5, :border_width => 1}
end