= 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) || '' = 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}" - 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) = 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) - if @workshop.can_translate?(current_user) - I18n.backend.enabled_locales.each do |locale| = (link_to (_'actions.workshops.Translate', "Translate into #{language_name(locale)}", :vars => {:language => language_name(locale)}), edit_workshop_url(@this_conference.slug, @workshop.id, url_params(locale)), :class => 'button translate') if locale.to_sym != I18n.locale.to_sym = (link_to (_'actions.workshops.Delete'), delete_workshop_path(@this_conference.slug, @workshop.id), :class => 'button delete') if @workshop.can_delete?(current_user)