Added localization to workshops, made login persist through subdomains
This commit is contained in:
@@ -8,52 +8,61 @@
|
||||
.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
|
||||
.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
|
||||
= columns(medium: 6) do
|
||||
%h3=_'articles.workshops.headings.languages','Workshop Language'
|
||||
- [:en, :es, :fr].each do |language|
|
||||
.single-check-box-field.input-field
|
||||
= 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
|
||||
- theme_found = false
|
||||
- [:race_gender, :mechanics, :funding, :organization, :community].each do |theme|
|
||||
.single-radio-button-field.input-field
|
||||
= 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
|
||||
= 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)
|
||||
= 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
|
||||
= label_tag "needs_#{need}" do
|
||||
= check_box_tag "needs[#{need}]", 1, @needs.include?(need)
|
||||
= _"workshop.options.needs.#{need}"
|
||||
%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
|
||||
= label_tag "space_#{space}" do
|
||||
= radio_button_tag :space, space, @space == space
|
||||
= _"workshop.options.space.#{space}"
|
||||
= 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
|
||||
- if @workshop && I18n.locale.to_s != @workshop.locale.to_s
|
||||
.original-text
|
||||
%h4=_'translate.content.Translation_of'
|
||||
.value=markdown @workshop.info!
|
||||
- if !@workshop || @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
|
||||
= 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
|
||||
- theme_found = false
|
||||
- [:race_gender, :mechanics, :funding, :organization, :community].each do |theme|
|
||||
.single-radio-button-field.input-field
|
||||
= 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
|
||||
= 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)
|
||||
= 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
|
||||
= label_tag "needs_#{need}" do
|
||||
= check_box_tag "needs[#{need}]", 1, @needs.include?(need)
|
||||
= _"workshop.options.needs.#{need}"
|
||||
%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
|
||||
= label_tag "space_#{space}" do
|
||||
= radio_button_tag :space, space, @space == space
|
||||
= _"workshop.options.space.#{space}"
|
||||
= 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
|
||||
= columns(medium: 12) do
|
||||
.actions.right
|
||||
= button_tag :save, :value => :save
|
||||
|
||||
@@ -40,4 +40,7 @@
|
||||
= 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)
|
||||
Reference in New Issue
Block a user