Pre registration
This commit is contained in:
@@ -6,14 +6,14 @@
|
||||
=_'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 !preview && workshop.can_show_interest?(current_user)
|
||||
- if preview.blank? && workshop.can_show_interest?(current_user)
|
||||
= form_tag toggle_workshop_interest_path(workshop.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) || ''
|
||||
- if !preview && logged_in? && current_user.can_translate?
|
||||
= button_tag (workshop.interested?(current_user) ? :remove_interest : :show_interest), :value => :toggle_interest, :class => (workshop.interested?(current_user) ? :delete : :add)
|
||||
=_!(workshop.info).html_safe if workshop.info.present?
|
||||
- if preview.blank? && translations_available_for_editing
|
||||
.actions
|
||||
- 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(workshop.conference.slug, workshop.id, url_params(locale)), :class => 'button translate') if workshop.can_translate?(current_user, locale)
|
||||
- translations_available_for_editing.each do |locale|
|
||||
= link_to (_'actions.workshops.Translate', "Translate into #{language_name(locale)}", :vars => {:language => language_name(locale)}), translate_workshop_url(workshop.conference.slug, workshop.id, locale), :class => [:button, :translate]
|
||||
= columns(medium: 6) do
|
||||
%h3=_'articles.workshops.headings.facilitators'
|
||||
.facilitators
|
||||
@@ -21,38 +21,40 @@
|
||||
- u = User.find(f.user_id)
|
||||
- if logged_in? && (workshop.public_facilitator?(u) || f.user_id == current_user.id || workshop.active_facilitator?(current_user))
|
||||
.facilitator
|
||||
.name=_!(u.firstname || u.username || u.email)
|
||||
.name=_!u.name
|
||||
.role
|
||||
=_"roles.workshops.facilitator.#{workshop.role(u).to_s}"
|
||||
- if !preview && f.role.to_sym == :requested && workshop.active_facilitator?(current_user)
|
||||
=(link_to (_'actions.workshops.Approve'), approve_facilitate_workshop_request_path(workshop.conference.slug, workshop.id, f.user_id, 'approve'), :class => 'button modify')
|
||||
=(link_to (_'actions.workshops.Deny'), approve_facilitate_workshop_request_path(workshop.conference.slug, workshop.id, f.user_id, 'deny'), :class => 'button delete')
|
||||
- elsif !preview && (f.user_id == current_user.id && f.role.to_sym != :creator) || (!workshop.conference.registered?(u) && workshop.active_facilitator?(current_user))
|
||||
=(link_to (_'actions.workshops.Remove'), approve_facilitate_workshop_request_path(workshop.conference.slug, workshop.id, f.user_id, 'remove'), :class => 'button delete')
|
||||
- if !preview
|
||||
- if preview.blank? && f.role.to_sym == :requested && workshop.active_facilitator?(current_user)
|
||||
=(link_to (_'actions.workshops.Approve'), approve_facilitate_workshop_request_path(workshop.conference.slug, workshop.id, f.user_id, 'approve'), :class => [:button, :modify])
|
||||
=(link_to (_'actions.workshops.Deny'), approve_facilitate_workshop_request_path(workshop.conference.slug, workshop.id, f.user_id, 'deny'), :class => [:button, :delete])
|
||||
- elsif preview.blank? && (f.user_id == current_user.id && f.role.to_sym != :creator) || (!workshop.conference.registered?(u) && workshop.active_facilitator?(current_user))
|
||||
=(link_to (_'actions.workshops.Remove'), approve_facilitate_workshop_request_path(workshop.conference.slug, workshop.id, f.user_id, 'remove'), :class => [:button, :delete])
|
||||
- unless preview.present?
|
||||
.actions
|
||||
=(link_to (_'actions.workshops.Facilitate'), facilitate_workshop_path(workshop.conference.slug, workshop.id), :class => 'button modify') if !workshop.facilitator?(current_user)
|
||||
=(link_to (_'actions.workshops.Facilitate'), facilitate_workshop_path(workshop.conference.slug, workshop.id), :class => [:button, workshop.needs_facilitators ? :accented : :subdued]) unless workshop.facilitator?(current_user)
|
||||
- if workshop.active_facilitator?(current_user)
|
||||
= form_tag workshop_add_facilitator_path(workshop.conference.slug, workshop.id), :class => 'add-facilitator' do
|
||||
%h4='Add a facilitator'
|
||||
%h4=_'articles.workshops.headings.add_facilitator','Add a facilitator'
|
||||
= form_tag workshop_add_facilitator_path(workshop.conference.slug, workshop.id), :class => 'add-facilitator flex-form' do
|
||||
.email-field.input-field
|
||||
= email_field_tag :email, nil, required: true
|
||||
= label_tag :email
|
||||
= button_tag :add
|
||||
- if workshop.languages
|
||||
- languages = JSON.parse(workshop.languages || '[]')
|
||||
- if languages.present?
|
||||
= 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
|
||||
%p= _!((languages.map { |x| _"languages.#{x}" }).join(', ').to_s.html_safe)
|
||||
- if workshop.theme.present?
|
||||
= 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
|
||||
%p= Workshop.all_themes.include?((workshop.theme || '').to_sym) ? (_"workshop.options.theme.#{workshop.theme}") : workshop.theme
|
||||
- if workshop.active_facilitator?(current_user) || workshop.conference.host?(current_user)
|
||||
- if workshop.needs
|
||||
- needs = JSON.parse(workshop.needs || '[]')
|
||||
- if needs.present?
|
||||
= 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
|
||||
%p= _!((needs.map { |x| _"workshop.options.needs.#{x}" }).join(', ').to_s.html_safe)
|
||||
- if workshop.notes.present?
|
||||
= columns(medium: 12) do
|
||||
%h3=_'articles.workshops.headings.notes','Notes'
|
||||
=markdown _!(workshop.notes)
|
||||
=_!(workshop.notes).html_safe
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
- # encoding: utf-8
|
||||
%ul.workshop-previews
|
||||
%ul.workshop-list
|
||||
- workshops.sort_by{ |w| w.title.downcase }.each do |w|
|
||||
- if w.title
|
||||
%li
|
||||
=link_to view_workshop_path(@this_conference.slug, w.id) do
|
||||
%h4=_!(w.title)
|
||||
%p=_!(w.info || '').gsub(/\n\#+(.*?)\r/, "\n<strong>\\1</strong>\r").gsub(/[\t ]*\r\n[\t ]*/, '<br>').html_safe
|
||||
- is_interested = w.interested?(current_user)
|
||||
%li{class: [is_interested ? :interested : nil]}
|
||||
= link_to view_workshop_path(w.conference.slug, w.id) do
|
||||
%h4.title=w.title
|
||||
.workshop-interest
|
||||
- if is_interested
|
||||
=_'articles.workshops.info.you_are_interested_count', "You and #{w.interested_count - 1} others are interested in this workshop", :vars => {:count => (w.interested_count - 1)}
|
||||
- elsif w.interested_count > 0
|
||||
=_'articles.workshops.info.interested_count', "#{w.interested_count} people are interested in this workshop", :vars => {:count => w.interested_count}
|
||||
.workshop-description=w.info.html_safe
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
= render 'conferences/page_header', :page_key => 'Facilitate_Workshop'
|
||||
= render 'conferences/page_header', :page_key => 'Conference_Registration'
|
||||
|
||||
%article
|
||||
= row do
|
||||
%h2=_'page_titles.conferences.Facilitate_Workshop'
|
||||
= columns(medium: 12) do
|
||||
=m('articles.workshops.paragraphs.facilitate_request_sent','Your request has been sent. You will receive an email once your request is approved or denied or if the current facilitators have any questions.')
|
||||
= columns(medium: 12) do
|
||||
.actions
|
||||
= link_to (_'actions.workshops.View'), view_workshop_url(@this_conference.slug, @workshop.id), :class => 'button'
|
||||
= link_to (_'actions.workshops.View_All'), workshops_url(@this_conference.slug), :class => 'button'
|
||||
= link_to (_'actions.workshops.View_All'), register_step_path(@this_conference.slug, :wokshops), :class => 'button'
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
= render 'conferences/page_header', :page_key => 'Workshops'
|
||||
|
||||
%article
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
%h2=_'articles.workshops.headings.Workshops'
|
||||
= columns(medium: 6) do
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
%p=_'articles.workshops.paragraphs.Workshops', :p
|
||||
= columns(medium: 6) do
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
%h3=_'articles.workshops.headings.Your_Workshops'
|
||||
= render 'workshops/workshop_previews', :workshops => @my_workshops
|
||||
= link_to (_'actions.workshops.create','New Workshop'), create_workshop_path(@this_conference.slug), class: [:button, :modify] if @conference.registration_open
|
||||
= row do
|
||||
= render 'workshops/workshop_previews', :workshops => @workshops
|
||||
= columns(medium: 12) do
|
||||
%h3=_'articles.workshops.headings.All_Workshops'
|
||||
= render 'workshops/workshop_previews', :workshops => @workshops
|
||||
@@ -1,69 +1,91 @@
|
||||
= render 'conferences/page_header', :page_key => (@workshop ? 'Edit_Workshop' : 'Create_Workshop')
|
||||
- add_stylesheet :editor
|
||||
- add_inline_script :pen
|
||||
- add_inline_script :markdown
|
||||
- add_inline_script :editor
|
||||
|
||||
-#= render 'conferences/page_header', :page_key => (@workshop.id.present? ? 'Edit_Workshop' : 'Create_Workshop')
|
||||
= render 'conferences/page_header', :page_key => 'Conference_Registration'
|
||||
|
||||
%article
|
||||
= row do
|
||||
= form_tag save_workshop_path(@this_conference.slug), class: 'composition' do
|
||||
= (hidden_field_tag :workshop_id, @workshop.id) if @workshop
|
||||
= columns(medium: 12) do
|
||||
=m('articles.workshops.paragraphs.new_workshop','Please accurately describe your workshop in detail. This will help hosts decide if they wish to add it to the schedule and when it should best be scheduled. Enter normal text but if you want to get fancy you can use [Markdown](http://daringfireball.net/projects/markdown/basics).')
|
||||
- if @workshop.id.present?
|
||||
= hidden_field_tag :workshop_id, @workshop.id
|
||||
- if @is_translating
|
||||
%h2=_(@page_title, vars: @page_title_vars)
|
||||
= hidden_field_tag :translation, @translation
|
||||
- else
|
||||
%h2=_@page_title, :t
|
||||
- else
|
||||
%h2=_@page_title, :t
|
||||
.text-field.input-field.big
|
||||
= label_tag :title
|
||||
= text_field_tag :title, @title, :required => true
|
||||
- if @workshop && I18n.locale.to_s != @workshop.locale.to_s
|
||||
= text_field_tag :title, @title, required: true, lang: @translation
|
||||
- if @is_translating
|
||||
.original-text
|
||||
%h4=_'translate.content.Translation_of'
|
||||
.value=@workshop.title!
|
||||
.text-area-field.input-field
|
||||
= label_tag :info
|
||||
= text_area_tag :info, @info, :required => true
|
||||
- if @workshop && I18n.locale.to_s != @workshop.locale.to_s
|
||||
.input-field-help=_'articles.workshops.paragraphs.info', :s, 2
|
||||
.textarea#info{lang: @translation, data: {name: :info}}=(@info || '').html_safe
|
||||
- if @is_translating
|
||||
.original-text
|
||||
%h4=_'translate.content.Translation_of'
|
||||
.value=markdown @workshop.info!
|
||||
- if !@workshop || @can_edit
|
||||
.value=(@workshop.info! || '').html_safe
|
||||
- if !@is_translating && (@workshop.id.blank? || @can_edit)
|
||||
= columns(medium: 6) do
|
||||
%h3=_'articles.workshops.headings.languages','Workshop Language'
|
||||
- [:en, :es, :fr].each do |language|
|
||||
.single-check-box-field.input-field
|
||||
.input-field-help=_'articles.workshops.paragraphs.languages', :s, 2
|
||||
.check-box-field.vertical.input-field
|
||||
- [:en, :es, :fr].each do |language|
|
||||
= check_box_tag "languages[#{language}]", 1, @languages && @languages.include?(language)
|
||||
= label_tag "languages_#{language}" do
|
||||
= check_box_tag "languages[#{language}]", 1, @languages && @languages.include?(language)
|
||||
= _"languages.#{language}"
|
||||
%h3=_'articles.workshops.headings.theme','Theme'
|
||||
.input-field-help=_'articles.workshops.paragraphs.theme', :p
|
||||
.input-field-help=_'articles.workshops.paragraphs.theme', :s, 2
|
||||
- theme_found = false
|
||||
- [:race_gender, :mechanics, :funding, :organization, :community].each do |theme|
|
||||
.single-radio-button-field.input-field
|
||||
.check-box-field.vertical.input-field
|
||||
- Workshop.all_themes.each do |theme|
|
||||
- is_selected = (@workshop.theme.to_s == theme.to_s)
|
||||
- theme_found ||= is_selected
|
||||
= radio_button_tag :theme, theme, is_selected
|
||||
= label_tag "theme_#{theme}" do
|
||||
- is_selected = (@theme == theme)
|
||||
- theme_found ||= is_selected
|
||||
= radio_button_tag :theme, theme, is_selected
|
||||
= _"workshop.options.theme.#{theme}"
|
||||
.single-radio-button-field.other-field.input-field
|
||||
- is_other = (@workshop.theme.present? && !theme_found)
|
||||
= radio_button_tag :theme, :other, is_other
|
||||
= label_tag "theme_other" do
|
||||
= radio_button_tag :theme, :other, (@theme && !theme_found)
|
||||
%div
|
||||
= _"workshop.options.theme.other"
|
||||
= text_field_tag :other_theme, (@theme && !theme_found ? @theme : nil)
|
||||
.other
|
||||
= text_field_tag :other_theme, (is_other ? @workshop.theme : nil), placeholder: (_"workshop.options.theme.other"), required: is_other
|
||||
= columns(medium: 6) do
|
||||
%h3=_'articles.workshops.headings.needs','What do you need?'
|
||||
- [:sound, :projector, :tools].each do |need|
|
||||
.single-check-box-field.input-field
|
||||
.input-field-help=_'articles.workshops.paragraphs.needs', :s, 2
|
||||
.check-box-field.vertical.input-field
|
||||
- [:sound, :projector, :tools].each do |need|
|
||||
= check_box_tag "needs[#{need.to_s}]", 1, JSON.parse(@workshop.needs || '[]').include?(need.to_s)
|
||||
= label_tag "needs_#{need}" do
|
||||
= check_box_tag "needs[#{need}]", 1, @needs.include?(need)
|
||||
= _"workshop.options.needs.#{need}"
|
||||
= _"workshop.options.needs.#{need.to_s}"
|
||||
%h3=_'articles.workshops.headings.space','Type of space'
|
||||
.input-field-help=_'articles.workshops.paragraphs.space', :p
|
||||
- [:meeting_room, :workshop, :outdoor_meeting].each do |space|
|
||||
.single-radio-button-field.input-field
|
||||
.input-field-help=_'articles.workshops.paragraphs.space', :s, 2
|
||||
.check-box-field.vertical.input-field
|
||||
- [:meeting_room, :workshop, :outdoor_meeting].each do |space|
|
||||
= radio_button_tag :space, space, @workshop.space == space
|
||||
= label_tag "space_#{space}" do
|
||||
= radio_button_tag :space, space, @space == space
|
||||
= _"workshop.options.space.#{space}"
|
||||
%h3=_'articles.workshops.headings.needs_facilitators','Looking for help?'
|
||||
.input-field-help=_'articles.workshops.paragraphs.needs_facilitators', :s, 2
|
||||
.check-box-field.vertical.input-field
|
||||
= check_box_tag :needs_facilitators, 1, @workshop.needs_facilitators
|
||||
= label_tag :needs_facilitators do
|
||||
= _'workshop.options.needs_facilitators', 'Needs Additional Facilitators'
|
||||
= columns(medium: 12) do
|
||||
%h3=_'articles.workshops.headings.notes','Notes for Conference Organizers and Workshop Facilitators'
|
||||
%p=_'articles.workshops.paragraphs.notes','Notes are only viewable by conference hosts and workshop facilitators'
|
||||
.text-area-field.input-field
|
||||
= label_tag :notes
|
||||
= text_area_tag :notes, @notes
|
||||
.warning-info=_'articles.workshops.paragraphs.notes','Notes are only viewable by conference hosts and workshop facilitators'
|
||||
.textarea#notes{data: {name: :notes}}=(@workshop.notes || '').html_safe
|
||||
= columns(medium: 12) do
|
||||
.actions.right
|
||||
= button_tag :save, :value => :save
|
||||
.actions.next-prev
|
||||
= button_tag :save, value: :save
|
||||
= button_tag :cancel, value: :cancel, class: :subdued, formnovalidate: true
|
||||
|
||||
|
||||
@@ -1,8 +1,20 @@
|
||||
= render 'conferences/page_header', :page_key => 'View_Workshop'
|
||||
= render 'conferences/page_header', :page_key => 'Conference_Registration'
|
||||
|
||||
= row id: 'registration-steps', class: 'flow-steps' do
|
||||
= columns do
|
||||
%ul
|
||||
- current_registration_steps.each do | step |
|
||||
- text = _"articles.conference_registration.headings.#{step[:name].to_s}"
|
||||
%li{class: [step[:enabled] ? :enabled : nil, :workshops == step[:name] ? :current : nil]}
|
||||
- if step[:enabled]
|
||||
.step= link_to text, register_step_path(@this_conference.slug, step[:name])
|
||||
- else
|
||||
.step= text
|
||||
|
||||
%article
|
||||
= render 'workshops/show', :workshop => @workshop, :preview => false
|
||||
= render 'workshops/show', :workshop => @workshop, :translations_available_for_editing => @translations_available_for_editing, :preview => false
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
.actions.right
|
||||
= (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.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)
|
||||
|
||||
Reference in New Issue
Block a user