Commit e2aecf6d authored by Tugce Nur Tas's avatar Tugce Nur Tas Committed by Tuğçe Nur Taş
Browse files

small correction after code review

parent 631d9fbf
- gender_request_filter = request_filter(:gender_request_cont, 'all')
.btn-group
button.btn.btn-default.dropdown-toggle type='button' data-toggle='dropdown' aria-label="#{t_attr(:salutation_request)}" aria-haspopup='true' aria-expanded='false' class="btn-md"
button.btn.btn-default.dropdown-toggle type='button' data-toggle='dropdown' aria-label="#{t_attr(:gender_request)}" aria-haspopup='true' aria-expanded='false' class="btn-md"
= "#{t_attr(:gender_request, Client)} : "
= t(gender_request_filter, scope: [:simple_form, :options, :client, :gender_request]) + ' '
span.caret aria-hidden='true'
......
tr
td = t("salutation.#{client.salutation}") unless client.salutation.blank?
td = t("salutation.#{client.salutation}") if client.salutation?
td = client.contact.full_name
td = client.contact.full_address
td = client.birth_year.year if client.birth_year
......
= simple_form_for(@client) do |f|
= simple_error_notice f
= f.input :user_id, as: :hidden
= f.input :salutation,
as: :select,
collection: Volunteer.salutation_collection,
collection: Client.salutation_collection,
include_blank: true
= f.simple_fields_for :contact do |c|
......
......@@ -15,7 +15,7 @@
tr
td= t_attr(:salutation)
td
- if @client.salutation.present?
- if @client.salutation?
= t("salutation.#{@client.salutation}")
tr
td= t_attr(:nationality)
......
......@@ -45,7 +45,7 @@ p= l(@volunteer.birth_year) if @volunteer.birth_year
h4= "#{t_attr(:salutation, Volunteer)}: "
p= t("salutation.#{@volunteer.salutation}") if @volunteer.salutation.present?
p= t("salutation.#{@volunteer.salutation}") if @volunteer.salutation?
h4= "#{t_attr(:avatar, Volunteer)}: "
p= image_tag @volunteer.avatar.url(:thumb) if @volunteer.avatar.present?
......
......@@ -37,12 +37,12 @@
= " / #{phone.label}" if phone.label.present?
= ": #{phone.body}\r\n"
- if @volunteer.birth_year.present?
- if @volunteer.birth_year?
= "#{rn2}#{t_attr(:birth_year, Volunteer)}:#{t3}#{l(@volunteer.birth_year)}\r\n"
- if @volunteer.salutation.present?
- if @volunteer.salutation?
= "\r\n#{t_attr(:salutation, Volunteer)}:#{t3}"
= t("salutation.#{@volunteer.salutation}") if @volunteer.salutation.present?
= t("salutation.#{@volunteer.salutation}") if @volunteer.salutation?
- if @volunteer.avatar.present?
= "#{rn2}#{t_attr(:avatar, Volunteer)}:\t\t"
......
......@@ -21,7 +21,7 @@
.col-xs-12.col-md-6
= f.input :birth_year,
as: :select,
collection: Client.year_collection,
collection: Volunteer.year_collection,
include_blank: true
.row
.col-xs-12
......
tr
td = t("salutation.#{volunteer.salutation}") unless volunteer.salutation.blank?
td = t("salutation.#{volunteer.salutation}") if volunteer.salutation?
- if action_name == 'index'
td = volunteer.contact.full_name
td = volunteer.contact.city
td = volunteer.contact.postal_code
td = volunteer.contact.contact_emails.first.body if volunteer.contact.contact_emails.any?
td = volunteer.birth_year.year if volunteer.birth_year.present?
td = volunteer.birth_year.year if volunteer.birth_year?
td = volunteer.language_skills.first.language_name if volunteer.language_skills.any?
td = render 'language_skills/show_inline', language_skills: volunteer.language_skills
td = volunteer.education
......
......@@ -19,7 +19,7 @@
td= l(@volunteer.birth_year) if @volunteer.birth_year
tr
td= t_attr(:salutation)
td= t("salutation.#{@volunteer.salutation}") if @volunteer.salutation.present?
td= t("salutation.#{@volunteer.salutation}") if @volunteer.salutation?
tr
td= t_attr(:avatar)
td= image_tag @volunteer.avatar.url(:thumb) if @volunteer.avatar.present?
......@@ -46,7 +46,7 @@
td
dl.dl-horizontal
dt= Volunteer.human_boolean(@volunteer.experience)
dd= @volunteer.volunteer_experience_desc if @volunteer.volunteer_experience_desc.present?
dd= @volunteer.volunteer_experience_desc if @volunteer.volunteer_experience_desc?
tr
td= t_attr(:expectations)
td= @volunteer.expectations
......
......@@ -45,7 +45,7 @@ en:
single_accompaniment: Single accompaniment
sport: Sport
training: Training
volunteer_experience_desc: If you have any experiences with voluntary work, please describe any further here.
volunteer_experience_desc: If you have any experiences with voluntary work, please describe here.
woman: Woman
working_percent: Employment rate (in Percent)
volunteer_email:
......
......@@ -38,7 +38,7 @@ class VolunteerApplicationsTest < ApplicationSystemTestCase
fill_in 'Education', with: 'Gurke'
fill_in 'What is your motivation to volunteer with migrants?', with: 'asfd'
page.check('volunteer_experience')
fill_in 'If you have any experiences with voluntary work, please describe any further here.', with: 'sdfsdfsdf'
fill_in 'If you have any experiences with voluntary work, please describe here.', with: 'sdfsdfsdf'
fill_in 'What do you expect from a person who would accompany you / your volunteer work?', with: 'asdf'
fill_in 'Where do you see your strengths? (Social competencies that you could contribute to voluntary work)', with: 'asdf'
fill_in 'What are your most important leisure interests?', with: 'asdf'
......
Supports Markdown
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