From 3635b02a655b81bfc2dddc2ae20cd15820ddc384 Mon Sep 17 00:00:00 2001 From: Godwin Date: Mon, 14 Aug 2017 19:40:43 -0700 Subject: [PATCH 1/5] Guest details for hosts --- app/assets/stylesheets/_application.scss | 5 +++++ app/views/layouts/application.html.haml | 1 - .../registration_steps/_review.html.haml | 22 ++++++++++++++++++- config/locales/en.yml | 5 +++++ config/locales/es.yml | 5 +++++ config/locales/fr.yml | 5 +++++ 6 files changed, 41 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/_application.scss b/app/assets/stylesheets/_application.scss index a1e242f..f9d74b8 100644 --- a/app/assets/stylesheets/_application.scss +++ b/app/assets/stylesheets/_application.scss @@ -326,6 +326,10 @@ table, .table { overflow: auto !important; } } + + &.full { + width: 100%; + } } .table-scroller { @@ -462,6 +466,7 @@ body.expanded-element { .responsive-table { display: block; + width: 100%; .table-td { padding: 1em; diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 4b01c7e..8ac3abf 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -91,4 +91,3 @@ = javascripts = inline_scripts = emit_js_translations - =# javascript_include_tag :jsreader diff --git a/app/views/registration_steps/_review.html.haml b/app/views/registration_steps/_review.html.haml index e9efc23..0d82808 100644 --- a/app/views/registration_steps/_review.html.haml +++ b/app/views/registration_steps/_review.html.haml @@ -47,7 +47,27 @@ = row do = columns(medium: 12) do %h4=_'articles.conference_registration.headings.hosting_info', :t - = richtext @host.housing_data['info'] + #house-rules{lang: @host.user.locale.to_s == I18n.locale.to_s ? nil : @host.user.locale} + = richtext @host.housing_data['info'] +- elsif @guests + = row do + = columns(medium: 12) do + %h3=_'articles.conference_registration.headings.Hosting', :t + %p=_'articles.conference_registration.paragraphs.Hosting', :p, vars: { count: @guests.sum { |s| s.size } } + = row do + = columns(medium: 12) do + %h4=_'articles.conference_registration.headings.guests', :t + - @guests.each do |space, guests| + %h5=_"forms.labels.generic.#{space}" + %table.full + - guests.each do |guest| + %tr + %th=guest.user.name + %th=guest.from + %tr + - if guest.housing_data['other'].present? + %td{colspan: 2, lang: guest.user.locale.to_s == I18n.locale.to_s ? nil : guest.user.locale} + = paragraph guest.housing_data['other'] = row do = columns(medium: 12) do diff --git a/config/locales/en.yml b/config/locales/en.yml index 6240dc9..b2cd482 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1725,6 +1725,7 @@ en: name: Name languages: Languages spoken headings: + guests: Guests pronoun: Pronoun (he/she/they) Back_to: 'Back to:' group_ride: Do you plan to attend the group ride? @@ -1838,6 +1839,10 @@ en: housing: Rules: House Rules paragraphs: + Hosting: + zero: You have not been selected to host any guests yet, please keep in mind that your guest list may change at any time. If you have any questions or issues about your guests, please reach out to the conference organizers. + one: You have been selected to host one guest, please keep in mind that your guest list may change at any time. If you have any questions or issues about your guests, please reach out to the conference organizers. + other: You have been selected to host %{count} guests, please keep in mind that your guest list may change at any time. If you have any questions or issues about your guests, please reach out to the conference organizers. 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 diff --git a/config/locales/es.yml b/config/locales/es.yml index d0f77c5..f18b82f 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -1401,7 +1401,12 @@ es: pronoun: Pronombre con el que te identificas (él/ella/ellxs) review: Revisar your_location: Ciudad o localidad en la que vives? + guests: Invitados paragraphs: + Hosting: + zero: No ha sido seleccionado para recibir invitados todavía, tenga en cuenta que su lista de invitados puede cambiar en cualquier momento. Si tiene alguna pregunta o problema sobre sus invitados, favor de comunicarse con los organizadores de la conferencia. + one: Usted ha sido seleccionado para recibir un invitado, por favor tenga en cuenta que su lista de invitados puede cambiar en cualquier momento. Si tiene alguna pregunta o problema sobre sus invitados, favor de comunicarse con los organizadores de la conferencia. + other: Usted ha sido seleccionado para recibir %{count} invitados, por favor tenga en cuenta que su lista de invitados puede cambiar en cualquier momento. Si tiene alguna pregunta o problema sobre sus invitados, favor de comunicarse con los organizadores de la conferencia. Payment_Made: Usted ya ha realizado un pago de %{fees_paid}. Payment_Add: "¡Gracias! Abajo puedes agregar más dinero a esta cantidad si deseas realizar otro pago. " diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 48e8393..9f864e1 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -1158,6 +1158,7 @@ fr: recycle_parts: Organismes de vélo à but non lucratif conference_registration: headings: + guests: Invités policy: Politique Policy_Agreement: Accord d’espace positif contact_info: Coordonnées @@ -1240,6 +1241,10 @@ fr: quiet: Maison calme not_attending: Je n’assisterai pas à la conférence paragraphs: + Hosting: + zero: Vous n'avez pas encore été sélectionné pour héberger des invités, n'oubliez pas que votre liste d'invités peut changer à tout moment. Si vous avez des questions ou des problèmes concernant vos invités, veuillez contacter les organisateurs de la conférence. + one: Vous avez été sélectionné pour héberger un invité, veuillez garder à l'esprit que votre liste d'invités peut changer à tout moment. Si vous avez des questions ou des problèmes concernant vos invités, veuillez contacter les organisateurs de la conférence. + other: Vous avez été sélectionné pour accueillir %{count} invités, n'oubliez pas que votre liste d'invités peut changer à tout moment. Si vous avez des questions ou des problèmes concernant vos invités, veuillez contacter les organisateurs de la conférence. Contact_Info: Parlez-nous un peu de vous Confirm_Agreement: En cliquant sur « J’accepte », vous vous engagez à faire votre possible pour appliquer l’Accord d’espace positif de Bike!Bike! Merci. From 740dc1b0d49dfb6d16b7ddbf39d229d1bde938d1 Mon Sep 17 00:00:00 2001 From: Muz Date: Tue, 15 Aug 2017 13:02:40 -0500 Subject: [PATCH 2/5] Don't extraneously include the hostname on links to workshops for emails --- app/views/user_mailer/workshop_facilitator_request.html.haml | 4 ++-- .../workshop_facilitator_request_approved.html.haml | 2 +- .../user_mailer/workshop_facilitator_request_denied.html.haml | 2 +- .../user_mailer/workshop_original_content_changed.html.haml | 2 +- app/views/user_mailer/workshop_translated.html.haml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/user_mailer/workshop_facilitator_request.html.haml b/app/views/user_mailer/workshop_facilitator_request.html.haml index 620baea..34639b5 100644 --- a/app/views/user_mailer/workshop_facilitator_request.html.haml +++ b/app/views/user_mailer/workshop_facilitator_request.html.haml @@ -4,8 +4,8 @@ %p =_'email.workshop.paragraph.request_instructions',"You can approve or deny this request on your workshop page: " - - workshop_link = @host + view_workshop_url(@conference.slug, @workshop.id).html_safe + - workshop_link = view_workshop_url(@conference.slug, @workshop.id).html_safe %a{href: workshop_link}=_!(workshop_link) %p=_'email.workshop.paragraph.request_reply_instructions',"You can also reply directly to this email to ask follow-up questions." - \ No newline at end of file + diff --git a/app/views/user_mailer/workshop_facilitator_request_approved.html.haml b/app/views/user_mailer/workshop_facilitator_request_approved.html.haml index 1e979e0..b1f8d1b 100644 --- a/app/views/user_mailer/workshop_facilitator_request_approved.html.haml +++ b/app/views/user_mailer/workshop_facilitator_request_approved.html.haml @@ -1,4 +1,4 @@ %p - - workshop_link = link_to (_!@workshop.title), @host + view_workshop_url(@conference.slug, @workshop.id) + - workshop_link = link_to (_!@workshop.title), view_workshop_url(@conference.slug, @workshop.id) =_'email.workshop.paragraph.request_approved',"You have been added as a facilitator of #{workshop_link.html_safe}.", vars: {workshop_title: workshop_link.html_safe} diff --git a/app/views/user_mailer/workshop_facilitator_request_denied.html.haml b/app/views/user_mailer/workshop_facilitator_request_denied.html.haml index 6697f2b..40282ed 100644 --- a/app/views/user_mailer/workshop_facilitator_request_denied.html.haml +++ b/app/views/user_mailer/workshop_facilitator_request_denied.html.haml @@ -1,3 +1,3 @@ %p - - workshop_link = link_to (_!@workshop.title), @host + view_workshop_url(@conference.slug, @workshop.id).html_safe + - workshop_link = link_to (_!@workshop.title), view_workshop_url(@conference.slug, @workshop.id).html_safe =_'email.workshop.paragraph.request_denied',"Your request to become a facilitator of #{workshop_link} has been denied. If you think this was in error, you may contact the current facilitators by making another request to facilitate.", vars: {workshop_title: workshop_link.html_safe} diff --git a/app/views/user_mailer/workshop_original_content_changed.html.haml b/app/views/user_mailer/workshop_original_content_changed.html.haml index d7a88ff..c393c37 100644 --- a/app/views/user_mailer/workshop_original_content_changed.html.haml +++ b/app/views/user_mailer/workshop_original_content_changed.html.haml @@ -10,5 +10,5 @@ %p =_'email.workshop.paragraph.view_workshop',"You can view the workshop here: " - - workshop_link = @host + view_workshop_path(@workshop.conference.slug, @workshop.id) + - workshop_link = view_workshop_path(@workshop.conference.slug, @workshop.id) %a{href: workshop_link}=workshop_link diff --git a/app/views/user_mailer/workshop_translated.html.haml b/app/views/user_mailer/workshop_translated.html.haml index 9b39b31..ecb0df2 100644 --- a/app/views/user_mailer/workshop_translated.html.haml +++ b/app/views/user_mailer/workshop_translated.html.haml @@ -10,5 +10,5 @@ %p =_'email.workshop.paragraph.view_workshop',"You can view the workshop here: " - - workshop_link = @host + view_workshop_url(@workshop.conference.slug, @workshop.id) + - workshop_link = view_workshop_url(@workshop.conference.slug, @workshop.id) %a{href: workshop_link}=_!(workshop_link) From 322e7481acba997bd467e64898023c4ec19f1c94 Mon Sep 17 00:00:00 2001 From: Godwin Date: Wed, 16 Aug 2017 09:58:59 -0700 Subject: [PATCH 3/5] Added missing translation for schedule page --- config/locales/en.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/locales/en.yml b/config/locales/en.yml index b2cd482..e0fc616 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1173,6 +1173,8 @@ en: errors: format: "%{attribute} %{message}" messages: + schedule: + need_not_available: '%{workshop_title} workshop requires %{need} but %{location} does not have this amenity' accepted: must be accepted blank: can't be blank present: must be blank From 34564083a83b5a83933bfac37182ebdd46a5bf22 Mon Sep 17 00:00:00 2001 From: Godwin Date: Fri, 18 Aug 2017 10:47:04 -0700 Subject: [PATCH 4/5] Added translation for admin error message --- config/locales/en.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/config/locales/en.yml b/config/locales/en.yml index e0fc616..7051da8 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1244,6 +1244,7 @@ en: space: companions: This host wishes to be housed with %{name} admin: + save_block_days_required: Select at least one day administrators: Error updating organizations dates: Error updating dates description: Error saving your conference description From d3f4bbe0ee59b58c33fe3e369c50f4acb3bba797 Mon Sep 17 00:00:00 2001 From: Godwin Date: Fri, 18 Aug 2017 11:15:54 -0700 Subject: [PATCH 5/5] Fixed error editing locations --- .../conference_administration/administration_step.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/conference_administration/administration_step.html.haml b/app/views/conference_administration/administration_step.html.haml index 211975c..68f6184 100644 --- a/app/views/conference_administration/administration_step.html.haml +++ b/app/views/conference_administration/administration_step.html.haml @@ -38,4 +38,4 @@ = columns(medium: 12) do %p=((_"articles.admin.#{@admin_group}.descriptions.#{@admin_step}", :s)) unless @hide_description === true = row do - = render @admin_step + = render @admin_step.to_s