Added conference list page, administration tools, and re-designed conference administration
This commit is contained in:
@@ -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,50 @@
|
||||
.host-field
|
||||
%h4.inline=_'forms.labels.generic.event_location'
|
||||
- if @event_location.present?
|
||||
%span.plain-value
|
||||
= @event_location.title
|
||||
= hidden_field_tag :event_location, @location
|
||||
- else
|
||||
= location_select(nil, inline_label: true, small: true, invalid_locations: (((((@schedule[@day] || {})[:times] || {})[@time] || {})[:item] || {})[:workshops] || {}).keys, label: false)
|
||||
- if @event_location.present?
|
||||
.host-field
|
||||
%h4.inline=_'articles.admin.locations.headings.amenities'
|
||||
%span.plain-value
|
||||
= (JSON.parse(@event_location.amenities || '[]').map { |a| _"workshop.options.needs.#{a}" }).join(', ')
|
||||
.host-field
|
||||
%h4.inline=_'forms.labels.generic.day'
|
||||
%span.plain-value
|
||||
= date(@day, :weekday)
|
||||
.host-field
|
||||
%h4.inline=_'forms.labels.generic.time'
|
||||
%span.plain-value
|
||||
= time(@workshop_blocks[@block]['time'].to_f)
|
||||
%table.workshops.admin-edit
|
||||
%tr
|
||||
%th.corner
|
||||
%th=_'articles.workshops.headings.theme'
|
||||
%th=_'articles.workshops.headings.space'
|
||||
%th=_'articles.workshops.headings.needs'
|
||||
%th=_'articles.workshops.headings.facilitators'
|
||||
%th=_'articles.workshops.headings.interested_count'
|
||||
%th=_'articles.workshops.headings.notes'
|
||||
- @ordered_workshops.each do | id, workshop |
|
||||
%tr.selectable{class: get_workshop_match(workshop, @day, @block, @event_location).to_s.gsub('_', '-'), data: {workshop: id}}
|
||||
%th=workshop.title
|
||||
%td=Workshop.all_themes.include?((workshop.theme || '').to_sym) ? (_"workshop.options.theme.#{workshop.theme}") : workshop.theme
|
||||
%td=workshop.space.present? ? (_"workshop.options.space.#{workshop.space}") : ''
|
||||
- needs = JSON.parse(workshop.needs || '[]')
|
||||
%td=_!((needs.map { |x| _"workshop.options.needs.#{x}" }).join(', ').to_s.html_safe)
|
||||
%td=(workshop.active_facilitators.map { |x| x.named_email }).join(', ')
|
||||
%td=workshop.interested_count
|
||||
%td
|
||||
.text=workshop.notes
|
||||
|
||||
.legend
|
||||
%h4 Legend
|
||||
%ul
|
||||
%li.good-match Good Match
|
||||
%li.bad-match Poor Match
|
||||
%li.selected-space Also at this time
|
||||
%li.other-space Also in this space
|
||||
%li.other-host Already scheduled
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user