Commit e55d7727 authored by Kaspar Vollenweider's avatar Kaspar Vollenweider

Merge branch 'fix/several_small_text_and_other_changes' into 'develop'

Fix/several small text and other changes

See merge request !939
parents 1c8dae78 7bcba03b
Pipeline #40125 passed with stage
in 37 minutes and 54 seconds
......@@ -69,3 +69,7 @@ fieldset {
.checkbox + .checkbox-line {
margin-top: 0;
}
textarea.double-height {
min-height: 100px;
}
......@@ -53,10 +53,10 @@ module ApplicationHelper
}, class: html_class }
end
def checkbox_toggle_collapse(f, field, collapse_selector, check_shows: true, label_html: nil, type: :boolean, disabled: false)
def checkbox_toggle_collapse(f, field, collapse_selector, check_shows: true, label_html: nil, type: :boolean, disabled: false, tabindex: nil)
input_html = { data: { collapse: collapse_selector, check_shows: check_shows },
class: 'checkbox-toggle-collapse',
disabled: disabled }
class: 'checkbox-toggle-collapse', disabled: disabled }
input_html.merge(tabindex: tabindex) if tabindex
f.input(field, type: type, input_html: input_html, label_html: label_html)
end
......
......@@ -16,7 +16,8 @@ class LanguageSkill < ApplicationRecord
}
def self.languages
@languages ||= I18n.t('language_names').map { |key, lang| [lang, key.to_s] }.sort
@languages ||= I18n.t('language_names').merge(I18n.t('language_names_customizations'))
.map { |key, lang| [lang, key.to_s] }.sort
end
......
......@@ -11,23 +11,23 @@
.col-xs-12.col-md-6
fieldset
legend= t_attr(:personal_particulars, Contact)
= f.input :salutation, as: :select, collection: Client::SALUTATIONS, include_blank: true
= f.input :salutation, as: :select, collection: Client::SALUTATIONS, include_blank: true, input_html: { tabindex: 1 }
= f.simple_fields_for :contact do |c|
.row
.col-xs-12.col-md-6
= c.input :first_name, required: true
= c.input :first_name, required: true, input_html: { tabindex: 2 }
= f.input :birth_year, as: :select, collection: Client.year_collection,
include_blank: true
= f.input :entry_date
include_blank: true, input_html: { tabindex: 4 }
= f.input :entry_date, input_html: { tabindex: 6 }
.col-xs-12.col-md-6
= c.input :last_name, required: true, label: t_attr(:last_name)
= f.input :nationality, as: :country
= f.input :permit, collection: Client::PERMITS, as: :radio_buttons
= c.input :last_name, required: true, label: t_attr(:last_name), input_html: { tabindex: 3 }
= f.input :nationality, as: :country, input_html: { tabindex: 5 }
= f.input :permit, collection: Client::PERMITS, as: :radio_buttons, input_html: { tabindex: 7 }
= f.simple_fields_for :contact do |c|
.col-xs-12.col-md-6
= render 'contacts/address_fields', f: c
= render 'contacts/phone_fields', f: c
= render 'contacts/address_fields', f: c, tabindex_start: 7
= render 'contacts/phone_fields', f: c, tabindex_start: 10
fieldset
legend Sprachkenntnisse
......@@ -69,7 +69,6 @@ fieldset
fieldset
legend Verfügbarkeit?
= render 'availability/form', f: f
.col-xs-12.col-md-6
fieldset
legend Interne Kriterien
......@@ -79,7 +78,24 @@ fieldset
= f.association :involved_authority, collection: @social_workers
= f.input :competent_authority
= f.input :cost_unit, collection: Client.cost_unit_collection, include_blank: true
- if policy(Client).show_comments?
= f.input :comments
= f.input :additional_comments
fieldset
legend= t_attr(:cost_unit)
= f.input :cost_unit, collection: Client.cost_unit_collection, include_blank: true, label_html: { class: 'sr-only' }
h4 Hinweis
p
'Kosten in der Stadt Zürich: Vermittlung von Freiwilligen ist kostenlos.
br
'Kosten in Gemeinden: Die einmalige Vermittlungspauschale nach einer einmonatigen Probezeit beträgt:
br
'CHF 600 bei TransFair-Unterstützung der Tandems in der AOZ, Stadt Zürich
br
'CHF 800 bei TransFair-Unterstützung der Tandems vor Ort
- if policy(Client).show_comments?
.col-xs-12
hr
.col-xs-12.col-md-6
= f.input :comments, input_html: { class: 'double-height' }
.col-xs-12.col-md-6
= f.input :additional_comments, input_html: { class: 'double-height' }
- tabindex_start ||= 0
fieldset
legend= t_attr(:address, Contact)
.row
.col-xs-6
= f.input :street, required: true
= f.input :street, required: true, input_html: { tabindex: tabindex_start + 1 }
.col-xs-6
= f.input :extended
.row
.col-xs-4
= f.input :postal_code, required: true
= f.input :postal_code, required: true, input_html: { tabindex: tabindex_start + 2 }
.col-xs-8
= f.input :city, required: true
= f.input :city, required: true, input_html: { tabindex: tabindex_start + 3 }
- tabindex_start ||= 0
fieldset
legend Telefon und Email
.row
.col-xs-12.col-md-6
= f.input :primary_email, as: :email, required: f.object.needs_primary_email?
= f.input :primary_email, as: :email, required: f.object.needs_primary_email?, input_html: { tabindex: tabindex_start + 1 }
.col-xs-12.col-md-6
= f.input :primary_phone, as: :tel, required: f.object.needs_primary_phone?
= f.input :primary_phone, as: :tel, required: f.object.needs_primary_phone?, input_html: { tabindex: tabindex_start + 2 }
- if controller_name == 'clients'
.col-xs-12.col-md-6
= f.input :secondary_phone, as: :tel
= f.input :secondary_phone, as: :tel, input_html: { tabindex: tabindex_start + 3 }
- tabindex_start ||= 0
.row
- if !f.object.client?
.col-xs-12.col-md-6= f.input :first_name, required: true
.col-xs-12.col-md-6= f.input :last_name, required: true, label: t('generic_keys.last_name')
.col-xs-12.col-md-6= f.input :first_name, required: true, input_html: { tabindex: tabindex_start + 1 }
.col-xs-12.col-md-6= f.input :last_name, required: true, label: t('generic_keys.last_name'), input_html: { tabindex: tabindex_start + 2 }
......@@ -46,7 +46,10 @@ wb.add_worksheet(name: t('group_offers', count: 2)) do |sheet|
type = t("offer_type.#{offer.offer_type}") if offer.offer_type?
state = t("offer_state.#{offer.offer_state}") if offer.offer_state?
creator = offer.creator if offer.creator
volunteers = offer.volunteers_with_roles
volunteers = offer.volunteers.map do |volunteer|
role_key = offer.responsible?(volunteer) ? 'responsible' : 'member'
"#{volunteer} (#{I18n.t("activerecord.attributes.group_assignment.#{role_key}")}) #{volunteer.contact.primary_email}"
end.compact
sheet.add_row [
offer.active? ? 'Aktiv' : 'Inaktiv',
......
......@@ -43,47 +43,47 @@
= f.input :salutation,
as: :select,
collection: Volunteer::SALUTATIONS,
include_blank: true
= render 'contacts/user_fields', f: c
include_blank: true, input_html: { tabindex: 1 }
= render 'contacts/user_fields', f: c, tabindex_start: 1
.col-xs-12.col-md-6
= render 'contacts/address_fields', f: c
= render 'contacts/address_fields', f: c, tabindex_start: 3
.col-xs-12.col-md-6
.row
.col-xs-12.col-md-6
= f.input :nationality, as: :country
= f.input :nationality, as: :country, input_html: { tabindex: 9 }
= f.input :birth_year,
as: :select,
collection: Volunteer.year_collection,
include_blank: true
include_blank: true, input_html: { tabindex: 10 }
.col-xs-12.col-md-6
= f.input :additional_nationality, as: :country
= f.input :avatar, as: :file
.row
.col-xs-8
= f.input :profession
= f.input :profession, input_html: { tabindex: 11 }
.col-xs-4
= f.input :working_percent
= f.input :working_percent, input_html: { tabindex: 12 }
.col-xs-6
= f.input :own_kids
= f.input :own_kids, input_html: { tabindex: 13 }
.col-xs-6
= f.input :education
= f.input :education, input_html: { tabindex: 14 }
.col-xs-12
= f.input :motivation
= f.input :motivation, input_html: { tabindex: 15 }
.col-xs-12
= checkbox_toggle_collapse(f, :experience, '#experience-desc')
= checkbox_toggle_collapse(f, :experience, '#experience-desc', tabindex: 16)
.col-xs-12.collapse#experience-desc
= f.input :volunteer_experience_desc
= f.input :volunteer_experience_desc, input_html: { tabindex: 17 }
.col-xs-12.col-md-6
= render 'contacts/phone_fields', f: c
= render 'contacts/phone_fields', f: c, tabindex_start: 6
.col-xs-12.col-md-6
- if current_user.present?
.col-xs-12.col-md-6
fieldset.bank-data
legend Bankdaten für Spesen
= checkbox_toggle_collapse(f, :waive, '.waiver-collapse', check_shows: false)
= f.input :bank, wrapper_html: { class: 'waiver-collapse' }
= f.input :iban, wrapper_html: { class: 'waiver-collapse' }
= checkbox_toggle_collapse(f, :waive, '.waiver-collapse', check_shows: false, tabindex: 18)
= f.input :bank, wrapper_html: { class: 'waiver-collapse' }, input_html: { tabindex: 19 }
= f.input :iban, wrapper_html: { class: 'waiver-collapse' }, input_html: { tabindex: 20 }
.row
.col-xs-12.col-md-6
......@@ -129,5 +129,5 @@ fieldset
- if current_user && policy(volunteer).show_comments?
.col-xs-12.col-md-6
= f.input :comments
= f.input :additional_comments
= f.input :comments, input_html: { class: 'double-height' }
= f.input :additional_comments, input_html: { class: 'double-height' }
......@@ -16,21 +16,10 @@ h1.m-b-20= @volunteer.contact.full_name
.table-responsive
table.table.table-no-border-top
tbody
tr
td= t_attr(:trial_period)
td= t(@volunteer.trial_period)
tr
td= t_attr(:intro_course)
td= t(@volunteer.intro_course)
tr
td= t_attr(:bank_account)
td= t(@volunteer.bank_account)
tr
td= t_attr(:doc_sent)
td= t(@volunteer.doc_sent)
tr
td= t_attr(:evaluation)
td= t(@volunteer.evaluation)
- [:trial_period, :intro_course, :bank_account, :doc_sent, :evaluation].each do |attribute|
tr
td= t_attr(attribute)
td= t(@volunteer[attribute])
h2.small Persönlicher Hintergrund
.table-responsive
......@@ -56,17 +45,14 @@ h2.small Persönlicher Hintergrund
= render 'language_skills/show', speaker: @volunteer
tr
td= t_attr(:profession)
td= @volunteer.profession
tr
td= t_attr(:own_kids)
td= @volunteer.own_kids
tr
td= t_attr(:education)
td= @volunteer.education
tr
td= t_attr(:motivation)
td= @volunteer.motivation
td= t_attr(:working_percent)
td #{@volunteer.working_percent}%
- [:profession, :own_kids, :education, :motivation].each do |attribute|
tr
td= t_attr(attribute)
td= @volunteer[attribute]
tr
td= t_attr(:experience)
td
......@@ -74,15 +60,11 @@ h2.small Persönlicher Hintergrund
dl.dl-horizontal
dt= t(@volunteer.experience)
dd= @volunteer.volunteer_experience_desc
tr
td= t_attr(:expectations)
td= @volunteer.expectations
tr
td= t_attr(:strengths)
td= @volunteer.strengths
tr
td= t_attr(:interests)
td= @volunteer.interests
- [:expectations, :strengths, :interests].each do |attribute|
tr
td= t_attr(attribute)
td= @volunteer[attribute]
- if @volunteer.internal?
tr
td= t_attr(:bank_details)
......@@ -102,12 +84,10 @@ h2.small Persönlicher Hintergrund
- else
= link_to @volunteer.registrar.full_name, profile_url_path(@volunteer.registrar)
- if policy(Volunteer).show_comments?
tr
td= t_attr(:comments)
td= @volunteer.comments
tr
td= t_attr(:additional_comments)
td= @volunteer.additional_comments
- [:comments, :additional_comments].each do |attribute|
tr
td= t_attr(attribute)
td= @volunteer[attribute]
.row
.col-xs-6
......
......@@ -178,6 +178,9 @@ de:
hint: Freiwillige/r kann wieder Einsätze machen, wie wenn sie/er neu akzeptiert worden wäre.<br>Hatte die/der Freiwillige vor der Beendigung ein Login auf dieser Platform, so wird dieses wieder aktiviert.<br>Es kann das selbe Login/Passwort wie vorher verwendet werden.
confirm: Soll die/der Freiwillige wirklich reaktiviert werden?
language_names_customizations:
NL: Niederländisch; Flämisch
# loose unasorted keys
"false": Nein
"true": Ja
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment