Merge pull request #54 from snap-cloud/track-tweaks
Improve Some Tracks Display, Fix Some VolunteersDisplays
This commit is contained in:
commit
6c56f45387
8 changed files with 31 additions and 19 deletions
|
|
@ -180,7 +180,7 @@ module Admin
|
||||||
:track_id, :state, :language, :is_highlight, :max_attendees,
|
:track_id, :state, :language, :is_highlight, :max_attendees,
|
||||||
# Not used anymore?
|
# Not used anymore?
|
||||||
:proposal_additional_speakers, :user, :users_attributes,
|
:proposal_additional_speakers, :user, :users_attributes,
|
||||||
speaker_ids: [])
|
speaker_ids: [], volunteer_ids: [])
|
||||||
end
|
end
|
||||||
|
|
||||||
def comment_params
|
def comment_params
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@ module ApplicationHelper
|
||||||
def volunteer_links(event)
|
def volunteer_links(event)
|
||||||
safe_join(event.volunteers.map do |volunteer|
|
safe_join(event.volunteers.map do |volunteer|
|
||||||
link_to(volunteer.name, admin_user_path(volunteer))
|
link_to(volunteer.name, admin_user_path(volunteer))
|
||||||
end, ',')
|
end, ', ')
|
||||||
end
|
end
|
||||||
|
|
||||||
def volunteer_selector_input(form)
|
def volunteer_selector_input(form)
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,11 @@
|
||||||
(
|
(
|
||||||
= link_to speaker.email, "mailto: #{speaker.email}"
|
= link_to speaker.email, "mailto: #{speaker.email}"
|
||||||
)
|
)
|
||||||
|
%tr
|
||||||
|
%td
|
||||||
|
%b Volunteers
|
||||||
|
%td
|
||||||
|
= volunteer_links(@event)
|
||||||
%tr
|
%tr
|
||||||
%td
|
%td
|
||||||
%b Biographies
|
%b Biographies
|
||||||
|
|
|
||||||
|
|
@ -6,5 +6,5 @@
|
||||||
.row
|
.row
|
||||||
.col-md-12
|
.col-md-12
|
||||||
= semantic_form_for @schedule, url: admin_conference_schedules_path(@conference.short_title) do |f|
|
= semantic_form_for @schedule, url: admin_conference_schedules_path(@conference.short_title) do |f|
|
||||||
= f.input :track, collection: Track.accessible_by(current_ability).where(program: @program).self_organized.confirmed.pluck(:name, :id), include_blank: false
|
= f.input :track, collection: Track.accessible_by(current_ability).where(program: @program), include_blank: false
|
||||||
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
|
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
|
||||||
|
|
|
||||||
|
|
@ -70,9 +70,6 @@
|
||||||
%span{ title: event.state.humanize, class: "fa #{status_icon(event)}" }
|
%span{ title: event.state.humanize, class: "fa #{status_icon(event)}" }
|
||||||
|
|
||||||
%td.col-md-7{style: "padding:20px 8px 20px 8px;"}
|
%td.col-md-7{style: "padding:20px 8px 20px 8px;"}
|
||||||
- if event.volunteers.include?(current_user)
|
|
||||||
%strong You are volunteer host for:
|
|
||||||
%br
|
|
||||||
= link_to event.title, conference_program_proposal_path(@conference.short_title, event.id)
|
= link_to event.title, conference_program_proposal_path(@conference.short_title, event.id)
|
||||||
%br
|
%br
|
||||||
%small.text-muted
|
%small.text-muted
|
||||||
|
|
@ -118,11 +115,14 @@
|
||||||
class: 'btn btn-default', id: "edit_proposal_#{event.id}"
|
class: 'btn btn-default', id: "edit_proposal_#{event.id}"
|
||||||
|
|
||||||
- if @volunteer_events.any?
|
- if @volunteer_events.any?
|
||||||
|
.row
|
||||||
|
.col-md-12
|
||||||
%h2
|
%h2
|
||||||
Volunteer Events
|
Volunteer Duties
|
||||||
%small
|
%small
|
||||||
Thanks for being a host at #{@conference.title}
|
Thanks for being a host at #{@conference.title}
|
||||||
= render 'volunteers_table', events: @volunteer_events
|
= render 'volunteers_table', events: @volunteer_events
|
||||||
|
|
||||||
.row
|
.row
|
||||||
.col-md-12
|
.col-md-12
|
||||||
- if can? :create, @event
|
- if can? :create, @event
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,22 @@
|
||||||
.panel.panel-default.event-panel{ onClick: 'eventClicked(event, this);', "data-url" => "#{url_for(conference_program_proposal_path(@conference.short_title, event.id))}" }
|
.panel.panel-default.event-panel{ onClick: 'eventClicked(event, this);', "data-url" => "#{url_for(conference_program_proposal_path(@conference.short_title, event.id))}" }
|
||||||
.panel-body
|
- header_color = event.track&.color || '#f5f5f5'
|
||||||
|
.trapezoid{style: "color: white; top: 12px; z-index: 100;"}
|
||||||
|
.panel-heading{ style: "background-color: #{header_color}; color: #{ contrast_color(header_color) }; border-radius: 4px" }
|
||||||
- event.speakers_ordered.each do |speaker|
|
- event.speakers_ordered.each do |speaker|
|
||||||
= image_tag speaker.profile_picture, :class => "img-circle pull-right all-speaker-pic", |
|
= image_tag speaker.profile_picture, class: "img-circle pull-right", alt: speaker.name, style: "padding: 2px;"
|
||||||
:alt => speaker.name, |
|
|
||||||
:title => speaker.name |
|
|
||||||
|
|
||||||
%p
|
%p
|
||||||
= canceled_replacement_event_label(event, event_schedule)
|
= canceled_replacement_event_label(event, event_schedule)
|
||||||
= replacement_event_notice(event_schedule)
|
= replacement_event_notice(event_schedule)
|
||||||
|
|
||||||
%span.h3
|
%span.h3{style: "margin-bottom: 14px"}
|
||||||
= event.title
|
= event.title
|
||||||
%br
|
%br
|
||||||
%small
|
%small{style: "color: #{contrast_color(header_color)}"}
|
||||||
= event.subtitle
|
= event.subtitle
|
||||||
|
.trapezoid{style: "color: #{header_color}; top: 12px;"}
|
||||||
|
|
||||||
|
.panel-body
|
||||||
%h4
|
%h4
|
||||||
- if(event.speakers.any?)
|
- if(event.speakers.any?)
|
||||||
presented by #{event.speaker_names}
|
presented by #{event.speaker_names}
|
||||||
|
|
|
||||||
|
|
@ -45,3 +45,7 @@
|
||||||
Relevance
|
Relevance
|
||||||
%dd
|
%dd
|
||||||
= markdown(@track.relevance)
|
= markdown(@track.relevance)
|
||||||
|
|
||||||
|
.row
|
||||||
|
- @track.events.each do |event|
|
||||||
|
= render 'schedules/event', event: event, event_schedule: event.event_schedules.first
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue