Added conference list page, administration tools, and re-designed conference administration
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
- body_class 'banner-bottom'
|
||||
= render :partial => 'application/header', :locals => {:page_group => :administration, :page_key => 'Administration', :image_file => 'admin.jpg'}
|
||||
|
||||
%article
|
||||
= row do
|
||||
= form_tag save_conference_path, class: 'composition' do
|
||||
= columns(medium: 12) do
|
||||
%h2=_@page_title, :t
|
||||
= hidden_field_tag :id, @this_conference.id if @this_conference.id.present?
|
||||
|
||||
= columns(medium: 12) do
|
||||
= textfield :city, location(@this_conference.city), required: true, big: true
|
||||
= columns(medium: 12, class: 'flex-column') do
|
||||
= selectfield :type, @this_conference.conferencetype, Conference.conference_types.keys.map { |k| [(_"forms.options.conferences.types.#{k}"), k]}, required: true, stretch: true
|
||||
= numberfield :year, @this_conference.conference_year || Date.today.year, required: true
|
||||
= columns(medium: 6) do
|
||||
= checkbox :is_public, @this_conference.is_public != false, 'forms.labels.generic.is_public'
|
||||
= columns(medium: 6) do
|
||||
= checkbox :is_featured, @this_conference.is_featured != false, 'forms.labels.generic.is_featured'
|
||||
= columns(medium: 12) do
|
||||
.actions.next-prev
|
||||
= button_tag :save, value: :save
|
||||
- if @this_conference.id.present?
|
||||
= button_with_confirmation :delete, value: :delete, class: 'delete'
|
||||
@@ -1,20 +1,20 @@
|
||||
- content_for :banner do
|
||||
- image = image_path(image_file || 'empty-racks.jpg')
|
||||
- style = nil
|
||||
- cover = nil
|
||||
- figure = nil
|
||||
- if capable_of(:css_mixblendmode)
|
||||
- cover = "<div class=\"cover\" style=\"background-image: url(#{image})\"></div>"
|
||||
- else
|
||||
- style = "background-image: url(#{image})"
|
||||
#header-title.short{style: style}
|
||||
= (render banner_image, {:image => image}) if defined?(banner_image) == "local-variable"
|
||||
= cover.html_safe if cover
|
||||
- if @page_title.present? || defined?(page_group)
|
||||
- content_for :title do
|
||||
=@page_title.present? ? I18n.t(@page_title, @page_title_vars) : I18n.t("page_titles.#{page_group.to_s}.#{page_key.to_s}")
|
||||
= row do
|
||||
= columns do
|
||||
%h1=_(@main_title || "page_titles.#{page_group.to_s}.#{page_key.to_s}", :t, @main_title_vars)
|
||||
- content_for :og_image do
|
||||
= image
|
||||
- image = image_path(image_file || 'empty-racks.jpg')
|
||||
- style = nil
|
||||
- cover = nil
|
||||
- figure = nil
|
||||
- if capable_of(:css_mixblendmode)
|
||||
- cover = "<div class=\"cover\" style=\"background-image: url(#{image})\"></div>"
|
||||
- else
|
||||
- style = "background-image: url(#{image})"
|
||||
#header-title.short{style: style}
|
||||
= (render banner_image, {:image => image}) if defined?(banner_image) == "local-variable"
|
||||
= cover.html_safe if cover
|
||||
- if @page_title.present? || defined?(page_group)
|
||||
- content_for :title do
|
||||
= I18n.t(@page_title || "page_titles.#{page_group.to_s}.#{page_key.to_s}", @page_title_vars)
|
||||
= row do
|
||||
= columns do
|
||||
%h1=_(@main_title || "page_titles.#{page_group.to_s}.#{page_key.to_s}", :t, @main_title_vars || (@page_title_vars.present? && @page_title.blank? ? { vars: @page_title_vars } : nil))
|
||||
- content_for :og_image do
|
||||
= image
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
- this_is_the_front_page
|
||||
- if @conference
|
||||
= render 'conferences/header'
|
||||
%article
|
||||
= row do
|
||||
= columns(medium: 10, push: {medium: 1}) do
|
||||
%h2=_!@conference.title
|
||||
= richtext @conference.info
|
||||
- if @conference.registration_status == :open
|
||||
- if @conference.workshop_schedule_published
|
||||
- add_inline_script :home_schedule
|
||||
%h3=_'articles.workshops.headings.Schedule'
|
||||
= render 'conferences/admin/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 })
|
||||
- content_for :og_image do
|
||||
= @conference.poster.full.url || image_path('default_poster.jpg')
|
||||
- if @conferences
|
||||
- @conferences.each do | conference |
|
||||
= render 'conferences/conference', conference: conference, links: [ :read_more, :register ]
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
= render :partial => 'application/header', :locals => {:image_file => @banner_image || 'grafitti.jpg'}
|
||||
%article
|
||||
= row do
|
||||
= columns do
|
||||
- if logged_in?
|
||||
%h2=_'articles.user_settings.headings.Your_Account'
|
||||
- if @conference.present? && (@conference.registration_status == :pre || @conference.registration_status == :open)
|
||||
%p=_'articles.user_settings.paragraphs.conference_registration', :t
|
||||
= link_to (_'actions.conference.edit_registration'), register_path(@conference.slug), class: :button
|
||||
- if @conferences.present?
|
||||
%h3=_'articles.user_settings.headings.Your_Conferences'
|
||||
.link-dump
|
||||
- @conferences.each do | conference |
|
||||
= link_to (_!conference.title), administration_step_path(conference.slug, :edit), class: :button
|
||||
= row do
|
||||
= columns do
|
||||
- if logged_in?
|
||||
%h2=_'articles.user_settings.headings.Your_Account'
|
||||
- if @conference.present? && (@conference.registration_status == :pre || @conference.registration_status == :open)
|
||||
%p=_'articles.user_settings.paragraphs.conference_registration', :t
|
||||
= link_to (_'actions.conference.edit_registration'), register_path(@conference.slug), class: :button
|
||||
- if @conferences.present?
|
||||
%h3=_'articles.user_settings.headings.Your_Conferences'
|
||||
.link-dump
|
||||
- @conferences.each do | conference |
|
||||
= link_to (_!conference.title), administration_step_path(conference.slug, :edit), class: :button
|
||||
|
||||
= form_tag update_settings_path do
|
||||
= textfield :name, current_user.name, required: true, heading: 'articles.conference_registration.headings.name', big: true
|
||||
= checkboxes :languages, User.AVAILABLE_LANGUAGES, current_user.languages || [I18n.locale], 'languages', heading: 'articles.conference_registration.headings.languages'
|
||||
= radiobuttons :preferred_language, I18n.backend.enabled_locales, current_user.locale || I18n.locale, 'languages', heading: 'articles.conference_registration.headings.preferred_language'
|
||||
= checkbox :email_subscribe, current_user.is_subscribed != false, 'articles.user_settings.email_subscribe', heading: 'articles.user_settings.headings.email_subscribe', help: 'articles.user_settings.paragraphs.email_subscribe', inline: true, right_help: true
|
||||
.actions
|
||||
= button_tag :save, value: :save
|
||||
- else
|
||||
%h2=_'forms.actions.generic.login'
|
||||
= render 'login'
|
||||
= form_tag update_settings_path do
|
||||
= textfield :name, current_user.name, required: true, heading: 'articles.conference_registration.headings.name', big: true
|
||||
= checkboxes :languages, User.AVAILABLE_LANGUAGES, current_user.languages || [I18n.locale], 'languages', heading: 'articles.conference_registration.headings.languages'
|
||||
= radiobuttons :preferred_language, I18n.backend.enabled_locales, current_user.locale || I18n.locale, 'languages', heading: 'articles.conference_registration.headings.preferred_language'
|
||||
= checkbox :email_subscribe, current_user.is_subscribed != false, 'articles.user_settings.email_subscribe', heading: 'articles.user_settings.headings.email_subscribe', help: 'articles.user_settings.paragraphs.email_subscribe', inline: true, right_help: true
|
||||
.actions
|
||||
= button_tag :save, value: :save
|
||||
- else
|
||||
%h2=_'forms.actions.generic.login'
|
||||
= render 'login'
|
||||
@@ -0,0 +1,41 @@
|
||||
= columns(large: 8, push: { large: 2}) do
|
||||
%h3=_'articles.admin.info.headings.Host_Organizations'
|
||||
%p=_'articles.admin.info.descriptions.Host_Organizations', vars: { city_name: @this_conference.city.city }
|
||||
= admin_update_form do
|
||||
= checkboxes :organizations, (@organizations.map { |org| [org.name, org.id] }), @this_conference.organizations.map(&:id), 'test.test', vertical: true, big: true
|
||||
.actions.right.small
|
||||
= button_tag :save, value: :set_organizations
|
||||
- @this_conference.organizations.each do | organization |
|
||||
%h4=organization.name
|
||||
- if organization.users.present?
|
||||
.details.org-members
|
||||
- organization.users.each do | user |
|
||||
= raw_data_set(:h5, user.name) do
|
||||
= user.email
|
||||
- unless user.id == current_user.id && !current_user.administrator?
|
||||
= admin_update_form class: [:inline, :right] do
|
||||
= hidden_field_tag :user_id, user.id
|
||||
= hidden_field_tag :org_id, organization.id
|
||||
= button_tag :remove_member, value: :remove_org_member, class: [:small, :delete]
|
||||
= admin_update_form class: 'mini-flex-form' do
|
||||
= hidden_field_tag :org_id, organization.id
|
||||
= emailfield :email, nil, required: true
|
||||
= button_tag :add_member, value: :add_org_member, class: :small
|
||||
|
||||
%h3=_'articles.admin.info.headings.External_Administrators'
|
||||
%p=_'articles.admin.info.descriptions.External_Administrators'
|
||||
- if @this_conference.administrators.present?
|
||||
.details.org-members
|
||||
- @this_conference.administrators.each do | user |
|
||||
= raw_data_set(:h5, user.name) do
|
||||
= user.email
|
||||
- unless user.id == current_user.id && !current_user.administrator?
|
||||
= admin_update_form class: [:inline, :right] do
|
||||
= hidden_field_tag :user_id, user.id
|
||||
= button_tag :remove_member, value: :remove_administrator, class: [:small, :delete]
|
||||
= admin_update_form class: 'mini-flex-form' do
|
||||
= userfield :email, nil, required: true
|
||||
-#= emailfield :email, nil, required: true
|
||||
= button_tag :add_member, value: :add_administrator, class: :small
|
||||
= columns(large: 2) do
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
= columns(medium: 12) do
|
||||
= admin_update_form do
|
||||
- if @broadcast_step == :preview || @broadcast_step == :test
|
||||
= hidden_field_tag :subject, @subject
|
||||
= hidden_field_tag :body, @body
|
||||
= hidden_field_tag :send_to, @send_to
|
||||
- if @broadcast_step == :preview
|
||||
%p= _'articles.conference_registration.paragraphs.admin.broadcast.test', vars: { send_to_count: "<strong>#{(@send_to_count || 0)}</strong>".html_safe }
|
||||
- else
|
||||
.warning-info.make-room= _'articles.conference_registration.paragraphs.admin.broadcast.preview', vars: { send_to_count: "<strong>#{(@send_to_count || 0)}</strong>".html_safe }
|
||||
.test-preview
|
||||
%h3=@subject
|
||||
= richtext @body, 4
|
||||
.actions.right
|
||||
= button_tag :test, value: :test, class: :secondary if @broadcast_step == :preview
|
||||
= button_with_confirmation :send, (_'modals.admin.broadcast.confirm', vars: { number: "<strong>#{(@send_to_count || 0)}</strong>".html_safe }), value: :send, class: :delete if @broadcast_step == :test
|
||||
= button_tag :edit, value: :edit
|
||||
- else
|
||||
= selectfield :send_to, nil, broadcast_options, full: true
|
||||
= textfield :subject, @subject, required: true, big: true
|
||||
= textarea :body, @body, lang: @this_conference.locale, edit_on: :focus
|
||||
.actions.right
|
||||
= button_tag :preview, value: :preview
|
||||
@@ -0,0 +1,17 @@
|
||||
= admin_update_form do
|
||||
= row do
|
||||
= columns(medium: 6, push: { medium: 1 }) do
|
||||
= fieldset :start_date, inline: true, inline_label: true do
|
||||
= month_select @start_month, name: :start_month, label: false
|
||||
= month_day_select @start_day, name: :start_day, label: false
|
||||
|
||||
= row do
|
||||
= columns(medium: 6, push: { medium: 1 }) do
|
||||
= fieldset :end_date, inline: true, inline_label: true do
|
||||
= month_select @end_month, name: :end_month, label: false
|
||||
= month_day_select @end_day, name: :end_day, label: false
|
||||
|
||||
= row do
|
||||
= columns(medium: 6, push: { medium: 1 }) do
|
||||
.actions
|
||||
= button_tag :save, value: :save
|
||||
@@ -0,0 +1,5 @@
|
||||
= columns(medium: 12) do
|
||||
= admin_update_form do
|
||||
= translate_textarea :info, @this_conference, label: 'articles.conference_registration.headings.admin.edit.info', help: 'articles.conference_registration.paragraphs.admin.edit.info', edit_on: :focus
|
||||
.actions.right
|
||||
= button_tag :save, value: :save
|
||||
@@ -0,0 +1,41 @@
|
||||
- if @this_conference.event_locations.blank?
|
||||
= columns(medium: 12) do
|
||||
.warning-info=_'articles.admin.events.no_locations_warning'
|
||||
- else
|
||||
= columns(medium: 12) do
|
||||
- if @events.present? && @event.id.blank?
|
||||
%table.events.admin-edit
|
||||
%tr
|
||||
%th=_'forms.labels.generic.title'
|
||||
%th=_'forms.labels.generic.event_location'
|
||||
%th=_'forms.labels.generic.day'
|
||||
%th=_'forms.labels.generic.time'
|
||||
%th=_'forms.labels.generic.time_span'
|
||||
%th.form
|
||||
- @events.each do | event |
|
||||
%tr
|
||||
%th=event.title
|
||||
%td=_!(event.event_location.present? ? event.event_location.title : '')
|
||||
%td=date(event.start_time.to_date, :weekday)
|
||||
%td=time(event.start_time, :short)
|
||||
%td=hours(event.start_time, event.end_time)
|
||||
%td.form
|
||||
= admin_update_form do
|
||||
= hidden_field_tag :id, event.id
|
||||
= link_to (_'forms.actions.generic.edit'), edit_event_path(@this_conference, event.id), class: [:button, :small, :modify]
|
||||
= button_with_confirmation :delete, (_'modals.admin.generic.delete.confirm', :p, vars: { title: event.title }), value: :delete, class: [:delete, :small]
|
||||
|
||||
= columns(medium: 12) do
|
||||
%h3=_"articles.admin.locations.headings.#{@event.id.present? ? 'edit' : 'add'}_event", :t
|
||||
|
||||
= admin_update_form do
|
||||
= hidden_field_tag :id, @event.id if @event.id.present?
|
||||
.flex-inputs
|
||||
= location_select @event.event_location_id, small: true, stretch: true
|
||||
= day_select @day, small: true, format: :weekday
|
||||
= hour_select @time, small: true
|
||||
= length_select @length, small: true
|
||||
= translate_fields @event, { title: { type: :textfield, big: true, label: 'forms.labels.generic.title' }, info: { type: :textarea, label: 'forms.labels.generic.info', edit_on: :focus } }
|
||||
.actions.next-prev
|
||||
= button_tag :save, value: :save
|
||||
= button_tag :cancel, value: :cancel, class: :subdued, formnovalidate: true if @event.id.present?
|
||||
@@ -0,0 +1,11 @@
|
||||
.guests-housed
|
||||
%h5 Guests Housed:
|
||||
.data="#{@guests_housed} / #{@guests.size}"
|
||||
|
||||
%table.hosts.admin-edit
|
||||
- @hosts.each do | id, registration |
|
||||
%tr.host
|
||||
%th
|
||||
.name=registration.user.name
|
||||
.address=registration.housing_data['address']
|
||||
%td.inner-table{colspan: 2}=host_guests_table(registration)
|
||||
@@ -0,0 +1,10 @@
|
||||
- add_inline_script :housing
|
||||
= columns(medium: 12) do
|
||||
= admin_update_form id: 'housing-table-form' do
|
||||
#housing-table= render partial: 'hosts_table'
|
||||
#guest-selector
|
||||
= admin_update_form class: 'guest-dlg', id: 'guest-list-table' do
|
||||
%h3 Select a Guest
|
||||
#table
|
||||
.actions
|
||||
= link_to (_'links.download.Excel'), administration_step_path(@this_conference.slug, @admin_step, :format => :xlsx), class: [:button, :download]
|
||||
@@ -0,0 +1,42 @@
|
||||
- unless @location.present?
|
||||
- if @locations.present?
|
||||
= columns(medium: 12) do
|
||||
%table.locations.admin-edit
|
||||
%tr
|
||||
%th=_'forms.labels.generic.title'
|
||||
%th=_'forms.labels.generic.address'
|
||||
%th=_'articles.workshops.headings.space'
|
||||
%th=_'articles.admin.locations.headings.amenities'
|
||||
%th.form
|
||||
- @locations.each do | location |
|
||||
%tr
|
||||
%th=_!(location.title || '')
|
||||
%td=location_link location
|
||||
%td=location.space.present? ? (_"workshop.options.space.#{location.space}") : ''
|
||||
%td
|
||||
- amenities = location.amenities.present? ? JSON.parse(location.amenities) : []
|
||||
=_!(amenities.collect { |amenity| _"workshop.options.needs.#{amenity}" }).join(', ')
|
||||
%td.form
|
||||
= admin_update_form do
|
||||
= hidden_field_tag :id, location.id
|
||||
= link_to (_'forms.actions.generic.edit'), edit_location_path(@this_conference, location.id), class: [:button, :small, :modify]
|
||||
= button_with_confirmation :delete, (_'modals.admin.generic.delete.confirm', :p, vars: { title: location.title }), value: :delete, class: [:delete, :small]
|
||||
= admin_update_form do
|
||||
= columns(medium: 12) do
|
||||
%h5=_"articles.admin.locations.headings.#{@location.present? ? 'edit' : 'add'}_location", :t
|
||||
= hidden_field_tag :id, @location.id if @location.present?
|
||||
= textfield :title, @location.present? ? @location.title : nil, required: true, big: true, help: 'articles.admin.locations.paragraphs.title'
|
||||
.flex-column.address-form
|
||||
= textfield :address, @location.present? ? @location.address : nil, required: true, help: 'articles.admin.locations.paragraphs.address', stretch: true
|
||||
.city=location(@this_conference.city)
|
||||
= columns(medium: 6) do
|
||||
= radiobuttons :space, EventLocation.all_spaces, @space, 'workshop.options.space', vertical: true, heading: 'articles.workshops.headings.space', required: true, help: 'articles.admin.locations.paragraphs.space'
|
||||
= columns(medium: 6) do
|
||||
= checkboxes :needs, EventLocation.all_amenities, @amenities || [], 'workshop.options.needs', vertical: true, heading: 'articles.admin.locations.headings.amenities', help: 'articles.admin.locations.paragraphs.amenities'
|
||||
= columns(medium: 12) do
|
||||
.actions.next-prev
|
||||
- if @location.present?
|
||||
= button_tag :save, value: :save
|
||||
= button_tag :cancel, value: :cancel, class: :subdued, formnovalidate: true
|
||||
- else
|
||||
= button_tag :create, value: :create
|
||||
@@ -0,0 +1,35 @@
|
||||
= columns(medium: 12) do
|
||||
- if @this_conference.event_locations.present?
|
||||
- if @this_conference.meals.present?
|
||||
%table.meals.admin-edit
|
||||
%tr
|
||||
%th=_'forms.labels.generic.title'
|
||||
%th=_'forms.labels.generic.info'
|
||||
%th=_'forms.labels.generic.event_location'
|
||||
%th=_'forms.labels.generic.day'
|
||||
%th=_'forms.labels.generic.time'
|
||||
%th.form
|
||||
- @meals.each do | time, meal |
|
||||
%tr
|
||||
%th
|
||||
=_!(meal['title'] || '')
|
||||
%td=_!(meal['info'] || '')
|
||||
%td=_!location_name(meal['location'].to_i)
|
||||
%td=date(meal['day'], :weekday)
|
||||
%td=time(meal['time'].to_f)
|
||||
%td.form
|
||||
= admin_update_form do
|
||||
= hidden_field_tag :meal, time
|
||||
= button_tag :delete, value: :delete, class: [:small, :delete]
|
||||
= admin_update_form do
|
||||
%h3=_'articles.admin.locations.headings.add_meal', :t
|
||||
.flex-inputs
|
||||
= location_select nil, small: true, stretch: true
|
||||
= day_select nil, small: true, format: :weekday
|
||||
= hour_select nil, small: true
|
||||
= textfield :title, nil, required: true, big: true, help: 'articles.admin.locations.paragraphs.meal_title'
|
||||
= textfield :info, nil, help: 'articles.admin.locations.paragraphs.meal_info'
|
||||
.actions.next-prev
|
||||
= button_tag :add_meal, value: :add_meal
|
||||
- else
|
||||
.warning-info=_'articles.admin.meals.no_locations_warning'
|
||||
@@ -0,0 +1,6 @@
|
||||
= columns(medium: 12) do
|
||||
= form_tag administration_update_path(@this_conference.slug, @admin_step) do
|
||||
= translate_textarea :payment_message, @this_conference, default: 'articles.conference_registration.paragraphs.Payment', help: 'articles.conference_registration.paragraphs.admin.payment.message', edit_on: :focus, short: true
|
||||
|
||||
.actions.right
|
||||
= button_tag :save, value: :save
|
||||
@@ -0,0 +1,8 @@
|
||||
= columns(medium: 12) do
|
||||
= form_tag administration_update_path(@this_conference.slug, @admin_step) do
|
||||
= emailfield :paypal_email_address, @this_conference.paypal_email_address || @this_conference.email_address || (@this_conference.organizations.present? && @this_conference.organizations.first.present? ? @this_conference.organizations.first.email_address : nil)
|
||||
= textfield :paypal_username, @this_conference.paypal_username
|
||||
= passwordfield :paypal_password, @this_conference.paypal_password
|
||||
= textfield :paypal_signature, @this_conference.paypal_signature
|
||||
.actions.right
|
||||
= button_tag :save, value: :save
|
||||
@@ -0,0 +1,5 @@
|
||||
= columns(medium: 12) do
|
||||
= form_tag administration_update_path(@this_conference.slug, :poster), multipart: true do
|
||||
= filefield :poster, @this_conference.poster, required: true, label: false, preview: true
|
||||
.actions.left
|
||||
= button_tag :upload, value: :upload, id: 'upload-file'
|
||||
@@ -0,0 +1,2 @@
|
||||
= columns(medium: 12) do
|
||||
TO COME
|
||||
@@ -0,0 +1,8 @@
|
||||
= columns(medium: 12) do
|
||||
= form_tag administration_update_path(@this_conference.slug, @admin_step) do
|
||||
- if @this_conference.workshop_schedule_published
|
||||
%p=_'articles.conference_registration.paragraphs.admin.schedule.published', :p
|
||||
.actions= button_tag :un_publish, value: :publish, class: :delete
|
||||
- else
|
||||
%p=_'articles.conference_registration.paragraphs.admin.schedule.un_published', :p
|
||||
.actions= button_tag :publish, value: :publish
|
||||
@@ -0,0 +1,5 @@
|
||||
= columns(medium: 12) do
|
||||
= form_tag administration_update_path(@this_conference.slug, @admin_step) do
|
||||
= selectfield :registration_status, @this_conference.registration_status || 'closed', registration_status_options_list, inline_label: true
|
||||
.actions.left
|
||||
= button_tag :save, value: :save
|
||||
@@ -0,0 +1,17 @@
|
||||
- add_inline_script :registrations
|
||||
= columns(medium: 12) do
|
||||
.goes-fullscreen#registrations-table
|
||||
.flex-column
|
||||
= searchfield :search, nil, big: true, stretch: true
|
||||
%a.button{data: { expands: 'registrations-table' }}='expand'
|
||||
%a.button.delete{data: { contracts: 'registrations-table' }}='close'
|
||||
%a.button.modify{data: { 'opens-modal': 'new-registration' }}='+'
|
||||
.table-scroller
|
||||
= html_table @excel_data, registrations_table_options
|
||||
= admin_update_form id: 'new-registration', class: 'modal-edit' do
|
||||
.modal-edit-overlay{data: { 'closes-modal': 'new-registration' }}
|
||||
.modal-edit-content
|
||||
= html_edit_table @excel_data, registrations_edit_table_options
|
||||
.actions.right
|
||||
%a.button.subdued{data: { 'closes-modal': 'new-registration' }}='Cancel'
|
||||
= button_tag :save, value: :save, class: :modify
|
||||
@@ -0,0 +1,85 @@
|
||||
= columns(medium: 12) do
|
||||
- conference = @this_conference || @conference
|
||||
- if conference.event_locations.blank? && @entire_page
|
||||
.warning-info=_'articles.admin.schedule.no_locations_warning'
|
||||
- else
|
||||
- add_inline_script :schedule if @entire_page
|
||||
#schedule-preview
|
||||
- @schedule.each do | day, data |
|
||||
%h4=date(day, :weekday)
|
||||
%table.schedule{class: [data[:locations].present? ? 'has-locations' : 'no-locations', "locations-#{data[:num_locations]}"]}
|
||||
- if data[:locations].present? && data[:locations].values.first != :add
|
||||
%thead
|
||||
%tr
|
||||
%th.corner
|
||||
- data[:locations].each do | id, location |
|
||||
%th=location.is_a?(Symbol) ? '' : location.title
|
||||
%tbody
|
||||
- data[:times].each do | time, time_data |
|
||||
%tr
|
||||
- rowspan = (time_data[:length] * 2).to_i
|
||||
%th=time(time)
|
||||
- if time_data[:type] == :workshop
|
||||
- data[:locations].each do | id, location |
|
||||
- if time_data[:item][:workshops][id].present?
|
||||
- workshop = time_data[:item][:workshops][id][:workshop]
|
||||
- status = time_data[:item][:workshops][id][:status]
|
||||
- else
|
||||
- workshop = status = nil
|
||||
%td{class: [time_data[:type], workshop.present? ? :filled : :open], rowspan: rowspan, data: workshop.present? ? nil : { block: time_data[:item][:block], day: day, location: id }}
|
||||
- if workshop.present? && workshop.event_location.present?
|
||||
= link_to view_workshop_path(@conference.slug, workshop.id), class: 'event-detail-link' do
|
||||
.details
|
||||
.title=workshop.title
|
||||
%template.event-details{data: { href: view_workshop_path(@conference.slug, workshop.id) }}
|
||||
%h1.title=workshop.title
|
||||
%p.address
|
||||
= workshop.event_location.title + _!(': ')
|
||||
= location_link workshop.event_location
|
||||
.workshop-description= richtext workshop.info, 1
|
||||
- if @can_edit
|
||||
= form_tag administration_update_path(conference.slug, @admin_step), class: 'deschedule-workshop' do
|
||||
.status
|
||||
.conflict-score
|
||||
%span.title Conflicts:
|
||||
%span.value="#{status[:conflict_score]} / #{workshop.interested.size}"
|
||||
- if status[:errors].present?
|
||||
.errors
|
||||
- status[:errors].each do | error |
|
||||
.error=_"errors.messages.schedule.#{error[:name].to_s}", vars: error[:i18nVars]
|
||||
= hidden_field_tag :id, workshop.id
|
||||
= button_tag :deschedule, value: :deschedule_workshop, class: [:delete, :small]
|
||||
- elsif @can_edit
|
||||
.title="Block #{time_data[:item][:block] + 1}"
|
||||
- elsif time_data[:type] != :nil
|
||||
%td{class: time_data[:type], rowspan: rowspan, colspan: data[:locations].present? ? data[:locations].size : 1}
|
||||
- case time_data[:type]
|
||||
- when :meal
|
||||
- location = EventLocation.where(id: time_data[:item]['location'].to_i).first
|
||||
- if location.present?
|
||||
%a.event-detail-link
|
||||
.details
|
||||
.title= time_data[:item]['title']
|
||||
.location= location.title
|
||||
%template.event-details
|
||||
%h1.title=time_data[:item]['title']
|
||||
%p.address
|
||||
= location.title + _!(': ')
|
||||
= location_link location
|
||||
- when :event
|
||||
- if time_data[:item].event_location.present?
|
||||
%a.event-detail-link
|
||||
.details
|
||||
.title= time_data[:item][:title]
|
||||
.location= time_data[:item].event_location.title
|
||||
%template.event-details
|
||||
%h1.title=time_data[:item][:title]
|
||||
%p.address
|
||||
= time_data[:item].event_location.title + _!(': ')
|
||||
= location_link time_data[:item].event_location
|
||||
= richtext time_data[:item][:info], 1
|
||||
- if @entire_page
|
||||
#workshop-selector
|
||||
= form_tag administration_update_path(@this_conference.slug, @admin_step), class: 'workshop-dlg', id: 'workshop-table-form' do
|
||||
%h3 Select a Workshop
|
||||
#table
|
||||
@@ -0,0 +1,46 @@
|
||||
= hidden_field_tag :host, host.id
|
||||
.host-field
|
||||
%h4.inline=_'forms.labels.generic.name'
|
||||
%span.plain-value= host.user.name
|
||||
.host-field
|
||||
%h4.inline=_'articles.conference_registration.headings.host.availability'
|
||||
%span.plain-value= host.housing_data['availability'].present? && host.housing_data['availability'][1].present? ? date_span(host.housing_data['availability'][0].to_date, host.housing_data['availability'][1].to_date) : ''
|
||||
- if host.housing_data['considerations'].present?
|
||||
.host-field
|
||||
%h4.inline=_'articles.conference_registration.headings.host.considerations'
|
||||
%span.plain-value= (host.housing_data['considerations'].map { | consideration | _"articles.conference_registration.host.considerations.#{consideration}" }).join(', ')
|
||||
- if sanitize(host.housing_data['notes'], tags: []).present?
|
||||
.host-field
|
||||
%h4=_'articles.conference_registration.headings.host.notes'
|
||||
%blockquote= host.housing_data['notes'].html_safe
|
||||
%table.guests.admin-edit
|
||||
%tr
|
||||
%th.corner
|
||||
%th=_'forms.labels.generic.city'
|
||||
%th=_'forms.labels.generic.housing'
|
||||
%th=_'articles.admin.housing.headings.arrival_departure'
|
||||
%th=_'articles.conference_registration.headings.companion'
|
||||
%th=_'forms.labels.generic.food'
|
||||
%th=_'forms.labels.generic.allergies'
|
||||
%th=_'forms.labels.generic.other'
|
||||
- @guests.each do | id, registration |
|
||||
%tr.selectable{class: get_housing_match(host, registration, space).to_s.gsub('_', '-'), data: {host: host.id, guest: id, space: space}}
|
||||
%th=registration.user.name
|
||||
%td=registration.city
|
||||
%td=registration.housing.present? ? (_"articles.conference_registration.questions.housing.#{registration.housing}") : ''
|
||||
%td=date_span(registration.arrival.to_date, registration.departure.to_date)
|
||||
- companion = companion(registration)
|
||||
%td=companion.present? ? (companion.is_a?(User) ? companion.named_email : (_"articles.conference_registration.terms.registration_status.#{companion}")) : ''
|
||||
%td=registration.food.present? ? (_"articles.conference_registration.questions.food.#{registration.food}") : ''
|
||||
%td=registration.allergies
|
||||
%td
|
||||
.p=registration.other
|
||||
|
||||
.legend
|
||||
%h4 Legend
|
||||
%ul
|
||||
%li.good-match Good Match
|
||||
%li.bad-match Poor Match
|
||||
%li.selected-space Also in this space
|
||||
%li.other-space Also with this host
|
||||
%li.other-host Already hosted
|
||||
@@ -0,0 +1,21 @@
|
||||
= columns(medium: 12) do
|
||||
.details
|
||||
= data_set(:h3, 'articles.admin.stats.headings.completed_registrations') do
|
||||
= (@completed_registrations || 0).to_s
|
||||
= data_set(:h3, 'articles.admin.stats.headings.incomplete_registrations') do
|
||||
= ((@registration_count - @completed_registrations) || 0).to_s
|
||||
= data_set(:h3, 'articles.admin.stats.headings.bikes') do
|
||||
= (@completed_registrations || 0) > 0 ? "#{@bikes} (#{number_to_percentage(@bikes / @completed_registrations.to_f * 100.0)})" : "0"
|
||||
= data_set(:h3, 'articles.admin.stats.headings.food.meat') do
|
||||
= (@food[:all] || 0) > 0 ? "#{@food[:meat]} (#{number_to_percentage(@food[:meat] / @food[:all].to_f * 100.0)})" : "0"
|
||||
= data_set(:h3, 'articles.admin.stats.headings.food.vegetarian') do
|
||||
= (@food[:all] || 0) > 0 ? "#{@food[:vegetarian]} (#{number_to_percentage(@food[:vegetarian] / @food[:all].to_f * 100.0)})" : "0"
|
||||
= data_set(:h3, 'articles.admin.stats.headings.food.vegan') do
|
||||
= (@food[:all] || 0) > 0 ? "#{@food[:vegan]} (#{number_to_percentage(@food[:vegan] / @food[:all].to_f * 100.0)})" : "0"
|
||||
= data_set(:h3, 'articles.admin.stats.headings.donation_count') do
|
||||
= (@completed_registrations || 0) > 0 ? "#{@donation_count} (#{number_to_percentage(@donation_count / @completed_registrations.to_f * 100.0)})" : "0"
|
||||
= data_set(:h3, 'articles.admin.stats.headings.donation_total') do
|
||||
= "$#{@donations || 0.00}"
|
||||
.actions
|
||||
= link_to (_'links.download.Excel'), administration_step_path(@this_conference.slug, :stats, :format => :xlsx), class: [:button, :download]
|
||||
= link_to (_'links.download.Organizations_Excel'), administration_step_path(@this_conference.slug, :organizations, :format => :xlsx), class: [:button, :download, :subdued]
|
||||
@@ -0,0 +1,8 @@
|
||||
= columns(medium: 12) do
|
||||
= form_tag administration_update_path(@this_conference.slug, @admin_step) do
|
||||
= fieldset :payment_amounts, label: false do
|
||||
- payment_amounts = @this_conference.payment_amounts.present? ? @this_conference.payment_amounts : Conference.default_payment_amounts
|
||||
- for i in 1..5 do
|
||||
= numberfield "payment_amounts[#{i - 1}]", payment_amounts[i - 1], step: 0.01, min: 0.00, label: false
|
||||
.actions.right
|
||||
= button_tag :save, value: :save
|
||||
@@ -0,0 +1,19 @@
|
||||
= columns(medium: 12) do
|
||||
.table.workshop-blocks
|
||||
.table-tr.header
|
||||
.table-th=_'forms.labels.generic.block_number'
|
||||
.table-th=_'forms.labels.generic.time'
|
||||
.table-th=_'forms.labels.generic.length'
|
||||
.table-th=_'forms.labels.generic.days'
|
||||
.table-th.form
|
||||
- @workshop_blocks.each_with_index do | info, block |
|
||||
- is_new = info['time'].blank?
|
||||
= form_tag administration_update_path(@this_conference.slug, @admin_step), class: ['table-tr', is_new ? 'new' : 'saved'] do
|
||||
.table-th.center.big= is_new ? '' : (block + 1)
|
||||
.table-td=hour_select info['time'], small: true, label: false
|
||||
.table-td=length_select info['length'], {small: true, label: false}, 0.5, 2
|
||||
.table-td=checkboxes :days, @block_days, info['days'].map(&:to_i), 'date.day_names', vertical: true, small: true
|
||||
.table-td.form
|
||||
= hidden_field_tag :workshop_block, block
|
||||
= button_tag :delete_block, value: :delete_block, class: [:small, :delete] if block == @workshop_blocks.length - 2
|
||||
= button_tag (is_new ? :add_block : :update_block), value: :save_block, class: [:small, :add]
|
||||
@@ -0,0 +1,27 @@
|
||||
- body_class 'banner-bottom' unless @this_conference.poster.present?
|
||||
- content_for :banner do
|
||||
= render :partial => 'application/header', :locals => { page_group: :administration, page_key: 'Administration', image_file: @this_conference.poster_url || 'admin.jpg'}
|
||||
|
||||
%article
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
= columns(medium: 12, id: :conferences, class: 'list-view') do
|
||||
%h2=@this_conference.title
|
||||
%p=_'articles.admin.paragraphs.administration', :p
|
||||
%ul.break
|
||||
- administration_steps.each do | step, actions |
|
||||
%li
|
||||
.info
|
||||
%h3=_"articles.admin.#{step}.heading", :t
|
||||
.help
|
||||
%p=_"articles.admin.#{step}.description", :p
|
||||
|
||||
.actions.figures
|
||||
- actions.each do | action |
|
||||
- action_text = (_"articles.admin.#{step}.headings.#{action}", :t)
|
||||
.figure
|
||||
= link_to administration_step_path(@this_conference.slug, action.to_s) do
|
||||
%header= action_text
|
||||
.body
|
||||
= svg "admin/#{action.to_s}", action_text
|
||||
.description=(_"articles.admin.#{step}.descriptions.#{action}", :s)
|
||||
@@ -0,0 +1,38 @@
|
||||
- body_class 'banner-bottom' unless @this_conference.poster.present?
|
||||
- content_for :banner do
|
||||
= render :partial => 'application/header', :locals => { page_group: :administration, page_key: 'Administration', image_file: @this_conference.poster_url || 'admin.jpg'}
|
||||
|
||||
%article{id: "admin-#{@admin_step}"}
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
%h2.floating=(_"articles.admin.#{@admin_group}.headings.#{@admin_step}", :t)
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
%nav.sub-nav
|
||||
%ul
|
||||
%li=link_to (_'articles.admin.headings.back'), administrate_conference_path(@this_conference.slug)
|
||||
- administration_steps[@admin_group].each do | step |
|
||||
%li
|
||||
- title = (_"articles.admin.#{@admin_group}.headings.#{step}", :t)
|
||||
- if step == @admin_step.to_sym
|
||||
= title
|
||||
- else
|
||||
= link_to title, administration_step_path(@this_conference.slug, step.to_s)
|
||||
- if @success_message.present?
|
||||
= row do
|
||||
= columns(class: 'info-messages') do
|
||||
.success-info.info-message=_"success.messages.admin.#{@success_message}", :s
|
||||
- if @error_message.present?
|
||||
= row do
|
||||
= columns(class: 'info-messages') do
|
||||
.error-info.info-message=_"errors.messages.admin.#{@error_message}", :s
|
||||
- if @warnings.present?
|
||||
= row class: 'warnings', tag: :ul do
|
||||
- @warnings.each do | warning |
|
||||
= columns tag: :li, class: 'warning-info info-message' do
|
||||
= warning
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
%p=((_"articles.admin.#{@admin_group}.descriptions.#{@admin_step}", :s)) unless @hide_description === true
|
||||
= row do
|
||||
= render @admin_step
|
||||
@@ -1,6 +1,6 @@
|
||||
= columns(medium: 3, large: 2) do
|
||||
= admin_menu
|
||||
= 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}"
|
||||
%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}"
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
- links ||= [ :register ]
|
||||
- sections ||= [ :info ]
|
||||
%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?
|
||||
= richtext conference.info
|
||||
- if conference.registration_status == :open && sections.include?(:workshops)
|
||||
- if conference.workshop_schedule_published
|
||||
- add_inline_script :home_schedule
|
||||
%h3=_'articles.workshops.headings.Schedule'
|
||||
= render 'conferences/admin/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 })
|
||||
.links
|
||||
= (link_to (_'forms.actions.generic.register'), register_path(conference.slug), class: [:button, :register]) if links.include?(:register) && conference.registration_status == :open
|
||||
= (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,10 +1,10 @@
|
||||
- content_for :banner do
|
||||
.title
|
||||
%h1=_!@conference.title
|
||||
%h1=_!@this_conference.title
|
||||
.details
|
||||
%h2.primary=location(@conference.organizations.first.locations.first)
|
||||
%h2.primary=location(@this_conference.city)
|
||||
.secondary
|
||||
= date_span(@conference.start_date.to_date, @conference.end_date.to_date)
|
||||
%img{src: @conference.poster.full.url || image_path('default_poster.jpg'), role: :presentation, alt: (_'images.conference.poster', vars: { conference_title: @conference.title })}
|
||||
= date_span(@this_conference.start_date.to_date, @this_conference.end_date.to_date)
|
||||
%img{src: @this_conference.poster.full.url || image_path('default_poster.jpg'), role: :presentation, alt: (_'images.conference.poster', vars: { conference_title: @this_conference.title })}
|
||||
- content_for :og_image do
|
||||
= @conference.poster.full.url || image_path('default_poster.jpg')
|
||||
= @this_conference.poster.full.url || image_path('default_poster.jpg')
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
= columns(medium: 12) do
|
||||
= form_tag register_path(@this_conference.slug) do
|
||||
= checkbox :can_provide_housing, @registration.can_provide_housing, 'articles.conference_registration.can_provide_housing', heading: 'articles.conference_registration.headings.can_provide_housing', help: 'articles.conference_registration.paragraphs.can_provide_housing', inline: true, toggles: 'hosting-options', centered: true
|
||||
#hosting-options
|
||||
= checkbox :not_attending, @registration.is_attending == 'n', 'articles.conference_registration.not_attending', help: 'articles.conference_registration.paragraphs.not_attending', inline: true, right_help: true
|
||||
= textfield :address, @hosting_data['address'], required: true, heading: 'articles.conference_registration.headings.host.address', help: 'articles.conference_registration.paragraphs.host.address'
|
||||
= telephonefield :phone, @hosting_data['phone'], required: true
|
||||
= fieldset :space, heading: 'articles.conference_registration.headings.host.space', help: 'articles.conference_registration.paragraphs.host.space' do
|
||||
- ConferenceRegistration.all_spaces.each do | space |
|
||||
= numberfield space, @hosting_data['space'][space.to_s] || 0, min: 0, required: true
|
||||
= fieldset :hosting_dates, heading: 'articles.conference_registration.headings.host.availability', help: 'articles.conference_registration.paragraphs.host.availability' do
|
||||
- first_day_options = conference_days_options_list(:before)
|
||||
- last_day_options = conference_days_options_list(:after)
|
||||
= selectfield :first_day, @hosting_data['availability'][0] || first_day_options.first.last, first_day_options
|
||||
= selectfield :last_day, @hosting_data['availability'][1] || last_day_options.last.last, last_day_options
|
||||
= 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
|
||||
= form_tag register_path(@this_conference.slug) do
|
||||
= checkbox :can_provide_housing, @registration.can_provide_housing, 'articles.conference_registration.can_provide_housing', heading: 'articles.conference_registration.headings.can_provide_housing', help: 'articles.conference_registration.paragraphs.can_provide_housing', inline: true, toggles: 'hosting-options', centered: true
|
||||
#hosting-options
|
||||
= checkbox :not_attending, @registration.is_attending == 'n', 'articles.conference_registration.not_attending', help: 'articles.conference_registration.paragraphs.not_attending', inline: true, right_help: true
|
||||
= textfield :address, @hosting_data['address'], required: true, heading: 'articles.conference_registration.headings.host.address', help: 'articles.conference_registration.paragraphs.host.address'
|
||||
= telephonefield :phone, @hosting_data['phone'], required: true
|
||||
= fieldset :space, heading: 'articles.conference_registration.headings.host.space', help: 'articles.conference_registration.paragraphs.host.space' do
|
||||
- ConferenceRegistration.all_spaces.each do | space |
|
||||
= numberfield space, @hosting_data['space'][space.to_s] || 0, min: 0, required: true
|
||||
= fieldset :hosting_dates, heading: 'articles.conference_registration.headings.host.availability', help: 'articles.conference_registration.paragraphs.host.availability' do
|
||||
- first_day_options = conference_days_options_list(:before)
|
||||
- last_day_options = conference_days_options_list(:after)
|
||||
= selectfield :first_day, @hosting_data['availability'][0] || first_day_options.first.last, first_day_options
|
||||
= selectfield :last_day, @hosting_data['availability'][1] || last_day_options.last.last, last_day_options
|
||||
= 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
|
||||
|
||||
@@ -1 +1 @@
|
||||
= render :partial => 'application/header', :locals => {:page_group => :conferences, :page_key => page_key, :image_file => @conference.poster_url}
|
||||
= render :partial => 'application/header', :locals => {:page_group => :conferences, :page_key => page_key, :image_file => @this_conference.poster_url}
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
= columns(medium: 12) do
|
||||
- if @registration.registration_fees_paid.present?
|
||||
%p
|
||||
%strong=_'articles.conference_registration.paragraphs.Payment_Made', :p, vars: { fees_paid: (number_to_currency @registration.registration_fees_paid, unit: '$') }
|
||||
= _'articles.conference_registration.paragraphs.Payment_Add'
|
||||
= @this_conference.payment_message.html_safe if @this_conference.payment_message.present?
|
||||
- elsif @this_conference.payment_message.present?
|
||||
= @this_conference.payment_message.html_safe
|
||||
- else
|
||||
%p=@this_conference.payment_message || (_'articles.conference_registration.paragraphs.Payment', :p)
|
||||
- if @registration.registration_fees_paid.present?
|
||||
%p
|
||||
%strong=_'articles.conference_registration.paragraphs.Payment_Made', :p, vars: { fees_paid: (number_to_currency @registration.registration_fees_paid, unit: '$') }
|
||||
= _'articles.conference_registration.paragraphs.Payment_Add'
|
||||
= @this_conference.payment_message.html_safe if @this_conference.payment_message.present?
|
||||
- elsif @this_conference.payment_message.present?
|
||||
= @this_conference.payment_message.html_safe
|
||||
- else
|
||||
%p=@this_conference.payment_message || (_'articles.conference_registration.paragraphs.Payment', :p)
|
||||
= columns(large: 9, push: 1) do
|
||||
= 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
|
||||
=_! (number_to_currency amount, unit: '$')
|
||||
= form_tag register_path(@this_conference.slug), class: ['custom-payment', :centered] do
|
||||
%span.currency=_!'$'
|
||||
= numberfield :amount, nil, required: true, step: 0.01, min: 0.00, label: false
|
||||
= button_tag :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'
|
||||
= 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
|
||||
=_! (number_to_currency amount, unit: '$')
|
||||
= form_tag register_path(@this_conference.slug), class: ['custom-payment', :centered] do
|
||||
%span.currency=_!'$'
|
||||
= numberfield :amount, nil, required: true, step: 0.01, min: 0.00, label: false
|
||||
= button_tag :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'
|
||||
|
||||
= columns(large: 2)
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
- org_index = session[:registration][:new_org_index] || 0
|
||||
= hidden_field_tag :new_org_index, org_index
|
||||
- if session[:registration][:new_organization].length > 1
|
||||
%h3=_'registration.new_organization.list.title','Your New Organizations'
|
||||
%ul.columns.medium-11.medium-offset-1.end
|
||||
- session[:registration][:new_organization].each_with_index do |new_organization, index|
|
||||
- if new_organization.present? && new_organization[:name].present?
|
||||
%li
|
||||
- if index == org_index && new_organization[:name]
|
||||
%strong=new_organization[:name]
|
||||
- else
|
||||
= new_organization[:name]
|
||||
%h3=_'registration.new_organization.title','Your Organization Information'
|
||||
.columns.medium-12
|
||||
= text_field_tag :organization_name, session[:registration][:new_organization][org_index][:name], :required => true
|
||||
.columns.medium-12= text_area_tag :organization_info, session[:registration][:new_organization][org_index][:info], :data => {:editor => ""}
|
||||
.columns.medium-7
|
||||
= email_field_tag :organization_email, session[:registration][:new_organization][org_index][:email], :required => true
|
||||
= text_field_tag :organization_street, session[:registration][:new_organization][org_index][:street], :required => true
|
||||
= text_field_tag :organization_city, session[:registration][:new_organization][org_index][:city], :required => true
|
||||
= country_select_tag :organization_country, session[:registration][:new_organization][org_index][:country], :required => true
|
||||
= subregion_select_tag :organization_territory, session[:registration][:new_organization][org_index][:territory], session[:registration][:new_organization][org_index][:country] || 'US', html: {class: session[:registration][:new_organization][org_index][:country] ? 'can' : 'cant', data: {:country => session[:registration][:new_organization][org_index][:country]}}
|
||||
.columns.medium-5
|
||||
= image_field_tag :logo
|
||||
.columns
|
||||
= check_box_tag :add_another_org, (org_index <= session[:registration][:new_organization].length - 1)
|
||||
|
||||
- content_for :footer_scripts do
|
||||
= javascript_include_tag 'editor'
|
||||
- org_index = session[:registration][:new_org_index] || 0
|
||||
= hidden_field_tag :new_org_index, org_index
|
||||
- if session[:registration][:new_organization].length > 1
|
||||
%h3=_'registration.new_organization.list.title','Your New Organizations'
|
||||
%ul.columns.medium-11.medium-offset-1.end
|
||||
- session[:registration][:new_organization].each_with_index do |new_organization, index|
|
||||
- if new_organization.present? && new_organization[:name].present?
|
||||
%li
|
||||
- if index == org_index && new_organization[:name]
|
||||
%strong=new_organization[:name]
|
||||
- else
|
||||
= new_organization[:name]
|
||||
%h3=_'registration.new_organization.title','Your Organization Information'
|
||||
.columns.medium-12
|
||||
= text_field_tag :organization_name, session[:registration][:new_organization][org_index][:name], :required => true
|
||||
.columns.medium-12= text_area_tag :organization_info, session[:registration][:new_organization][org_index][:info], :data => {:editor => ""}
|
||||
.columns.medium-7
|
||||
= email_field_tag :organization_email, session[:registration][:new_organization][org_index][:email], :required => true
|
||||
= text_field_tag :organization_street, session[:registration][:new_organization][org_index][:street], :required => true
|
||||
= text_field_tag :organization_city, session[:registration][:new_organization][org_index][:city], :required => true
|
||||
= country_select_tag :organization_country, session[:registration][:new_organization][org_index][:country], :required => true
|
||||
= subregion_select_tag :organization_territory, session[:registration][:new_organization][org_index][:territory], session[:registration][:new_organization][org_index][:country] || 'US', html: {class: session[:registration][:new_organization][org_index][:country] ? 'can' : 'cant', data: {:country => session[:registration][:new_organization][org_index][:country]}}
|
||||
.columns.medium-5
|
||||
= image_field_tag :logo
|
||||
.columns
|
||||
= check_box_tag :add_another_org, (org_index <= session[:registration][:new_organization].length - 1)
|
||||
|
||||
- content_for :footer_scripts do
|
||||
= javascript_include_tag 'editor'
|
||||
@@ -1,59 +1,59 @@
|
||||
= columns(medium: 12) do
|
||||
%h2=_'articles.conference_registration.headings.Stats'
|
||||
%p=_'articles.conference_registration.paragraphs.Stats', :p
|
||||
%h2=_'articles.conference_registration.headings.Stats'
|
||||
%p=_'articles.conference_registration.paragraphs.Stats', :p
|
||||
= columns(medium: 6) do
|
||||
%ul.stats
|
||||
%li
|
||||
%h3=_'articles.conference_registration.terms.Total_Registrations'
|
||||
.stat.important=_!@total_registrations
|
||||
%li.money
|
||||
%h3=_'articles.conference_registration.terms.Total_Donations'
|
||||
.stat=money @total_donations
|
||||
%li
|
||||
%h3=_'articles.conference_registration.terms.Donation_Count'
|
||||
.stat
|
||||
= _!"#{@donation_count} / #{@total_registrations}"
|
||||
%li
|
||||
%h3=_'articles.conference_registration.terms.Housing'
|
||||
.breakdown
|
||||
- @housing.each do |h, v|
|
||||
- unless h == :none
|
||||
.stat-with-label
|
||||
.label=_"articles.conference_registration.questions.housing.#{h}"
|
||||
.stat=_!v
|
||||
%li
|
||||
%h3=_'articles.conference_registration.terms.Bikes'
|
||||
.breakdown
|
||||
.stat=_!"#{@bike_count} / #{@total_registrations}"
|
||||
- @bikes.each do |h, v|
|
||||
- unless h == :none
|
||||
.stat-with-label
|
||||
.label=_"articles.conference_registration.questions.bikes.#{h}"
|
||||
.stat.percent=_!percent(v.to_f / @bike_count)
|
||||
%li
|
||||
%h3=_'articles.conference_registration.terms.Food'
|
||||
.breakdown
|
||||
- @food.each do |h, v|
|
||||
.stat-with-label
|
||||
.label=_"articles.conference_registration.questions.food.#{h}"
|
||||
.stat.percent=_!percent(v.to_f / @total_registrations)
|
||||
%li
|
||||
%h3=_'articles.conference_registration.terms.Languages'
|
||||
.breakdown
|
||||
- @languages.each do |h, v|
|
||||
.stat-with-label
|
||||
.label=_"languages.#{h}"
|
||||
.stat.percent=_!percent(v.to_f / @total_registrations)
|
||||
%ul.stats
|
||||
%li
|
||||
%h3=_'articles.conference_registration.terms.Total_Registrations'
|
||||
.stat.important=_!@total_registrations
|
||||
%li.money
|
||||
%h3=_'articles.conference_registration.terms.Total_Donations'
|
||||
.stat=money @total_donations
|
||||
%li
|
||||
%h3=_'articles.conference_registration.terms.Donation_Count'
|
||||
.stat
|
||||
= _!"#{@donation_count} / #{@total_registrations}"
|
||||
%li
|
||||
%h3=_'articles.conference_registration.terms.Housing'
|
||||
.breakdown
|
||||
- @housing.each do |h, v|
|
||||
- unless h == :none
|
||||
.stat-with-label
|
||||
.label=_"articles.conference_registration.questions.housing.#{h}"
|
||||
.stat=_!v
|
||||
%li
|
||||
%h3=_'articles.conference_registration.terms.Bikes'
|
||||
.breakdown
|
||||
.stat=_!"#{@bike_count} / #{@total_registrations}"
|
||||
- @bikes.each do |h, v|
|
||||
- unless h == :none
|
||||
.stat-with-label
|
||||
.label=_"articles.conference_registration.questions.bikes.#{h}"
|
||||
.stat.percent=_!percent(v.to_f / @bike_count)
|
||||
%li
|
||||
%h3=_'articles.conference_registration.terms.Food'
|
||||
.breakdown
|
||||
- @food.each do |h, v|
|
||||
.stat-with-label
|
||||
.label=_"articles.conference_registration.questions.food.#{h}"
|
||||
.stat.percent=_!percent(v.to_f / @total_registrations)
|
||||
%li
|
||||
%h3=_'articles.conference_registration.terms.Languages'
|
||||
.breakdown
|
||||
- @languages.each do |h, v|
|
||||
.stat-with-label
|
||||
.label=_"languages.#{h}"
|
||||
.stat.percent=_!percent(v.to_f / @total_registrations)
|
||||
= columns(medium: 6) do
|
||||
.allergies
|
||||
%h3=_'articles.conference_registration.headings.Allergies'
|
||||
%ul
|
||||
- @allergies.each do |a|
|
||||
%li
|
||||
%p=_!a
|
||||
.other
|
||||
%h3=_'articles.conference_registration.headings.other'
|
||||
%ul
|
||||
- @other.each do |o|
|
||||
%li
|
||||
%p=_!o
|
||||
.allergies
|
||||
%h3=_'articles.conference_registration.headings.Allergies'
|
||||
%ul
|
||||
- @allergies.each do |a|
|
||||
%li
|
||||
%p=_!a
|
||||
.other
|
||||
%h3=_'articles.conference_registration.headings.other'
|
||||
%ul
|
||||
- @other.each do |o|
|
||||
%li
|
||||
%p=_!o
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
= form_tag administration_update_path(@this_conference.slug, :broadcast) do
|
||||
- if @broadcast_step == :preview || @broadcast_step == :test
|
||||
= hidden_field_tag :subject, @subject
|
||||
= hidden_field_tag :body, @body
|
||||
= hidden_field_tag :send_to, @send_to
|
||||
- if @broadcast_step == :preview
|
||||
%p= _'articles.conference_registration.paragraphs.admin.broadcast.test', vars: { send_to_count: "<strong>#{(@send_to_count || 0)}</strong>".html_safe }
|
||||
- else
|
||||
.warning-info.make-room= _'articles.conference_registration.paragraphs.admin.broadcast.preview', vars: { send_to_count: "<strong>#{(@send_to_count || 0)}</strong>".html_safe }
|
||||
.test-preview
|
||||
%h4=@subject
|
||||
= richtext @body, 4
|
||||
.actions.right
|
||||
= button_tag :test, value: :test, class: :secondary if @broadcast_step == :preview
|
||||
= button_with_confirmation :send, (_'modals.admin.broadcast.confirm', vars: { number: "<strong>#{(@send_to_count || 0)}</strong>".html_safe }), value: :send, class: :delete if @broadcast_step == :test
|
||||
= button_tag :edit, value: :edit
|
||||
- else
|
||||
= selectfield :send_to, nil, broadcast_options, full: true
|
||||
= textfield :subject, @subject, required: true, big: true
|
||||
= textarea :body, @body, lang: @this_conference.locale, edit_on: :focus
|
||||
.actions.right
|
||||
= button_tag :preview, value: :preview
|
||||
@@ -1,20 +0,0 @@
|
||||
= form_tag administration_update_path(@this_conference.slug, :edit) do
|
||||
= selectfield :registration_status, @this_conference.registration_status || 'closed', registration_status_options_list, small: true, inline_label: true
|
||||
= textarea :info, @this_conference.info!, heading: 'articles.conference_registration.headings.admin.edit.info', help: 'articles.conference_registration.paragraphs.admin.edit.info', lang: @this_conference.locale, edit_on: :focus
|
||||
- I18n.backend.enabled_locales.each do | locale |
|
||||
- if locale.to_s != @this_conference.locale.to_s
|
||||
= textarea "info_translations[#{locale.to_s}]", @this_conference._info(locale), label: 'translate.pages.Locale_Translation', vars: { language: _("languages.#{locale}") }, lang: locale, edit_on: :focus
|
||||
.actions.right
|
||||
= button_tag :save, value: :save
|
||||
%h4=_'articles.admin.edit.headings.host_organizations'
|
||||
- @this_conference.organizations.each do | organization |
|
||||
%p=organization.name
|
||||
%h5=_'articles.admin.edit.headings.members'
|
||||
.details.org-members.inline
|
||||
- organization.users.each do | user |
|
||||
= raw_data_set(:h6, user.name) do
|
||||
= user.email
|
||||
= form_tag administration_update_path(@this_conference.slug, :edit), class: 'mini-flex-form' do
|
||||
= hidden_field_tag :org_id, organization.id
|
||||
= emailfield :email, nil, required: true
|
||||
= button_tag :add_member, value: :add_member, class: :small
|
||||
@@ -1,42 +0,0 @@
|
||||
- if @this_conference.event_locations.blank?
|
||||
.warning-info=_'articles.admin.events.no_locations_warning'
|
||||
- else
|
||||
- if @events.present?
|
||||
%table.events.admin-edit
|
||||
%tr
|
||||
%th=_'forms.labels.generic.title'
|
||||
%th=_'forms.labels.generic.event_location'
|
||||
%th=_'forms.labels.generic.day'
|
||||
%th=_'forms.labels.generic.time'
|
||||
%th=_'forms.labels.generic.time_span'
|
||||
%th.form
|
||||
- @events.each do | event |
|
||||
%tr
|
||||
%th=event.title
|
||||
%td=_!(event.event_location.present? ? event.event_location.title : '')
|
||||
%td=date(event.start_time.to_date, :weekday)
|
||||
%td=time(event.start_time, :short)
|
||||
%td=hours(event.start_time, event.end_time)
|
||||
%td.form
|
||||
= form_tag administration_update_path(@this_conference.slug, :events) do
|
||||
= hidden_field_tag :id, event.id
|
||||
= button_tag :edit, value: :edit, class: :small
|
||||
= button_with_confirmation :delete, (_'modals.admin.generic.delete.confirm', :p, vars: { title: event.title }), value: :delete, class: [:delete, :small]
|
||||
|
||||
%h4=_"articles.admin.locations.headings.#{@event.id.present? ? 'edit' : 'add'}_event", :t
|
||||
= form_tag administration_update_path(@this_conference.slug, :events) do
|
||||
= hidden_field_tag :id, @event.id if @event.id.present?
|
||||
= textfield :title, @event.title!, required: true, big: true, lang: @event.locale
|
||||
= textarea :info, @event.info!, heading: 'articles.conference_registration.headings.admin.edit.info', help: 'articles.conference_registration.paragraphs.admin.events.info', lang: @event.locale, edit_on: :focus
|
||||
.flex-inputs
|
||||
= location_select @event.event_location_id, small: true, stretch: true
|
||||
= day_select @day, small: true, format: :weekday
|
||||
= hour_select @time, small: true
|
||||
= length_select @length, small: true
|
||||
- I18n.backend.enabled_locales.each do | locale |
|
||||
- if locale.to_s != @event.locale.to_s
|
||||
= textfield "title_translations[#{locale.to_s}]", @event._title(locale), big: true, heading: 'translate.pages.Locale_Translation', vars: { language: _("languages.#{locale}") }, label: 'forms.labels.generic.title', lang: locale
|
||||
= textarea "info_translations[#{locale.to_s}]", @event._info(locale), lang: locale, label: 'forms.labels.generic.info', edit_on: :focus
|
||||
.actions.next-prev
|
||||
= button_tag :save, value: :save
|
||||
= button_tag :cancel, value: :cancel, class: :subdued, formnovalidate: true if @event.id.present?
|
||||
@@ -1,11 +0,0 @@
|
||||
.guests-housed
|
||||
%h5 Guests Housed:
|
||||
.data="#{@guests_housed} / #{@guests.size}"
|
||||
|
||||
%table.hosts.admin-edit
|
||||
- @hosts.each do | id, registration |
|
||||
%tr.host
|
||||
%th
|
||||
.name=registration.user.name
|
||||
.address=registration.housing_data['address']
|
||||
%td.inner-table{colspan: 2}=host_guests_table(registration)
|
||||
@@ -1,10 +0,0 @@
|
||||
- add_inline_script :housing
|
||||
= form_tag administration_update_path(@this_conference.slug, :housing), id: 'housing-table-form' do
|
||||
#housing-table= render partial: 'conferences/admin/hosts_table'
|
||||
#guest-selector
|
||||
= form_tag administration_update_path(@this_conference.slug, :housing), class: 'guest-dlg', id: 'guest-list-table' do
|
||||
%h3 Select a Guest
|
||||
#table
|
||||
.actions
|
||||
= link_to (_'links.download.Excel'), administration_step_path(@this_conference.slug, :housing, :format => :xlsx), class: [:button, :download]
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
- unless @location.present?
|
||||
- if @locations.present?
|
||||
%table.locations.admin-edit
|
||||
%tr
|
||||
%th=_'forms.labels.generic.title'
|
||||
%th=_'forms.labels.generic.address'
|
||||
%th=_'articles.workshops.headings.space'
|
||||
%th=_'articles.admin.locations.headings.amenities'
|
||||
%th.form
|
||||
- @locations.each do | location |
|
||||
%tr
|
||||
%th=_!(location.title || '')
|
||||
%td=location_link location
|
||||
%td=location.space.present? ? (_"workshop.options.space.#{location.space}") : ''
|
||||
%td
|
||||
- amenities = location.amenities.present? ? JSON.parse(location.amenities) : []
|
||||
=_!(amenities.collect { |amenity| _"workshop.options.needs.#{amenity}" }).join(', ')
|
||||
%td.form
|
||||
= form_tag administration_update_path(@this_conference.slug, :locations) do
|
||||
= hidden_field_tag :id, location.id
|
||||
= button_tag :edit, value: :edit, class: :small
|
||||
= button_with_confirmation :delete, (_'modals.admin.generic.delete.confirm', :p, vars: { title: location.title }), value: :delete, class: [:delete, :small]
|
||||
%h4=_"articles.admin.locations.headings.#{@location.present? ? 'edit' : 'add'}_location", :t
|
||||
= form_tag administration_update_path(@this_conference.slug, :locations) do
|
||||
= hidden_field_tag :id, @location.id if @location.present?
|
||||
= textfield :title, @location.present? ? @location.title : nil, required: true, big: true, help: 'articles.admin.locations.paragraphs.title'
|
||||
= textfield :address, @location.present? ? @location.address : nil, required: true, help: 'articles.admin.locations.paragraphs.address'
|
||||
= columns(medium: 6) do
|
||||
= radiobuttons :space, EventLocation.all_spaces, @location.present? ? @location.space : nil, 'workshop.options.space', vertical: true, heading: 'articles.workshops.headings.space', required: true, help: 'articles.admin.locations.paragraphs.space'
|
||||
= columns(medium: 6) do
|
||||
= checkboxes :needs, EventLocation.all_amenities, @location.present? ? JSON.parse(@location.amenities) : [], 'workshop.options.needs', vertical: true, heading: 'articles.admin.locations.headings.amenities', help: 'articles.admin.locations.paragraphs.amenities'
|
||||
.actions.next-prev
|
||||
- if @location.present?
|
||||
= button_tag :save, value: :save
|
||||
= button_tag :cancel, value: :cancel, class: :subdued, formnovalidate: true
|
||||
- else
|
||||
= button_tag :create, value: :create
|
||||
@@ -1,34 +0,0 @@
|
||||
- if @this_conference.event_locations.present?
|
||||
- if @this_conference.meals.present?
|
||||
%table.meals.admin-edit
|
||||
%tr
|
||||
%th=_'forms.labels.generic.title'
|
||||
%th=_'forms.labels.generic.info'
|
||||
%th=_'forms.labels.generic.event_location'
|
||||
%th=_'forms.labels.generic.day'
|
||||
%th=_'forms.labels.generic.time'
|
||||
%th.form
|
||||
- @meals.each do | time, meal |
|
||||
%tr
|
||||
%th
|
||||
=_!(meal['title'] || '')
|
||||
%td=_!(meal['info'] || '')
|
||||
%td=_!location_name(meal['location'].to_i)
|
||||
%td=date(meal['day'], :weekday)
|
||||
%td=time(meal['time'].to_f)
|
||||
%td.form
|
||||
= form_tag administration_update_path(@this_conference.slug, :meals) do
|
||||
= hidden_field_tag :meal, time
|
||||
= button_tag :delete, value: :delete, class: [:small, :delete]
|
||||
= form_tag administration_update_path(@this_conference.slug, :meals) do
|
||||
%h4=_'articles.admin.locations.headings.add_meal', :t
|
||||
.flex-inputs
|
||||
= location_select nil, small: true, stretch: true
|
||||
= day_select nil, small: true, format: :weekday
|
||||
= hour_select nil, small: true
|
||||
= textfield :title, nil, required: true, big: true, help: 'articles.admin.locations.paragraphs.meal_title'
|
||||
= textfield :info, nil, help: 'articles.admin.locations.paragraphs.meal_info'
|
||||
.actions.next-prev
|
||||
= button_tag :add_meal, value: :add_meal
|
||||
- else
|
||||
.warning-info=_'articles.admin.meals.no_locations_warning'
|
||||
@@ -1,20 +0,0 @@
|
||||
= form_tag administration_update_path(@this_conference.slug, :payment) do
|
||||
= textarea :payment_message, (@this_conference.payment_message! || "<p>#{I18n.t('articles.conference_registration.paragraphs.Payment', locale: @this_conference.locale)}</p>"), help: 'articles.conference_registration.paragraphs.admin.payment.message', lang: @this_conference.locale, edit_on: :focus, short: true
|
||||
- I18n.backend.enabled_locales.each do | locale |
|
||||
- if locale.to_s != @this_conference.locale.to_s
|
||||
= textarea "payment_message_translations[#{locale.to_s}]", (@this_conference._payment_message(locale) || "<p>#{I18n.t('articles.conference_registration.paragraphs.Payment', locale: locale)}</p>"), label: 'translate.pages.Locale_Translation', vars: { language: _("languages.#{locale}") }, lang: locale, edit_on: :focus, short: true
|
||||
|
||||
%h4=_'articles.admin.payment.headings.payment_amounts', :t
|
||||
= fieldset :payment_amounts, help: 'articles.admin.payment.paragraphs.payment_amounts' do
|
||||
- payment_amounts = @this_conference.payment_amounts.present? ? @this_conference.payment_amounts : Conference.default_payment_amounts
|
||||
- for i in 1..5 do
|
||||
= numberfield "payment_amounts[#{i - 1}]", payment_amounts[i - 1], step: 0.01, min: 0.00, label: false
|
||||
|
||||
%h4=_'articles.admin.edit.headings.paypal_info', :t
|
||||
%p=(_'articles.admin.edit.paragraphs.paypal_info', :p).html_safe
|
||||
= emailfield :paypal_email_address, @this_conference.paypal_email_address || @this_conference.email_address || (@this_conference.organizations.present? && @this_conference.organizations.first.present? ? @this_conference.organizations.first.email_address : nil)
|
||||
= textfield :paypal_username, @this_conference.paypal_username
|
||||
= passwordfield :paypal_password, @this_conference.paypal_password
|
||||
= textfield :paypal_signature, @this_conference.paypal_signature
|
||||
.actions.right
|
||||
= button_tag :save, value: :save
|
||||
@@ -1,93 +0,0 @@
|
||||
- conference = @this_conference || @conference
|
||||
- if conference.event_locations.blank? && @entire_page
|
||||
.warning-info=_'articles.admin.schedule.no_locations_warning'
|
||||
- else
|
||||
- if @entire_page
|
||||
- add_inline_script :schedule
|
||||
= form_tag administration_update_path(conference.slug, :schedule) do
|
||||
- if conference.workshop_schedule_published
|
||||
%p=_'articles.conference_registration.paragraphs.admin.schedule.published', :p
|
||||
.actions= button_tag :un_publish, value: :publish, class: :delete
|
||||
- else
|
||||
%p=_'articles.conference_registration.paragraphs.admin.schedule.un_published', :p
|
||||
.actions= button_tag :publish, value: :publish
|
||||
|
||||
#schedule-preview
|
||||
- @schedule.each do | day, data |
|
||||
%h4=date(day, :weekday)
|
||||
%table.schedule{class: [data[:locations].present? ? 'has-locations' : 'no-locations', "locations-#{data[:num_locations]}"]}
|
||||
- if data[:locations].present? && data[:locations].values.first != :add
|
||||
%thead
|
||||
%tr
|
||||
%th.corner
|
||||
- data[:locations].each do | id, location |
|
||||
%th=location.is_a?(Symbol) ? '' : location.title
|
||||
%tbody
|
||||
- data[:times].each do | time, time_data |
|
||||
%tr
|
||||
- rowspan = (time_data[:length] * 2).to_i
|
||||
%th=time(time)
|
||||
- if time_data[:type] == :workshop
|
||||
- data[:locations].each do | id, location |
|
||||
- if time_data[:item][:workshops][id].present?
|
||||
- workshop = time_data[:item][:workshops][id][:workshop]
|
||||
- status = time_data[:item][:workshops][id][:status]
|
||||
- else
|
||||
- workshop = status = nil
|
||||
%td{class: [time_data[:type], workshop.present? ? :filled : :open], rowspan: rowspan, data: workshop.present? ? nil : { block: time_data[:item][:block], day: day, location: id }}
|
||||
- if workshop.present? && workshop.event_location.present?
|
||||
= link_to view_workshop_path(@conference.slug, workshop.id), class: 'event-detail-link' do
|
||||
.details
|
||||
.title=workshop.title
|
||||
%template.event-details{data: { href: view_workshop_path(@conference.slug, workshop.id) }}
|
||||
%h1.title=workshop.title
|
||||
%p.address
|
||||
= workshop.event_location.title + _!(': ')
|
||||
= location_link workshop.event_location
|
||||
.workshop-description= richtext workshop.info, 1
|
||||
- if @can_edit
|
||||
= form_tag administration_update_path(conference.slug, :schedule), class: 'deschedule-workshop' do
|
||||
.status
|
||||
.conflict-score
|
||||
%span.title Conflicts:
|
||||
%span.value="#{status[:conflict_score]} / #{workshop.interested.size}"
|
||||
- if status[:errors].present?
|
||||
.errors
|
||||
- status[:errors].each do | error |
|
||||
.error=_"errors.messages.schedule.#{error[:name].to_s}", vars: error[:i18nVars]
|
||||
= hidden_field_tag :id, workshop.id
|
||||
= button_tag :deschedule, value: :deschedule_workshop, class: [:delete, :small]
|
||||
- elsif @can_edit
|
||||
.title="Block #{time_data[:item][:block] + 1}"
|
||||
- elsif time_data[:type] != :nil
|
||||
%td{class: time_data[:type], rowspan: rowspan, colspan: data[:locations].present? ? data[:locations].size : 1}
|
||||
- case time_data[:type]
|
||||
- when :meal
|
||||
- location = EventLocation.where(id: time_data[:item]['location'].to_i).first
|
||||
- if location.present?
|
||||
%a.event-detail-link
|
||||
.details
|
||||
.title= time_data[:item]['title']
|
||||
.location= location.title
|
||||
%template.event-details
|
||||
%h1.title=time_data[:item]['title']
|
||||
%p.address
|
||||
= location.title + _!(': ')
|
||||
= location_link location
|
||||
- when :event
|
||||
- if time_data[:item].event_location.present?
|
||||
%a.event-detail-link
|
||||
.details
|
||||
.title= time_data[:item][:title]
|
||||
.location= time_data[:item].event_location.title
|
||||
%template.event-details
|
||||
%h1.title=time_data[:item][:title]
|
||||
%p.address
|
||||
= time_data[:item].event_location.title + _!(': ')
|
||||
= location_link time_data[:item].event_location
|
||||
= richtext time_data[:item][:info], 1
|
||||
- if @entire_page
|
||||
#workshop-selector
|
||||
= form_tag administration_update_path(@this_conference.slug, :schedule), class: 'workshop-dlg', id: 'workshop-table-form' do
|
||||
%h3 Select a Workshop
|
||||
#table
|
||||
@@ -1,46 +0,0 @@
|
||||
= hidden_field_tag :host, host.id
|
||||
.host-field
|
||||
%h4.inline=_'forms.labels.generic.name'
|
||||
%span.plain-value= host.user.name
|
||||
.host-field
|
||||
%h4.inline=_'articles.conference_registration.headings.host.availability'
|
||||
%span.plain-value= host.housing_data['availability'].present? && host.housing_data['availability'][1].present? ? date_span(host.housing_data['availability'][0].to_date, host.housing_data['availability'][1].to_date) : ''
|
||||
- if host.housing_data['considerations'].present?
|
||||
.host-field
|
||||
%h4.inline=_'articles.conference_registration.headings.host.considerations'
|
||||
%span.plain-value= (host.housing_data['considerations'].map { | consideration | _"articles.conference_registration.host.considerations.#{consideration}" }).join(', ')
|
||||
- if sanitize(host.housing_data['notes'], tags: []).present?
|
||||
.host-field
|
||||
%h4=_'articles.conference_registration.headings.host.notes'
|
||||
%blockquote= host.housing_data['notes'].html_safe
|
||||
%table.guests.admin-edit
|
||||
%tr
|
||||
%th.corner
|
||||
%th=_'forms.labels.generic.city'
|
||||
%th=_'forms.labels.generic.housing'
|
||||
%th=_'articles.admin.housing.headings.arrival_departure'
|
||||
%th=_'articles.conference_registration.headings.companion'
|
||||
%th=_'forms.labels.generic.food'
|
||||
%th=_'forms.labels.generic.allergies'
|
||||
%th=_'forms.labels.generic.other'
|
||||
- @guests.each do | id, registration |
|
||||
%tr.selectable{class: get_housing_match(host, registration, space).to_s.gsub('_', '-'), data: {host: host.id, guest: id, space: space}}
|
||||
%th=registration.user.name
|
||||
%td=registration.city
|
||||
%td=registration.housing.present? ? (_"articles.conference_registration.questions.housing.#{registration.housing}") : ''
|
||||
%td=date_span(registration.arrival.to_date, registration.departure.to_date)
|
||||
- companion = companion(registration)
|
||||
%td=companion.present? ? (companion.is_a?(User) ? companion.named_email : (_"articles.conference_registration.terms.registration_status.#{companion}")) : ''
|
||||
%td=registration.food.present? ? (_"articles.conference_registration.questions.food.#{registration.food}") : ''
|
||||
%td=registration.allergies
|
||||
%td
|
||||
.p=registration.other
|
||||
|
||||
.legend
|
||||
%h4 Legend
|
||||
%ul
|
||||
%li.good-match Good Match
|
||||
%li.bad-match Poor Match
|
||||
%li.selected-space Also in this space
|
||||
%li.other-space Also with this host
|
||||
%li.other-host Already hosted
|
||||
@@ -1,37 +0,0 @@
|
||||
- add_inline_script :registrations
|
||||
.details
|
||||
= data_set(:h4, 'articles.admin.stats.headings.completed_registrations') do
|
||||
= (@completed_registrations || 0).to_s
|
||||
= data_set(:h4, 'articles.admin.stats.headings.incomplete_registrations') do
|
||||
= ((@registration_count - @completed_registrations) || 0).to_s
|
||||
= data_set(:h4, 'articles.admin.stats.headings.bikes') do
|
||||
= (@completed_registrations || 0) > 0 ? "#{@bikes} (#{number_to_percentage(@bikes / @completed_registrations.to_f * 100.0)})" : "0"
|
||||
= data_set(:h4, 'articles.admin.stats.headings.food.meat') do
|
||||
= (@food[:all] || 0) > 0 ? "#{@food[:meat]} (#{number_to_percentage(@food[:meat] / @food[:all].to_f * 100.0)})" : "0"
|
||||
= data_set(:h4, 'articles.admin.stats.headings.food.vegetarian') do
|
||||
= (@food[:all] || 0) > 0 ? "#{@food[:vegetarian]} (#{number_to_percentage(@food[:vegetarian] / @food[:all].to_f * 100.0)})" : "0"
|
||||
= data_set(:h4, 'articles.admin.stats.headings.food.vegan') do
|
||||
= (@food[:all] || 0) > 0 ? "#{@food[:vegan]} (#{number_to_percentage(@food[:vegan] / @food[:all].to_f * 100.0)})" : "0"
|
||||
= data_set(:h4, 'articles.admin.stats.headings.donation_count') do
|
||||
= (@completed_registrations || 0) > 0 ? "#{@donation_count} (#{number_to_percentage(@donation_count / @completed_registrations.to_f * 100.0)})" : "0"
|
||||
= data_set(:h4, 'articles.admin.stats.headings.donation_total') do
|
||||
= "$#{@donations || 0.00}"
|
||||
.actions
|
||||
= link_to (_'links.download.Excel'), administration_step_path(@this_conference.slug, :stats, :format => :xlsx), class: [:button, :download]
|
||||
= link_to (_'links.download.Organizations_Excel'), administration_step_path(@this_conference.slug, :organizations, :format => :xlsx), class: [:button, :download, :subdued]
|
||||
%h4=_'articles.admin.stats.headings.Registrations'
|
||||
.goes-fullscreen#registrations-table
|
||||
.flex-column
|
||||
= searchfield :search, nil, big: true, stretch: true
|
||||
%a.button{data: { expands: 'registrations-table' }}='expand'
|
||||
%a.button.delete{data: { contracts: 'registrations-table' }}='close'
|
||||
%a.button.modify{data: { 'opens-modal': 'new-registration' }}='+'
|
||||
.table-scroller
|
||||
= html_table @excel_data, registrations_table_options
|
||||
= form_tag administration_update_path(@this_conference.slug, :stats), id: 'new-registration', class: 'modal-edit' do
|
||||
.modal-edit-overlay{data: { 'closes-modal': 'new-registration' }}
|
||||
.modal-edit-content
|
||||
=html_edit_table @excel_data, registrations_edit_table_options
|
||||
.actions.right
|
||||
%a.button.subdued{data: { 'closes-modal': 'new-registration' }}='Cancel'
|
||||
= button_tag :save, value: :save, class: :modify
|
||||
@@ -1,18 +0,0 @@
|
||||
.table.workshop-blocks
|
||||
.table-tr.header
|
||||
.table-th=_'forms.labels.generic.block_number'
|
||||
.table-th=_'forms.labels.generic.time'
|
||||
.table-th=_'forms.labels.generic.length'
|
||||
.table-th=_'forms.labels.generic.days'
|
||||
.table-th.form
|
||||
- @workshop_blocks.each_with_index do | info, block |
|
||||
- is_new = info['time'].blank?
|
||||
= form_tag administration_update_path(@this_conference.slug, :workshop_times), class: ['table-tr', is_new ? 'new' : 'saved'] do
|
||||
.table-th.center.big= is_new ? '' : (block + 1)
|
||||
.table-td=hour_select info['time'], small: true, label: false
|
||||
.table-td=length_select info['length'], {small: true, label: false}, 0.5, 2
|
||||
.table-td=checkboxes :days, @block_days, info['days'].map(&:to_i), 'date.day_names', vertical: true, small: true
|
||||
.table-td.form
|
||||
= hidden_field_tag :workshop_block, block
|
||||
= button_tag :delete_block, value: :delete_block, class: [:small, :delete] if block == @workshop_blocks.length - 2
|
||||
= button_tag (is_new ? :add_block : :update_block), value: :save_block, class: [:small, :add]
|
||||
@@ -1,35 +1,35 @@
|
||||
= render 'page_header', :page_key => 'Email_Participants'
|
||||
%article
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
- if @email_sent == :yes
|
||||
%p=_('articles.conference_registration.paragraphs.participants_emailed',"All participants of #{@this_conference.title} have been emailed.", :vars => {:conference_title => @this_conference.title})
|
||||
- if @email_sent != :yes
|
||||
=m('articles.conference_registration.paragraphs.Email_Participants','This page is used to contact all participants. Text can be entered as [Markdown](http://daringfireball.net/projects/markdown/basics). Pressing \'test\' will send the email only to you, make sure you do this and use caution in general before pressing \'send\'')
|
||||
- if @email_sent == :yes || @email_sent == :preview
|
||||
%h2=_'articles.conference_registration.headings.Preview'
|
||||
.email-preview
|
||||
%h3=@subject
|
||||
=markdown @content
|
||||
- if @email_sent != :yes
|
||||
= form_tag broadcast_path(@this_conference.slug), class: 'composition' do
|
||||
- if @email_sent == :preview
|
||||
= hidden_field_tag :subject, @subject
|
||||
= hidden_field_tag :content, @content
|
||||
- else
|
||||
.text-field.input-field.big
|
||||
= label_tag :subject
|
||||
= text_field_tag :subject, @subject, :required => true
|
||||
.select-field.input-field
|
||||
= label_tag :content
|
||||
= 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})
|
||||
- if @email_sent == :preview # let the user send the
|
||||
= button_tag :edit, :value => :edit
|
||||
= button_tag :send, :value => :send
|
||||
- else
|
||||
= button_tag :preview, :value => :preview
|
||||
= button_tag :test, :value => :test
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
- if @email_sent == :yes
|
||||
%p=_('articles.conference_registration.paragraphs.participants_emailed',"All participants of #{@this_conference.title} have been emailed.", :vars => {:conference_title => @this_conference.title})
|
||||
- if @email_sent != :yes
|
||||
=m('articles.conference_registration.paragraphs.Email_Participants','This page is used to contact all participants. Text can be entered as [Markdown](http://daringfireball.net/projects/markdown/basics). Pressing \'test\' will send the email only to you, make sure you do this and use caution in general before pressing \'send\'')
|
||||
- if @email_sent == :yes || @email_sent == :preview
|
||||
%h2=_'articles.conference_registration.headings.Preview'
|
||||
.email-preview
|
||||
%h3=@subject
|
||||
=markdown @content
|
||||
- if @email_sent != :yes
|
||||
= form_tag broadcast_path(@this_conference.slug), class: 'composition' do
|
||||
- if @email_sent == :preview
|
||||
= hidden_field_tag :subject, @subject
|
||||
= hidden_field_tag :content, @content
|
||||
- else
|
||||
.text-field.input-field.big
|
||||
= label_tag :subject
|
||||
= text_field_tag :subject, @subject, :required => true
|
||||
.select-field.input-field
|
||||
= label_tag :content
|
||||
= 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})
|
||||
- if @email_sent == :preview # let the user send the
|
||||
= button_tag :edit, :value => :edit
|
||||
= button_tag :send, :value => :send
|
||||
- else
|
||||
= button_tag :preview, :value => :preview
|
||||
= button_tag :test, :value => :test
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
= javascript_include_tag 'topojson.js'
|
||||
- add_inline_script :map
|
||||
- content_for :title do
|
||||
=I18n.t'articles.conferences.headings.Conference_List'
|
||||
|
||||
- content_for :banner do
|
||||
#header-title.map
|
||||
%svg#map.loading{preserveAspectRatio: 'xMinYMin slice', viewBox: "0 0 1880 550"}
|
||||
#tooltip
|
||||
|
||||
%article
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
%h2=_"articles.conferences.headings.conferences", :t
|
||||
%p=_"articles.conferences.paragraphs.conferences", :p
|
||||
- if logged_in? && current_user.administrator?
|
||||
.actions.left= link_to (_'forms.actions.generic.create'), new_conference_path, class: ['button', 'accented']
|
||||
= row do
|
||||
= columns(medium: 12, id: :conferences, class: 'list-view') do
|
||||
- @conference_list.each do | type, list |
|
||||
%h3=_"articles.conferences.headings.types.#{type.to_s}", :t
|
||||
%ul
|
||||
- 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}}
|
||||
.info
|
||||
%h4.title= conference.title
|
||||
.conference-details
|
||||
.location=location(conference.city)
|
||||
.date= date_span(conference.start_date.to_date, conference.end_date.to_date)
|
||||
.actions
|
||||
= link_to (_'articles.workshops.info.read_more'), conference_path(conference.slug), class: ['button', 'conference-link', 'small']
|
||||
- if logged_in?
|
||||
- if conference.host? current_user
|
||||
= link_to (_'forms.actions.generic.administrate'), administrate_conference_path(conference.slug), class: [:button, :modify, :small]
|
||||
- if current_user.administrator?
|
||||
= link_to (_'forms.actions.generic.edit'), edit_conference_path(conference.slug), class: [:button, :subdued, :small]
|
||||
- if conference.poster.present?
|
||||
.img
|
||||
%img{src: conference.poster.preview.url}
|
||||
@@ -1,13 +1,13 @@
|
||||
= render :partial => 'page_header', :locals => {:page_key => 'Conference_Registration'}
|
||||
= render :partial => 'page_header', :locals => {:page_key => 'Conference_Administration'}
|
||||
|
||||
- if @warnings.present?
|
||||
= row class: 'warnings', tag: :ul do
|
||||
- @warnings.each do | warning |
|
||||
= columns tag: :li do
|
||||
= warning
|
||||
= row class: 'warnings', tag: :ul do
|
||||
- @warnings.each do | warning |
|
||||
= columns tag: :li do
|
||||
= warning
|
||||
%article
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
%h2=_(@page_title)
|
||||
= registration_step_menu
|
||||
= render @register_template.to_s
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
%h2=_(@page_title)
|
||||
= registration_step_menu
|
||||
= render @register_template.to_s
|
||||
|
||||
@@ -1,34 +1,34 @@
|
||||
- location = @conference.organizations.first.locations.first
|
||||
- location_name = location.city + ', ' + (location.territory ? Carmen::Country.coded(location.country).subregions.coded(location.territory).name : location.country)
|
||||
|
||||
- title @conference.title
|
||||
- description "#{@conference.title} conference in #{location_name} for DIY bicycle collectives, co-ops, and advocacy groups"
|
||||
= render 'header'
|
||||
%article.row
|
||||
.columns.large-10
|
||||
- if @register_step
|
||||
%h2='Conference Registration'
|
||||
- if @actions
|
||||
= form_tag (@conference.url + '/register/').gsub(/\/\/+/, '/'), :method => :post, :multipart => @multipart do
|
||||
= hidden_field_tag :step, @register_step
|
||||
- if @error_message
|
||||
.columns.medium-8.medium-centered
|
||||
%p.error=@error_message
|
||||
= render @register_template
|
||||
.columns= form_actions @actions
|
||||
- else
|
||||
= render @register_template
|
||||
- else
|
||||
%h2=('About '+@conference.title)
|
||||
=p @conference, :info
|
||||
- if @conference.registration_open
|
||||
.columns.small-12.centered
|
||||
%a.button.register-now{href: @conference.url(:register)}
|
||||
=_'conference.Register_Now'
|
||||
|
||||
|
||||
- content_for :side_bar do
|
||||
%h5= @conference.title+' is hosted by:'
|
||||
%ul.preview-list.org-list.small-block-grid-2.large-block-grid-1
|
||||
- @conference.organizations.each do |organization|
|
||||
%li=render 'organizations/preview', :organization => organization
|
||||
- location = @conference.organizations.first.locations.first
|
||||
- location_name = location.city + ', ' + (location.territory ? Carmen::Country.coded(location.country).subregions.coded(location.territory).name : location.country)
|
||||
|
||||
- title @conference.title
|
||||
- description "#{@conference.title} conference in #{location_name} for DIY bicycle collectives, co-ops, and advocacy groups"
|
||||
= render 'header'
|
||||
%article.row
|
||||
.columns.large-10
|
||||
- if @register_step
|
||||
%h2='Conference Registration'
|
||||
- if @actions
|
||||
= form_tag (@conference.url + '/register/').gsub(/\/\/+/, '/'), :method => :post, :multipart => @multipart do
|
||||
= hidden_field_tag :step, @register_step
|
||||
- if @error_message
|
||||
.columns.medium-8.medium-centered
|
||||
%p.error=@error_message
|
||||
= render @register_template
|
||||
.columns= form_actions @actions
|
||||
- else
|
||||
= render @register_template
|
||||
- else
|
||||
%h2=('About '+@conference.title)
|
||||
=p @conference, :info
|
||||
- if @conference.registration_open
|
||||
.columns.small-12.centered
|
||||
%a.button.register-now{href: @conference.url(:register)}
|
||||
=_'conference.Register_Now'
|
||||
|
||||
|
||||
- content_for :side_bar do
|
||||
%h5= @conference.title+' is hosted by:'
|
||||
%ul.preview-list.org-list.small-block-grid-2.large-block-grid-1
|
||||
- @conference.organizations.each do |organization|
|
||||
%li=render 'organizations/preview', :organization => organization
|
||||
@@ -0,0 +1,5 @@
|
||||
- content_for :og_image do
|
||||
= @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
|
||||
@@ -1,83 +1,84 @@
|
||||
!!!
|
||||
%html{ lang: I18n.locale.to_s }
|
||||
%head
|
||||
%meta{ charset: 'utf-8' }
|
||||
%meta{ name: 'viewport', content: 'width=device-width, initial-scale=1.0' }
|
||||
- title = yield :title
|
||||
%title=_!('Bike!Bike!' + (content_for?(:title) ? " - #{title}" : ''))
|
||||
%meta{ name: 'description', content: (yield_or_default :description, I18n.t('page_descriptions.home')) }
|
||||
= csrf_meta_tags
|
||||
= stylesheets
|
||||
%link{ href: asset_path(@favicon), rel: 'shortcut icon', type: 'image/x-icon' }
|
||||
%link{ href: asset_path(@favicon), rel: 'icon', type: 'image/x-icon' }
|
||||
- @alt_lang_urls.each do |locale, url|
|
||||
%link{ rel: :alternate, hreflang: locale, href: url }
|
||||
- if content_for?(:og_image)
|
||||
- og_image = yield :og_image
|
||||
- og_image = request.base_url + og_image
|
||||
%meta{property: 'og:title', content: title}
|
||||
%meta{property: 'og:type', content: 'website'}
|
||||
%meta{property: 'og:image', content: og_image}
|
||||
%meta{name: "theme-color", content: @theme_colour}
|
||||
= yield :head
|
||||
%head
|
||||
%meta{ charset: 'utf-8' }
|
||||
%meta{ name: 'viewport', content: 'width=device-width, initial-scale=1.0' }
|
||||
- title = yield :title
|
||||
%title=_!('Bike!Bike!' + (content_for?(:title) ? " - #{title}" : ''))
|
||||
%meta{ name: 'description', content: (yield_or_default :description, I18n.t('page_descriptions.home')) }
|
||||
= csrf_meta_tags
|
||||
= stylesheets
|
||||
%link{ href: asset_path(@favicon), rel: 'shortcut icon', type: 'image/x-icon' }
|
||||
%link{ href: asset_path(@favicon), rel: 'icon', type: 'image/x-icon' }
|
||||
- @alt_lang_urls.each do |locale, url|
|
||||
%link{ rel: :alternate, hreflang: locale, href: url }
|
||||
- if content_for?(:og_image)
|
||||
- og_image = yield :og_image
|
||||
- og_image = request.base_url + og_image
|
||||
%meta{property: 'og:title', content: title}
|
||||
%meta{property: 'og:type', content: 'website'}
|
||||
%meta{property: 'og:image', content: og_image}
|
||||
%meta{name: "theme-color", content: @theme_colour}
|
||||
= yield :head
|
||||
|
||||
%body{ class: page_style }
|
||||
#primary-content
|
||||
= render 'shared/navbar'
|
||||
%main#main
|
||||
%header#banner=yield :banner
|
||||
- if @submenu
|
||||
=row do
|
||||
= columns(medium: 12) do
|
||||
%nav.sub-menu
|
||||
- @submenu.each do |href,key|
|
||||
%a{href: href, class: request.fullpath.start_with?(href) ? 'current' : nil}=_"menu.submenu.#{key}"
|
||||
- if has_content?
|
||||
#content=yield
|
||||
- else
|
||||
= yield
|
||||
#footer
|
||||
%footer= render 'shared/footer'
|
||||
#content-overlay
|
||||
#overlay
|
||||
.dlg#contact-dlg
|
||||
.dlg-content
|
||||
%h2.title=_'articles.contact.headings.contact'
|
||||
.dlg-inner= render 'contact', cancel_btn: true
|
||||
- if @confirmation_dlg.present?
|
||||
.dlg#confirmation-dlg
|
||||
.dlg-content
|
||||
%h2.title=_'modals.confirm'
|
||||
.dlg-inner
|
||||
%p.message=''
|
||||
%a.button.confirm=_'modals.yes_button'
|
||||
%button.delete.close=_'modals.no_button'
|
||||
- if @info_dlg.present?
|
||||
.dlg#info-dlg
|
||||
.dlg-content
|
||||
%h2.title=_'modals.info'
|
||||
.dlg-inner
|
||||
%p.message=''
|
||||
%button.close=_'modals.done_button'
|
||||
- if @login_dlg.present?
|
||||
.dlg#login-dlg
|
||||
.dlg-content
|
||||
%h2.title=_'forms.actions.generic.login'
|
||||
.dlg-inner
|
||||
= form_tag do_confirm_path, class: 'flex-form' do
|
||||
= hidden_field_tag :dest, settings_path
|
||||
= emailfield :email, nil, big: true
|
||||
= button_tag :continue, :value => :confirm_email
|
||||
.flex-form
|
||||
= link_to (_'forms.actions.generic.facebook_sign_in','Facebook Sign In'), auth_at_provider_path(provider: :facebook, dest: settings_path), class: [:button, :facebook]
|
||||
%button.close.subdued=_'forms.actions.generic.cancel'
|
||||
|
||||
- if @event_dlg.present?
|
||||
.event-dlg#event-dlg{ data: { type: :event } }
|
||||
.event-details
|
||||
.actions.right
|
||||
%a.more-details.button{href: '#'}=_'articles.workshops.info.read_more'
|
||||
%button.close-btn.subdued=_'forms.actions.generic.close'
|
||||
= yield :footer_scripts if content_for?(:footer_scripts)
|
||||
= inline_scripts
|
||||
= emit_js_translations
|
||||
%body{ class: page_style }
|
||||
#primary-content
|
||||
= render 'shared/navbar'
|
||||
%main#main
|
||||
- if content_for?(:banner)
|
||||
%header#banner=yield :banner
|
||||
- if @submenu
|
||||
=row do
|
||||
= columns(medium: 12) do
|
||||
%nav.sub-menu
|
||||
- @submenu.each do |href,key|
|
||||
%a{href: href, class: request.fullpath.start_with?(href) ? 'current' : nil}=_"menu.submenu.#{key}"
|
||||
- if has_content?
|
||||
#content=yield
|
||||
- else
|
||||
= yield
|
||||
#footer
|
||||
%footer= render 'shared/footer'
|
||||
#content-overlay
|
||||
#overlay
|
||||
.dlg#contact-dlg
|
||||
.dlg-content
|
||||
%h2.title=_'articles.contact.headings.contact'
|
||||
.dlg-inner= render 'contact', cancel_btn: true
|
||||
- if @confirmation_dlg.present?
|
||||
.dlg#confirmation-dlg
|
||||
.dlg-content
|
||||
%h2.title=_'modals.confirm'
|
||||
.dlg-inner
|
||||
%p.message=''
|
||||
%a.button.confirm=_'modals.yes_button'
|
||||
%button.delete.close=_'modals.no_button'
|
||||
- if @info_dlg.present?
|
||||
.dlg#info-dlg
|
||||
.dlg-content
|
||||
%h2.title=_'modals.info'
|
||||
.dlg-inner
|
||||
%p.message=''
|
||||
%button.close=_'modals.done_button'
|
||||
- if @login_dlg.present?
|
||||
.dlg#login-dlg
|
||||
.dlg-content
|
||||
%h2.title=_'forms.actions.generic.login'
|
||||
.dlg-inner
|
||||
= form_tag do_confirm_path, class: 'flex-form' do
|
||||
= hidden_field_tag :dest, settings_path
|
||||
= emailfield :email, nil, big: true
|
||||
= button_tag :continue, :value => :confirm_email
|
||||
.flex-form
|
||||
= link_to (_'forms.actions.generic.facebook_sign_in','Facebook Sign In'), auth_at_provider_path(provider: :facebook, dest: settings_path), class: [:button, :facebook]
|
||||
%button.close.subdued=_'forms.actions.generic.cancel'
|
||||
|
||||
- if @event_dlg.present?
|
||||
.event-dlg#event-dlg{ data: { type: :event } }
|
||||
.event-details
|
||||
.actions.right
|
||||
%a.more-details.button{href: '#'}=_'articles.workshops.info.read_more'
|
||||
%button.close-btn.subdued=_'forms.actions.generic.close'
|
||||
= yield :footer_scripts if content_for?(:footer_scripts)
|
||||
= inline_scripts
|
||||
= emit_js_translations
|
||||
|
||||
@@ -1,38 +1,38 @@
|
||||
.programme
|
||||
- schedule.each do |day, day_schedule|
|
||||
.programme-day
|
||||
%h2=I18n.l(conference.start_date + (day - 1).days, :format => "%A")
|
||||
- (0...day_parts.length).each do |day_part|
|
||||
.programme-day-part
|
||||
- times = schedule_start_and_end_times(day_part, day_parts, day_schedule)
|
||||
- if times.present?
|
||||
%h3=_"articles.headings.schedule.day_parts.#{day_parts.keys[day_part].to_s}" if day_parts.length > 1
|
||||
%table.schedule
|
||||
%tr
|
||||
%th
|
||||
- (times.first...times.last).step(0.5).each do |t|
|
||||
- t = t.to_i if t == t.to_i
|
||||
%th=I18n.l(Date.today + t.hours, :format => :short)
|
||||
- day_schedule[:locations].each do |location, location_schedule|
|
||||
%tr
|
||||
%th
|
||||
%a{href: "https://maps.google.com/maps?q=#{URI.escape((locations[location.to_s].address || '').gsub(/\s+/, '+'))}", target: :_blank}
|
||||
=locations[location.to_s].title
|
||||
- skip = 0
|
||||
- (times.first...times.last).step(0.5).each do |t|
|
||||
- t = t.to_i if t == t.to_i
|
||||
- if location_schedule[t].present?
|
||||
- workshop = location_schedule[t]
|
||||
- w = get_workshop(workshop, workshops, events)
|
||||
%td{:class => workshop_classes(w, show_interest) + [show_previews && workshop[:type] == :workshop ? 'previewable' : nil], :colspan => (workshop[:span] * 2), :id => "workshop-#{w.id}"}
|
||||
.title= w.title
|
||||
- if show_previews && workshop[:type] == :workshop
|
||||
.info
|
||||
%a.close{href: "#!"}
|
||||
= render 'workshops/show', :workshop => w, :preview => true
|
||||
%a{class: 'preview', href: "#workshop-#{w.id}"}
|
||||
- skip = workshop[:span] - 0.5
|
||||
- elsif skip > 0
|
||||
- skip -= 0.5
|
||||
- else
|
||||
%td.empty
|
||||
- schedule.each do |day, day_schedule|
|
||||
.programme-day
|
||||
%h2=I18n.l(conference.start_date + (day - 1).days, :format => "%A")
|
||||
- (0...day_parts.length).each do |day_part|
|
||||
.programme-day-part
|
||||
- times = schedule_start_and_end_times(day_part, day_parts, day_schedule)
|
||||
- if times.present?
|
||||
%h3=_"articles.headings.schedule.day_parts.#{day_parts.keys[day_part].to_s}" if day_parts.length > 1
|
||||
%table.schedule
|
||||
%tr
|
||||
%th
|
||||
- (times.first...times.last).step(0.5).each do |t|
|
||||
- t = t.to_i if t == t.to_i
|
||||
%th=I18n.l(Date.today + t.hours, :format => :short)
|
||||
- day_schedule[:locations].each do |location, location_schedule|
|
||||
%tr
|
||||
%th
|
||||
%a{href: "https://maps.google.com/maps?q=#{URI.escape((locations[location.to_s].address || '').gsub(/\s+/, '+'))}", target: :_blank}
|
||||
=locations[location.to_s].title
|
||||
- skip = 0
|
||||
- (times.first...times.last).step(0.5).each do |t|
|
||||
- t = t.to_i if t == t.to_i
|
||||
- if location_schedule[t].present?
|
||||
- workshop = location_schedule[t]
|
||||
- w = get_workshop(workshop, workshops, events)
|
||||
%td{:class => workshop_classes(w, show_interest) + [show_previews && workshop[:type] == :workshop ? 'previewable' : nil], :colspan => (workshop[:span] * 2), :id => "workshop-#{w.id}"}
|
||||
.title= w.title
|
||||
- if show_previews && workshop[:type] == :workshop
|
||||
.info
|
||||
%a.close{href: "#!"}
|
||||
= render 'workshops/show', :workshop => w, :preview => true
|
||||
%a{class: 'preview', href: "#workshop-#{w.id}"}
|
||||
- skip = workshop[:span] - 0.5
|
||||
- elsif skip > 0
|
||||
- skip -= 0.5
|
||||
- else
|
||||
%td.empty
|
||||
|
||||
@@ -1,77 +1,77 @@
|
||||
= render 'conferences/page_header', :page_key => 'Edit_Schedule'
|
||||
%article
|
||||
= form_tag save_schedule_path(@this_conference.slug), class: 'composition' do
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
= render 'schedule/programme', :schedule => @schedule, :conference => @this_conference, :workshops => @workshops, :events => @events, :locations => @location_hash, :show_interest => false, :day_parts => @day_parts, :show_previews => false
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
- if @error_count && @error_count > 0
|
||||
%h3.errors
|
||||
=_'errors.schedule.errors',"Errors:"
|
||||
= @error_count
|
||||
- if @conflict_score && @conflict_score > 0
|
||||
%h3.conflict-score
|
||||
=_'errors.schedule.conflict_score',"Interest Conflicts:"
|
||||
= @conflict_score
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
= (hidden_field_tag :location_id, @location.id) if @location
|
||||
.actions
|
||||
- if @this_conference.workshop_schedule_published
|
||||
= button_tag :Unpublish, :value => :unpublish, :class => 'delete'
|
||||
- elsif @error_count < 1
|
||||
= button_tag :Publish, :value => :publish
|
||||
= button_tag :Preview, :value => :preview, :class => 'secondary'
|
||||
- unless @this_conference.workshop_schedule_published && @error_count > 0
|
||||
= button_tag :save, :value => :save
|
||||
- unless @saved
|
||||
.unsaved=_'errors.schedule.unsaved','Your changes will not be saved until you press Save or Publish'
|
||||
= row do
|
||||
= columns(medium: 6) do
|
||||
%h2=_"articles.headings.schedule.day_parts.Workshops"
|
||||
%ul.all-workshops
|
||||
- @workshops.each do |i|
|
||||
- error = @errors["w#{i.id}"]
|
||||
- warnings = @warnings["w#{i.id}"]
|
||||
%li{class: error.present? ? :error : nil}
|
||||
%h3=i.title
|
||||
.workshop-interest=_'articles.workshops.info.interested_count', "#{i.interested_count} people are interested in this workshop", :vars => {:count => i.interested_count}
|
||||
.time
|
||||
= select_tag "workshop_day[#{i.id}]", options_for_select(@days, i.conference_day), :include_blank => true
|
||||
= select_tag "workshop_hour[#{i.id}]", options_for_select(@hours, i.start_time ? i.start_time.strftime('%R') : nil), :include_blank => true
|
||||
= select_tag "workshop_duration[#{i.id}]", options_for_select(@workshop_durations, i.duration || 60)
|
||||
.location
|
||||
= select_tag "workshop_location[#{i.id}]", options_from_collection_for_select(@locations, :id, :title, i.event_location_id), :include_blank => true
|
||||
- if warnings
|
||||
%ul.warnings
|
||||
- warnings.each do |warning|
|
||||
%li=warning
|
||||
- if error
|
||||
.error-description=error
|
||||
= columns(medium: 6) do
|
||||
%h2=_"articles.headings.schedule.day_parts.Events"
|
||||
%ul.all-events
|
||||
- @events.each do |i|
|
||||
- error = @errors["e#{i.id}"]
|
||||
%li{:class => [i.event_type, error.present? ? :error : nil]}
|
||||
%h3=i.title
|
||||
.time
|
||||
= select_tag "event_day[#{i.id}]", options_for_select(@days, i.conference_day)
|
||||
= select_tag "event_hour[#{i.id}]", options_for_select(@hours, i.start_time ? i.start_time.strftime('%R') : '12:00')
|
||||
= select_tag "event_duration[#{i.id}]", options_for_select(@event_durations, i.duration || 60)
|
||||
.location
|
||||
= select_tag "event_location[#{i.id}]", options_from_collection_for_select(@locations, :id, :title, i.event_location_id), :include_blank => true
|
||||
- if error
|
||||
.error-description=error
|
||||
%h2=_"articles.headings.schedule.day_parts.Day_Parts"
|
||||
%ul.day_parts
|
||||
- [:morning, :afternoon, :evening].each do |day_part|
|
||||
%li
|
||||
%h4
|
||||
=_"articles.headings.schedule.day_parts.#{day_part.to_s}"
|
||||
- h = (Date.today + @day_parts[day_part.to_s].to_f.hours).strftime('%R')
|
||||
- if day_part == :morning
|
||||
.select=h
|
||||
- else
|
||||
= select_tag "day_parts[#{day_part.to_s}]", options_for_select(@hours, h)
|
||||
= form_tag save_schedule_path(@this_conference.slug), class: 'composition' do
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
= render 'schedule/programme', :schedule => @schedule, :conference => @this_conference, :workshops => @workshops, :events => @events, :locations => @location_hash, :show_interest => false, :day_parts => @day_parts, :show_previews => false
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
- if @error_count && @error_count > 0
|
||||
%h3.errors
|
||||
=_'errors.schedule.errors',"Errors:"
|
||||
= @error_count
|
||||
- if @conflict_score && @conflict_score > 0
|
||||
%h3.conflict-score
|
||||
=_'errors.schedule.conflict_score',"Interest Conflicts:"
|
||||
= @conflict_score
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
= (hidden_field_tag :location_id, @location.id) if @location
|
||||
.actions
|
||||
- if @this_conference.workshop_schedule_published
|
||||
= button_tag :Unpublish, :value => :unpublish, :class => 'delete'
|
||||
- elsif @error_count < 1
|
||||
= button_tag :Publish, :value => :publish
|
||||
= button_tag :Preview, :value => :preview, :class => 'secondary'
|
||||
- unless @this_conference.workshop_schedule_published && @error_count > 0
|
||||
= button_tag :save, :value => :save
|
||||
- unless @saved
|
||||
.unsaved=_'errors.schedule.unsaved','Your changes will not be saved until you press Save or Publish'
|
||||
= row do
|
||||
= columns(medium: 6) do
|
||||
%h2=_"articles.headings.schedule.day_parts.Workshops"
|
||||
%ul.all-workshops
|
||||
- @workshops.each do |i|
|
||||
- error = @errors["w#{i.id}"]
|
||||
- warnings = @warnings["w#{i.id}"]
|
||||
%li{class: error.present? ? :error : nil}
|
||||
%h3=i.title
|
||||
.workshop-interest=_'articles.workshops.info.interested_count', "#{i.interested_count} people are interested in this workshop", :vars => {:count => i.interested_count}
|
||||
.time
|
||||
= select_tag "workshop_day[#{i.id}]", options_for_select(@days, i.conference_day), :include_blank => true
|
||||
= select_tag "workshop_hour[#{i.id}]", options_for_select(@hours, i.start_time ? i.start_time.strftime('%R') : nil), :include_blank => true
|
||||
= select_tag "workshop_duration[#{i.id}]", options_for_select(@workshop_durations, i.duration || 60)
|
||||
.location
|
||||
= select_tag "workshop_location[#{i.id}]", options_from_collection_for_select(@locations, :id, :title, i.event_location_id), :include_blank => true
|
||||
- if warnings
|
||||
%ul.warnings
|
||||
- warnings.each do |warning|
|
||||
%li=warning
|
||||
- if error
|
||||
.error-description=error
|
||||
= columns(medium: 6) do
|
||||
%h2=_"articles.headings.schedule.day_parts.Events"
|
||||
%ul.all-events
|
||||
- @events.each do |i|
|
||||
- error = @errors["e#{i.id}"]
|
||||
%li{:class => [i.event_type, error.present? ? :error : nil]}
|
||||
%h3=i.title
|
||||
.time
|
||||
= select_tag "event_day[#{i.id}]", options_for_select(@days, i.conference_day)
|
||||
= select_tag "event_hour[#{i.id}]", options_for_select(@hours, i.start_time ? i.start_time.strftime('%R') : '12:00')
|
||||
= select_tag "event_duration[#{i.id}]", options_for_select(@event_durations, i.duration || 60)
|
||||
.location
|
||||
= select_tag "event_location[#{i.id}]", options_from_collection_for_select(@locations, :id, :title, i.event_location_id), :include_blank => true
|
||||
- if error
|
||||
.error-description=error
|
||||
%h2=_"articles.headings.schedule.day_parts.Day_Parts"
|
||||
%ul.day_parts
|
||||
- [:morning, :afternoon, :evening].each do |day_part|
|
||||
%li
|
||||
%h4
|
||||
=_"articles.headings.schedule.day_parts.#{day_part.to_s}"
|
||||
- h = (Date.today + @day_parts[day_part.to_s].to_f.hours).strftime('%R')
|
||||
- if day_part == :morning
|
||||
.select=h
|
||||
- else
|
||||
= select_tag "day_parts[#{day_part.to_s}]", options_for_select(@hours, h)
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
= render 'conferences/page_header', :page_key => 'Schedule'
|
||||
%article
|
||||
- if @this_conference.host?(current_user)
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
- if @locations.present? && @events.present?
|
||||
.actions.left
|
||||
= link_to (_'actions.schedule.edit','Edit Schedule'), edit_schedule_path(@this_conference.slug), class: [:button]
|
||||
= row do
|
||||
= columns(medium: 6) do
|
||||
%h2=_'articles.schedule.headings.Events'
|
||||
- if @events
|
||||
%ul.events
|
||||
- @events.each do |event|
|
||||
%li
|
||||
%h3=_!event.title
|
||||
= link_to (_'actions.events.edit','Edit'), edit_event_path(@this_conference.slug, event.id), class: [:button, :modify]
|
||||
.actions.left
|
||||
= link_to (_'actions.events.create','Add Event'), add_event_path(@this_conference.slug), class: [:button]
|
||||
= columns(medium: 6) do
|
||||
%h2=_'articles.schedule.headings.Locations'
|
||||
- if @locations
|
||||
%ul.locations
|
||||
- @locations.each do |location|
|
||||
%li
|
||||
%h3=_!location.title
|
||||
= link_to (_'actions.locations.edit','Edit'), edit_location_path(@this_conference.slug, location.id), class: [:button, :modify]
|
||||
.actions.left
|
||||
= link_to (_'actions.schedule.edit','Add Location'), add_location_path(@this_conference.slug), class: [:button]
|
||||
- if @this_conference.host?(current_user)
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
- if @locations.present? && @events.present?
|
||||
.actions.left
|
||||
= link_to (_'actions.schedule.edit','Edit Schedule'), edit_schedule_path(@this_conference.slug), class: [:button]
|
||||
= row do
|
||||
= columns(medium: 6) do
|
||||
%h2=_'articles.schedule.headings.Events'
|
||||
- if @events
|
||||
%ul.events
|
||||
- @events.each do |event|
|
||||
%li
|
||||
%h3=_!event.title
|
||||
= link_to (_'actions.events.edit','Edit'), edit_event_path(@this_conference.slug, event.id), class: [:button, :modify]
|
||||
.actions.left
|
||||
= link_to (_'actions.events.create','Add Event'), add_event_path(@this_conference.slug), class: [:button]
|
||||
= columns(medium: 6) do
|
||||
%h2=_'articles.schedule.headings.Locations'
|
||||
- if @locations
|
||||
%ul.locations
|
||||
- @locations.each do |location|
|
||||
%li
|
||||
%h3=_!location.title
|
||||
= link_to (_'actions.locations.edit','Edit'), edit_location_path(@this_conference.slug, location.id), class: [:button, :modify]
|
||||
.actions.left
|
||||
= link_to (_'actions.schedule.edit','Add Location'), add_location_path(@this_conference.slug), class: [:button]
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
.external
|
||||
.facebook
|
||||
=_'links.footer.help_text.facebook', 'Join our facebook group' do |title|
|
||||
%a{href: 'https://www.facebook.com/groups/648758205249998/', target: :_blank, title: title}
|
||||
=svg_sprite 'icons', 'bb-icon-fb', 'facebook logo'
|
||||
.github
|
||||
%a{href: 'https://github.com/bikebike/BikeBike', target: :_blank}
|
||||
= off_screen(_'links.footer.text.Help_contribute')
|
||||
= svg_sprite 'icons', 'bb-icon-github', 'github logo'
|
||||
.user-controls
|
||||
- if logged_in?
|
||||
= link_to (_!current_user.name), settings_path, class: 'my-account'
|
||||
= _!' | '
|
||||
= link_to (_'forms.actions.generic.Log_out'), logout_path, class: 'logout'
|
||||
- else
|
||||
= signin_link
|
||||
%ul.locales
|
||||
- @alt_lang_urls.each do |locale, url|
|
||||
%li
|
||||
- locale_translation = language_name(locale, true)
|
||||
%a{href: url, lang: locale}
|
||||
=_'translate.content.change_locale', "Read in #{locale_translation}", vars: {language: locale_translation}, locale: locale if locale != I18n.locale.to_s
|
||||
.site-info
|
||||
.contact-us=link_to (_'links.footer.help_text.contact'), contact_path, id: 'contact-link'
|
||||
.copy
|
||||
=_'links.footer.help_text.contributors', 'Who contributed to building this website' do |title|
|
||||
=link_to :humans_txt, {title: title} do
|
||||
=((_!"©#{Date.today.strftime("%Y")} Bike!Bike!") || '').html_safe
|
||||
- protect do
|
||||
.external
|
||||
.facebook
|
||||
=_'links.footer.help_text.facebook', 'Join our facebook group' do |title|
|
||||
%a{href: 'https://www.facebook.com/groups/648758205249998/', target: :_blank, title: title}
|
||||
-#= svg_sprite 'icons', 'bb-icon-fb', 'facebook logo'
|
||||
= svg 'facebook', 'facebook logo'
|
||||
.github
|
||||
=_'links.footer.text.Help_contribute' do |title|
|
||||
%a{href: 'https://github.com/bikebike/BikeBike', target: :_blank, title: title}
|
||||
-#= svg_sprite 'icons', 'bb-icon-github', 'github logo'
|
||||
= svg 'github', 'github logo'
|
||||
.user-controls
|
||||
- if logged_in?
|
||||
= link_to (_!current_user.name), settings_path, class: 'my-account'
|
||||
= _!' | '
|
||||
= link_to (_'forms.actions.generic.Log_out'), logout_path, class: 'logout'
|
||||
- else
|
||||
= signin_link
|
||||
%ul.locales
|
||||
-# - @alt_lang_urls.each do |locale, url|
|
||||
-# %li
|
||||
-# - locale_translation = language_name(locale, true)
|
||||
-# %a{href: url, lang: locale}
|
||||
-# =_'translate.content.change_locale', "Read in #{locale_translation}", vars: {language: locale_translation}, locale: locale if locale != I18n.locale.to_s
|
||||
.site-info
|
||||
.contact-us=link_to (_'links.footer.help_text.contact'), contact_path, id: 'contact-link'
|
||||
.copy
|
||||
=_'links.footer.help_text.contributors', 'Who contributed to building this website' do |title|
|
||||
=link_to :humans_txt, {title: title} do
|
||||
=((_!"©#{Date.today.strftime("%Y")} Bike!Bike!") || '').html_safe
|
||||
|
||||
@@ -1,21 +1,27 @@
|
||||
%nav
|
||||
#main-nav
|
||||
- begin
|
||||
= row(class: 'inner-nav') do
|
||||
= columns(medium: 4, class: 'inner-nav') do
|
||||
= link_to home_path, :class => 'logo' do
|
||||
= svg_sprite('icons', "bb-icon-logo", "Logo")
|
||||
= svg_sprite('icons', "bb-icon-logo-text", "Logo Text")
|
||||
= off_screen _!'Bike Bike'
|
||||
= columns(medium: 8, class: 'nav') do
|
||||
= nav_link :about
|
||||
= nav_link :policy
|
||||
- case (@conference && @conference.registration_status ? @conference.registration_status.to_sym : :closed)
|
||||
- when :pre
|
||||
= nav_link register_path(@conference.slug), :pre_register, :register
|
||||
- when :open
|
||||
= nav_link register_path(@conference.slug), :register
|
||||
- else
|
||||
= render 'shared/donate_button', :email_address => (@conference.paypal_email_address || @conference.email_address || (@conference.organizations.present? && @conference.organizations.first.present? ? @conference.organizations.first.email_address : nil))
|
||||
- rescue
|
||||
|
||||
#main-nav
|
||||
= row(class: 'inner-nav') do
|
||||
= columns(medium: 3) do
|
||||
- protect do
|
||||
= link_to home_path, :class => 'logo' do
|
||||
-#= svg_sprite('icons', "bb-icon-logo", "Logo")
|
||||
-#= svg_sprite('icons', "bb-icon-logo-text", "Logo Text")
|
||||
= svg 'logo', (_!'Bike Bike')
|
||||
= svg 'logo-text', (_!'Bike Bike')
|
||||
= off_screen _!'Bike Bike'
|
||||
= columns(medium: 6, class: 'nav') do
|
||||
- protect do
|
||||
= nav_link :about
|
||||
= nav_link :policy
|
||||
= nav_link :conferences
|
||||
= columns(medium: 3, class: 'locale-nav') do
|
||||
- protect do
|
||||
%ul.locales
|
||||
- @alt_lang_urls.each do |locale, url|
|
||||
%li{class: locale == I18n.locale.to_s ? 'current' : nil}
|
||||
- locale_translation = language_name(locale, true)
|
||||
- translation_text = (_'translate.content.change_locale', "Read in #{locale_translation}", vars: {language: locale_translation}, locale: locale)
|
||||
%a{href: url, lang: locale, title: translation_text}
|
||||
%span{aria: {hidden: true}}=locale
|
||||
= off_screen translation_text
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
%img{src: "#{@conference.poster.full.url}", style: "max-width: 100%;"}
|
||||
%div{style: 'padding: 25px'}
|
||||
%h1=_'register.email.registration_confirmed.thank_you',"Hi #{@data[:user][:username]}, thank you for completing your registration. We'll see you at Bike!Bike!"
|
||||
%h2=_'register.email.registration_confirmed.please_pay',"If you have not already done so, we ask that you pay the registration donation as soon as you can. At your convenience please visit the link below."
|
||||
%div{style: 'text-align:center'}
|
||||
%h1{style: 'background-color:#F11845;text-align:center;display:inline-block;padding: 5px 20px 10px;'}
|
||||
%a{href: @confirmation_url, style: 'color:#FFF;text-decoration:none;'}
|
||||
=_'register.email.registration_confirmed.pay_now',"Pay Registration Fees"
|
||||
%p=(_'register.email.registration_confirmed.info',"We'll have housing, loaner bikes, and food arranged for your arrival. If you have any other questions or concerns, please email bikebike2014columbus@gmail.com").gsub(/(\w+@\w+\.\w{2,3})/, '<a href="mailto:\1">\1</a>').html_safe
|
||||
%p=_'register.email.registration_confirmed.contact',"For urgent/emergency matters, you can reach our Outreach Coordinator, Reda, at 503-984-9191 or Jason at 614-364-3636."
|
||||
%img{src: "#{@conference.poster.full.url}", style: "max-width: 100%;"}
|
||||
%div{style: 'padding: 25px'}
|
||||
%h1=_'register.email.registration_confirmed.thank_you',"Hi #{@data[:user][:username]}, thank you for completing your registration. We'll see you at Bike!Bike!"
|
||||
%h2=_'register.email.registration_confirmed.please_pay',"If you have not already done so, we ask that you pay the registration donation as soon as you can. At your convenience please visit the link below."
|
||||
%div{style: 'text-align:center'}
|
||||
%h1{style: 'background-color:#F11845;text-align:center;display:inline-block;padding: 5px 20px 10px;'}
|
||||
%a{href: @confirmation_url, style: 'color:#FFF;text-decoration:none;'}
|
||||
=_'register.email.registration_confirmed.pay_now',"Pay Registration Fees"
|
||||
%p=(_'register.email.registration_confirmed.info',"We'll have housing, loaner bikes, and food arranged for your arrival. If you have any other questions or concerns, please email bikebike2014columbus@gmail.com").gsub(/(\w+@\w+\.\w{2,3})/, '<a href="mailto:\1">\1</a>').html_safe
|
||||
%p=_'register.email.registration_confirmed.contact',"For urgent/emergency matters, you can reach our Outreach Coordinator, Reda, at 503-984-9191 or Jason at 614-364-3636."
|
||||
@@ -1,7 +1,7 @@
|
||||
%img{src: "#{@conference.poster.full.url}", style: "max-width: 100%;"}
|
||||
%div{style: 'padding: 25px'}
|
||||
%h1=_'register.email.registration.please_confirm',"Hi #{@data[:user][:username]}, please confirm your registration for #{@conference.title}", vars: {:username => @data[:user][:username]}
|
||||
%div{style: 'text-align:center'}
|
||||
%h1{style: 'background-color:#F11845;text-align:center;display:inline-block;padding: 5px 20px 10px;'}
|
||||
%a{href: @confirmation_url, style: 'color:#FFF;text-decoration:none;'}
|
||||
=_'register.email.registration.confirm_button',"Yes I'm Really Coming!"
|
||||
%img{src: "#{@conference.poster.full.url}", style: "max-width: 100%;"}
|
||||
%div{style: 'padding: 25px'}
|
||||
%h1=_'register.email.registration.please_confirm',"Hi #{@data[:user][:username]}, please confirm your registration for #{@conference.title}", vars: {:username => @data[:user][:username]}
|
||||
%div{style: 'text-align:center'}
|
||||
%h1{style: 'background-color:#F11845;text-align:center;display:inline-block;padding: 5px 20px 10px;'}
|
||||
%a{href: @confirmation_url, style: 'color:#FFF;text-decoration:none;'}
|
||||
=_'register.email.registration.confirm_button',"Yes I'm Really Coming!"
|
||||
@@ -1,46 +1,46 @@
|
||||
%h1 From
|
||||
%table.error-report
|
||||
%tr
|
||||
%th Key
|
||||
%th Value
|
||||
%tr
|
||||
%td User ID
|
||||
%td=@from.is_a?(User) ? @from.id : ''
|
||||
%tr
|
||||
%td User Name
|
||||
%td=@from.is_a?(User) ? @from.name : ''
|
||||
%tr
|
||||
%td User Email
|
||||
%td=@from.is_a?(User) ? @from.email : @from
|
||||
%tr
|
||||
%td IP Address
|
||||
%td=@request['remote_ip']
|
||||
%tr
|
||||
%td UUID
|
||||
%td=@request['uuid']
|
||||
%tr
|
||||
%td URL
|
||||
%td=@request['original_url']
|
||||
%tr
|
||||
%th Key
|
||||
%th Value
|
||||
%tr
|
||||
%td User ID
|
||||
%td=@from.is_a?(User) ? @from.id : ''
|
||||
%tr
|
||||
%td User Name
|
||||
%td=@from.is_a?(User) ? @from.name : ''
|
||||
%tr
|
||||
%td User Email
|
||||
%td=@from.is_a?(User) ? @from.email : @from
|
||||
%tr
|
||||
%td IP Address
|
||||
%td=@request['remote_ip']
|
||||
%tr
|
||||
%td UUID
|
||||
%td=@request['uuid']
|
||||
%tr
|
||||
%td URL
|
||||
%td=@request['original_url']
|
||||
|
||||
%h1 Message
|
||||
%blockquote=markdown(@message)
|
||||
|
||||
%h1 Params
|
||||
%table.error-report
|
||||
%tr
|
||||
%th Key
|
||||
%th Value
|
||||
- @params.each do | key, value |
|
||||
%tr
|
||||
%td=key
|
||||
%td=value
|
||||
%tr
|
||||
%th Key
|
||||
%th Value
|
||||
- @params.each do | key, value |
|
||||
%tr
|
||||
%td=key
|
||||
%td=value
|
||||
|
||||
%h1 Request Environment
|
||||
%table.error-report
|
||||
%tr
|
||||
%th Key
|
||||
%th Value
|
||||
- @request['env'].each do | key, value |
|
||||
%tr
|
||||
%td=key
|
||||
%td=value
|
||||
%tr
|
||||
%th Key
|
||||
%th Value
|
||||
- @request['env'].each do | key, value |
|
||||
%tr
|
||||
%td=key
|
||||
%td=value
|
||||
@@ -1,6 +1,6 @@
|
||||
%p=_'email.confirmation.paragraph.please_confirm','Hello! To gain access to registration and other features of Bike!Bike!, please confirm your email address by clicking on following link:'
|
||||
- link = "#{@host}/confirm/#{@confirmation.token}"
|
||||
%p
|
||||
%h3
|
||||
%b
|
||||
%a{href: link}=_'email.confirmation.link.please_confirm'
|
||||
%h3
|
||||
%b
|
||||
%a{href: link}=_'email.confirmation.link.please_confirm'
|
||||
|
||||
@@ -2,52 +2,52 @@
|
||||
%pre=@report
|
||||
|
||||
- if @exception.present?
|
||||
%h1 Backtrace
|
||||
%pre=@exception
|
||||
%h1 Backtrace
|
||||
%pre=@exception
|
||||
|
||||
%h1 Details
|
||||
%table.error-report
|
||||
%tr
|
||||
%th Key
|
||||
%th Value
|
||||
%tr
|
||||
%td User ID
|
||||
%td=@user.present? ? @user.id : ''
|
||||
%tr
|
||||
%td User Name
|
||||
%td=@user.present? ? @user.name : ''
|
||||
%tr
|
||||
%td User Email
|
||||
%td=@user.present? ? @user.email : ''
|
||||
%tr
|
||||
%td IP Address
|
||||
%td=@request['remote_ip']
|
||||
%tr
|
||||
%td UUID
|
||||
%td=@request['uuid']
|
||||
%tr
|
||||
%td URL
|
||||
%td=@request['original_url']
|
||||
%tr
|
||||
%td Time
|
||||
%td=@time
|
||||
%tr
|
||||
%th Key
|
||||
%th Value
|
||||
%tr
|
||||
%td User ID
|
||||
%td=@user.present? ? @user.id : ''
|
||||
%tr
|
||||
%td User Name
|
||||
%td=@user.present? ? @user.name : ''
|
||||
%tr
|
||||
%td User Email
|
||||
%td=@user.present? ? @user.email : ''
|
||||
%tr
|
||||
%td IP Address
|
||||
%td=@request['remote_ip']
|
||||
%tr
|
||||
%td UUID
|
||||
%td=@request['uuid']
|
||||
%tr
|
||||
%td URL
|
||||
%td=@request['original_url']
|
||||
%tr
|
||||
%td Time
|
||||
%td=@time
|
||||
|
||||
%h1 Params
|
||||
%table.error-report
|
||||
%tr
|
||||
%th Key
|
||||
%th Value
|
||||
- @params.each do | key, value |
|
||||
%tr
|
||||
%td=key
|
||||
%td=value
|
||||
%tr
|
||||
%th Key
|
||||
%th Value
|
||||
- @params.each do | key, value |
|
||||
%tr
|
||||
%td=key
|
||||
%td=value
|
||||
|
||||
%h1 Request Environment
|
||||
%table.error-report
|
||||
%tr
|
||||
%th Key
|
||||
%th Value
|
||||
- @request['env'].each do | key, value |
|
||||
%tr
|
||||
%td=key
|
||||
%td=value
|
||||
%tr
|
||||
%th Key
|
||||
%th Value
|
||||
- @request['env'].each do | key, value |
|
||||
%tr
|
||||
%td=key
|
||||
%td=value
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
%p=_'email.general.paragraph.thank_you', "Thank you #{@user.firstname},", :vars => {:name => @user.firstname}
|
||||
|
||||
- if @conference.registration_status.to_sym == :pre
|
||||
%p=_'email.registration.paragraph.pre_registered', :vars => {:conference_title => @conference.title}
|
||||
%p=_'email.registration.paragraph.pre_registered', :vars => {:conference_title => @conference.title}
|
||||
- else
|
||||
%p=_'email.registration.paragraph.confirmed', :vars => {:conference_title => @conference.title}
|
||||
%p=_'email.registration.paragraph.confirmed', :vars => {:conference_title => @conference.title}
|
||||
|
||||
%p=_'email.general.paragraph.see_you', :vars => {:conference_location => @conference.location.city}
|
||||
%p=_'email.general.paragraph.see_you', :vars => {:conference_location => @conference.location.city}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
=_'email.general.paragraph.thank_you', "Thank you #{@user.firstname},", :vars => {:name => @user.firstname}
|
||||
|
||||
- if @conference.registration_status.to_sym == :pre
|
||||
=_'email.general.paragraph.pre_registered', "You have successfully pre-registered for #{@conference.title}. We will let you know when registration is fully open and if there is any important news about the conference that you should know about. We encourage you to create or volunteer to facilitate workshops soon. You can do that, or change your registration details at any time by clicking on the pre-register link again.", :vars => {:conference_title => @conference.title}
|
||||
- else
|
||||
=_'email.registration.paragraph.confirmed', :vars => {:conference_title => @conference.title}
|
||||
|
||||
=_'email.general.paragraph.see_you', :vars => {:conference_location => @conference.location.city}
|
||||
@@ -1,15 +1,15 @@
|
||||
%p=_('email.workshop_comment.paragraph.user_said', vars: {user_name: @comment.user.name})
|
||||
%blockquote
|
||||
=_!@comment.comment
|
||||
=_!@comment.comment
|
||||
|
||||
- if @comment.reply?
|
||||
- original_comment = @comment.comment_object
|
||||
%p=_('email.workshop_comment.paragraph.user_said', vars: {user_name: original_comment.user.name})
|
||||
%blockquote
|
||||
=_!original_comment.comment
|
||||
- if @comment.reply?
|
||||
- original_comment = @comment.comment_object
|
||||
%p=_('email.workshop_comment.paragraph.user_said', vars: {user_name: original_comment.user.name})
|
||||
%blockquote
|
||||
=_!original_comment.comment
|
||||
|
||||
|
||||
%p
|
||||
=_'email.workshop.paragraph.view_workshop'
|
||||
- workshop_link = @host + view_workshop_path(@workshop.conference.slug, @workshop.id)
|
||||
%a{href: workshop_link}=workshop_link
|
||||
=_'email.workshop.paragraph.view_workshop'
|
||||
- workshop_link = @host + view_workshop_path(@workshop.conference.slug, @workshop.id)
|
||||
%a{href: workshop_link}=workshop_link
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
%blockquote=CGI::escapeHTML(@message || '').gsub(/\n/, '<br>').html_safe
|
||||
|
||||
%p
|
||||
=_'email.workshop.paragraph.request_instructions',"You can approve or deny this request on your workshop page: "
|
||||
- workshop_link = @host + view_workshop_path(@conference.slug, @workshop.id)
|
||||
%a{href: workshop_link}=workshop_link
|
||||
=_'email.workshop.paragraph.request_instructions',"You can approve or deny this request on your workshop page: "
|
||||
- workshop_link = @host + view_workshop_path(@conference.slug, @workshop.id)
|
||||
%a{href: workshop_link}=workshop_link
|
||||
|
||||
%p=_'email.workshop.paragraph.request_reply_instructions',"You can also reply directly to this email to ask follow-up questions."
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
%p=_('email.translations.paragraph.workshop_original_content_changed', "#{@translator.name} has modified the original content for #{@workshop.title}. Translations may need to be updated.", vars: {user_name: @translator.firstname, workshop_title: @workshop.title})
|
||||
|
||||
- @data.each do |field, values|
|
||||
%h2=_"forms.labels.generic.#{field.to_s}"
|
||||
%b=_'email.translations.headings.new_value'
|
||||
%blockquote=_!values[:new].html_safe
|
||||
%b=_'email.translations.headings.old_value'
|
||||
- if values[:old].present?
|
||||
%blockquote=_!values[:old].html_safe
|
||||
%h2=_"forms.labels.generic.#{field.to_s}"
|
||||
%b=_'email.translations.headings.new_value'
|
||||
%blockquote=_!values[:new].html_safe
|
||||
%b=_'email.translations.headings.old_value'
|
||||
- if values[:old].present?
|
||||
%blockquote=_!values[:old].html_safe
|
||||
|
||||
%p
|
||||
=_'email.workshop.paragraph.view_workshop',"You can view the workshop here: "
|
||||
- workshop_link = @host + view_workshop_path(@workshop.conference.slug, @workshop.id)
|
||||
%a{href: workshop_link}=workshop_link
|
||||
=_'email.workshop.paragraph.view_workshop',"You can view the workshop here: "
|
||||
- workshop_link = @host + view_workshop_path(@workshop.conference.slug, @workshop.id)
|
||||
%a{href: workshop_link}=workshop_link
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
%p=_('email.translations.paragraph.workshop_translated', "#{@translator.name} has modified the #{@locale_name} translation for #{@workshop.title}.", vars: {user_name: @translator.firstname, language: @locale_name, workshop_title: @workshop.title})
|
||||
|
||||
- @data.each do |field, values|
|
||||
%h2=_"forms.labels.generic.#{field.to_s}"
|
||||
%b=_'email.translations.headings.new_value'
|
||||
%blockquote=_!values[:new].html_safe
|
||||
%b=_'email.translations.headings.old_value'
|
||||
- if values[:old].present?
|
||||
%blockquote=_!values[:old].html_safe
|
||||
%h2=_"forms.labels.generic.#{field.to_s}"
|
||||
%b=_'email.translations.headings.new_value'
|
||||
%blockquote=_!values[:new].html_safe
|
||||
%b=_'email.translations.headings.old_value'
|
||||
- if values[:old].present?
|
||||
%blockquote=_!values[:old].html_safe
|
||||
|
||||
%p
|
||||
=_'email.workshop.paragraph.view_workshop',"You can view the workshop here: "
|
||||
- workshop_link = @host + view_workshop_path(@workshop.conference.slug, @workshop.id)
|
||||
%a{href: workshop_link}=workshop_link
|
||||
=_'email.workshop.paragraph.view_workshop',"You can view the workshop here: "
|
||||
- workshop_link = @host + view_workshop_path(@workshop.conference.slug, @workshop.id)
|
||||
%a{href: workshop_link}=workshop_link
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
=_('email.translations.paragraph.workshop_translated', "#{@translator.firstname} has modified the #{@locale_name} translation for #{@workshop.title}.", vars: {user_name: @translator.firstname, language: @locale_name, workshop_title: @workshop.title})
|
||||
|
||||
|
||||
- @data.each do |field, values|
|
||||
=(_!'** ') + (_"forms.labels.generic.#{field.to_s}")
|
||||
=(_!' - ') + (_'email.translations.headings.new_value')
|
||||
=(_!' ------------------------------ ')
|
||||
=_!values[:new]
|
||||
=(_!' ------------------------------ ')
|
||||
|
||||
|
||||
=(_!' - ') + (_'email.translations.headings.old_value')
|
||||
=(_!' ------------------------------ ')
|
||||
=_!values[:old]
|
||||
=(_!' ------------------------------ ')
|
||||
|
||||
|
||||
=(_!' - ') + (_'email.translations.headings.diff')
|
||||
=(_!' ------------------------------ ')
|
||||
=(_!values[:diff][:text])
|
||||
=(_!' ------------------------------ ')
|
||||
|
||||
|
||||
=_'email.workshop.paragraph.view_workshop',"You can view the workshop here: "
|
||||
= view_workshop_path(@workshop.conference.slug, @workshop.id)
|
||||
@@ -1,89 +1,89 @@
|
||||
- is_facilitator = workshop.active_facilitator?(current_user)
|
||||
= row class: 'view-object' do
|
||||
= columns(medium: 12) do
|
||||
%h2=_!workshop.title
|
||||
.workshop-interest
|
||||
- if workshop.can_show_interest?(current_user)
|
||||
= form_tag toggle_workshop_interest_path(workshop.conference.slug, workshop.id), class: 'js-xhr' do
|
||||
%span.interest-text=interest_text(workshop)
|
||||
%span.interest-button=interest_button(workshop)
|
||||
- else
|
||||
%span.interest-text=interest_text(workshop)
|
||||
= richtext workshop.info
|
||||
- if preview.blank? && translations_available_for_editing
|
||||
.actions
|
||||
- translations_available_for_editing.each do |locale|
|
||||
= link_to (_'actions.workshops.Translate', "Translate into #{language_name(locale)}", :vars => {:language => language_name(locale)}), translate_workshop_url(workshop.conference.slug, workshop.id, locale), :class => [:button, :translate]
|
||||
= columns(medium: 6) do
|
||||
%h3=_'articles.workshops.headings.facilitators'
|
||||
.facilitators
|
||||
- workshop.workshop_facilitators.each do |f|
|
||||
- u = User.find(f.user_id)
|
||||
- is_this_user = (f.user_id == current_user.id)
|
||||
- if logged_in? && (workshop.public_facilitator?(u) || is_this_user || is_facilitator)
|
||||
.facilitator
|
||||
.name=_!u.name
|
||||
.role
|
||||
=_"roles.workshops.facilitator.#{workshop.role(u).to_s}"
|
||||
- if is_facilitator && preview.blank?
|
||||
.details
|
||||
.email=u.email
|
||||
- if f.role.to_sym == :requested
|
||||
=(link_to (_'actions.workshops.Approve'), approve_facilitate_workshop_request_path(workshop.conference.slug, workshop.id, f.user_id, 'approve'), :class => [:button, :modify])
|
||||
=(link_to (_'actions.workshops.Deny'), approve_facilitate_workshop_request_path(workshop.conference.slug, workshop.id, f.user_id, 'deny'), :class => [:button, :delete])
|
||||
- elsif workshop.can_remove?(current_user, u)
|
||||
=(link_with_confirmation (_'actions.workshops.Make_Owner'), (_'modals.workshops.facilitators.confirm_transfer_ownership', vars: { user_name: u.name}),approve_facilitate_workshop_request_path(workshop.conference.slug, workshop.id, f.user_id, 'switch_ownership'), :class => [:button, :modify]) unless f.role.to_sym == :creator || !workshop.creator?(current_user)
|
||||
=(link_with_confirmation (_"actions.workshops.#{is_this_user ? 'Leave' : 'Remove'}"), (_"modals.workshops.facilitators.confirm_remove#{is_this_user ? '_self' : ''}", vars: { user_name: u.name}), approve_facilitate_workshop_request_path(workshop.conference.slug, workshop.id, f.user_id, 'remove'), :class => [:button, :delete])
|
||||
- if is_this_user && workshop.requested_collaborator?(current_user)
|
||||
.details
|
||||
=(link_with_confirmation (_'actions.workshops.Cancel_Request'), (_'modals.workshops.facilitators.confirm_cancel_request'), approve_facilitate_workshop_request_path(workshop.conference.slug, workshop.id, f.user_id, 'remove'), :class => [:button, :delete])
|
||||
- unless preview.present?
|
||||
=(link_to (_'actions.workshops.Facilitate'), facilitate_workshop_path(workshop.conference.slug, workshop.id), :class => [:button, workshop.needs_facilitators ? :accented : :subdued]) unless workshop.facilitator?(current_user)
|
||||
- if is_facilitator
|
||||
%h4=_'articles.workshops.headings.add_facilitator','Add a facilitator'
|
||||
= form_tag workshop_add_facilitator_path(workshop.conference.slug, workshop.id), :class => 'add-facilitator mini-flex-form' do
|
||||
.email-field.input-field
|
||||
= email_field_tag :email, nil, required: true
|
||||
= label_tag :email
|
||||
= off_screen (_'forms.actions.aria.add'), 'add-new-desc'
|
||||
= button_tag :add, aria: { labelledby: 'add-new-desc' }
|
||||
- languages = JSON.parse(workshop.languages || '[]')
|
||||
- if languages.present?
|
||||
= columns(medium: 6) do
|
||||
%h3=_'articles.workshops.headings.languages','Workshop Language'
|
||||
%p= _!((languages.map { |x| _"languages.#{x}" }).join(', ').to_s.html_safe)
|
||||
- if workshop.theme.present?
|
||||
= columns(medium: 6) do
|
||||
%h3=_'articles.workshops.headings.theme','Theme'
|
||||
%p= Workshop.all_themes.include?((workshop.theme || '').to_sym) ? (_"workshop.options.theme.#{workshop.theme}") : workshop.theme
|
||||
- if is_facilitator || workshop.conference.host?(current_user)
|
||||
- needs = JSON.parse(workshop.needs || '[]')
|
||||
- if needs.present?
|
||||
= columns(medium: 6) do
|
||||
%h3=_'articles.workshops.headings.needs','What do you need?'
|
||||
%p= _!((needs.map { |x| _"workshop.options.needs.#{x}" }).join(', ').to_s.html_safe)
|
||||
- if workshop.notes.present?
|
||||
= columns(medium: 12, class: 'workshop-notes') do
|
||||
%h3=_'articles.workshops.headings.notes','Notes'
|
||||
= richtext workshop.notes, 3
|
||||
= columns(medium: 12, id: :comments) do
|
||||
%h3=_'articles.workshops.headings.Comments'
|
||||
%ul.comments
|
||||
- workshop.comments.each do | comment |
|
||||
%li.comment{id: "comment-#{comment.id}"}
|
||||
= comment(comment)
|
||||
- sub_comments = comment.comments
|
||||
- if sub_comments.present?
|
||||
%ul.sub-comments.comments
|
||||
- sub_comments.each do | sub_comment |
|
||||
%li.sub-comment.comment{id: "comment-#{sub_comment.id}"}
|
||||
= comment(sub_comment)
|
||||
= form_tag workshop_comment_path(workshop.conference.slug, workshop.id) do
|
||||
= hidden_field_tag :comment_id, comment.id
|
||||
= textarea :reply, nil, plain: true, required: true, label: false, labelledby: "replyto-#{comment.id}"
|
||||
.actions.right
|
||||
= button_tag :reply, value: :reply, data: {opens: "#comment-#{comment.id} form", focus: :textarea}, class: :small, id: "replyto-#{comment.id}"
|
||||
= form_tag workshop_comment_path(workshop.conference.slug, workshop.id) do
|
||||
= textarea :comment, nil, plain: true, required: true, label: false, labelledby: :add_comment
|
||||
.actions.right
|
||||
= button_tag :add_comment, value: :add_comment, id: :add_comment
|
||||
= columns(medium: 12) do
|
||||
%h2=_!workshop.title
|
||||
.workshop-interest
|
||||
- if workshop.can_show_interest?(current_user)
|
||||
= form_tag toggle_workshop_interest_path(workshop.conference.slug, workshop.id), class: 'js-xhr' do
|
||||
%span.interest-text=interest_text(workshop)
|
||||
%span.interest-button=interest_button(workshop)
|
||||
- else
|
||||
%span.interest-text=interest_text(workshop)
|
||||
= richtext workshop.info
|
||||
- if preview.blank? && translations_available_for_editing
|
||||
.actions
|
||||
- translations_available_for_editing.each do |locale|
|
||||
= link_to (_'actions.workshops.Translate', "Translate into #{language_name(locale)}", :vars => {:language => language_name(locale)}), translate_workshop_url(workshop.conference.slug, workshop.id, locale), :class => [:button, :translate]
|
||||
= columns(medium: 6) do
|
||||
%h3=_'articles.workshops.headings.facilitators'
|
||||
.facilitators
|
||||
- workshop.workshop_facilitators.each do |f|
|
||||
- u = User.find(f.user_id)
|
||||
- is_this_user = (f.user_id == current_user.id)
|
||||
- if logged_in? && (workshop.public_facilitator?(u) || is_this_user || is_facilitator)
|
||||
.facilitator
|
||||
.name=_!u.name
|
||||
.role
|
||||
=_"roles.workshops.facilitator.#{workshop.role(u).to_s}"
|
||||
- if is_facilitator && preview.blank?
|
||||
.details
|
||||
.email=u.email
|
||||
- if f.role.to_sym == :requested
|
||||
=(link_to (_'actions.workshops.Approve'), approve_facilitate_workshop_request_path(workshop.conference.slug, workshop.id, f.user_id, 'approve'), :class => [:button, :modify])
|
||||
=(link_to (_'actions.workshops.Deny'), approve_facilitate_workshop_request_path(workshop.conference.slug, workshop.id, f.user_id, 'deny'), :class => [:button, :delete])
|
||||
- elsif workshop.can_remove?(current_user, u)
|
||||
=(link_with_confirmation (_'actions.workshops.Make_Owner'), (_'modals.workshops.facilitators.confirm_transfer_ownership', vars: { user_name: u.name}),approve_facilitate_workshop_request_path(workshop.conference.slug, workshop.id, f.user_id, 'switch_ownership'), :class => [:button, :modify]) unless f.role.to_sym == :creator || !workshop.creator?(current_user)
|
||||
=(link_with_confirmation (_"actions.workshops.#{is_this_user ? 'Leave' : 'Remove'}"), (_"modals.workshops.facilitators.confirm_remove#{is_this_user ? '_self' : ''}", vars: { user_name: u.name}), approve_facilitate_workshop_request_path(workshop.conference.slug, workshop.id, f.user_id, 'remove'), :class => [:button, :delete])
|
||||
- if is_this_user && workshop.requested_collaborator?(current_user)
|
||||
.details
|
||||
=(link_with_confirmation (_'actions.workshops.Cancel_Request'), (_'modals.workshops.facilitators.confirm_cancel_request'), approve_facilitate_workshop_request_path(workshop.conference.slug, workshop.id, f.user_id, 'remove'), :class => [:button, :delete])
|
||||
- unless preview.present?
|
||||
=(link_to (_'actions.workshops.Facilitate'), facilitate_workshop_path(workshop.conference.slug, workshop.id), :class => [:button, workshop.needs_facilitators ? :accented : :subdued]) unless workshop.facilitator?(current_user)
|
||||
- if is_facilitator
|
||||
%h4=_'articles.workshops.headings.add_facilitator','Add a facilitator'
|
||||
= form_tag workshop_add_facilitator_path(workshop.conference.slug, workshop.id), :class => 'add-facilitator mini-flex-form' do
|
||||
.email-field.input-field
|
||||
= email_field_tag :email, nil, required: true
|
||||
= label_tag :email
|
||||
= off_screen (_'forms.actions.aria.add'), 'add-new-desc'
|
||||
= button_tag :add, aria: { labelledby: 'add-new-desc' }
|
||||
- languages = JSON.parse(workshop.languages || '[]')
|
||||
- if languages.present?
|
||||
= columns(medium: 6) do
|
||||
%h3=_'articles.workshops.headings.languages','Workshop Language'
|
||||
%p= _!((languages.map { |x| _"languages.#{x}" }).join(', ').to_s.html_safe)
|
||||
- if workshop.theme.present?
|
||||
= columns(medium: 6) do
|
||||
%h3=_'articles.workshops.headings.theme','Theme'
|
||||
%p= Workshop.all_themes.include?((workshop.theme || '').to_sym) ? (_"workshop.options.theme.#{workshop.theme}") : workshop.theme
|
||||
- if is_facilitator || workshop.conference.host?(current_user)
|
||||
- needs = JSON.parse(workshop.needs || '[]')
|
||||
- if needs.present?
|
||||
= columns(medium: 6) do
|
||||
%h3=_'articles.workshops.headings.needs','What do you need?'
|
||||
%p= _!((needs.map { |x| _"workshop.options.needs.#{x}" }).join(', ').to_s.html_safe)
|
||||
- if workshop.notes.present?
|
||||
= columns(medium: 12, class: 'workshop-notes') do
|
||||
%h3=_'articles.workshops.headings.notes','Notes'
|
||||
= richtext workshop.notes, 3
|
||||
= columns(medium: 12, id: :comments) do
|
||||
%h3=_'articles.workshops.headings.Comments'
|
||||
%ul.comments
|
||||
- workshop.comments.each do | comment |
|
||||
%li.comment{id: "comment-#{comment.id}"}
|
||||
= comment(comment)
|
||||
- sub_comments = comment.comments
|
||||
- if sub_comments.present?
|
||||
%ul.sub-comments.comments
|
||||
- sub_comments.each do | sub_comment |
|
||||
%li.sub-comment.comment{id: "comment-#{sub_comment.id}"}
|
||||
= comment(sub_comment)
|
||||
= form_tag workshop_comment_path(workshop.conference.slug, workshop.id) do
|
||||
= hidden_field_tag :comment_id, comment.id
|
||||
= textarea :reply, nil, plain: true, required: true, label: false, labelledby: "replyto-#{comment.id}"
|
||||
.actions.right
|
||||
= button_tag :reply, value: :reply, data: {opens: "#comment-#{comment.id} form", focus: :textarea}, class: :small, id: "replyto-#{comment.id}"
|
||||
= form_tag workshop_comment_path(workshop.conference.slug, workshop.id) do
|
||||
= textarea :comment, nil, plain: true, required: true, label: false, labelledby: :add_comment
|
||||
.actions.right
|
||||
= button_tag :add_comment, value: :add_comment, id: :add_comment
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
%ul.workshop-list
|
||||
- workshops.sort_by{ |w| w.title.downcase }.each do |w|
|
||||
- is_interested = w.interested?(current_user)
|
||||
%li{class: [is_interested ? :interested : nil]}
|
||||
%h4.title=w.title
|
||||
.workshop-interest
|
||||
- if w.can_show_interest?(current_user)
|
||||
= form_tag toggle_workshop_interest_path(w.conference.slug, w.id), class: 'js-xhr' do
|
||||
%span.interest-text=interest_text(w)
|
||||
%span.interest-button=interest_button(w)
|
||||
- elsif w.interested_count > 0
|
||||
%span.interest-text=interest_text(w)
|
||||
.workshop-description=richtext w.info, 4
|
||||
.actions.right
|
||||
= link_to (_'articles.workshops.info.read_more'), view_workshop_path(w.conference.slug, w.id), class: ['workshop-link', :button, :small]
|
||||
- workshops.sort_by{ |w| w.title.downcase }.each do |w|
|
||||
- is_interested = w.interested?(current_user)
|
||||
%li{class: [is_interested ? :interested : nil]}
|
||||
%h4.title=w.title
|
||||
.workshop-interest
|
||||
- if w.can_show_interest?(current_user)
|
||||
= form_tag toggle_workshop_interest_path(w.conference.slug, w.id), class: 'js-xhr' do
|
||||
%span.interest-text=interest_text(w)
|
||||
%span.interest-button=interest_button(w)
|
||||
- elsif w.interested_count > 0
|
||||
%span.interest-text=interest_text(w)
|
||||
.workshop-description=richtext w.info, 4
|
||||
.actions.right
|
||||
= link_to (_'articles.workshops.info.read_more'), view_workshop_path(w.conference.slug, w.id), class: ['workshop-link', :button, :small]
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
= render 'conferences/page_header', :page_key => 'Workshops'
|
||||
|
||||
%article
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
%h2=_'articles.workshops.headings.Workshops'
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
%p=_'articles.workshops.paragraphs.Workshops', :p
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
%h3=_'articles.workshops.headings.Your_Workshops'
|
||||
= render 'workshops/workshop_previews', :workshops => @my_workshops
|
||||
= link_to (_'actions.workshops.create','New Workshop'), create_workshop_path(@this_conference.slug), class: [:button, :modify] if @conference.registration_open
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
%h3=_'articles.workshops.headings.All_Workshops'
|
||||
= render 'workshops/workshop_previews', :workshops => @workshops
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
%h2=_'articles.workshops.headings.Workshops'
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
%p=_'articles.workshops.paragraphs.Workshops', :p
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
%h3=_'articles.workshops.headings.Your_Workshops'
|
||||
= render 'workshops/workshop_previews', :workshops => @my_workshops
|
||||
= link_to (_'actions.workshops.create','New Workshop'), create_workshop_path(@this_conference.slug), class: [:button, :modify] if @conference.registration_open
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
%h3=_'articles.workshops.headings.All_Workshops'
|
||||
= render 'workshops/workshop_previews', :workshops => @workshops
|
||||
@@ -1,41 +1,41 @@
|
||||
= render 'conferences/page_header', :page_key => 'Conference_Registration'
|
||||
|
||||
%article
|
||||
= row do
|
||||
= form_tag save_workshop_path(@this_conference.slug), class: 'composition' do
|
||||
= columns(medium: 12) do
|
||||
- if @workshop.id.present?
|
||||
= hidden_field_tag :workshop_id, @workshop.id
|
||||
- if @is_translating
|
||||
%h2=_(@page_title, vars: @page_title_vars)
|
||||
= hidden_field_tag :translation, @translation
|
||||
- else
|
||||
%h2=_@page_title, :t
|
||||
- else
|
||||
%h2=_@page_title, :t
|
||||
= row do
|
||||
= form_tag save_workshop_path(@this_conference.slug), class: 'composition' do
|
||||
= columns(medium: 12) do
|
||||
- if @workshop.id.present?
|
||||
= hidden_field_tag :workshop_id, @workshop.id
|
||||
- if @is_translating
|
||||
%h2=_(@page_title, vars: @page_title_vars)
|
||||
= hidden_field_tag :translation, @translation
|
||||
- else
|
||||
%h2=_@page_title, :t
|
||||
- else
|
||||
%h2=_@page_title, :t
|
||||
|
||||
= registration_step_menu
|
||||
|
||||
= textfield :title, @title, required: true, lang: @translation, big: true, original_value: @is_translating ? @workshop.title! : nil, original_lang: @workshop.locale
|
||||
= textarea :info, @info, help: 'articles.workshops.paragraphs.info', lang: @translation, original_value: @is_translating ? richtext(@workshop.info!, 4).html_safe : nil, original_lang: @workshop.locale
|
||||
- if !@is_translating && (@workshop.id.blank? || @can_edit)
|
||||
= columns(medium: 6) do
|
||||
= checkboxes :languages, User.AVAILABLE_LANGUAGES, @languages, 'languages', vertical: true, heading: 'articles.workshops.headings.languages', help: 'articles.workshops.paragraphs.languages'
|
||||
= radiobuttons :theme, Workshop.all_themes, @workshop.theme, 'workshop.options.theme', vertical: true, heading: 'articles.workshops.headings.theme', help: 'articles.workshops.paragraphs.theme', other: true
|
||||
= columns(medium: 6) do
|
||||
= checkboxes :needs, Workshop.all_needs, JSON.parse(@workshop.needs || '[]'), 'workshop.options.needs', vertical: true, heading: 'articles.workshops.headings.needs', help: 'articles.workshops.paragraphs.needs'
|
||||
= radiobuttons :space, Workshop.all_spaces, @workshop.space, 'workshop.options.space', vertical: true, heading: 'articles.workshops.headings.space', help: 'articles.workshops.paragraphs.space'
|
||||
= registration_step_menu
|
||||
|
||||
= textfield :title, @title, required: true, lang: @translation, big: true, original_value: @is_translating ? @workshop.title! : nil, original_lang: @workshop.locale
|
||||
= textarea :info, @info, help: 'articles.workshops.paragraphs.info', lang: @translation, original_value: @is_translating ? richtext(@workshop.info!, 4).html_safe : nil, original_lang: @workshop.locale
|
||||
- if !@is_translating && (@workshop.id.blank? || @can_edit)
|
||||
= columns(medium: 6) do
|
||||
= checkboxes :languages, User.AVAILABLE_LANGUAGES, @languages, 'languages', vertical: true, heading: 'articles.workshops.headings.languages', help: 'articles.workshops.paragraphs.languages'
|
||||
= radiobuttons :theme, Workshop.all_themes, @workshop.theme, 'workshop.options.theme', vertical: true, heading: 'articles.workshops.headings.theme', help: 'articles.workshops.paragraphs.theme', other: true
|
||||
= columns(medium: 6) do
|
||||
= checkboxes :needs, Workshop.all_needs, JSON.parse(@workshop.needs || '[]'), 'workshop.options.needs', vertical: true, heading: 'articles.workshops.headings.needs', help: 'articles.workshops.paragraphs.needs'
|
||||
= radiobuttons :space, Workshop.all_spaces, @workshop.space, 'workshop.options.space', vertical: true, heading: 'articles.workshops.headings.space', help: 'articles.workshops.paragraphs.space'
|
||||
|
||||
%h3#needs_facilitators-label=_'articles.workshops.headings.needs_facilitators','Looking for help?'
|
||||
.input-field-help#needs_facilitators-desc=_'articles.workshops.paragraphs.needs_facilitators', :s, 2
|
||||
%fieldset.check-box-field.vertical.input-field{aria: {labeledby: 'needs_facilitators-label', describedby: 'needs_facilitators-desc'}}
|
||||
= check_box_tag :needs_facilitators, 1, @workshop.needs_facilitators
|
||||
= label_tag :needs_facilitators do
|
||||
= _'workshop.options.needs_facilitators', 'Needs Additional Facilitators'
|
||||
= columns(medium: 12) do
|
||||
= textarea :notes, @workshop.notes, warning: 'articles.workshops.paragraphs.notes'
|
||||
= columns(medium: 12) do
|
||||
.actions.next-prev
|
||||
= button_tag :save, value: :save
|
||||
= button_tag :cancel, value: :cancel, class: :subdued, formnovalidate: true
|
||||
%h3#needs_facilitators-label=_'articles.workshops.headings.needs_facilitators','Looking for help?'
|
||||
.input-field-help#needs_facilitators-desc=_'articles.workshops.paragraphs.needs_facilitators', :s, 2
|
||||
%fieldset.check-box-field.vertical.input-field{aria: {labeledby: 'needs_facilitators-label', describedby: 'needs_facilitators-desc'}}
|
||||
= check_box_tag :needs_facilitators, 1, @workshop.needs_facilitators
|
||||
= label_tag :needs_facilitators do
|
||||
= _'workshop.options.needs_facilitators', 'Needs Additional Facilitators'
|
||||
= columns(medium: 12) do
|
||||
= textarea :notes, @workshop.notes, warning: 'articles.workshops.paragraphs.notes'
|
||||
= columns(medium: 12) do
|
||||
.actions.next-prev
|
||||
= button_tag :save, value: :save
|
||||
= button_tag :cancel, value: :cancel, class: :subdued, formnovalidate: true
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
= registration_step_menu
|
||||
|
||||
%article
|
||||
= render 'workshops/show', :workshop => @workshop, :translations_available_for_editing => @translations_available_for_editing, :preview => false
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
.actions.next-prev
|
||||
= (link_to (_'actions.workshops.Edit'), edit_workshop_path(@this_conference.slug, @workshop.id), :class => [:button, :modify]) if @workshop.can_edit?(current_user)
|
||||
= (link_to (_'actions.workshops.Delete'), delete_workshop_path(@this_conference.slug, @workshop.id), :class => 'button delete') if @workshop.can_delete?(current_user)
|
||||
= render 'workshops/show', :workshop => @workshop, :translations_available_for_editing => @translations_available_for_editing, :preview => false
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
.actions.next-prev
|
||||
= (link_to (_'actions.workshops.Edit'), edit_workshop_path(@this_conference.slug, @workshop.id), :class => [:button, :modify]) if @workshop.can_edit?(current_user)
|
||||
= (link_to (_'actions.workshops.Delete'), delete_workshop_path(@this_conference.slug, @workshop.id), :class => 'button delete') if @workshop.can_delete?(current_user)
|
||||
|
||||
Reference in New Issue
Block a user