User/Person models merge
This commit is contained in:
parent
66b84e3660
commit
23bf55b66c
80 changed files with 1064 additions and 1221 deletions
|
|
@ -11,9 +11,9 @@
|
|||
%tbody
|
||||
%tr
|
||||
%td #{index + 1}
|
||||
%td #{registration.public_name}
|
||||
%td #{registration.name}
|
||||
%td #{registration.conference.title}
|
||||
%td #{registration.created_at.strftime('%m/%d/%Y')}
|
||||
- else
|
||||
%h5.text-warning.text-center
|
||||
No registrations!
|
||||
No registrations!
|
||||
|
|
|
|||
|
|
@ -12,11 +12,11 @@
|
|||
%tbody
|
||||
%tr
|
||||
%td #{index + 1}
|
||||
%td #{event.submitter}
|
||||
%td #{event.submitter.name}
|
||||
%td #{event.title}
|
||||
%td #{event.conference.title}
|
||||
%td
|
||||
.span{'class'=>label_for(event.state)} #{event.state.humanize}
|
||||
- else
|
||||
%h5.text-warning.text-center
|
||||
No submissions!
|
||||
No submissions!
|
||||
|
|
|
|||
|
|
@ -20,4 +20,4 @@
|
|||
%span.label.label-danger Unconfirmed
|
||||
- else
|
||||
%h5.text-warning.text-center
|
||||
No sign ups!
|
||||
No sign ups!
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@
|
|||
- @top_submitter.each do |key, value|
|
||||
.row.top-submitter
|
||||
.col-md-2
|
||||
= image_tag(key.gravatar_url(size: '25'), title: "Yo #{key.public_name}!", :alt => '', 'class'=>'img-circle img-responsive text-center')
|
||||
= image_tag(key.gravatar_url(size: '25'), title: "Yo #{key.name}!", :alt => '', 'class'=>'img-circle img-responsive text-center')
|
||||
.col-md-10
|
||||
%h4
|
||||
#{key}
|
||||
#{key.name}
|
||||
%div
|
||||
%small
|
||||
#{pluralize(value, 'submission')}
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
.nested-fields
|
||||
= f.inputs do
|
||||
= f.input :email
|
||||
= f.input :public_name
|
||||
= remove_association_link :person, f
|
||||
|
||||
|
|
@ -81,7 +81,7 @@
|
|||
%td
|
||||
%b Submitter
|
||||
%td
|
||||
= link_to @event.submitter.public_name, admin_person_path(@event.submitter)
|
||||
= link_to @event.submitter.name, admin_user_path(@event.submitter)
|
||||
(
|
||||
= link_to @event.submitter.email, "mailto: #{@event.submitter.email}"
|
||||
)
|
||||
|
|
|
|||
6
app/views/admin/events/_user_fields.html.haml
Normal file
6
app/views/admin/events/_user_fields.html.haml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
.nested-fields
|
||||
= f.inputs do
|
||||
= f.input :email
|
||||
= f.input :name
|
||||
= remove_association_link :user, f
|
||||
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
%td{:style => "width:15%"}
|
||||
%b Rating
|
||||
%td
|
||||
- if @event.average_rating.to_f > 0
|
||||
- if @event.average_rating.to_f > 0
|
||||
#{@event.average_rating}/#{@conference.call_for_papers.rating}
|
||||
- else
|
||||
Rating: 0/#{@conference.call_for_papers.rating}
|
||||
|
|
@ -15,20 +15,20 @@
|
|||
- else
|
||||
= label_tag "label_rating", "", :class => "avgrating"
|
||||
%tr
|
||||
%td
|
||||
%td
|
||||
%b Voters
|
||||
%td
|
||||
= @event.voters.length
|
||||
- if @event.voters.length > 0
|
||||
(
|
||||
= @ratings.map {|x| "#{x.first_name} #{x.last_name}"}.join ', '
|
||||
= @ratings.map {|x| "#{x.name}"}.join ', '
|
||||
)
|
||||
%tr
|
||||
%td
|
||||
%td
|
||||
%b Your vote
|
||||
%td
|
||||
- @conference.call_for_papers.rating.times do |counter|
|
||||
- voted = @event.voted?(@event, current_user.person)
|
||||
- voted = @event.voted?(@event, current_user)
|
||||
- if voted && voted.rating == counter+1
|
||||
= link_to "", vote_admin_conference_event_path(@conference.short_title, @event, :rating => counter+1), :remote => true, :id =>"label#{counter+1}", :class => "myrating", :voted => true
|
||||
- else
|
||||
|
|
@ -37,20 +37,20 @@
|
|||
|
||||
- if @ratings.length > 0
|
||||
- @ratings.each do |rate|
|
||||
- unless rate.person_id == current_user.person.id
|
||||
- unless rate.user_id == current_user.id
|
||||
%tr
|
||||
%td
|
||||
= rate.first_name
|
||||
= rate.last_name
|
||||
%td
|
||||
- @conference.call_for_papers.rating.times do |counter|
|
||||
- voted = @event.voted?(@event, rate.person)
|
||||
- voted = @event.voted?(@event, rate.user)
|
||||
- if voted && voted.rating == counter+1
|
||||
= label_tag "label#{counter+1}", "", :class => "othersrating", :voted => true
|
||||
= javascript_tag "$('label[voted=true]').prevAll().andSelf().addClass('bright');"
|
||||
- else
|
||||
= label_tag "label#{counter+1}", "", :class => "othersrating"
|
||||
:javascript
|
||||
:javascript
|
||||
$(function () {
|
||||
var checkedId = $("a[voted='true']").attr('id');
|
||||
$('a[id=' + checkedId + ']').prevAll().andSelf().addClass('bright');
|
||||
|
|
@ -68,4 +68,4 @@
|
|||
$(".myrating").click(function() {
|
||||
$(this).siblings().removeClass("bright");
|
||||
$(this).prevAll().andSelf().addClass("bright");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -58,14 +58,14 @@
|
|||
- bgcolor=""
|
||||
%td{:style=>"background-color: #{bgcolor}"}
|
||||
- if !event.submitter.nil?
|
||||
=link_to event.submitter.public_name, admin_person_path(event.submitter)
|
||||
=link_to event.submitter.name, admin_user_path(event.submitter)
|
||||
- if event.submitter.registrations.count < 1
|
||||
(Unregistered!)
|
||||
- else
|
||||
Unknown submitter
|
||||
%td
|
||||
- if speaker = event.speakers.first
|
||||
= link_to speaker.public_name, admin_person_path(speaker)
|
||||
= link_to speaker.name, admin_user_path(speaker)
|
||||
- else
|
||||
Unknown speaker
|
||||
- l = link_to "Change", edit_admin_conference_event_speaker_path(@conference.short_title, event), :remote => true
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
%tr
|
||||
%td
|
||||
- if !version.whodunnit.nil?
|
||||
= Person.find_person_by_user_id(version.whodunnit).public_name
|
||||
= User.find(version.whodunnit).name
|
||||
- else
|
||||
No user (probably via the console)
|
||||
%td
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
= semantic_form_for [:admin, @person] do |f|
|
||||
= f.inputs "Basic Information" do
|
||||
= f.input :first_name, :as => :string
|
||||
= f.input :last_name, :as => :string
|
||||
= f.input :public_name, :as => :string
|
||||
= f.input :email
|
||||
= f.input :company, :as => :string
|
||||
= f.input :biography, :input_html => {:rows => 10}
|
||||
= f.actions do
|
||||
= f.action :submit, :button_html => {:class => "btn primary"}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
.row
|
||||
.col-md-12
|
||||
.page-header
|
||||
%h1
|
||||
People
|
||||
- if @people
|
||||
= "(#{@people.length})"
|
||||
= link_to "New person", new_admin_person_path, :class => "btn btn-success pull-right"
|
||||
|
||||
.row
|
||||
.col-md-12
|
||||
.well
|
||||
%table.table.table-striped.table-bordered.table-hover#people
|
||||
%thead
|
||||
%th
|
||||
%b Email
|
||||
%th
|
||||
%b Last Name
|
||||
%th
|
||||
%b First Name
|
||||
%th
|
||||
%b Public Name
|
||||
%th
|
||||
%b # of Conference Registrations
|
||||
%th
|
||||
%th
|
||||
- @people.each do |person|
|
||||
%tr
|
||||
%td= person.email
|
||||
%td= person.last_name
|
||||
%td= person.first_name
|
||||
%td= person.public_name
|
||||
%td= person.registrations.count
|
||||
%td= link_to "Edit", edit_admin_person_path(person)
|
||||
%td= link_to "View", admin_person_path(person)
|
||||
|
||||
:javascript
|
||||
$(document).ready(function() {
|
||||
$('#people').dataTable( {
|
||||
"bPaginate": false,
|
||||
"bLengthChange": false
|
||||
} );
|
||||
} );
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
%table.table
|
||||
%tr
|
||||
%td
|
||||
%b First Name
|
||||
%td
|
||||
= @person.first_name
|
||||
%tr
|
||||
%td
|
||||
%b Last Name
|
||||
%td
|
||||
= @person.last_name
|
||||
%tr
|
||||
%td
|
||||
%b Public Name
|
||||
%td
|
||||
= @person.public_name
|
||||
%tr
|
||||
%td
|
||||
%b Company
|
||||
%td
|
||||
= @person.company
|
||||
%tr
|
||||
%td
|
||||
%b Email
|
||||
%td
|
||||
= @person.email
|
||||
%tr
|
||||
%td
|
||||
%b Created At
|
||||
%td
|
||||
= @person.created_at
|
||||
%tr
|
||||
%td
|
||||
%b Updated At
|
||||
%td
|
||||
= @person.updated_at
|
||||
%tr
|
||||
%td
|
||||
%b Biography
|
||||
%td
|
||||
= @person.biography
|
||||
%tr
|
||||
%td
|
||||
%b Registered to attend
|
||||
%td
|
||||
- if @person.registrations.count == 0
|
||||
None
|
||||
- else
|
||||
= @person.registrations.map { |r| r.conference.title }.join ','
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
Assign speaker
|
||||
= semantic_form_for @speaker, :as => :speaker, :url => admin_conference_event_speaker_path(@conference.short_title, @event), :method => :put do |f|
|
||||
.form-inputs.form-horizontal.modal-body
|
||||
= f.collection_select(:person_id, Person.order(:public_name), :id, :public_name)
|
||||
= f.collection_select(:user_id, User.order(:name), :id, :name)
|
||||
|
||||
.modal-footer
|
||||
= link_to "Close", "#", :data => {:dismiss => "modal"}, :class => 'btn'
|
||||
|
|
|
|||
|
|
@ -5,22 +5,16 @@
|
|||
%thead
|
||||
%th
|
||||
ID
|
||||
- (@speaker_fields_person + @speaker_fields_reg).each do |field|
|
||||
- (@speaker_fields_user + @speaker_fields_reg).each do |field|
|
||||
%th
|
||||
= field.capitalize
|
||||
- @speakers.each do |speaker|
|
||||
%tr
|
||||
%td
|
||||
= count +=1
|
||||
- @speaker_fields_person.each do |field|
|
||||
- @speaker_fields_user.each do |field|
|
||||
%td
|
||||
- if field == 'name'
|
||||
= speaker.first_name
|
||||
= speaker.last_name
|
||||
%br
|
||||
(#{speaker.public_name})
|
||||
- else
|
||||
= speaker.send(field.to_sym)
|
||||
= speaker.send(field.to_sym)
|
||||
- @speaker_fields_reg.each do |field|
|
||||
%td
|
||||
- reg = speaker_reg(speaker)
|
||||
|
|
|
|||
8
app/views/admin/users/_form.html.haml
Normal file
8
app/views/admin/users/_form.html.haml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
= semantic_form_for [:admin, @user] do |f|
|
||||
= f.inputs "Basic Information" do
|
||||
= f.input :name, :as => :string
|
||||
= f.input :email
|
||||
= f.input :affiliation, :as => :string
|
||||
= f.input :biography, :input_html => {:rows => 10}
|
||||
= f.actions do
|
||||
= f.action :submit, :button_html => {:class => "btn btn-primary"}
|
||||
|
|
@ -4,6 +4,8 @@
|
|||
Users
|
||||
- if @users
|
||||
= "(#{@users.length})"
|
||||
|
||||
= link_to "New User", new_admin_user_path, :class => "btn btn-success pull-right"
|
||||
.well
|
||||
%table.table.table-striped.table-bordered.table-hover#users
|
||||
%thead
|
||||
|
|
@ -14,18 +16,15 @@
|
|||
%th
|
||||
%b Email
|
||||
%th
|
||||
%b Last Name
|
||||
%b Name
|
||||
%th
|
||||
%b First Name
|
||||
%th
|
||||
%b Public Name
|
||||
%b # of Conference Registrations
|
||||
%th
|
||||
%b Roles
|
||||
%th
|
||||
%th
|
||||
%th
|
||||
- @users.each do |user|
|
||||
- person = Person.find_person_by_user_id(user.id)
|
||||
%tr
|
||||
%td
|
||||
= user.id
|
||||
|
|
@ -37,13 +36,9 @@
|
|||
%td
|
||||
= user.email
|
||||
%td
|
||||
= user.last_name
|
||||
= user.name
|
||||
%td
|
||||
= user.first_name
|
||||
%td
|
||||
= user.public_name
|
||||
%td
|
||||
= user.roles.map { |role| role.name }.join ','
|
||||
= user.registrations.count
|
||||
%td
|
||||
.modal.fade{:id => "user-role-selection-#{user.id}", "role" => "dialog", "aria-hidden" => "true"}
|
||||
.modal-dialog
|
||||
|
|
@ -60,22 +55,21 @@
|
|||
%button{:class=> "btn btn-danger", "data-dismiss"=> "modal", "aria-hidden"=>"true"}
|
||||
Cancel
|
||||
- else
|
||||
= "Give #{user.public_name} (#{user.email}) the following roles:"
|
||||
= "Give #{user.name} (#{user.email}) the following roles:"
|
||||
= semantic_form_for(user, :url => admin_user_path(user), :method => :put) do |f|
|
||||
= f.input :roles, :label => false
|
||||
%button{:class=> "btn btn-danger", "data-dismiss"=> "modal", "aria-hidden"=>"true"}
|
||||
Cancel
|
||||
= f.action :submit, :as => :button, :button_html => {:value => "Save", :class => "btn btn-primary"}
|
||||
=link_to "Modify Roles", "#", "data-toggle" => "modal", "data-target" => "#user-role-selection-#{user.id}",id: "user-modify-role-#{user.id}"
|
||||
=link_to "#{user.roles.map { |role| role.name }.join ', '}", "#", "data-toggle" => "modal", "data-target" => "#user-role-selection-#{user.id}",id: "user-modify-role-#{user.id}"
|
||||
%td
|
||||
=link_to "Details", "javascript: void(0)", :class => "user-details-popover", "data-trigger" => "click", "data-placement" => "bottom",
|
||||
"data-html" => "true",
|
||||
"data-content" => user.popup_details,
|
||||
"data-original-title" => ""
|
||||
= link_to "Edit", edit_admin_user_path(user)
|
||||
%td
|
||||
= link_to "View", admin_user_path(user)
|
||||
%td
|
||||
- if current_user.id == user.id or user.role_ids.include? 3
|
||||
=link_to 'Delete',admin_user_path(user), :method => :delete , :data => {:confirm => 'Are you sure ?'}, :disabled => true,:class => "btn btn-primary disabled btn-danger",:role => "button"
|
||||
- else
|
||||
=link_to 'Delete',admin_user_path(user), :method => :delete , :data => {:confirm => 'Are you sure ?'}, :disabled => true,:class => "btn btn-primary disabled btn-danger",:role => "button"
|
||||
- else
|
||||
=link_to 'Delete',admin_user_path(user), :method=> :delete , :data=> {:confirm => 'Are you sure ?'},:class => "btn btn-primary btn-danger"
|
||||
|
||||
|
||||
|
|
|
|||
7
app/views/admin/users/show.html.haml
Normal file
7
app/views/admin/users/show.html.haml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
%table.table
|
||||
- @show_attributes.each do |attr|
|
||||
%tr
|
||||
%td
|
||||
%b
|
||||
= attr.capitalize.gsub('_', ' ')
|
||||
%td= @user.send(attr)
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
%h3
|
||||
Registration for
|
||||
= @conference.title
|
||||
- if @person.proposal_count(@conference) > 0
|
||||
- if @user.proposal_count(@conference) > 0
|
||||
.row
|
||||
.col-md-12
|
||||
%i
|
||||
|
|
@ -14,8 +14,8 @@
|
|||
%br
|
||||
Your public name (required)
|
||||
%br
|
||||
= f.fields_for :person do |p|
|
||||
= p.text_field :public_name, :for => :person
|
||||
= f.fields_for :user do |p|
|
||||
= p.input :name
|
||||
|
||||
- if @conference.questions
|
||||
= render :partial => "questions", :locals => {:f => f}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
.row
|
||||
.col-md-12
|
||||
= f.input :volunteer, :label => "Click here if you want to become a volunteer at #{@conference.short_title}", :input_html => {:maxlength => 15, :size => 40}
|
||||
= f.fields_for :person do |p|
|
||||
= render :partial => 'devise/registrations/volunteerperson', :locals => {:p => p}
|
||||
= f.fields_for :user do |u|
|
||||
= render :partial => 'devise/registrations/volunteeruser', :locals => {:u => u}
|
||||
|
||||
%br
|
||||
- if @conference.vpositions.count > 0
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
=p.input :mobile, :label => "Mobile No (Include country code)", :input_html => {:placeholder => "Eg. +336812345679"}, :hint => "Only visible to org team & volunteer coordinator"
|
||||
|
||||
=p.input :tshirt, :label => "Tshirt Size", :collection => [["Choose", nil],["XS","XS"],["S","S"],["M", "M"], ["L", "L"], ["XL", "XL"], ["XXL", "XXL"], ["XXXL", "XXXL"], ["Girl-S","Girl-s"], ["Girl-M","Girl-M"], ["Girl-L","Girl-L"], ["Girl-XL","Girl-XL"]]
|
||||
|
||||
=p.input :languages, :label => "Which languages do you speak", :hint => "Start from the one you speak best and use 2 letter symbolization, eg. EN, GR, DE"
|
||||
|
||||
= p.input :volunteer_experience, :label => "Do you have any past experience?", :input_html => {:rows => 3, :class => "span6"}
|
||||
7
app/views/devise/registrations/_volunteeruser.html.haml
Normal file
7
app/views/devise/registrations/_volunteeruser.html.haml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
= u.input :mobile, :label => "Mobile No (Include country code)", :input_html => {:placeholder => "Eg. +336812345679"}, :hint => "Only visible to org team & volunteer coordinator"
|
||||
|
||||
= u.input :tshirt, :label => "Tshirt Size", :collection => [["Choose", nil],["XS","XS"],["S","S"],["M", "M"], ["L", "L"], ["XL", "XL"], ["XXL", "XXL"], ["XXXL", "XXXL"], ["Girl-S","Girl-s"], ["Girl-M","Girl-M"], ["Girl-L","Girl-L"], ["Girl-XL","Girl-XL"]]
|
||||
|
||||
= u.input :languages, :label => "Which languages do you speak", :hint => "Start from the one you speak best and use 2 letter symbolization, eg. EN, GR, DE"
|
||||
|
||||
= u.input :volunteer_experience, :label => "Do you have any past experience?", :input_html => {:rows => 3, :class => "span6"}
|
||||
|
|
@ -2,19 +2,17 @@
|
|||
.col-md-12
|
||||
= semantic_form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f|
|
||||
= f.inputs :name => "Profile" do
|
||||
= f.fields_for :person do |p|
|
||||
= p.input :first_name, :as => :string
|
||||
= p.input :last_name, :as => :string
|
||||
= p.input :public_name, :as => :string
|
||||
= p.input :irc_nickname, :label => "IRC nick:", :as => :string
|
||||
= p.input :company, :label => "Affiliation", :as => :string, :hint => "This could be a company, a user group, or nothing at all."
|
||||
= p.input :biography, :input_html => {:rows => 5, "onkeyup" => "word_count(this, 'biography-count', 150)"}, :for => :person
|
||||
= f.fields_for :user do |u|
|
||||
= u.input :name, :as => :string
|
||||
= u.input :nickname, :as => :string
|
||||
= u.input :affiliation, :as => :string, :hint => "This could be a company, a user group, or nothing at all."
|
||||
= u.input :biography, :input_html => {:rows => 5, "onkeyup" => "word_count(this, 'biography-count', 150)"}
|
||||
You have used
|
||||
%span#biography-count #{current_user.person.biography_word_count}
|
||||
%span#biography-count #{current_user.biography_word_count}
|
||||
words. Biographies are limited to 150 words.
|
||||
%br
|
||||
%br
|
||||
= render :partial => 'devise/registrations/volunteerperson', :locals => {:p => p}
|
||||
= render :partial => 'devise/registrations/volunteeruser', :locals => {:u => u}
|
||||
= f.inputs :name => 'OpenID' do
|
||||
%h4
|
||||
Currently using the following openIDs:
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
.well
|
||||
= semantic_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
|
||||
= f.input :email
|
||||
= f.input :name, required: true
|
||||
= f.input :password
|
||||
= f.input :password_confirmation
|
||||
= f.action :submit, as: :button, label: 'Sign Up', button_html: {class: 'btn btn-primary'}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
- else
|
||||
= link_to "Register", register_conference_path(conference.short_title), :class =>"btn btn-success"
|
||||
= link_to "Schedule", conference_schedule_path(conference.short_title), :class =>"btn btn-default" if conference.call_for_papers and conference.call_for_papers.schedule_public
|
||||
- if !current_user.nil? && current_user.person.proposal_count(conference) > 0
|
||||
- if !current_user.nil? && current_user.proposal_count(conference) > 0
|
||||
= link_to "View My Proposals", conference_proposal_index_path(conference.short_title), :class =>"btn btn-default"
|
||||
- elsif conference.cfp_open?
|
||||
= link_to "Submit Proposal", conference_proposal_index_path(conference.short_title), :class =>"btn btn-default"
|
||||
= link_to "Submit Proposal", conference_proposal_index_path(conference.short_title), :class =>"btn btn-default"
|
||||
|
|
@ -24,7 +24,3 @@
|
|||
= link_to(admin_users_path) do
|
||||
%span.glyphicon.glyphicon-user
|
||||
Users
|
||||
%li
|
||||
= link_to(admin_people_path) do
|
||||
%span.glyphicon.glyphicon-star-empty
|
||||
People
|
||||
|
|
|
|||
|
|
@ -16,11 +16,11 @@
|
|||
%ul.nav.navbar-nav.navbar-right
|
||||
%li.dropdown
|
||||
%a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#", id: "current-user-detail"}
|
||||
- if not current_user.person.public_name.empty?
|
||||
#{current_user.person.public_name}
|
||||
- if not current_user.name.empty?
|
||||
#{current_user.name}
|
||||
-else
|
||||
#{current_user.email}
|
||||
= image_tag(current_user.person.gravatar_url(size: '18'), title: "Yo #{current_user.person.public_name}!", :alt => '')
|
||||
= image_tag(current_user.gravatar_url(size: '18'), title: "Yo #{current_user.name}!", :alt => '')
|
||||
%b.caret
|
||||
%ul.dropdown-menu
|
||||
= render 'layouts/user_menu'
|
||||
|
|
|
|||
|
|
@ -42,12 +42,12 @@
|
|||
|
||||
%section#information
|
||||
= f.inputs :name => "Your Information" do
|
||||
= semantic_fields_for @person do |p|
|
||||
= p.input :public_name, :as => :string, :required => true
|
||||
= p.input :company, :as => :string, :label => "Affiliation", :hint => "This could be a company, a user group, or nothing at all."
|
||||
= p.input :biography, :required => true, :input_html => {:rows => 5, :class => 'span11', "onkeyup" => "word_count(this, 'biography-count', 150)"}
|
||||
= semantic_fields_for @user do |u|
|
||||
= u.input :name, :as => :string, :required => true
|
||||
= u.input :affiliation, :as => :string, :hint => "This could be a company, a user group, or nothing at all."
|
||||
= u.input :biography, :required => true, :input_html => {:rows => 5, :class => 'span11', "onkeyup" => "word_count(this, 'biography-count', 150)"}
|
||||
You have used
|
||||
%span#biography-count #{@person.biography_word_count}
|
||||
%span#biography-count #{@user.biography_word_count}
|
||||
words. Biographies are limited to 150 words.
|
||||
%br
|
||||
%br
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
= "My Proposals for #{@conference.title}"
|
||||
- if @conference.cfp_open? || organizer_or_admin?
|
||||
= link_to "New Proposal", new_conference_proposal_path(@conference.short_title), :class => "btn btn-primary pull-right"
|
||||
- if @person.proposal_count(@conference) > 0
|
||||
- if @user.proposal_count(@conference) > 0
|
||||
.row
|
||||
.col-md-12
|
||||
%table.table.table-bordered.table-striped
|
||||
|
|
|
|||
|
|
@ -57,15 +57,15 @@
|
|||
.col-md-8
|
||||
%h3
|
||||
by
|
||||
= @speaker.public_name
|
||||
= @speaker.name
|
||||
(
|
||||
= @speaker.email
|
||||
)
|
||||
- if @speaker.company?
|
||||
- if @speaker.affiliation?
|
||||
%br
|
||||
%span.muted
|
||||
from
|
||||
= @speaker.company
|
||||
= @speaker.affiliation
|
||||
-if @speaker.biography?
|
||||
= simple_format(@speaker.biography)
|
||||
.col-md-4
|
||||
|
|
|
|||
|
|
@ -49,8 +49,8 @@
|
|||
data-href="<%= url_for(conference_proposal_path(@conference.short_title, event[0].id)) %>">
|
||||
<%- if speaker = event[0].speakers.first %>
|
||||
<%= image_tag speaker.gravatar_url, :class => "img-circle pull-right",
|
||||
:alt => speaker.public_name,
|
||||
:title => speaker.public_name,
|
||||
:alt => speaker.name,
|
||||
:title => speaker.name,
|
||||
:style => "padding:8px;" %>
|
||||
<%- end %>
|
||||
<h5>
|
||||
|
|
@ -65,7 +65,7 @@
|
|||
</span>
|
||||
<span class="schedule-speaker">
|
||||
<span class="glyphicon glyphicon-user"></span>
|
||||
<%= "#{speaker.first_name} #{speaker.last_name}" %>
|
||||
<%= "#{speaker.name}" %>
|
||||
</span>
|
||||
<% if event[0].track%>
|
||||
<span class="schedule-track">
|
||||
|
|
|
|||
|
|
@ -1,54 +0,0 @@
|
|||
= f.inputs :name => "Your Details" do
|
||||
%br
|
||||
Your public name (required)
|
||||
%br
|
||||
= f.fields_for :person do |p|
|
||||
= p.text_field :public_name, :for => :person
|
||||
- if @conference.use_supporter_levels? and @conference.supporter_levels.length > 0
|
||||
= f.semantic_fields_for :supporter_registration do |reg|
|
||||
= reg.input :supporter_level, :as => :select, :collection => @conference.supporter_levels
|
||||
= reg.input :code, :label => "Confirmation or registration code (if applicable)"
|
||||
%span#supporter-link.help-block
|
||||
|
||||
= f.input :attending_with_partner, :label => false
|
||||
= f.input :using_affiliated_lodging, :label => false
|
||||
= f.input :handicapped_access_required, :label => false
|
||||
= f.input :other_special_needs, :label => "Any other special needs?", :input_html => {:rows => 2, :class => "span6"}
|
||||
= f.inputs "Travel Info" do
|
||||
= f.input :arrival, :as => :string, :input_html => {:value => (f.object.arrival.to_formatted_s(:db_without_seconds) unless f.object.arrival.nil?), :id => "registration-arrival-datepicker", :readonly => "readonly" }
|
||||
= f.input :departure, :as => :string, :input_html => {:value => (f.object.departure.to_formatted_s(:db_without_seconds) unless f.object.departure.nil?), :id => "registration-departure-datepicker", :readonly => "readonly" }
|
||||
- if @conference.social_events.count > 0
|
||||
= f.inputs "Are you planning to attend any of the parties?" do
|
||||
%br Yes, I'll be attending...
|
||||
%br
|
||||
= f.input :social_events, :as => :check_boxes, :label => false, :collection => @conference.social_events
|
||||
|
||||
:javascript
|
||||
$("#registration_supporter_registration_attributes_supporter_level_id").change(function () {
|
||||
var str = "";
|
||||
#{generate_supporter_level_js @conference}
|
||||
$("#supporter-link").html(str);
|
||||
})
|
||||
.trigger('change');
|
||||
|
||||
$("#registration-arrival-datepicker").datetimepicker({
|
||||
dateFormat: "yy-mm-dd",
|
||||
timeFormat: "HH:mm",
|
||||
showSecond: false,
|
||||
numberOfMonths: 1,
|
||||
defaultDate: '#{@conference.start_date.yesterday.strftime('%Y-%m-%d')}',
|
||||
onSelect: function(selected) {
|
||||
$("#registration-departure-datepicker").datepicker("option","minDate", selected)
|
||||
}
|
||||
});
|
||||
|
||||
$("#registration-departure-datepicker").datetimepicker({
|
||||
dateFormat: "yy-mm-dd",
|
||||
timeFormat: "HH:mm",
|
||||
showSecond: false,
|
||||
numberOfMonths: 1,
|
||||
defaultDate: '#{@conference.end_date.tomorrow.strftime('%Y-%m-%d')}',
|
||||
onSelect: function(selected) {
|
||||
$("#registration-arrival-datepicker").datepicker("option","maxDate", selected)
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue