Edit workshop locale warning
This commit is contained in:
parent
2185129e55
commit
b74b3062e8
@ -1723,6 +1723,10 @@ ul.warnings {
|
|||||||
.text-field & {
|
.text-field & {
|
||||||
margin: 0 0 1em 0;
|
margin: 0 0 1em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.top-message {
|
||||||
|
margin-top: 2em;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.success-info {
|
.success-info {
|
||||||
|
@ -67,8 +67,8 @@ class WorkshopsController < ApplicationController
|
|||||||
else
|
else
|
||||||
return do_403 unless @can_edit
|
return do_403 unless @can_edit
|
||||||
|
|
||||||
@title = @workshop.title
|
@title = @workshop.title!
|
||||||
@info = @workshop.info
|
@info = @workshop.info!
|
||||||
end
|
end
|
||||||
|
|
||||||
@needs = JSON.parse(@workshop.needs || '[]').map &:to_sym
|
@needs = JSON.parse(@workshop.needs || '[]').map &:to_sym
|
||||||
|
@ -137,7 +137,8 @@ module FormHelper
|
|||||||
|
|
||||||
if options[:warning].present?
|
if options[:warning].present?
|
||||||
description_id ||= "#{id}-desc"
|
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
|
end
|
||||||
|
|
||||||
aria = {}
|
aria = {}
|
||||||
|
@ -326,4 +326,23 @@ module WidgetsHelper
|
|||||||
end
|
end
|
||||||
end
|
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
|
end
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
= row do
|
= row do
|
||||||
= columns(medium: 12) do
|
= columns(medium: 12) do
|
||||||
%h3=_'articles.conferences.headings.housing_info', :t
|
%h3=_'articles.conferences.headings.housing_info', :t
|
||||||
%p=(_'articles.conference_registration.paragraphs.Housing', :p, vars: { name: @host.user.name, address: location_link(Location.find_location(@host.housing_data['address'], @this_conference.city)), phone: @host.housing_data['phone'], email: @host.user.email}).html_safe
|
%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
|
= row do
|
||||||
= columns(medium: 12) do
|
= columns(medium: 12) do
|
||||||
%h4=_'articles.conference_registration.headings.hosting_info', :t
|
%h4=_'articles.conference_registration.headings.hosting_info', :t
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
- if preview.blank? && translations_available_for_editing
|
- if preview.blank? && translations_available_for_editing
|
||||||
.actions.center
|
.actions.center
|
||||||
- translations_available_for_editing.each do |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]
|
= 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?
|
- if logged_in?
|
||||||
= columns(medium: 6) do
|
= columns(medium: 6) do
|
||||||
%h3=_'articles.workshops.headings.facilitators'
|
%h3=_'articles.workshops.headings.facilitators'
|
||||||
@ -30,19 +30,19 @@
|
|||||||
.details
|
.details
|
||||||
.email=_!u.email
|
.email=_!u.email
|
||||||
- if f.role.to_sym == :requested
|
- 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.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.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)
|
- 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.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.#{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)
|
- if is_this_user && workshop.requested_collaborator?(current_user)
|
||||||
.details
|
.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?
|
- 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
|
- if is_facilitator
|
||||||
%h4=_'articles.workshops.headings.add_facilitator','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 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.input-field
|
||||||
= email_field_tag :email, nil, required: true
|
= email_field_tag :email, nil, required: true
|
||||||
= label_tag :email
|
= label_tag :email
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
= hidden_field_tag :translation, @translation
|
= hidden_field_tag :translation, @translation
|
||||||
- else
|
- else
|
||||||
%h2=_@page_title, :t
|
%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
|
- else
|
||||||
%h2=_@page_title, :t
|
%h2=_@page_title, :t
|
||||||
|
|
||||||
|
@ -1837,7 +1837,7 @@ en:
|
|||||||
housing:
|
housing:
|
||||||
Rules: House Rules
|
Rules: House Rules
|
||||||
paragraphs:
|
paragraphs:
|
||||||
Housing: You are staying at %{address}, your host's name is <strong>%{name}</strong>. You can contact them by email <a href="mailto:%{email}">%{email}</a> or by phone at <a href="tel:%{phone}">%{phone}</a>. Please take some time to read their house rules below.
|
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
|
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
|
respectful as possible. If you do not provide a pronoun organizers may assume
|
||||||
he, she, or they based on your name or visual identity.
|
he, she, or they based on your name or visual identity.
|
||||||
@ -2246,6 +2246,7 @@ en:
|
|||||||
we want to hear about everyone’s experience within the many configurations
|
we want to hear about everyone’s experience within the many configurations
|
||||||
of community shops we’re coming from.
|
of community shops we’re coming from.
|
||||||
notes: Notes are only viewable by conference hosts and workshop facilitators
|
notes: Notes are only viewable by conference hosts and workshop facilitators
|
||||||
|
not_original_locale: You are editing a %{original_locale} workshop, <a href="%{link}">edit the %{this_locale} translation instead</a>
|
||||||
facilitate_request: Please tell the current workshop facilitators who you
|
facilitate_request: Please tell the current workshop facilitators who you
|
||||||
are, why you want to help facilitate the workshop, and how you think 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
|
will help make the workshop better. All of the current facilitators will
|
||||||
|
@ -1333,6 +1333,7 @@ fr:
|
|||||||
d’avis à nouveau,veuillez cliquer sur le boutonci-dessous,maissouvenez-vousquesi
|
d’avis à nouveau,veuillez cliquer sur le boutonci-dessous,maissouvenez-vousquesi
|
||||||
vous attendez trop longtemps,votre hébergement et votre bicyclette pourraient
|
vous attendez trop longtemps,votre hébergement et votre bicyclette pourraient
|
||||||
être attribués à quelqu’un d’autre.
|
ê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_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,
|
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
|
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
|
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
|
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.
|
ou l’une des animatrices a des questions.
|
||||||
|
not_original_locale: Vous éditez un atelier %{original_locale}, <a href="%{link}">éditez la traduction %{this_locale} à la place</a>
|
||||||
notes: Les remarques ne peuvent être vues que par organisateurs et les organisatrices
|
notes: Les remarques ne peuvent être vues que par organisateurs et les organisatrices
|
||||||
ainsi que par les personnes qui animent les présentations.
|
ainsi que par les personnes qui animent les présentations.
|
||||||
needs: Si vous avez besoin du matériel qui suit, les organisateurs et les
|
needs: Si vous avez besoin du matériel qui suit, les organisateurs et les
|
||||||
|
Loading…
x
Reference in New Issue
Block a user