Make volunteers choose a single main team

This commit is contained in:
Petko Bordjukov 2024-04-18 18:57:26 +03:00
parent f43c125e6d
commit 0e0d73cbbd
14 changed files with 492 additions and 338 deletions

View File

@ -4,7 +4,7 @@ module Management
def index def index
@filters = filter_params || {} @filters = filter_params || {}
@volunteers = VolunteerSearch.new(scope: Volunteer.where(conference: current_conference).eager_load(:volunteer_teams), filters: params[:filters]).results @volunteers = VolunteerSearch.new(scope: Volunteer.where(conference: current_conference).eager_load(:volunteer_team), filters: params[:filters]).results
end end
def show def show
@ -30,13 +30,14 @@ module Management
def filter_params def filter_params
params.fetch(:filters, {}).permit(:volunteer_team_id) params.fetch(:filters, {}).permit(:volunteer_team_id)
end end
def volunteer_params def volunteer_params
params.require(:volunteer).permit(:name, :picture, :email, :phone, params.require(:volunteer).permit(:name, :picture, :email, :phone,
:tshirt_size, :tshirt_cut, :tshirt_size, :tshirt_cut,
:food_preferences, :previous_experience, :food_preferences, :previous_experience,
:notes, :language, :notes, :language,
volunteer_team_ids: []) :volunteer_team_id,
additional_volunteer_team_ids: [])
end end
end end
end end

View File

@ -34,7 +34,7 @@ module Public
params.require(:volunteer).permit( params.require(:volunteer).permit(
:name, :picture, :email, :phone, :tshirt_size, :tshirt_cut, :name, :picture, :email, :phone, :tshirt_size, :tshirt_cut,
:food_preferences, :previous_experience, :notes, :language, :food_preferences, :previous_experience, :notes, :language,
volunteer_team_ids: [] :volunteer_team_id
) )
end end
end end

View File

@ -11,26 +11,27 @@ class Volunteer < ActiveRecord::Base
validates :food_preferences, inclusion: {in: FOOD_PREFERENCES.map(&:to_s)} validates :food_preferences, inclusion: {in: FOOD_PREFERENCES.map(&:to_s)}
validates :email, format: {with: /\A[^@]+@[^@]+\z/}, presence: true validates :email, format: {with: /\A[^@]+@[^@]+\z/}, presence: true
validates :phone, presence: true, format: {with: /\A[+\- \(\)0-9]+\z/} validates :phone, presence: true, format: {with: /\A[+\- \(\)0-9]+\z/}
validates :volunteer_teams, presence: true validates :volunteer_team, presence: true
validate :volunteer_teams_belong_to_conference validate :volunteer_teams_belong_to_conference
phony_normalize :phone, default_country_code: "BG" phony_normalize :phone, default_country_code: "BG"
belongs_to :conference belongs_to :conference
has_and_belongs_to_many :volunteer_teams belongs_to :volunteer_team
has_and_belongs_to_many :additional_volunteer_teams, class_name: "VolunteerTeam"
before_create :ensure_main_volunteer_team_is_part_of_additional_volunteer_teams
before_create :assign_unique_id before_create :assign_unique_id
after_create :send_notification_to_organizers
after_create :send_notification_to_volunteer after_create :send_notification_to_volunteer
private private
def assign_unique_id def ensure_main_volunteer_team_is_part_of_additional_volunteer_teams
self.unique_id = Digest::SHA256.hexdigest(SecureRandom.uuid) self.additional_volunteer_teams |= [volunteer_team] if volunteer_team
end end
def send_notification_to_organizers def assign_unique_id
VolunteerMailer.team_notification(self).deliver_later self.unique_id = Digest::SHA256.hexdigest(SecureRandom.uuid)
end end
def send_notification_to_volunteer def send_notification_to_volunteer
@ -39,8 +40,11 @@ class Volunteer < ActiveRecord::Base
def volunteer_teams_belong_to_conference def volunteer_teams_belong_to_conference
conference_volunteer_teams = conference.volunteer_teams conference_volunteer_teams = conference.volunteer_teams
unless volunteer_teams.all? { |team| conference_volunteer_teams.include? team } unless additional_volunteer_teams.all? { |team| conference_volunteer_teams.include? team }
errors.add :volunteer_teams, :invalid_volunteer_team errors.add :additional_volunteer_teams, :invalid_volunteer_team
end
unless conference_volunteer_teams.include?(volunteer_team)
errors.add :volunteer_team, :invalid_volunteer_team
end end
end end
end end

View File

@ -1,7 +1,7 @@
class VolunteerSearch class VolunteerSearch
include SearchObject.module(:sorting) include SearchObject.module(:sorting)
option(:volunteer_team_id) { |scope, value| scope.joins(:volunteer_teams).where volunteer_teams: {id: value} } option(:volunteer_team_id) { |scope, value| scope.joins(:volunteer_team).where volunteer_team: {id: value} }
sort_by "name" sort_by "name"
config[:defaults]["sort"] = "#{config[:sort_attributes].first} asc" config[:defaults]["sort"] = "#{config[:sort_attributes].first} asc"

View File

@ -11,7 +11,8 @@
= f.input :name, autofocus: true = f.input :name, autofocus: true
= f.input :email = f.input :email
= f.association :volunteer_teams, as: :check_boxes, wrapper: :horizontal_radio_and_checkboxes, collection: current_conference.volunteer_teams = f.association :volunteer_team, as: :radio_buttons, wrapper: :horizontal_radio_and_checkboxes, collection: current_conference.volunteer_teams
= f.association :additional_volunteer_teams, as: :check_boxes, wrapper: :horizontal_radio_and_checkboxes, collection: current_conference.volunteer_teams
= f.input :phone, input_html: {value: @volunteer.phone.try(:phony_formatted, format: :international)} = f.input :phone, input_html: {value: @volunteer.phone.try(:phony_formatted, format: :international)}
= f.input :language, as: :radio_buttons, wrapper: :horizontal_radio_and_checkboxes, collection: locale_collection, include_blank: false, checked: (@volunteer.language.presence || I18n.locale) = f.input :language, as: :radio_buttons, wrapper: :horizontal_radio_and_checkboxes, collection: locale_collection, include_blank: false, checked: (@volunteer.language.presence || I18n.locale)
= f.input :tshirt_size, collection: Volunteer::TSHIRT_SIZES, as: :radio_buttons, wrapper: :horizontal_radio_and_checkboxes, checked: (@volunteer.tshirt_size.presence || :m) = f.input :tshirt_size, collection: Volunteer::TSHIRT_SIZES, as: :radio_buttons, wrapper: :horizontal_radio_and_checkboxes, checked: (@volunteer.tshirt_size.presence || :m)

View File

@ -1,4 +1,4 @@
<%- csv_headers = %w{id name email language unique_id phone tshirt_size tshirt_cut food_preferences previous_experience notes teams} -%> <%- csv_headers = %w{id name email language unique_id phone tshirt_size tshirt_cut food_preferences previous_experience notes team additional_teams} -%>
<%= CSV.generate_line(csv_headers).html_safe -%> <%= CSV.generate_line(csv_headers).html_safe -%>
<%- @volunteers.each do |volunteer| -%> <%- @volunteers.each do |volunteer| -%>
<%= CSV.generate_line([volunteer.id, <%= CSV.generate_line([volunteer.id,
@ -12,5 +12,6 @@
volunteer.food_preferences, volunteer.food_preferences,
volunteer.previous_experience, volunteer.previous_experience,
volunteer.notes, volunteer.notes,
volunteer.volunteer_teams.map(&:name).join(', ')]).html_safe -%> volunteer.volunteer_team.name,
volunteer.additional_volunteer_teams.map(&:name).join(', ')]).html_safe -%>
<%- end -%> <%- end -%>

View File

@ -32,7 +32,7 @@
thead thead
tr tr
th = t '.profile' th = t '.profile'
th = Volunteer.human_attribute_name :volunteer_teams th = Volunteer.human_attribute_name :volunteer_team
th.actions th.actions
tbody tbody
- @volunteers.each do |volunteer| - @volunteers.each do |volunteer|
@ -50,7 +50,7 @@
p p
= icon(:envelope, volunteer.email) = icon(:envelope, volunteer.email)
td td
= volunteer.volunteer_teams.map(&:name).join(', ') = volunteer.volunteer_team.name
td.actions td.actions
div.btn-group.btn-group-sm div.btn-group.btn-group-sm
= action_buttons(current_conference, volunteer, [:show, :edit]) = action_buttons(current_conference, volunteer, [:show, :edit])

View File

@ -25,8 +25,10 @@
h4.media-heading h4.media-heading
= @volunteer.name = @volunteer.name
hr hr
h4 = Volunteer.human_attribute_name(:volunteer_teams) h4 = Volunteer.human_attribute_name(:volunteer_team)
= @volunteer.volunteer_teams.map(&:name).join(', ') = @volunteer.volunteer_team.name
h4 = Volunteer.human_attribute_name(:additional_volunteer_teams)
= @volunteer.additional_volunteer_teams.map(&:name).join(', ')
- if @volunteer.previous_experience.present? - if @volunteer.previous_experience.present?
h4 = Volunteer.human_attribute_name(:previous_experience) h4 = Volunteer.human_attribute_name(:previous_experience)
= simple_format @volunteer.previous_experience = simple_format @volunteer.previous_experience

View File

@ -15,77 +15,6 @@ bg:
change_feedback_for: Преоценете „%{title}“ change_feedback_for: Преоценете „%{title}“
by: от %{authors} by: от %{authors}
feedback_incentive: Бихме били благодарни, ако споделите с нас мнението си за конференцията и събитията в нея. feedback_incentive: Бихме били благодарни, ако споделите с нас мнението си за конференцията и събитията в нея.
management:
volunteers:
index:
all: Всички
profile: Профил
total: "%{current} от общо %{total}"
personal_profiles:
index:
no_profile: 'Този потребител няма въведен профил за текущата конференция.'
total: "%{current} от общо %{total}"
create:
successfully_created: "Профилът беше създаден успешно."
show:
contacts: "Данни за контакт"
event_propositions: "Предложения за събития"
conferences:
update_vote_data:
vote_data_successfully_updated: "Резултатите от гласуването бяха обновени успешно"
error_during_vote_data_save: "Възникна грешка при запазването на резултатите от гласуването"
error_during_connection_with_voting_endpoint: "Възникна грешка при опит за изтегляне на резултатите от гласуването: %{error}"
vote_results:
back_to: "Обратно към %{conference}"
vote_results: "Резултати от гласуването"
vote_data_never_updated: "Резултатите от гласуването не са изтеглени"
voting_results: "Резултати от гласуването"
vote_data_updated_at: "последно обновяване %{updated_at}"
vote_ratio: "%{votes} от общо %{total_votes} гласа"
fetch_vote_results: "Обнови резултатите от гласуването"
percent: "%"
rank: "Позиция"
unranked: "Няма данни"
export: Експорт
show:
full_vote_results: "Пълни резултати от гласуването"
vote_data_never_updated: "Резултатите от гласуването не са изтеглени"
voting_results: "Резултати от гласуването"
vote_data_updated_at: "последно обновяване %{updated_at}"
vote_ratio: "%{votes} от общо %{total_votes} гласа"
summary: 'Обобщение'
cfp_status: 'Състояние на CFP'
fetch_vote_results: "Обнови резултатите от гласуването"
percent: "%"
rank: "Позиция"
events:
conflicts:
conflicts: "Конфликти"
conflicts_of: "Конфликти на „%{event}“"
percent: "Процент"
hint_html: "Следващата таблица илюстрира какъв процент от посетителите, изявили интерес да присъстват на <strong>„%{event}“</strong>, биха желали да присъстват на всяко от посочените събития."
edit:
edit: "Редакция на %{event_type} „%{event_title}“"
speaker:
no_profile: 'Този потребител няма въведени профили в системата.'
profile_from: "профил от %{conference}"
create_profile: "Създай нов профил"
previous_event_propositions: 'Предишни предложения за събития'
contacts: "Информация за контакт"
show:
between_approved_events: "Между настоящото и одобрените събития"
no_approved_events: "Няма достатъчно одобрени събития"
rank: "Класиране"
review: "Преглед на %{event_type} „%{event_title}“"
conflicts: "Конфликти"
percent: "Процент"
index:
all: "Всички"
total: "%{current} от общо %{total}"
event:
create_profile: "Създай профил"
no_records:
no_records_found: 'Не бяха открити записи, които да отговарят на изискванията'
abstract: "Резюме" abstract: "Резюме"
helpers: helpers:
submit: submit:
@ -190,7 +119,8 @@ bg:
previous_experience: Предишен опит previous_experience: Предишен опит
notes: Бележки notes: Бележки
language: Език language: Език
volunteer_teams: Екипи доброволци volunteer_team: Екип доброволци
additional_volunteer_teams: Допълнителни екипи доброволци
track: track:
color: "Цвят" color: "Цвят"
description: "Описание" description: "Описание"
@ -230,7 +160,9 @@ bg:
attributes: attributes:
picture: picture:
invalid_content_type: "невалиден формат на снимката" invalid_content_type: "невалиден формат на снимката"
volunteer_teams: volunteer_team:
invalid_volunteer_team: "невалиден екип от доброволци"
additional_volunteer_teams:
invalid_volunteer_team: "невалиден екип от доброволци" invalid_volunteer_team: "невалиден екип от доброволци"
models: models:
feedback: feedback:
@ -434,10 +366,11 @@ bg:
public_email: E-mail адрес, който ще бъде видим за посетителите public_email: E-mail адрес, който ще бъде видим за посетителите
twitter: "Потребителското Ви име в Twitter" twitter: "Потребителското Ви име в Twitter"
volunteer: volunteer:
name: "Имайте предвид, че това име ще бъде изписано на грамотата ви за участие в конференцията"
email: "Е-mail адресът Ви, който ще бъде видим само от организаторите" email: "Е-mail адресът Ви, който ще бъде видим само от организаторите"
phone: "Мобилният Ви телефон, който ще бъде видим само за организаторите" phone: "Мобилният Ви телефон, който ще бъде видим само за организаторите"
picture: "Ваша снимка в jpeg, png или gif формат" picture: "Ваша снимка в jpeg, png или gif формат"
volunteer_teams: "Доброволческите екипи, от които искате да сте част. Подробни описания на екипите можете да намерите <a href=\"/volunteer_teams\" target=\"_blank\">тук</a>" volunteer_team: "Доброволческият екип, от които искате да бъдете част. Подробни описания на екипите можете да намерите <a href=\"/volunteer_teams\" target=\"_blank\">тук</a>. Ако желаете да участвате в повече от един екип, споменете това в полето бележка."
user: user:
email: e-mail адресът Ви. Ще бъде видим само от организаторите email: e-mail адресът Ви. Ще бъде видим само от организаторите
password: "Парола с дължина между 8 и 128 символа" password: "Парола с дължина между 8 и 128 символа"

View File

