User/Person models merge
This commit is contained in:
parent
66b84e3660
commit
23bf55b66c
80 changed files with 1064 additions and 1221 deletions
|
|
@ -1,19 +1,15 @@
|
|||
.row
|
||||
.col-md-12
|
||||
%h3
|
||||
Edit registration of #{@person.public_name} (#{@person.email}) for #{@conference.title}
|
||||
Edit registration of #{@user.name} (#{@user.email}) for #{@conference.title}
|
||||
%br
|
||||
.row
|
||||
.col-md-12
|
||||
= semantic_form_for(@registration, :url => admin_conference_registration_path(@conference.short_title, @registration)) do |f|
|
||||
= f.inputs "Personal Information" do
|
||||
= f.fields_for :person do |p|
|
||||
= p.input :first_name, :as => :string
|
||||
= p.input :last_name, :as => :string
|
||||
= p.label :Nickname, :as => :string
|
||||
= p.text_field :irc_nickname, :as => :string
|
||||
= p.label :Affiliation
|
||||
= p.text_field :company, :placeholder => "Company/User Group/nothing", :as => :string
|
||||
= f.fields_for :user do |u|
|
||||
= u.input :nickname, :as => :string
|
||||
= u.input :affiliation, :placeholder => "Company/User Group/nothing", :as => :string
|
||||
= f.inputs "Registration Information" do
|
||||
- if @conference.use_supporter_levels? and @conference.supporter_levels.length > 0
|
||||
= f.semantic_fields_for :supporter_registration do |reg|
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
- @headers.each do |field|
|
||||
%td
|
||||
- if field == "name"
|
||||
#{registration.last_name} #{registration.first_name} (#{registration.irc_nickname}) #{registration.company}
|
||||
#{registration.name} #{registration.nickname} #{registration.affiliation}
|
||||
- if registration.supporter_level && registration.supporter_level.title != 'Free'
|
||||
%p{:style => "color:red"}
|
||||
= registration.supporter_level.title
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
= link_to "Edit", edit_admin_conference_registration_path(@conference.short_title, :id => registration), :method => :get, :class => "btn btn-primary"
|
||||
|
||||
%td
|
||||
= link_to "Delete", admin_conference_registration_path(@conference.short_title, registration), :method => :delete, :class => "btn btn-danger", data: {confirm: "Really delete registration for #{registration.public_name} #{registration.email}?"}
|
||||
= link_to "Delete", admin_conference_registration_path(@conference.short_title, registration), :method => :delete, :class => "btn btn-danger", data: {confirm: "Really delete registration for #{registration.name} #{registration.email}?"}
|
||||
%tr{:id => "row#{counter}", :style=>"display:none;"}
|
||||
%td{:colspan=>13}
|
||||
= render :partial => "questions", :locals => {:registration => registration}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
prawn_document(:force_download=>true, :filename => @pdf_filename) do |pdf|
|
||||
table_array = []
|
||||
header_array = [" ",
|
||||
"Last Name",
|
||||
"First Name",
|
||||
"Public Name",
|
||||
"Name",
|
||||
"Email",
|
||||
"Attending Social Events",
|
||||
"Attending With Partner",
|
||||
|
|
@ -13,9 +11,7 @@ prawn_document(:force_download=>true, :filename => @pdf_filename) do |pdf|
|
|||
@registrations.each do |registration|
|
||||
row = []
|
||||
row << ""
|
||||
row << registration.last_name
|
||||
row << registration.first_name
|
||||
row << registration.public_name
|
||||
row << registration.name
|
||||
row << registration.email
|
||||
if registration.attending_social_events
|
||||
row << "X"
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ wb.add_worksheet(:name => "registrations") do |sheet|
|
|||
@registrations.each do |reg|
|
||||
row = []
|
||||
row << reg.attended
|
||||
row << "#{reg.last_name} #{reg.first_name} (#{reg.public_name})"
|
||||
row << reg.irc_nickname
|
||||
row << reg.company
|
||||
row << reg.name
|
||||
row << reg.nickname
|
||||
row << reg.affiliation
|
||||
row << reg.email
|
||||
row << reg.attending_social_events
|
||||
row << reg.attending_with_partner
|
||||
|
|
@ -21,5 +21,5 @@ wb.add_worksheet(:name => "registrations") do |sheet|
|
|||
sheet.add_row row
|
||||
end
|
||||
sheet.column_info[8].width = [sheet.column_info[8].width, 30].min
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,16 +7,11 @@
|
|||
= semantic_form_for(@registration, :url => admin_conference_registrations_path(@conference.short_title)) do |f|
|
||||
|
||||
= f.inputs "Your details" do
|
||||
= f.fields_for @person do |p|
|
||||
= p.fields_for @user do |u|
|
||||
= u.input :email, :as => :string, :hint => "Please enter a valid email address. You will need it to log in to OSEM later."
|
||||
= p.input :first_name, :as => :string
|
||||
= p.input :last_name, :as => :string
|
||||
= p.input :public_name, :as => :string
|
||||
= p.label :Nickname
|
||||
= p.text_field :irc_nickname, :as => :string
|
||||
= p.label :Affiliation
|
||||
= p.text_field :company, :placeholder => "Company/User Group/nothing", :as => :string
|
||||
= f.fields_for @user do |u|
|
||||
= u.input :email, :as => :string, :hint => "Please enter a valid email address. You will need it to log in to OSEM later."
|
||||
= u.input :name, as: :string
|
||||
= u.input :nickname, :as => :string
|
||||
= u.input :affiliation, :placeholder => "Company/User Group/nothing", :as => :string
|
||||
|
||||
= f.inputs "Registration Information" do
|
||||
- if @conference.use_supporter_levels? and @conference.supporter_levels.length > 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue