BikeBikeBike/app/views/conferences/_conference.html.haml

46 lines
3.0 KiB
Plaintext
Raw Normal View History

- links ||= [ :register ]
- sections ||= [ :info ]
2017-07-01 16:02:38 -07:00
- is_registered = conference.registered?(current_user)
2017-04-09 11:37:16 -07:00
= 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)
2017-09-04 14:10:55 -07:00
- if conference.poster.present? && links.include?(:register) && conference.can_register?(current_user)
2017-07-12 21:54:47 -07:00
.register-link
2017-09-04 14:10:55 -07:00
- unless logged_in?
.access-registration
= _'actions.conference.already_registered'
= link_to (_'actions.conference.access_registration'), register_path(conference.slug)
2017-07-12 21:54:47 -07:00
= (link_to _(is_registered ? 'actions.conference.edit_registration' : 'forms.actions.generic.register'), register_path(conference.slug), class: [:button, :register])
2017-04-09 11:37:16 -07:00
- if conference.poster.present?
2017-07-01 16:02:38 -07:00
%figure
%img{src: conference.poster.full.url, role: :presentation, alt: (_'images.conference.poster', vars: { conference_title: conference.title })}
%article
= row(class: 'conference-details') do
= columns(medium: 10, push: {medium: 1}) do
%h2=_!conference.title if conference.poster.present?
= richtext conference.info
2017-07-12 21:54:47 -07:00
2017-07-01 16:02:38 -07:00
.links
2017-09-04 14:10:55 -07:00
= (link_to (_(is_registered ? 'actions.conference.edit_registration' : 'forms.actions.generic.register')), register_path(conference.slug), class: [:button, :register]) if links.include?(:register) && conference.can_register?(current_user)
2017-07-01 16:02:38 -07:00
= (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)
2017-07-12 21:54:47 -07:00
- conference.extended_details.each do |section|
- if sections.include?(section) && conference.copy_data[section][:show]
%h3{id: section}=(_ conference.copy_data[section][:heading], vars: conference.copy_data[section][:vars]) unless conference.copy_data[section][:heading] == false
= richtext conference.copy_data[section][:value], (conference.copy_data[section][:heading] == false ? 2 : 3)
- if section == :workshop_info
.actions.center= link_to (_'articles.conference_registration.actions.View_Workshops'), workshops_path(conference), class: :button
- if conference.registration_status == :open && sections.include?(:schedule)
- if conference.workshop_schedule_published
- add_inline_script :home_schedule
%h3=_'articles.workshops.headings.Schedule'
2017-04-09 11:37:16 -07:00
= render 'conference_administration/schedule'