@ -1,21 +1,21 @@
en: en:
public: public:
event_feedbacks: event_feedbacks:
new: &new_feedbacks_en new: &new_feedbacks_bg
feedback_for: Rating '%{title}' feedback_for: "Rating '%{title}'"
submit: Submit submit: Submit
success: The feedback was submitted successfully success: The feedback was submitted successfully
conference_feedbacks: conference_feedbacks:
new: *new_feedbacks_en new: *new_feedbacks_bg
index: index:
feedback_for_the_conference: Feedback for the conference feedback_for_the_conference: Feedback for the conference
general_feedback_for: Submit general feedback for "%{title}" general_feedback_for: "Submit general feedback for \"%{title}\""
change_general_feedback_for: Resubmit general feedback for "%{title}" change_general_feedback_for: "Resubmit general feedback for \"%{title}\""
feedback_for: Submit feedback for "%{title}" feedback_for: "Submit feedback for \"%{title}\""
change_feedback_for: Resubmit feedback for "%{title}" change_feedback_for: "Resubmit feedback for \"%{title}\""
by: by %{authors} by: "by %{authors}"
feedback_incentive: We would be happy to receive your feedback about the conference and its events. feedback_incentive: We would be happy to receive your feedback about the conference and its events.
abstract: Abstract abstract: "Abstract"
helpers: helpers:
submit: submit:
event: event:
@ -25,68 +25,90 @@ en:
create: "Submit application" create: "Submit application"
update: "Update application" update: "Update application"
actions: actions:
are_you_sure: Are you sure? are_you_sure: "Are you sure?"
clone:
button: "Clone %{model}"
title: "Clone existing %{model}"
create: create:
button: Create %{model} button: "Create %{model}"
title: 'Create a new #{model}' title: "Create a new #{model}"
destroy: destroy:
button: Destroy %{model} button: "Destroy %{model}"
edit: edit:
button: Edit %{model} button: "Edit %{model}"
title: Editing %{model} title: "Editing %{model}"
index: index:
button: Browse %{models} button: "Browse %{models}"
title: Browse %{models} title: "Browse %{models}"
new: new:
title_f: New %{model} title_f: "New %{model}"
title_m: New %{model} title_m: "New %{model}"
title_c: "New %{model}"
view: view:
button: View %{model} button: "View %{model}"
title: Viewing %{model} title: "Viewing %{model}"
attributes:
average_rating: Average rating
rating: Rating
activerecord: activerecord:
attributes: attributes:
feedback: feedback:
author_email: E-mail author_email: E-mail
rating: Rating rating: Rating
comment: Comment comment: Comment
participation:
participant: Participant
approved: Confirmed by participant
proposition:
status: Status
statuses:
undecided: Undecided
approved: Approved
rejected: Rejected
backup: Backup
conference: conference:
description: Description participants: "Participants"
description: "Description"
email: E-mail email: E-mail
end_date: End date end_date: "End date"
host_name: Domain name host_name: "Domain name"
start_date: Start date start_date: "Start date"
title: Title planned_cfp_end_date: "Planned CFP End date"
title: "Title"
event: event:
abstract: Abstract conference: "Conference"
agreement: I accept status: "Statis"
description: Description abstract: "Abstract"
language: Language agreement: "I accept"
length: Length description: "Description"
notes: Notes language: "Language"
subtitle: Sub-title length: "Length"
title: Title notes: "Notes"
track: Track subtitle: "Sub-title"
user: Speaker title: "Title"
feedbacks: Feedback track: "Track"
rank: "Rank"
user: "Speaker"
participants: "Participants"
feedbacks: "Feedback"
event_type: event_type:
description: Description description: "Description"
name: Name name: "Name"
minimum_length: Minimum length minimum_length: Minimum length
maximum_length: Maximum length maximum_length: Maximum length
hall: hall:
name: Name name: "Name"
personal_profile: personal_profile:
biography: Short biography biography: "Short biography"
first_name: First name first_name: "First name"
github: Github account github: Github account
last_name: Last name last_name: "Last name"
mobile_phone: Mobile phone mobile_phone: "Mobile phone"
organisation: Organization organisation: "Organization"
picture: Photo picture: "Photo"
public_email: Public e-mail public_email: "Public e-mail"
twitter: Twitter account twitter: Twitter account
volunteer: volunteer:
language: Language
picture: Picture picture: Picture
name: Name name: Name
email: E-mail email: E-mail
@ -96,109 +118,125 @@ en:
food_preferences: Food preference food_preferences: Food preference
previous_experience: Previous experience previous_experience: Previous experience
notes: Notes notes: Notes
volunteer_teams: Екипи доброволци
track:
color: Color
description: Description
name: Name
user:
current_password: Current password
email: E-mail
language: Language language: Language
password: Password volunteer_team: Volunteer team
password_confirmation: Password confirmation additional_volunteer_teams: Additional volunteer teams
remember_me: Remember me track:
color: "Color"
description: "Description"
name: "Name"
user:
current_password: "Current password"
email: E-mail
language: "Language"
password: "Password"
password_confirmation: "Password confirmation"
remember_me: "Remember me"
volunteer_team:
name: Name
description: Description
color: Color
errors: errors:
models: models:
event: event:
attributes: attributes:
track: track:
must_be_a_valid_track: must be one of the listed lecture tracks must_be_a_valid_track: "must be one of the listed lecture tracks"
length: length:
must_be_between: "must be between %{minimum} and %{maximum} minutes" must_be_between: "must be between %{minimum} and %{maximum} minutes"
personal_profile: personal_profile:
attributes: attributes:
github: github:
invalid: can contain only alphabet characters, digits or a dash and cannot start with a dash invalid: "can contain only alphabet characters, digits or a dash and cannot start with a dash"
twitter: twitter:
invalid: can contain a maximum of 15 symbols that need to be alphabet characters, digits or an underscore invalid: "can contain a maximum of 15 symbols that need to be alphabet characters, digits or an underscore"
user: user:
attributes: attributes:
email: email:
invalid: is not a valid e-mail address invalid: "is not a valid e-mail address"
password_confirmation: password_confirmation:
confirmation: does not match the password confirmation: "does not match the password"
volunteer: volunteer:
attributes: attributes:
picture: picture:
invalid_content_type: "invalid picture format" invalid_content_type: "invalid picture format"
volunteer_team:
invalid_volunteer_team: "invalid volunteer team"
additional_volunteer_teams:
invalid_volunteer_team: "invalid volunteer team"
models: models:
feedback:
one: Feedback
other: Feedback
participation:
one: Participation
other: Participation
volunteership: volunteership:
one: volunteership one: volunteership
other: volunteerships other: volunteerships
conference: conference:
one: conference one: "conference"
other: conferences other: "conferences"
event: event:
one: Suggestion one: "Suggestion"
other: Suggestions other: "Suggestions"
event_type: event_type:
one: event type one: "event type"
other: event types other: "event types"
hall: hall:
one: hall one: "hall"
other: halls other: "halls"
lecture: lecture:
one: Lecture one: "Lecture"
other: Lectures other: "Lectures"
personal_profile: personal_profile:
one: Profile one: "Profile"
other: Profiles other: "Profiles"
proposition: proposition:
one: Proposition one: "Proposition"
other: Propositions other: "Propositions"
sponsorship_offer: sponsorship_offer:
one: sponsor one: "sponsor"
other: sponsors other: "sponsors"
track: track:
one: track one: "track"
other: tracks other: "tracks"
volunteer_team: volunteer_team:
one: "volunteer team" one: "volunteer team"
other: "volunteer teams" other: "volunteer teams"
user: user:
one: User one: "User"
other: Users other: "Users"
volunteer: volunteer:
one: volunteer one: "volunteer"
other: volunteers other: "volunteers"
workshop: workshop:
one: Workshop one: "Workshop"
other: Workshops other: "Workshops"
change_pass: Change password change_pass: "Change password"
click_to_unlock: Click the link below to unlock click_to_unlock: "Click the link below to unlock"
confirm_by_clicking: You can confirm your account by clicking the link below confirm_by_clicking: "You can confirm your account by clicking the link below"
confirmations: confirmations:
did_not_receive_confirmation_instructions: You have not received confirmation instructions? did_not_receive_confirmation_instructions: "You have not received confirmation instructions?"
resend: Send resend: "Send"
resend_confirmation: Send confirmation E-mail resend_confirmation: "Send confirmation E-mail"
description: Description description: "Description"
did_not_get_confirmation: You did not receive confirmation instructions? did_not_get_confirmation: "You did not receive confirmation instructions?"
did_not_get_unlock: You did not receive unlock instructions? did_not_get_unlock: "You did not receive unlock instructions?"
do_not_want_pass_reset1: "If you don't want to change your password, please delete this E-mail." do_not_want_pass_reset1: "If you don't want to change your password, please delete this E-mail."
do_not_want_pass_reset2: Your password will not be change unless you click the link above and enter a new password. do_not_want_pass_reset2: "Your password will not be change unless you click the link above and enter a new password."
edit: Edit edit: "Edit"
edit_speaker_profile: Edit profile edit_speaker_profile: "Edit profile"
edit_talk: Edit talk edit_talk: "Edit talk"
edit_title: 'track "%{track}", duration: %{len} min' edit_title: "track \"%{track}\", duration: %{len} min"
edit_workshop: Edit workshop edit_workshop: "Edit workshop"
enter: Enter enter: "Enter"
errors: errors:
messages: messages:
improbable_phone: not a valid phone number improbable_phone: "not a valid phone number"
event_mailer: event_mailer:
acceptance_notification: acceptance_notification:
subject: Your submission for %{conference} for the %{submission_type} "%{title}" has been approved subject: "Your submission for %{conference} for the %{submission_type} \"%{title}\" has been approved"
rejection_notification: rejection_notification:
subject: "Your submission for %{conference} for the %{submission_type} \"%{title}\" has not been approved" subject: "Your submission for %{conference} for the %{submission_type} \"%{title}\" has not been approved"
volunteer_mailer: volunteer_mailer:
@ -206,77 +244,77 @@ en:
subject: "Your application for \"volunteership\" on %{conference_name} was received" subject: "Your application for \"volunteership\" on %{conference_name} was received"
event_states: event_states:
approved: approved:
one: Approved one: "Approved"
other: Approved other: "Approved"
backup: backup:
one: Backup one: "Backup"
other: Backup other: "Backup"
confirmed: confirmed:
one: Confirmed one: "Confirmed"
other: Confirmed other: "Confirmed"
rejected: rejected:
one: Rejected one: "Rejected"
other: Rejected other: "Rejected"
undecided: undecided:
one: Undecided one: "Undecided"
other: Undecided other: "Undecided"
expected_validation: Awaiting confirmation of %{email} expected_validation: "Awaiting confirmation of %{email}"
hello: Hello, %{name} hello: "Hello, %{name}"
home: Home home: "Home"
home_title: "%{conference} - call for participation" home_title: "%{conference} - call for participation"
lecture_was_successfully_confirmed: Your lecture was confirmed successfully lecture_was_successfully_confirmed: "Your lecture was confirmed successfully"
license_notice: Please keep in mind that the presentations will later be published under the CC-BY-ND (Creative Commons Attribution No derivatives) license. license_notice: "Please keep in mind that the presentations will later be published under the CC-BY-ND (Creative Commons Attribution No derivatives) license."
locales: locales:
bg: Bulgarian bg: "Bulgarian"
en: English en: English
login: Login login: "Login"
login_data: Account information login_data: "Account information"
login_with: Log in with %{with} login_with: "Log in with %{with}"
logout: Log out logout: "Log out"
lostpass: Forgotten password? lostpass: "Forgotten password?"
meta_data: 'Language: %{language}, track: "%{track}", duration: %{length} m.' meta_data: "Language: %{language}, track: \"%{track}\", duration: %{length} m."
my_talks: My lecture submissions my_talks: "My lecture submissions"
my_workshops: My workshop submissions my_workshops: "My workshop submissions"
new_workshop_title: Submit a workshop new_workshop_title: "Submit a workshop"
no_talks_submitted: You are yet to submit a lecture no_talks_submitted: "You are yet to submit a lecture"
no_workshops_submitted: You are yet to submit a workshop no_workshops_submitted: "You are yet to submit a workshop"
of_motto: share the freedom of_motto: "share the freedom"
pass_update_hint1: Do not fill this in unless you want to change your password pass_update_hint1: "Do not fill this in unless you want to change your password"
pass_update_hint2: "Fill this in if you'd like to change your password or E-mail address" pass_update_hint2: "Fill this in if you'd like to change your password or E-mail address"
passwords: passwords:
change_your_password: Change your password change_your_password: "Change your password"
confirm_your_new_password: Password confirmation confirm_your_new_password: "Password confirmation"
forgotten_password: Forgotten password forgotten_password: "Forgotten password"
new_password: New password new_password: "New password"
send_instructions: Send instructions send_instructions: "Send instructions"
please_fill_in_your_speaker_profile: Please fill in the data for your personal profile please_fill_in_your_speaker_profile: "Please fill in the data for your personal profile"
registration: Registration registration: "Registration"
registrations: registrations:
account_cancelation: Account deletion account_cancelation: "Account deletion"
add_phone_number: Add a phone number add_phone_number: "Add a phone number"
are_you_sure: Are you sure you want to delete your registration are_you_sure: "Are you sure you want to delete your registration"
cancel_my_account: Delete my account cancel_my_account: "Delete my account"
edit_account: Edit account edit_account: "Edit account"
leave_blank_if_you_do_not_want_to_change: "leave blank if you don't want to change it" leave_blank_if_you_do_not_want_to_change: "leave blank if you don't want to change it"
minimum_characters: at least %{minimum} symbols minimum_characters: "at least %{minimum} symbols"
sign_me_up: Sign me up sign_me_up: "Sign me up"
sign_up: Registration sign_up: "Registration"
unhappy: You are not happy? unhappy: "You are not happy?"
update: Update update: "Update"
we_need_your_current_password: we need your current password in order to confirm the changes we_need_your_current_password: "we need your current password in order to confirm the changes"
resend_instructions_btn: Resend instructions resend_instructions_btn: "Resend instructions"
resend_instructions_header: Resend confirmation instructions resend_instructions_header: "Resend confirmation instructions"
resend_unlock_instructions_title: Resend unlock instructions resend_unlock_instructions_title: "Resend unlock instructions"
send_lostpass_instructions: Resend lost password instructions send_lostpass_instructions: "Resend lost password instructions"
sessions: sessions:
remember_me: Remember me remember_me: "Remember me"
sign_in: Sign in sign_in: "Sign in"
sign_in_heading: Sign in sign_in_heading: "Sign in"
sign_in_with: Sign in with %{with} sign_in_with: "Sign in with %{with}"
sign_out: Sign out sign_out: "Sign out"
simple_form: simple_form:
error_notification: error_notification:
default_message: 'Please see the errors below:' default_message: "Please see the errors below:"
options: options:
volunteer: volunteer:
tshirt_size: tshirt_size:
@ -295,82 +333,84 @@ en:
vegan: Vegan vegan: Vegan
hints: hints:
feedback: feedback:
author_email: "Your E-mail address if you'd like to share it with us" author_email: Your E-mail address if you'd like to share it with us
rating: Select your rating for the event rating: Select your rating for the event
comment: Express your opinion in greater detail here comment: Express your opinion in greater detail here
conference: conference:
description: Conference description description: "Conference description"
email: Orga team email email: Orga team email
end_date: Last day of the conference end_date: "Last day of the conference"
start_date: First day of the conference start_date: "First day of the conference"
title: Title of the conference planned_cfp_end_date: "The day before all speakers must have submitted their proposals. This field is informative, it is not enforced."
title: "Title of the conference"
tracks: tracks:
color: Color color: "Color"
description: Short description description: "Short description"
name: Track name name: "Track name"
event: event:
abstract: An abstract of the event that will be published for the attendees to read (around 1 paragraph) abstract: "An abstract of the event that will be published for the attendees to read (around 1 paragraph)"
agreement: Indicate if you accept your workshop to be recorded and published under the CC-BY-ND (Creative Commons Attribution No Derivatives) license agreement: "Indicate if you accept your workshop to be recorded and published under the CC-BY-ND (Creative Commons Attribution No Derivatives) license"
description: Detailed description of the event (several paragraphs) description: "Detailed description of the event (several paragraphs)"
language: "Language in which the event will be lead" language: ""
length: "Length of the event (in minutes). The length of a %{type} is between %{min} and %{max} minutes" length: "Length of the event (in minutes). The length of a %{type} is between %{min} and %{max} minutes"
notes: "Notes that you'd like the organisation team to read" notes: "Notes that you'd like the organisation team to read"
subtitle: "" subtitle: ""
title: "" title: ""
track: The lecture track for your event track: "The lecture track for your event"
personal_profile: personal_profile:
biography: Describe yourself with a few sentences, writing about yourself in the third person :) biography: "Describe yourself with a few sentences, writing about yourself in the third person :)"
github: Your Github username github: "Your Github username"
mobile_phone: A mobile phone that will be visible only by the organisation team mobile_phone: "A mobile phone that will be visible only by the organisation team"
organisation: The organisation you represent organisation: "The organisation you represent"
picture: Your photo picture: "Your photo"
public_email: E-mail address that will be visible for the attendees public_email: E-mail address that will be visible for the attendees
twitter: Your Twitter handle twitter: "Your Twitter handle"
volunteer: volunteer:
name: "Keep in mind that this name will be written in your certificate for participation in the conference."
email: "Your E-mail address. It will be visible only to the organizers" email: "Your E-mail address. It will be visible only to the organizers"
phone: "Your mobile phone. It will be visible only to the organizers" phone: "Your mobile phone. It will be visible only to the organizers"
picture: "A picture of you in jpeg, png or gif format" picture: "A picture of you in jpeg, png or gif format"
volunteer_teams: "The volunteer teams you'd like to be part of. You can find a description of each team <a href=\"/volunteer_teams?locale=en\" target=\"_blank\">here</a>" volunteer_team: "The volunteer team you'd like to be a part of. You can find a description of each team <a href=\"/volunteer_teams?locale=en\" target=\"_blank\">here</a>. Leave a note in the Notes field if you wish to be a part of any additional teams."
user: user:
email: Your e-mail address. Will be visible to the organizers only. email: Your e-mail address. Will be visible to the organizers only.
password: Password with length between 8 and 128 symbols password: "Password with length between 8 and 128 symbols"
password_confirmation: Repeat the password password_confirmation: "Repeat the password"
'no': false 'no': "No"
required: required:
mark: "*" mark: "*"
text: Required field text: "Required field"
'yes': true 'yes': "Yes"
someone_requested_passreset: Someone requested to change the password of your account. The password can be changed by following the link below someone_requested_passreset: "Someone requested to change the password of your account. The password can be changed by following the link below"
speaker_profile: Speaker profile speaker_profile: "Speaker profile"
submit_talk_header: Submit a new talk submit_talk_header: "Submit a new talk"
suggestion_and_speaker_count: "%{suggestions} submissions by %{speakers} speakers" suggestion_and_speaker_count: "%{suggestions} submissions by %{speakers} speakers"
talks: Talks talks: "Talks"
unlocks: unlocks:
did_not_receive_unlock_instructions: Did not receive unlock instructions? did_not_receive_unlock_instructions: "Did not receive unlock instructions?"
resend: Resend resend: "Resend"
resend_unlock_instructions: Resend unlock instructions resend_unlock_instructions: "Resend unlock instructions"
update: Update update: "Update"
views: views:
conference: conference:
info: Conference details info: "Conference details"
see_details: See details see_details: "See details"
events: events:
edit_event: Editing %{event_type} %{title} edit_event: "Editing %{event_type} %{title}"
event_successfully_created: Your %{event_type} submission was successfully created event_successfully_created: "Your %{event_type} submission was successfully created"
event_successfully_updated: Your %{event_type} submission was successfully updated event_successfully_updated: "Your %{event_type} submission was successfully updated"
successfully_confirmed: Your %{event_type} submission was successfully confirmed successfully_confirmed: "Your %{event_type} submission was successfully confirmed"
error_on_confirmation: There was an error during the confirmation of your %{event_type} submission error_on_confirmation: "There was an error during the confirmation of your %{event_type} submission"
no_events: You are yet to submit an event no_events: "You are yet to submit an event"
submit_event: Submit a %{event_type} submit_event: "Submit a %{event_type}"
navigation: navigation:
my_submissions: My submissions my_submissions: "My submissions"
personal_profiles: personal_profiles:
successfully_created: Your personal profile was successfully created successfully_created: "Your personal profile was successfully created"
successfully_updated: Your personal profile was successfully updated successfully_updated: "Your personal profile was successfully updated"
user: user:
info: User details info: "User details"
welcome: welcome:
submit_event: Submit %{event_type} submit_event: "Submit %{event_type}"
volunteers: volunteers:
new_volunteer_title: Apply for a volunteer new_volunteer_title: Apply for a volunteer
edit_volunteer_title: "Volunteership application of %{name}" edit_volunteer_title: "Volunteership application of %{name}"
@ -380,7 +420,7 @@ en:
successful_application_edit: "Your application was successfully updated" successful_application_edit: "Your application was successfully updated"
error_occurred_while_applying: "There was an error and your application could not be sent" error_occurred_while_applying: "There was an error and your application could not be sent"
you_successfully_retracted_your_application_for: "Your application was successfully retracted" you_successfully_retracted_your_application_for: "Your application was successfully retracted"
welcome: Welcome, %{name} welcome: "Welcome, %{name}"
what_we_ask: 'We would like to receive your lecture, workshop, and stand submissions that belong to the following tracks until %{date}:' what_we_ask: "We would like to receive your lecture, workshop, and stand submissions that belong to the following tracks until %{date}:"
workshop_was_successfully_confirmed: The workshop was successfully confirmed workshop_was_successfully_confirmed: "The workshop was successfully confirmed"
workshops: Workshops workshops: "Workshops"

