Bike!Bike! Website!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
2.6 KiB

= render 'conferences/page_header', :page_key => 'View_Workshop'
%article
= row do
= columns(medium: 12) do
%h2=_!@workshop.title
.workshop-interest
- if @workshop.interested?(current_user)
=_'articles.workshops.info.you_are_interested_count', "You and #{@workshop.interested_count - 1} others are interested in this workshop", :vars => {:count => (@workshop.interested_count - 1)}
- else
=_'articles.workshops.info.interested_count', "#{@workshop.interested_count} people are interested in this workshop", :vars => {:count => @workshop.interested_count}
- if @workshop.can_show_interest?(current_user)
= form_tag toggle_workshop_interest_path(@this_conference.slug, @workshop.id) do
= button_tag (@workshop.interested?(current_user) ? :remove_interest : :show_interest), :value => :toggle_interest, :class => (@workshop.interested?(current_user) ? 'delete' : 'add')
=markdown _!(@workshop.info) || ''
9 years ago
= columns(medium: 6) do
%h3=_'articles.workshops.headings.facilitators'
.facilitators
- @workshop.workshop_facilitators.each do |f|
.facilitator
- u = User.find(f.user_id)
.name=_!(u.firstname || u.username || u.email)
.role=_"roles.workshops.facilitator.#{f.role}"
9 years ago
- if @workshop.languages
= columns(medium: 6) do
%h3=_'articles.workshops.headings.languages','Workshop Language'
%p= _!((JSON.parse(@workshop.languages || '[]').map { |x| _"languages.#{x}" }).join(', ').to_s.html_safe)
- if @workshop.theme
= columns(medium: 6) do
%h3=_'articles.workshops.headings.theme','Theme'
%p= [:race_gender, :mechanics, :funding, :organization, :community].include?((@workshop.theme || '').to_sym) ? (_"workshop.options.theme.#{@workshop.theme}") : @workshop.theme
- if @workshop.can_edit?(current_user) || @this_conference.host?(current_user)
- if @workshop.needs
= columns(medium: 6) do
%h3=_'articles.workshops.headings.needs','What do you need?'
%p= _!((JSON.parse(@workshop.needs || '[]').map { |x| _"workshop.options.needs.#{x}" }).join(', ').to_s.html_safe)
- if @workshop.notes
= columns(medium: 12) do
%h3=_'articles.workshops.headings.notes','Notes'
=markdown _!(@workshop.notes)
9 years ago
= columns(medium: 12) do
.actions
= (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)