2017 refactor
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
= columns(medium: 3, large: 2) do
|
||||
= admin_menu
|
||||
= columns(medium: 9, large: 10) do
|
||||
%h3.subtitle=_("menu.submenu.admin.#{@admin_step.titlecase.gsub(/\s/, '_')}")
|
||||
%p=(_"articles.admin.#{@admin_step.gsub(/\s/, '_')}.description", :p) unless @hide_description === true
|
||||
%div{id: "admin-#{@admin_step}"}= render "conferences/admin/#{@admin_step}"
|
||||
@@ -1,18 +1,17 @@
|
||||
- links ||= [ :register ]
|
||||
- sections ||= [ :info ]
|
||||
= row(tag: :header) do
|
||||
= columns(class: 'conference-banner') do
|
||||
.title
|
||||
%h1=_!conference.title
|
||||
.details
|
||||
%h2.primary=location(conference.city || conference.location) if conference.city_name.present?
|
||||
- if conference.start_date.present? && conference.end_date.present?
|
||||
.secondary
|
||||
= date_span(conference.start_date.to_date, conference.end_date.to_date)
|
||||
- if conference.poster.present?
|
||||
%img{src: conference.poster.full.url, role: :presentation, alt: (_'images.conference.poster', vars: { conference_title: conference.title })}
|
||||
%article
|
||||
= row(tag: :header) do
|
||||
= columns(class: 'conference-banner') do
|
||||
.title
|
||||
%h1=_!conference.title
|
||||
.details
|
||||
%h2.primary=location(conference.city || conference.location) if conference.city_name.present?
|
||||
- if conference.start_date.present? && conference.end_date.present?
|
||||
.secondary
|
||||
= date_span(conference.start_date.to_date, conference.end_date.to_date)
|
||||
- if conference.poster.present?
|
||||
%img{src: conference.poster.full.url || image_path('default_poster.jpg'), role: :presentation, alt: (_'images.conference.poster', vars: { conference_title: conference.title })}
|
||||
|
||||
= row(class: 'conference-details') do
|
||||
= columns(medium: 10, push: {medium: 1}) do
|
||||
%h2=_!conference.title if conference.poster.present?
|
||||
@@ -21,13 +20,13 @@
|
||||
- if conference.workshop_schedule_published
|
||||
- add_inline_script :home_schedule
|
||||
%h3=_'articles.workshops.headings.Schedule'
|
||||
= render 'conferences/admin/schedule'
|
||||
= render 'conference_administration/schedule'
|
||||
- else
|
||||
%h3=_'articles.workshops.headings.Proposed_Workshops'
|
||||
%p=_'articles.workshops.paragraphs.Proposed_Workshops'
|
||||
= render 'workshops/workshop_previews', :workshops => (conference.workshops.sort { |a, b| a.title.downcase <=> b.title.downcase })
|
||||
= render 'workshops/workshop_previews', workshops: (conference.workshops.sort { |a, b| a.title.downcase <=> b.title.downcase })
|
||||
.links
|
||||
= (link_to (_'forms.actions.generic.register'), register_path(conference.slug), class: [:button, :register]) if links.include?(:register) && conference.registration_status == :open
|
||||
= (link_to (_'forms.actions.generic.register'), register_path(conference.slug), class: [:button, :register]) if links.include?(:register) && conference.can_register?
|
||||
= (link_to (_'articles.workshops.info.read_more'), conference_path(conference.slug), class: :button) if links.include?(:read_more)
|
||||
= (link_to (_'forms.actions.generic.administrate'), administrate_conference_path(conference.slug), class: [:button]) if links.include?(:administrate)
|
||||
= (link_to (_'forms.actions.generic.edit'), edit_conference_path(conference.slug), class: [:button, :subdued]) if links.include?(:edit)
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
= columns(medium: 12) do
|
||||
%p=_"articles.conference_registration.paragraphs.#{@this_conference.registration_status == :open ? '': 'Pre_'}Registration_Details"
|
||||
%h3=_'articles.conference_registration.headings.Verify_Account'
|
||||
%p=_'articles.conference_registration.paragraphs.Verify_Account'
|
||||
%p=_"articles.conference_registration.paragraphs.#{@this_conference.registration_status == :open ? '': 'Pre_'}Registration_Details"
|
||||
%h3=_'articles.conference_registration.headings.Verify_Account'
|
||||
%p=_'articles.conference_registration.paragraphs.Verify_Account'
|
||||
|
||||
= form_tag register_path(@this_conference.slug), class: 'flex-form' do
|
||||
.email-field.input-field.big
|
||||
= email_field_tag :email, nil, required: true
|
||||
= label_tag :email
|
||||
= button_tag :continue, :value => :confirm_email
|
||||
= form_tag register_path(@this_conference.slug), class: 'flex-form' do
|
||||
.email-field.input-field.big
|
||||
= email_field_tag :email, nil, required: true
|
||||
= label_tag :email
|
||||
= button :continue, value: :confirm_email
|
||||
= columns(medium: 12, class: 'flex-column') do
|
||||
%p.stretch-item=_'articles.conference_registration.paragraphs.facebook_sign_in'
|
||||
= link_to (_'forms.actions.generic.facebook_sign_in','Facebook Sign In'), auth_at_provider_path(:provider => :facebook), class: [:button, :facebook]
|
||||
%p.stretch-item=_'articles.conference_registration.paragraphs.facebook_sign_in'
|
||||
= link_to (_'forms.actions.generic.facebook_sign_in','Facebook Sign In'), auth_at_provider_path(:provider => :facebook), class: [:button, :facebook]
|
||||
|
||||
@@ -5,5 +5,5 @@
|
||||
= textfield :location, (params[:location] || location(@registration.city ||lookup_ip_location)), required: true, heading: 'articles.conference_registration.headings.location'
|
||||
= checkboxes :languages, User.AVAILABLE_LANGUAGES, (current_user.languages || [I18n.locale]).map(&:to_sym), 'languages', heading: 'articles.conference_registration.headings.languages'
|
||||
.actions.next-prev
|
||||
= button_tag (params[:step] == :save ? :save : :next), value: :contact_info
|
||||
= button_tag :previous, value: :prev_contact_info, class: :subdued, formnovalidate: true
|
||||
= button (params[:step] == :save ? :save : :next), value: :contact_info
|
||||
= button :previous, value: :prev_contact_info, class: :subdued, formnovalidate: true
|
||||
|
||||
@@ -48,4 +48,4 @@
|
||||
- if @conference.registration_open
|
||||
= form_tag register_path(@this_conference.slug) do
|
||||
.actions
|
||||
= button_tag :edit_registration, :value => :register
|
||||
= button :edit_registration, :value => :register
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
%article
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
%h2=_'articles.conference_registration.headings.email_confirm','Please confirm your email address'
|
||||
= columns(medium: 12) do
|
||||
%p=_'articles.conference_registration.paragraphs.email_confirm', :p
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
%h2=_'articles.conference_registration.headings.email_confirm','Please confirm your email address'
|
||||
= columns(medium: 12) do
|
||||
%p=_'articles.conference_registration.paragraphs.email_confirm', :p
|
||||
|
||||
@@ -16,5 +16,5 @@
|
||||
= checkboxes :considerations, ConferenceRegistration.all_considerations, @hosting_data['considerations'], 'articles.conference_registration.host.considerations', heading: 'articles.conference_registration.headings.host.considerations', help: 'articles.conference_registration.paragraphs.host.considerations', vertical: true
|
||||
= textarea :notes, @hosting_data['notes'], help: 'articles.conference_registration.paragraphs.host.notes', edit_on: :focus
|
||||
.actions.next-prev
|
||||
= button_tag (params[:step] == :save ? :save : :next), value: :hosting
|
||||
= button_tag :previous, value: :prev_contact_info, class: :subdued, formnovalidate: true
|
||||
= button (params[:step] == :save ? :save : :next), value: :hosting
|
||||
= button :previous, value: :prev_contact_info, class: :subdued, formnovalidate: true
|
||||
|
||||
@@ -9,21 +9,22 @@
|
||||
- else
|
||||
%p=@this_conference.payment_message || (_'articles.conference_registration.paragraphs.Payment', :p)
|
||||
= columns(large: 9, push: 1) do
|
||||
= show_errors :payment
|
||||
= form_tag register_path(@this_conference.slug), class: :payment do
|
||||
= hidden_field_tag :button, :payment
|
||||
- payment_amounts = @this_conference.payment_amounts.present? ? @this_conference.payment_amounts : Conference.default_payment_amounts
|
||||
.graded-options{class: "option-count-#{payment_amounts.size}"}
|
||||
- payment_amounts.each_with_index do | amount, i |
|
||||
= button_tag :amount_25, name: :amount, value: amount.to_f.to_s, class: "option-#{i + 1}" do
|
||||
= button :amount_25, name: :amount, value: amount.to_f.to_s, class: "option-#{i + 1}" do
|
||||
=_! (number_to_currency amount, unit: '$')
|
||||
= form_tag register_path(@this_conference.slug), class: ['custom-payment', :centered] do
|
||||
%span.currency=_!'$'
|
||||
%span.currency=_!'$' # TODO: this needs to be localized
|
||||
= numberfield :amount, nil, required: true, step: 0.01, min: 0.00, label: false
|
||||
= button_tag :custom_amount, value: :payment
|
||||
= button :custom_amount, value: :payment
|
||||
%p=_'articles.conference_registration.paragraphs.currency','(amounts are in $USD)'
|
||||
= form_tag register_path(@this_conference.slug), class: :payment do
|
||||
= hidden_field_tag :button, :payment
|
||||
.actions.skip
|
||||
= button_tag :skip, name: :amount, value: '0.0'
|
||||
= button :skip, name: :amount, value: '0.0'
|
||||
|
||||
= columns(large: 2)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
= columns(medium: 12) do
|
||||
%h3=_'articles.conference_registration.headings.payment_confirm'
|
||||
%p=_'articles.conference_registration.paragraphs.payment_confirm', vars: {:amount => @amount}
|
||||
= form_tag register_path(@this_conference.slug), :class => :payment do
|
||||
.actions= button_tag :confirm_amount, :value => :paypal_confirmed
|
||||
%h3=_'articles.conference_registration.headings.payment_confirm'
|
||||
%p=_'articles.conference_registration.paragraphs.payment_confirm', vars: {:amount => @amount}
|
||||
= form_tag register_path(@this_conference.slug), :class => :payment do
|
||||
.actions= button :confirm_amount, :value => :paypal_confirmed
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
= columns(medium: 12) do
|
||||
%p=_'articles.conference_registration.paragraphs.Policy_Agreement', :s, 2
|
||||
%p=_'articles.conference_registration.paragraphs.Policy_Agreement', :s, 2
|
||||
= columns(medium: 10, push: 1) do
|
||||
= render 'application/policy'
|
||||
= render 'application/policy'
|
||||
= columns(medium: 12) do
|
||||
%p=_'articles.conference_registration.paragraphs.Confirm_Agreement', :p
|
||||
= form_tag register_path(@this_conference.slug) do
|
||||
.actions= button_tag :agree, :value => :policy
|
||||
%p=_'articles.conference_registration.paragraphs.Confirm_Agreement', :p
|
||||
= form_tag register_path(@this_conference.slug) do
|
||||
.actions= button :agree, value: :policy
|
||||
|
||||
@@ -11,4 +11,4 @@
|
||||
= emailfield :companion, (@registration.housing_data['companions'] || [nil]).first, heading: 'articles.conference_registration.headings.companion', help: 'articles.conference_registration.paragraphs.companion', big: true
|
||||
= textfield :allergies, @registration.allergies, heading: 'articles.conference_registration.headings.allergies'
|
||||
= textarea :other, @registration.other, plain: true, heading: 'articles.conference_registration.headings.other'
|
||||
= button_tag :register, :value => :questions
|
||||
= button :register, value: :questions
|
||||
|
||||
@@ -8,4 +8,4 @@
|
||||
.email-field.input-field
|
||||
= email_field_tag :email, nil, required: true
|
||||
= label_tag :email
|
||||
= button_tag :register, :value => :register
|
||||
= button :register, value: :register
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
.columns{:class => @host_privledges ? 'medium-8' : 'medium-12'}
|
||||
= f.fields_for @user do |u|
|
||||
.columns#step-1.registration-step= u.email_field :email
|
||||
%button#submit-email.next=_'form.Next'
|
||||
= f.fields_for @user do |u|
|
||||
.columns#step-2.registration-step= u.text_field :username
|
||||
-# .columns.medium-6
|
||||
= select_tag :is_attending, options_for_select(ConferenceRegistration::AttendingOptions, @conference_registration.try(:is_attending)), :label => true
|
||||
%ol
|
||||
- @conference.registration_form_fields.each do |ff|
|
||||
%li
|
||||
- response = @conference_registration ? ConferenceRegistrationResponse.find_by(conference_registration_id: @conference_registration.id, registration_form_field_id: ff.id) : nil
|
||||
= form_field ff, response
|
||||
= f.actions :register
|
||||
|
||||
- content_for :scripts do
|
||||
:plain
|
||||
function updateForm(data, step) {
|
||||
$('.registration-step').each(function() {
|
||||
var $this = $(this);
|
||||
var this_step = parseInt($this.attr('id').replace(/^step\-(\d+)$/, '$1'));
|
||||
if (this_step > step) {
|
||||
$this.find('input,select').each(function(){
|
||||
var $input = $(this);
|
||||
var params = $input.attr('name').match(/\[(.*?)\]/g);
|
||||
var val = data.conference;
|
||||
for (key in params) {
|
||||
var k = params[key].replace(/\[(.*)\]/, '$1');
|
||||
val = val[params[key].replace(/\[(.*)\]/, '$1')];
|
||||
}
|
||||
$input.val(val)
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
- dom_ready do
|
||||
:plain
|
||||
$('#submit-email').click(function(e){
|
||||
e.preventDefault();
|
||||
$.post('register/step/1', $('form.edit_conference').serialize(), function(data) {
|
||||
//console.log(data.conference.user.username);
|
||||
updateForm(data, 1);
|
||||
});
|
||||
});
|
||||
@@ -1,22 +1,22 @@
|
||||
= columns(medium: 12, class: 'major-group') do
|
||||
- if @my_workshops.present?
|
||||
%h3=_'articles.conference_registration.headings.Your_Workshops'
|
||||
%p=_'articles.conference_registration.paragraphs.Your_Workshops', :p
|
||||
= render 'workshops/workshop_previews', :workshops => @my_workshops
|
||||
- else
|
||||
%p=_'articles.conference_registration.paragraphs.Create_Workshop', :p
|
||||
= link_to (_'articles.conference_registration.headings.Add_Workshop'), create_workshop_path(@this_conference.slug), class: :button
|
||||
- if @my_workshops.present?
|
||||
%h3=_'articles.conference_registration.headings.Your_Workshops'
|
||||
%p=_'articles.conference_registration.paragraphs.Your_Workshops', :p
|
||||
= render 'workshops/workshop_previews', :workshops => @my_workshops
|
||||
- else
|
||||
%p=_'articles.conference_registration.paragraphs.Create_Workshop', :p
|
||||
= link_to (_'articles.conference_registration.headings.Add_Workshop'), create_workshop_path(@this_conference.slug), class: :button
|
||||
- if @requested_workshops.present?
|
||||
= columns(medium: 12, class: 'major-group') do
|
||||
%h3=_'articles.conference_registration.headings.Workshops_You_Have_Requested'
|
||||
%p=_'articles.conference_registration.paragraphs.Workshops_You_Have_Requested', :p
|
||||
= render 'workshops/workshop_previews', :workshops => @requested_workshops
|
||||
= columns(medium: 12, class: 'major-group') do
|
||||
%h3=_'articles.conference_registration.headings.Workshops_You_Have_Requested'
|
||||
%p=_'articles.conference_registration.paragraphs.Workshops_You_Have_Requested', :p
|
||||
= render 'workshops/workshop_previews', :workshops => @requested_workshops
|
||||
- if @workshops_in_need.present?
|
||||
= columns(medium: 12, class: 'major-group') do
|
||||
%h3=_'articles.conference_registration.headings.Workshops_Looking_For_Facilitators'
|
||||
%p=_'articles.conference_registration.paragraphs.Workshops_Looking_For_Facilitators', :p
|
||||
= render 'workshops/workshop_previews', :workshops => @workshops_in_need
|
||||
= columns(medium: 12, class: 'major-group') do
|
||||
%h3=_'articles.conference_registration.headings.Workshops_Looking_For_Facilitators'
|
||||
%p=_'articles.conference_registration.paragraphs.Workshops_Looking_For_Facilitators', :p
|
||||
= render 'workshops/workshop_previews', :workshops => @workshops_in_need
|
||||
- if @workshops.present?
|
||||
= columns(medium: 12, class: 'major-group') do
|
||||
%h3=_'articles.conference_registration.headings.All_Workshops'
|
||||
= render 'workshops/workshop_previews', :workshops => @workshops
|
||||
= columns(medium: 12, class: 'major-group') do
|
||||
%h3=_'articles.conference_registration.headings.All_Workshops'
|
||||
= render 'workshops/workshop_previews', :workshops => @workshops
|
||||
|
||||
@@ -19,17 +19,17 @@
|
||||
- else
|
||||
.text-field.input-field.big
|
||||
= label_tag :subject
|
||||
= text_field_tag :subject, @subject, :required => true
|
||||
= text_field_tag :subject, @subject, required: true
|
||||
.select-field.input-field
|
||||
= label_tag :content
|
||||
= text_area_tag :content, @content, :required => true
|
||||
= text_area_tag :content, @content, required: true
|
||||
.actions.right
|
||||
- if @email_sent == :test
|
||||
.note=_('articles.conference_registration.notes.Test_Email_Sent',"An email was sent to #{current_user.email}", vars: {:email_address => current_user.email})
|
||||
.note=_('articles.conference_registration.notes.Test_Email_Sent',"An email was sent to #{current_user.email}", vars: {email_address: current_user.email})
|
||||
- if @email_sent == :preview # let the user send the
|
||||
= button_tag :edit, :value => :edit
|
||||
= button_tag :send, :value => :send
|
||||
= button :edit, value: :edit
|
||||
= button :send, value: :send
|
||||
- else
|
||||
= button_tag :preview, :value => :preview
|
||||
= button_tag :test, :value => :test
|
||||
= button :preview, value: :preview
|
||||
= button :test, value: :test
|
||||
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
= render 'page_header', :page_key => 'Edit'
|
||||
= render 'page_header', page_key: 'Edit'
|
||||
%article
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
= form_tag save_conference_path(@this_conference.slug), class: 'composition' do
|
||||
.text-editor.input-field
|
||||
= label_tag :info
|
||||
= text_area_tag :info, @this_conference.info, :required => true
|
||||
.actions.right
|
||||
.left
|
||||
- I18n.backend.enabled_locales.each do |locale|
|
||||
= (link_to (_'actions.conference.Translate', "Edit #{language_name(locale)} version", :vars => {:language => language_name(locale)}), edit_conference_path(@this_conference.slug, url_params(locale)), :class => 'translate') if locale.to_sym != I18n.locale.to_sym
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
= form_tag save_conference_path(@this_conference.slug), class: 'composition' do
|
||||
.text-editor.input-field
|
||||
= label_tag :info
|
||||
= text_area_tag :info, @this_conference.info, :required => true
|
||||
.actions.right
|
||||
.left
|
||||
- I18n.backend.enabled_locales.each do |locale|
|
||||
= (link_to (_'actions.conference.Translate', "Edit #{language_name(locale)} version", vars: {:language => language_name(locale)}), edit_conference_path(@this_conference.slug, url_params(locale)), class: 'translate') if locale.to_sym != I18n.locale.to_sym
|
||||
|
||||
= button_tag :save, :value => :save
|
||||
= button :save, value: :save
|
||||
|
||||
/ :javascript
|
||||
/ window.jQuery || document.write('<script src="https://code.jquery.com/jquery-2.1.3.min.js"><\/script>')
|
||||
/ window.jQuery || document.write('<script src="https://code.jquery.com/jquery-2.1.3.min.js"><\/script>')
|
||||
-#= javascript_include_tag "froala_editor.min.js"
|
||||
-#= stylesheet_link_tag "froala_editor.min.css"
|
||||
-#= stylesheet_link_tag "font-awesome.min.css"
|
||||
/ :javascript
|
||||
/ $(function() {
|
||||
/ $('.text-editor textarea').editable({
|
||||
/ language: '<% I18n.locale.to_s %>',
|
||||
/ inlineMode: false,
|
||||
/ blockTags: ["n", "p", "h2", "blockquote", "pre"],
|
||||
/ buttons: ["formatBlock", "bold", "italic", "underline", "insertOrderedList", "insertUnorderedList", "sep", "createLink", "html", "undo", "redo"],
|
||||
/ colors: ['#00ADEF', '#DD57EF', '#E6C74B', 'REMOVE']
|
||||
/ });
|
||||
/ });
|
||||
/ $(function() {
|
||||
/ $('.text-editor textarea').editable({
|
||||
/ language: '<% I18n.locale.to_s %>',
|
||||
/ inlineMode: false,
|
||||
/ blockTags: ["n", "p", "h2", "blockquote", "pre"],
|
||||
/ buttons: ["formatBlock", "bold", "italic", "underline", "insertOrderedList", "insertUnorderedList", "sep", "createLink", "html", "undo", "redo"],
|
||||
/ colors: ['#00ADEF', '#DD57EF', '#E6C74B', 'REMOVE']
|
||||
/ });
|
||||
/ });
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
- page_style :form
|
||||
|
||||
= tabs!
|
||||
.row
|
||||
= form_for @conference do |f|
|
||||
.columns.medium-4
|
||||
%h2=_'conference.hosts.help.title', :t
|
||||
%p=_'conference.hosts.help', :p
|
||||
.columns.medium-8
|
||||
.clearfix
|
||||
= f.fields_for :conference_host_organizations, :include_id => true do |u|
|
||||
= u.organization_select_field :id, @conference.organizations[u.index] #, attrs: @conference
|
||||
= f.actions :save
|
||||
@@ -24,7 +24,7 @@
|
||||
- list.each do | conference |
|
||||
%li.conference{id: "conference-#{conference.id}", data: {a: conference.city.latitude, o: conference.city.longitude, y: conference.year, t: conference.conferencetype}, class: conference.is_public ? nil : 'not-public'}
|
||||
.info
|
||||
%h4.title= conference.title
|
||||
%h4.title= _!conference.title
|
||||
.conference-details
|
||||
.location=location(conference.city)
|
||||
- if conference.start_date.present? && conference.end_date.present?
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
= columns(medium: 12) do
|
||||
%h2=_(@page_title)
|
||||
= registration_step_menu
|
||||
= render "conferences/#{@register_template.to_s}"
|
||||
= render "conferences/#{@register_template}"
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
= render 'header'
|
||||
|
||||
- page_style :form
|
||||
|
||||
= tabs!
|
||||
.row
|
||||
= form_for @conference do |f|
|
||||
- if @host_privledges
|
||||
.columns.medium-4
|
||||
=sub_tabs!
|
||||
%h2=_'conference.hosts.help.title', :t
|
||||
%p=_'conference.hosts.help', :p
|
||||
= render @sub_action, :f => f
|
||||
= yield_or_default(:after_form)
|
||||
@@ -2,4 +2,4 @@
|
||||
= @this_conference.poster.full.url || image_path('default_poster.jpg')
|
||||
- content_for :title do
|
||||
=@this_conference.title
|
||||
= render 'conferences/conference', conference: @this_conference, links: @links
|
||||
= render 'conferences/conference', conference: @this_conference, links: @links, sections: [:info, :workshops]
|
||||
|
||||
Reference in New Issue
Block a user