View File

@ -11,6 +11,95 @@ bg:
events: events:
metadata: "%{type} на %{language} с продължителност %{length} минути" metadata: "%{type} на %{language} с продължителност %{length} минути"
management: management:
volunteers:
index:
all: Всички
profile: Профил
total: "%{current} от общо %{total}"
personal_profiles:
index:
no_profile: 'Този потребител няма въведен профил за текущата конференция.'
total: "%{current} от общо %{total}"
create:
successfully_created: "Профилът беше създаден успешно."
show:
contacts: "Данни за контакт"
event_propositions: "Предложения за събития"
talk_history: Събития с участието на лектора
comments_from_the_audience: Коментари от аудиторията
no_comments_received: Все още няма коментари.
private_email: Личен e-mail
conferences:
update_vote_data:
vote_data_successfully_updated: "Резултатите от гласуването бяха обновени успешно"
error_during_vote_data_save: "Възникна грешка при запазването на резултатите от гласуването"
error_during_connection_with_voting_endpoint: "Възникна грешка при опит за изтегляне на резултатите от гласуването: %{error}"
vote_results:
back_to: "Обратно към %{conference}"
vote_results: "Резултати от гласуването"
vote_data_never_updated: "Резултатите от гласуването не са изтеглени"
voting_results: "Резултати от гласуването"
vote_data_updated_at: "последно обновяване %{updated_at}"
vote_ratio: "%{votes} от общо %{total_votes} гласа"
fetch_vote_results: "Обнови резултатите от гласуването"
percent: "%"
rank: "Позиция"
unranked: "Няма данни"
export: Експорт
show:
full_vote_results: "Пълни резултати от гласуването"
vote_data_never_updated: "Резултатите от гласуването не са изтеглени"
voting_results: "Резултати от гласуването"
vote_data_updated_at: "последно обновяване %{updated_at}"
vote_ratio: "%{votes} от общо %{total_votes} гласа"
summary: 'Обобщение'
cfp_status: 'Състояние на CFP'
fetch_vote_results: "Обнови резултатите от гласуването"
percent: "%"
rank: "Позиция"
events:
update:
event_successfully_updated: Събитието беше обновено успешно
show:
average_grade: Средна оценка
total_feedback_grades:
one: от %{total_grades} оценка
other: от %{total_grades} оценки
no_feedback_received: Все още няма обратна връзка
no_comments_received: Все още няма коментари
comments: Коментари
top_conflicts: Топ 5 конфликти
between_approved_events: "Между настоящото и одобрените събития"
no_approved_events: "Няма достатъчно одобрени събития"
rank: "Класиране"
review: "Преглед на %{event_type} „%{event_title}“"
conflicts: "Конфликти"
percent: "Процент"
speaker:
continue: Още...
other_event_propositions: Други предложени събития
the_participant_has_not_created_a_profile: Потребителят не си е създал профил в системата.
private_email: Личен e-mail
no_other_event_propositions: Няма други предложени събития
no_profile: 'Този потребител няма въведени профили в системата.'
profile_from: "профил от %{conference}"
create_profile: "Създай нов профил"
previous_event_propositions: 'Предишни предложения за събития'
contacts: "Информация за контакт"
conflicts:
conflicts: "Конфликти"
conflicts_of: "Конфликти на „%{event}“"
percent: "Процент"
hint_html: "Следващата таблица илюстрира какъв процент от посетителите, изявили интерес да присъстват на <strong>„%{event}“</strong>, биха желали да присъстват на всяко от посочените събития."
edit:
edit: "Редакция на %{event_type} „%{event_title}“"
index:
all: "Всички"
total: "%{current} от общо %{total}"
event:
create_profile: "Създай профил"
no_records:
no_records_found: 'Не бяха открити записи, които да отговарят на изискванията'
feedback: feedback:
index: index:
feedback: Обратна връзка feedback: Обратна връзка
@ -27,30 +116,6 @@ bg:
feedback: feedback:
anonymous: Анонимен anonymous: Анонимен
about: относно about: относно
personal_profiles:
show:
talk_history: Събития с участието на лектора
comments_from_the_audience: Коментари от аудиторията
no_comments_received: Все още няма коментари.
private_email: Личен e-mail
events:
update:
event_successfully_updated: Събитието беше обновено успешно
show:
average_grade: Средна оценка
total_feedback_grades:
one: от %{total_grades} оценка
other: от %{total_grades} оценки
no_feedback_received: Все още няма обратна връзка
no_comments_received: Все още няма коментари
comments: Коментари
top_conflicts: Топ 5 конфликти
speaker:
continue: Още...
other_event_propositions: Други предложени събития
the_participant_has_not_created_a_profile: Потребителят не си е създал профил в системата.
private_email: Личен e-mail
no_other_event_propositions: Няма други предложени събития
ratings: ratings:
poor: Слаб poor: Слаб
average: Среден average: Среден

