From 29d62ad53b66675180dc80917ab7744fd7ad99d9 Mon Sep 17 00:00:00 2001 From: Godwin Date: Mon, 29 Aug 2016 22:00:31 -0700 Subject: [PATCH] Updates to schedule maker --- .../admin/_select_workshop_table.html.haml | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 app/views/conferences/admin/_select_workshop_table.html.haml diff --git a/app/views/conferences/admin/_select_workshop_table.html.haml b/app/views/conferences/admin/_select_workshop_table.html.haml new file mode 100644 index 0000000..0038ef3 --- /dev/null +++ b/app/views/conferences/admin/_select_workshop_table.html.haml @@ -0,0 +1,45 @@ +.host-field + %h4.inline=_'forms.labels.generic.event_location' + - if @location.present? && @location.to_i > 0 + %span.plain-value + = EventLocation.find(@location.to_i).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) +.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{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