From 8460800d1a812156691ab43378a49a373dec20d8 Mon Sep 17 00:00:00 2001 From: Godwin Date: Tue, 25 Jul 2017 11:41:15 -0700 Subject: [PATCH 1/5] Fixed backtrace in error reports (#247) * Fixed fonts * Fixed assets * Fixed logo in emails * Switched to immediate email delivery * Fixed prod emails and added deployment tasks * Fixed deployments * Updated README * Added Bike Collectives Core to README * Fixed issue with map loading * Fixed issue with map loading * Added map JSON data to assets precompilation * Fixed error sending to conference administrators * Let error report signature wrap * Fixed backtrace in error reports * Fixed backtrace in error reports --- app/views/user_mailer/error_report.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/user_mailer/error_report.html.haml b/app/views/user_mailer/error_report.html.haml index df66497..583957b 100644 --- a/app/views/user_mailer/error_report.html.haml +++ b/app/views/user_mailer/error_report.html.haml @@ -2,7 +2,7 @@ %h2 Error details %code.signature{class: "#{@report.source}-signature"}=@report.signature -%code.backtrace{class: "#{@report.source}-backtrace"}=@report.backtrace.gsub(/\n\s+/, '
 nbsp;').html_safe +%code.backtrace{class: "#{@report.source}-backtrace"}=@report.backtrace.gsub(/\n+\s+/, '
  ').html_safe %h2 Request details .request-details From c96d8fafbbe080d69399f5536656c55dc51cce40 Mon Sep 17 00:00:00 2001 From: Godwin Date: Fri, 28 Jul 2017 07:38:52 -0700 Subject: [PATCH 2/5] Fixed error redirecting to registration when trying to create a new workshop --- app/controllers/workshops_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/workshops_controller.rb b/app/controllers/workshops_controller.rb index c96628c..60c9e2e 100644 --- a/app/controllers/workshops_controller.rb +++ b/app/controllers/workshops_controller.rb @@ -361,7 +361,7 @@ class WorkshopsController < ApplicationController @page_title = "articles.conference_registration.headings.#{@this_conference.registration_status == :open ? '': 'Pre_'}Registration_Details" @main_title = "articles.conference_registration.headings.#{@this_conference.registration_status == :open ? '': 'Pre_'}Register" @main_title_vars = { vars: { title: @this_conference.title } } - render register_path(@this_conference.slug) + render 'conferences/register' end end From 83f25583170080b204e75bba89927b4f39356fec Mon Sep 17 00:00:00 2001 From: Godwin Date: Tue, 1 Aug 2017 09:41:11 -0700 Subject: [PATCH 3/5] Development (#248) * Fixed fonts * Fixed assets * Fixed logo in emails * Switched to immediate email delivery * Fixed prod emails and added deployment tasks * Fixed deployments * Updated README * Added Bike Collectives Core to README * Fixed issue with map loading * Fixed issue with map loading * Added map JSON data to assets precompilation * Fixed error sending to conference administrators * Let error report signature wrap * Fixed backtrace in error reports * Fixed backtrace in error reports * Moved pronoun heading to make it more obvoius I moved the "Pronoun" heading directly above the input field. It turned out that a lot of users were entering "He or "She" in the name field, I believe that was because of the placement of the "Pronoun" heading. I also needed to remove the optional warning but I'm hoping that won't cause problems. --- app/views/registration_steps/_name.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/registration_steps/_name.html.haml b/app/views/registration_steps/_name.html.haml index e1a9825..40e27a2 100644 --- a/app/views/registration_steps/_name.html.haml +++ b/app/views/registration_steps/_name.html.haml @@ -3,8 +3,8 @@ = save_registration_step do = columns(medium: 12) do = textfield :name, @name, required: true, big: true - %h3=_'articles.conference_registration.headings.pronoun' = columns(medium: 6) do %p.small=_'articles.conference_registration.paragraphs.pronoun', :p = columns(medium: 6) do - = textfield :pronoun, @pronoun, required: false, big: true, warning: 'articles.conference_registration.paragraphs.pronoun_optional' + %h3=_'articles.conference_registration.headings.pronoun' + = textfield :pronoun, @pronoun, required: false, big: true From 4054f450fc85c3a49050d46c1479530a46593683 Mon Sep 17 00:00:00 2001 From: Godwin Date: Wed, 2 Aug 2017 21:50:43 -0700 Subject: [PATCH 4/5] Development (#249) * Fixed fonts * Fixed assets * Fixed logo in emails * Switched to immediate email delivery * Fixed prod emails and added deployment tasks * Fixed deployments * Updated README * Added Bike Collectives Core to README * Fixed issue with map loading * Fixed issue with map loading * Added map JSON data to assets precompilation * Fixed error sending to conference administrators * Let error report signature wrap * Fixed backtrace in error reports * Fixed backtrace in error reports * Moved pronoun heading to make it more obvoius I moved the "Pronoun" heading directly above the input field. It turned out that a lot of users were entering "He or "She" in the name field, I believe that was because of the placement of the "Pronoun" heading. I also needed to remove the optional warning but I'm hoping that won't cause problems. * Added an error message when no email address is used on login --- app/assets/stylesheets/_admin.scss | 42 ++----------------- app/assets/stylesheets/user-mailer.scss | 2 +- app/mailers/user_mailer.rb | 2 +- app/views/application/_login.html.haml | 11 +++-- app/views/application/user_settings.html.haml | 2 +- config/environments/preview.rb | 3 -- 6 files changed, 14 insertions(+), 48 deletions(-) diff --git a/app/assets/stylesheets/_admin.scss b/app/assets/stylesheets/_admin.scss index 2cac45f..622af28 100644 --- a/app/assets/stylesheets/_admin.scss +++ b/app/assets/stylesheets/_admin.scss @@ -128,28 +128,6 @@ table, .table { margin: 0; width: 100%; } - - // tr:first-child { - // td, th { - // border-top: 0; - // } - // } - - // tr:last-child { - // td, th { - // border-bottom: 0; - // } - // } - - // td, th { - // &:first-child { - // border-left: 0 - // } - - // &:last-child { - // border-right: 0 - // } - // } } &.bold { @@ -458,6 +436,7 @@ nav.sub-menu { @include _(border-radius, 0.15em); @include default-box-shadow(top, 2); @include _(text-shadow, 0 0.05em 0.05em #FFF); + @include not-link-like; &:hover, &:active, &:focus { background-color: #D8D8D8; @@ -468,10 +447,6 @@ nav.sub-menu { color: #666; padding: 0.333em 0.75em 0.25em; } - - @include after { - display: none; - } } @include breakpoint(medium) { @@ -711,10 +686,7 @@ nav.sub-menu { border: 0.1rem solid $light-gray; border-top: 0; border-right: 0; - - @include after { - display: none; - } + @include not-link-like; &:hover { background-color: $light-gray; @@ -1566,6 +1538,7 @@ nav.sub-menu { margin: 0.5em 0; @include default-box-shadow(top, 2); @include _(transition, transform 150ms ease-in-out); + @include not-link-like; &:hover, &:focus, &:active { z-index: $zindex-base + 2; @@ -1583,10 +1556,6 @@ nav.sub-menu { cursor: pointer; @include _(box-shadow, inset 0em -2em 2em -1em $white); } - - @include after { - display: none; - } } } @@ -1797,10 +1766,7 @@ html[data-ontop] { a { color: inherit; - - @include after { - display: none; - } + @include not-link-like; } .name { diff --git a/app/assets/stylesheets/user-mailer.scss b/app/assets/stylesheets/user-mailer.scss index a16bef9..f1a325a 100644 --- a/app/assets/stylesheets/user-mailer.scss +++ b/app/assets/stylesheets/user-mailer.scss @@ -186,7 +186,7 @@ table#ecxbb_full_width { code { color: firebrick; - white-space: pre; + white-space: nowrap; margin: 0 0 2em; display: block; max-width: $max-table-width; diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb index 8f67c6d..da6cf38 100644 --- a/app/mailers/user_mailer.rb +++ b/app/mailers/user_mailer.rb @@ -145,7 +145,7 @@ class UserMailer < ActionMailer::Base @user = User.find(@request.data['user'].to_i) if @request.data['user'].present? - mail to: administrators, subject: clean_subject(subject) + mail to: administrators, subject: clean_subject(subject), reply_to: @user.present? ? @user.named_email : nil end def contact(from, subject, message, email_list) diff --git a/app/views/application/_login.html.haml b/app/views/application/_login.html.haml index 591e622..e406349 100644 --- a/app/views/application/_login.html.haml +++ b/app/views/application/_login.html.haml @@ -1,6 +1,9 @@ - dest ||= nil +- if flash[:error].present? + #action-message.error + .message=_"articles.conference_registration.error.#{flash[:error]}" = form_tag do_confirm_path, class: 'flex-form' do - = hidden_field_tag :dest, settings_path if dest.present? - = emailfield :email, nil, big: true - = button :continue, value: :confirm_email - = link_to (_'forms.actions.generic.facebook_sign_in','Facebook Sign In'), auth_at_provider_path(provider: :facebook, dest: dest), class: [:button, :facebook] + = hidden_field_tag :dest, settings_path if dest.present? + = emailfield :email, nil, big: true, required: true + = button :continue, value: :confirm_email + = link_to (_'forms.actions.generic.facebook_sign_in','Facebook Sign In'), auth_at_provider_path(provider: :facebook, dest: dest), class: [:button, :facebook] diff --git a/app/views/application/user_settings.html.haml b/app/views/application/user_settings.html.haml index e81c3e8..005fe6b 100644 --- a/app/views/application/user_settings.html.haml +++ b/app/views/application/user_settings.html.haml @@ -22,4 +22,4 @@ = button :save, value: :save - else %h2=_'forms.actions.generic.login' - = render 'login' \ No newline at end of file + = render 'login' diff --git a/config/environments/preview.rb b/config/environments/preview.rb index 748ef3e..1ede6a0 100644 --- a/config/environments/preview.rb +++ b/config/environments/preview.rb @@ -64,10 +64,7 @@ BikeBike::Application.configure do # config.action_controller.asset_host = "http://assets.example.com" # Precompile additional assets. - # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. - # config.assets.precompile += %w( search.js ) config.assets.precompile += %w(*.png *.jpg *.jpeg *.gif *.json *.ttf *.otf *.woff *.woff2 *.svg *.json) - #config.action_controller.asset_host = "https://preview-cdn.bikebike.org" # Ignore bad email addresses and do not raise email delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors. From f54c09f248873a306904b2a977c21027c9fcb9b8 Mon Sep 17 00:00:00 2001 From: Godwin Date: Sun, 6 Aug 2017 09:41:13 -0700 Subject: [PATCH 5/5] Development (#250) * Fixed fonts * Fixed assets * Fixed logo in emails * Switched to immediate email delivery * Fixed prod emails and added deployment tasks * Fixed deployments * Updated README * Added Bike Collectives Core to README * Fixed issue with map loading * Fixed issue with map loading * Added map JSON data to assets precompilation * Fixed error sending to conference administrators * Let error report signature wrap * Fixed backtrace in error reports * Fixed backtrace in error reports * Moved pronoun heading to make it more obvoius I moved the "Pronoun" heading directly above the input field. It turned out that a lot of users were entering "He or "She" in the name field, I believe that was because of the placement of the "Pronoun" heading. I also needed to remove the optional warning but I'm hoping that won't cause problems. * Added an error message when no email address is used on login * Fixed select guest table * Added house rules to housing admin and review * Edit workshop locale warning --- app/assets/stylesheets/_admin.scss | 12 +++++- app/assets/stylesheets/_application.scss | 41 ++----------------- .../conference_administration_controller.rb | 2 + app/controllers/workshops_controller.rb | 4 +- app/helpers/admin_helper.rb | 2 +- app/helpers/form_helper.rb | 3 +- app/helpers/geocoder_helper.rb | 10 ++++- app/helpers/widgets_helper.rb | 27 ++++++++++-- .../_hosts_table.html.haml | 31 ++++++++------ .../registration_steps/_review.html.haml | 10 +++++ app/views/shared/_navbar.html.haml | 2 +- app/views/workshops/_show.html.haml | 16 ++++---- app/views/workshops/new.html.haml | 2 + config/locales/en.yml | 5 +++ config/locales/fr.yml | 2 + 15 files changed, 100 insertions(+), 69 deletions(-) diff --git a/app/assets/stylesheets/_admin.scss b/app/assets/stylesheets/_admin.scss index 622af28..c765bc1 100644 --- a/app/assets/stylesheets/_admin.scss +++ b/app/assets/stylesheets/_admin.scss @@ -123,6 +123,7 @@ table, .table { td, .table-td { &.inner-table { padding: 0.5em; + vertical-align: top; table { margin: 0; @@ -133,6 +134,10 @@ table, .table { &.bold { @include font-family(secondary); } + + .rules { + font-size: 0.75em; + } } tbody th { @@ -859,7 +864,7 @@ nav.sub-menu { min-width: 15em; } - .host-notes { + .host-notes, .house-rules { @include font-family(primary); font-size: 0.85em; border: 0.1em solid $light-gray; @@ -876,6 +881,11 @@ nav.sub-menu { } } + .house-rules { + max-height: 30em; + overflow: auto; + } + .guest-notes { position: relative; float: left; diff --git a/app/assets/stylesheets/_application.scss b/app/assets/stylesheets/_application.scss index eceec87..3c15ad4 100644 --- a/app/assets/stylesheets/_application.scss +++ b/app/assets/stylesheets/_application.scss @@ -153,43 +153,6 @@ table, .table { } } - // td, .table-td { - // &.inner-table { - // padding: 0; - - // table { - // margin: 0; - // width: 100%; - // } - - // tr:first-child { - // td, th { - // border-top: 0; - // } - // } - - // tr:last-child { - // td, th { - // border-bottom: 0; - // } - // } - - // td, th { - // &:first-child { - // border-left: 0 - // } - - // &:last-child { - // border-right: 0 - // } - // } - // } - - // &.bold { - // @include font-family(secondary); - // } - // } - tbody th { width: 0.1rem; } @@ -1760,6 +1723,10 @@ ul.warnings { .text-field & { margin: 0 0 1em 0; } + + &.top-message { + margin-top: 2em; + } } .success-info { diff --git a/app/controllers/conference_administration_controller.rb b/app/controllers/conference_administration_controller.rb index 82d4529..a84416c 100644 --- a/app/controllers/conference_administration_controller.rb +++ b/app/controllers/conference_administration_controller.rb @@ -479,8 +479,10 @@ class ConferenceAdministrationController < ApplicationController end end + @excel_data[:data] << host_data end + return respond_to do |format| format.xlsx { render xlsx: '../conferences/stats', filename: "housing" } end diff --git a/app/controllers/workshops_controller.rb b/app/controllers/workshops_controller.rb index 60c9e2e..6aedb28 100644 --- a/app/controllers/workshops_controller.rb +++ b/app/controllers/workshops_controller.rb @@ -67,8 +67,8 @@ class WorkshopsController < ApplicationController else return do_403 unless @can_edit - @title = @workshop.title - @info = @workshop.info + @title = @workshop.title! + @info = @workshop.info! end @needs = JSON.parse(@workshop.needs || '[]').map &:to_sym diff --git a/app/helpers/admin_helper.rb b/app/helpers/admin_helper.rb index d8bfb5b..eb553ee 100644 --- a/app/helpers/admin_helper.rb +++ b/app/helpers/admin_helper.rb @@ -112,7 +112,7 @@ module AdminHelper end def get_housing_match(host, guest, space) - housing_data = guest.housing_data || [] + housing_data = guest.housing_data || {} if housing_data['host'].present? if housing_data['host'] == host.id diff --git a/app/helpers/form_helper.rb b/app/helpers/form_helper.rb index a9ccbc2..ddaf0d6 100644 --- a/app/helpers/form_helper.rb +++ b/app/helpers/form_helper.rb @@ -137,7 +137,8 @@ module FormHelper if options[:warning].present? description_id ||= "#{id}-desc" - html += content_tag(:div, _(options[:warning], :s, 2), id: description_id, class: 'warning-info') + # html += content_tag(:div, _(options[:warning], :s, 2), id: description_id, class: 'warning-info') + html += status_bubble(_(options[:warning], :s, 2), :warning, id: description_id) end aria = {} diff --git a/app/helpers/geocoder_helper.rb b/app/helpers/geocoder_helper.rb index b607da3..ed1507f 100644 --- a/app/helpers/geocoder_helper.rb +++ b/app/helpers/geocoder_helper.rb @@ -85,8 +85,14 @@ module GeocoderHelper end def location_link(location) - return '' unless location.present? && location.address.present? - content_tag(:a, (_!location.address), href: "http://www.google.com/maps/place/#{location.latitude},#{location.longitude}") + return '' unless location.present? + address = if location.is_a?(Location) + location.street + else + location.address + end + return '' unless address.present? + content_tag(:a, (_!address), href: "http://www.google.com/maps/place/#{location.latitude},#{location.longitude}") end def same_city?(location1, location2) diff --git a/app/helpers/widgets_helper.rb b/app/helpers/widgets_helper.rb index b2f2a0a..6dee5e8 100644 --- a/app/helpers/widgets_helper.rb +++ b/app/helpers/widgets_helper.rb @@ -112,20 +112,20 @@ module WidgetsHelper @housing_data[id][:guest_data][guest_id][:errors].each do |error, value| if value.is_a?(Array) value.each do |v| - status_html += content_tag(:li, _("errors.messages.housing.space.#{error.to_s}", vars: v)) + status_html += content_tag(:li, _("errors.messages.housing.space.#{error.to_s}", vars: v).html_safe) end else - status_html += content_tag(:li, _("errors.messages.housing.space.#{error.to_s}", vars: value)) + status_html += content_tag(:li, _("errors.messages.housing.space.#{error.to_s}", vars: value).html_safe) end end @housing_data[id][:guest_data][guest_id][:warnings].each do |error, value| if value.is_a?(Array) value.each do |v| - status_html += content_tag(:li, _("warnings.messages.housing.space.#{error.to_s}", v)) + status_html += content_tag(:li, _("warnings.messages.housing.space.#{error.to_s}", v).html_safe) end else - status_html += content_tag(:li, _("warnings.messages.housing.space.#{error.to_s}", vars: value)) + status_html += content_tag(:li, _("warnings.messages.housing.space.#{error.to_s}", vars: value).html_safe) end end @@ -326,4 +326,23 @@ module WidgetsHelper end end end + + def strong(text) + content_tag(:strong, text) + end + + def phone_link(number) + content_tag(:a, number, href: "tel:#{number}") + end + + def email_link(email) + content_tag(:a, email, href: "mailto:#{email}") + end + + def status_bubble(text, status, attributes = {}) + attributes[:class] ||= [] + attributes[:class] = [attributes[:class]] unless attributes[:class].is_a?(Array) + attributes[:class] << "#{status}-info" + content_tag(:div, text.html_safe, attributes) + end end diff --git a/app/views/conference_administration/_hosts_table.html.haml b/app/views/conference_administration/_hosts_table.html.haml index 21ed137..aad077f 100644 --- a/app/views/conference_administration/_hosts_table.html.haml +++ b/app/views/conference_administration/_hosts_table.html.haml @@ -8,15 +8,22 @@ - first_row = true %table.hosts.admin-edit - - @hosts.each do |id, registration| - - unless first_row - %tr.spacer - %td - %tr.host - %th - .name=registration.user.name - .address=registration.housing_data['address'] - - if registration.housing_data['notes'].present? - .host-notes=paragraph(registration.housing_data['notes']) - %td.inner-table{colspan: 2}=host_guests_table(registration) - - first_row = false + - @hosts.sort_by{ |id, registration| registration.user.name }.each do |id, registration| + - if @housing_data[id][:space].map { |k,v| v }.sum > 0 + - unless first_row + %tr.spacer + %td + %tr.host + %th + .name=registration.user.name + .address=location_link(Location.find_location(registration.housing_data['address'], @this_conference.city)) + - if registration.housing_data['notes'].present? + .host-notes=paragraph(registration.housing_data['notes']) + - if registration.housing_data['info'].present? + %div=_'articles.conference_registration.headings.housing.Rules', :t + .house-rules + =richtext(registration.housing_data['info'], 4) + + %td.inner-table{colspan: 2} + =host_guests_table(registration) + - first_row = false diff --git a/app/views/registration_steps/_review.html.haml b/app/views/registration_steps/_review.html.haml index 672081b..e9efc23 100644 --- a/app/views/registration_steps/_review.html.haml +++ b/app/views/registration_steps/_review.html.haml @@ -39,6 +39,16 @@ - if @allow_reopen_attendance .actions.centered = button :reopen_registration, value: :reopen_registration +- if @host + = row do + = columns(medium: 12) do + %h3=_'articles.conferences.headings.housing_info', :t + %p=(_'articles.conference_registration.paragraphs.Housing', :p, vars: { name: strong(@host.user.name), address: location_link(Location.find_location(@host.housing_data['address'], @this_conference.city)), phone: phone_link(@host.housing_data['phone']), email: email_link(@host.user.email) }).html_safe + = row do + = columns(medium: 12) do + %h4=_'articles.conference_registration.headings.hosting_info', :t + = richtext @host.housing_data['info'] + = row do = columns(medium: 12) do %h3=_'articles.workshops.headings.Workshops', :t diff --git a/app/views/shared/_navbar.html.haml b/app/views/shared/_navbar.html.haml index b88673e..1a45d77 100644 --- a/app/views/shared/_navbar.html.haml +++ b/app/views/shared/_navbar.html.haml @@ -20,6 +20,6 @@ - locale_translation = language_name(locale, true) - translation_text = (_'translate.content.change_locale', "Read in #{locale_translation}", vars: {language: locale_translation}, locale: locale) %a{href: url, lang: locale, title: translation_text} - %span{aria: {hidden: true}}=_!locale + %span{aria: {hidden: :true}}=_!locale = off_screen translation_text \ No newline at end of file diff --git a/app/views/workshops/_show.html.haml b/app/views/workshops/_show.html.haml index ca2d29e..cad5cc1 100644 --- a/app/views/workshops/_show.html.haml +++ b/app/views/workshops/_show.html.haml @@ -13,7 +13,7 @@ - if preview.blank? && translations_available_for_editing .actions.center - 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] + = 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] - if logged_in? = columns(medium: 6) do %h3=_'articles.workshops.headings.facilitators' @@ -30,19 +30,19 @@ .details .email=_!u.email - if f.role.to_sym == :requested - =(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]) + =(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 workshop.can_remove?(current_user, u) - =(link_with_confirmation (_'actions.workshops.Make_Owner'), (_'modals.workshops.facilitators.confirm_transfer_ownership', vars: { user_name: u.name}),approve_facilitate_workshop_request_path(workshop.conference.slug, workshop.id, f.user_id, 'switch_ownership'), :class => [:button, :modify]) unless f.role.to_sym == :creator || !workshop.creator?(current_user) - =(link_with_confirmation (_"actions.workshops.#{is_this_user ? 'Leave' : 'Remove'}"), (_"modals.workshops.facilitators.confirm_remove#{is_this_user ? '_self' : ''}", vars: { user_name: u.name}), approve_facilitate_workshop_request_path(workshop.conference.slug, workshop.id, f.user_id, 'remove'), :class => [:button, :delete]) + =(link_with_confirmation (_'actions.workshops.Make_Owner'), (_'modals.workshops.facilitators.confirm_transfer_ownership', vars: { user_name: u.name}),approve_facilitate_workshop_request_path(workshop.conference.slug, workshop.id, f.user_id, 'switch_ownership'), class: [:button, :modify]) unless f.role.to_sym == :creator || !workshop.creator?(current_user) + =(link_with_confirmation (_"actions.workshops.#{is_this_user ? 'Leave' : 'Remove'}"), (_"modals.workshops.facilitators.confirm_remove#{is_this_user ? '_self' : ''}", vars: { user_name: u.name}), approve_facilitate_workshop_request_path(workshop.conference.slug, workshop.id, f.user_id, 'remove'), class: [:button, :delete]) - if is_this_user && workshop.requested_collaborator?(current_user) .details - =(link_with_confirmation (_'actions.workshops.Cancel_Request'), (_'modals.workshops.facilitators.confirm_cancel_request'), approve_facilitate_workshop_request_path(workshop.conference.slug, workshop.id, f.user_id, 'remove'), :class => [:button, :delete]) + =(link_with_confirmation (_'actions.workshops.Cancel_Request'), (_'modals.workshops.facilitators.confirm_cancel_request'), approve_facilitate_workshop_request_path(workshop.conference.slug, workshop.id, f.user_id, 'remove'), class: [:button, :delete]) - unless preview.present? - =(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) + =(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 is_facilitator %h4=_'articles.workshops.headings.add_facilitator','Add a facilitator' - = form_tag workshop_add_facilitator_path(workshop.conference.slug, workshop.id), :class => 'add-facilitator mini-flex-form' do + = form_tag workshop_add_facilitator_path(workshop.conference.slug, workshop.id), class: 'add-facilitator mini-flex-form' do .email-field.input-field = email_field_tag :email, nil, required: true = label_tag :email diff --git a/app/views/workshops/new.html.haml b/app/views/workshops/new.html.haml index 8bd979b..6f3f38d 100644 --- a/app/views/workshops/new.html.haml +++ b/app/views/workshops/new.html.haml @@ -11,6 +11,8 @@ = hidden_field_tag :translation, @translation - else %h2=_@page_title, :t + - unless @is_translating || @workshop.locale.to_s == I18n.locale.to_s + = status_bubble(_('articles.workshops.paragraphs.not_original_locale', vars: { original_locale: language_name(@workshop.locale), this_locale: language_name(I18n.locale), link: translate_workshop_url(@workshop.conference.slug, @workshop.id, I18n.locale) }), :warning, class: 'top-message') - else %h2=_@page_title, :t diff --git a/config/locales/en.yml b/config/locales/en.yml index 48b0588..567fddd 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1833,7 +1833,11 @@ en: volunteering_info: Volunteering info additional_details: Additional details companion: Companion + Housing: Housing + housing: + Rules: House Rules paragraphs: + Housing: You are staying at %{address}, your host's name is %{name}. You can contact them by email %{email} or by phone at %{phone}. Please take some time to read their house rules below. pronoun: It is important that communications with you and about you are as respectful as possible. If you do not provide a pronoun organizers may assume he, she, or they based on your name or visual identity. @@ -2242,6 +2246,7 @@ en: we want to hear about everyone’s experience within the many configurations of community shops we’re coming from. notes: Notes are only viewable by conference hosts and workshop facilitators + not_original_locale: You are editing a %{original_locale} workshop, edit the %{this_locale} translation instead facilitate_request: Please tell the current workshop facilitators who you are, why you want to help facilitate the workshop, and how you think you will help make the workshop better. All of the current facilitators will diff --git a/config/locales/fr.yml b/config/locales/fr.yml index c408787..f720c5b 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -1333,6 +1333,7 @@ fr: d’avis à nouveau,veuillez cliquer sur le boutonci-dessous,maissouvenez-vousquesi vous attendez trop longtemps,votre hébergement et votre bicyclette pourraient être attribués à quelqu’un d’autre. + Housing: Vous restez à %{address}, le nom de votre hôte est %{name}. Vous pouvez les contacter par email %{email} ou par téléphone à %{phone}. Prenez le temps de lire les règles de leur maison ci-dessous. pronoun_optional: Il n’y a aucune obligation de choisir un pronom. pronoun: Il importe que lorsqu'on communique avec vous ou au sujet de vous, ce soit avec respect. Si vous ne précisez pas votre pronom, les organisateurs @@ -1617,6 +1618,7 @@ fr: facilitate_request_sent: Votre demande a été envoyée. Vous recevrez un courriel une fois qu’elle aura été approuvée ou rejetée, ou si l’un des animateurs ou l’une des animatrices a des questions. + not_original_locale: Vous éditez un atelier %{original_locale}, éditez la traduction %{this_locale} à la place notes: Les remarques ne peuvent être vues que par organisateurs et les organisatrices ainsi que par les personnes qui animent les présentations. needs: Si vous avez besoin du matériel qui suit, les organisateurs et les