View File

@ -1,14 +1,65 @@
en: en:
are_you_sure: Are you sure? are_you_sure: "Are you sure?"
view: View view: View
home: Home home: Home
more_about_user: ""
status: status:
undecided: Undecided undecided: Undecided
approved: Approved approved: Approved
rejected: Rejected rejected: Rejected
backup: Back-up backup: Back-up
events:
metadata: ""
management: management:
volunteers:
index:
all: ""
profile: ""
total: ""
personal_profiles:
index:
no_profile: ''
total: ""
create:
successfully_created: ""
show:
contacts: ""
event_propositions: ""
talk_history: ""
comments_from_the_audience: ""
no_comments_received: ""
private_email: ""
conferences:
update_vote_data:
vote_data_successfully_updated: ""
error_during_vote_data_save: ""
error_during_connection_with_voting_endpoint: ""
vote_results:
back_to: ""
vote_results: ""
vote_data_never_updated: ""
voting_results: ""
vote_data_updated_at: ""
vote_ratio: ""
fetch_vote_results: ""
percent: ""
rank: ""
unranked: ""
export: ""
show:
full_vote_results: ""
vote_data_never_updated: ""
voting_results: ""
vote_data_updated_at: ""
vote_ratio: ""
summary: ''
cfp_status: ''
fetch_vote_results: ""
percent: ""
rank: ""
events: events:
update:
event_successfully_updated: ""
show: show:
average_grade: Average grade average_grade: Average grade
total_feedback_grades: total_feedback_grades:
@ -17,3 +68,57 @@ en:
no_feedback_received: No feedback received (yet) no_feedback_received: No feedback received (yet)
no_comments_received: No comments received (yet) no_comments_received: No comments received (yet)
comments: Comments comments: Comments
top_conflicts: ""
between_approved_events: ""
no_approved_events: ""
rank: ""
review: ""
conflicts: ""
percent: ""
speaker:
continue: ""
other_event_propositions: ""
the_participant_has_not_created_a_profile: ""
private_email: ""
no_other_event_propositions: ""
no_profile: ''
profile_from: ""
create_profile: ""
previous_event_propositions: ''
contacts: ""
conflicts:
conflicts: ""
conflicts_of: ""
percent: ""
hint_html: ""
edit:
edit: ""
index:
all: ""
total: ""
event:
create_profile: ""
no_records:
no_records_found: ''
feedback:
index:
feedback: ""
overall_organisation: ""
comments: ""
average_grade: ""
total_feedback_grades:
one: ''
other: ''
no_feedback_received: ""
no_comments_received: ""
events: ""
shared:
feedback:
anonymous: ""
about: ""
ratings:
poor: ""
average: ""
good: ""
very_good: ""
excellent: ""

View File

@ -5,12 +5,14 @@
.form-inputs .form-inputs
.input .input
= image_tag @volunteer.picture.variant(resize_to_limit: [150, 150]) if @volunteer.picture.attached? = image_tag(@volunteer.picture.variant(resize_to_limit: [150, 150])) if @volunteer.picture.attached?
= f.input :picture, as: :file, direct: true, wrapper: false = f.hidden_field :picture, value: @volunteer.picture.signed_id if @volunteer.picture.attached?
= f.input :picture, as: :file, required: false, direct: true, wrapper: false, input_html: {direct_upload: true}
= f.input :name, autofocus: true = f.input :name, autofocus: true
= f.input :email = f.input :email
= f.input :phone, input_html: {value: @volunteer.phone.try(:phony_formatted, format: :international)} = f.input :phone, input_html: {value: @volunteer.phone.try(:phony_formatted, format: :international)}
= f.association :volunteer_teams, as: :check_boxes, wrapper: :default, collection: current_conference.volunteer_teams = f.association :volunteer_team, as: :radio_buttons, wrapper: :default, collection: current_conference.volunteer_teams
= f.input :language, as: :radio_buttons, collection: locale_collection, include_blank: false, wrapper: :default, checked: (@volunteer.language.presence || I18n.locale) = f.input :language, as: :radio_buttons, collection: locale_collection, include_blank: false, wrapper: :default, checked: (@volunteer.language.presence || I18n.locale)
= f.input :tshirt_size, collection: Volunteer::TSHIRT_SIZES, as: :radio_buttons, wrapper: :default, checked: (@volunteer.tshirt_size.presence || :m) = f.input :tshirt_size, collection: Volunteer::TSHIRT_SIZES, as: :radio_buttons, wrapper: :default, checked: (@volunteer.tshirt_size.presence || :m)
= f.input :tshirt_cut, collection: Volunteer::TSHIRT_CUTS, as: :radio_buttons, wrapper: :default, checked: (@volunteer.tshirt_cut.presence || :unisex) = f.input :tshirt_cut, collection: Volunteer::TSHIRT_CUTS, as: :radio_buttons, wrapper: :default, checked: (@volunteer.tshirt_cut.presence || :unisex)

View File

@ -114,7 +114,7 @@ module FeatureHelpers
fill_in Volunteer.human_attribute_name(:name), with: "Volunteer Foo" fill_in Volunteer.human_attribute_name(:name), with: "Volunteer Foo"
fill_in Volunteer.human_attribute_name(:email), with: "foo@example.com" fill_in Volunteer.human_attribute_name(:email), with: "foo@example.com"
fill_in Volunteer.human_attribute_name(:phone), with: "+359666666" fill_in Volunteer.human_attribute_name(:phone), with: "+359666666"
check VolunteerTeam.first.name choose VolunteerTeam.first.name
click_on I18n.t("helpers.submit.volunteer.create") click_on I18n.t("helpers.submit.volunteer.create")
end end