Commit e5d3e6aa authored by Kaspar Vollenweider's avatar Kaspar Vollenweider 👻 Committed by Kaspar
Browse files

uncluttered div soup from volunteer show

parent 438d46fd
.row
.col-xs-12
h3= t_model(Schedule)
.row
.col-xs-12
table.table.table-striped
thead
h3= t_model(Schedule)
.table-responsive
table.table.table-striped
thead
tr
th= t('when')
- Schedule.days.each do |day|
th.text-center
= t("weekdays.#{day}")
tbody
- participant.schedules.group_by(&:time).each do |time, schedules|
tr
th= t('when')
- Schedule.days.each do |day|
th.text-center
= t("weekdays.#{day}")
tbody
- participant.schedules.group_by(&:time).each do |time, schedules|
tr
td
= t("times.#{time}")
- schedules.each do |schedule|
td.text-center
- if schedule.available
i.glyphicon.glyphicon-ok.text-success
- else
i.glyphicon.glyphicon-remove.text-danger
td
= t("times.#{time}")
- schedules.each do |schedule|
td.text-center
- if schedule.available
i.glyphicon.glyphicon-ok.text-success
- else
i.glyphicon.glyphicon-remove.text-danger
.row
.col-xs-12
h1= @volunteer.full_name
h1= @volunteer.full_name
.table-responsive
table.table.table-no-border-top
tbody
tr
td= t_attr(:date_of_birth)
td= l(@volunteer.date_of_birth) if @volunteer.date_of_birth.present?
tr
td= t_attr(:gender)
td= t("gender.#{@volunteer.gender}") if @volunteer.gender.present?
tr
td= t_attr(:avatar)
td= image_tag(@volunteer.avatar.url(:thumb)) if @volunteer.avatar.present?
tr
td= t_attr(:nationality)
td= country(@volunteer.nationality) if @volunteer.nationality.present?
tr
td= t_attr(:additional_nationality)
td= country(@volunteer.additional_nationality) if @volunteer.additional_nationality.present?
tr
td= t_attr(:street)
td= @volunteer.street
tr
td= t_attr(:zip)
td= @volunteer.zip
tr
td= t_attr(:city)
td= @volunteer.city
tr
td= t_attr(:email)
td= mail_to(@volunteer.email) if @volunteer.email.present?
tr
td= t_attr(:phone)
td= @volunteer.phone
- if @volunteer.language_skills.any?
= render 'language_skills/show', speaker: @volunteer
- if @volunteer.relatives.any?
= render 'relatives/show', relative: @volunteer
tr
td= t_attr(:profession)
td= @volunteer.profession
tr
td= t_attr(:education)
td= @volunteer.education
tr
td= t_attr(:motivation)
td= @volunteer.motivation
tr
td= t_attr(:experience)
td= Volunteer.human_boolean(@volunteer.experience)
tr
td= t_attr(:expectations)
td= @volunteer.expectations
tr
td= t_attr(:strengths)
td= @volunteer.strengths
tr
td= t_attr(:skills)
td= @volunteer.skills
tr
td= t_attr(:interests)
td= @volunteer.interests
- if policy(Volunteer).destroy?
tr
td= t_attr(:state)
td= t("simple_form.options.volunteer.state.#{@volunteer.state}")
- if @volunteer.rejected?
tr
td= t_attr(:rejection_type)
td= t("rejection_type.#{@volunteer.rejection_type}") unless @volunteer.rejection_type.blank?
tr
td= t_attr(:rejection_text)
td= @volunteer.rejection_text
tr
td= t_attr(:duration)
td= t("duration.#{@volunteer.duration}") unless @volunteer.duration.blank?
tr
td= t_attr(:region)
td= t("region.#{@volunteer.region}") unless @volunteer.region.blank?
.row
.col-xs-12
h3= t_attr(:single_accompaniment)
table.table.table-striped
thead
.table-responsive
table.table.table-no-border-top
tbody
tr
td= t_attr(:date_of_birth)
td= l(@volunteer.date_of_birth) if @volunteer.date_of_birth.present?
tr
td= t_attr(:gender)
td= t("gender.#{@volunteer.gender}") if @volunteer.gender.present?
tr
td= t_attr(:avatar)
td= image_tag(@volunteer.avatar.url(:thumb)) if @volunteer.avatar.present?
tr
td= t_attr(:nationality)
td= country(@volunteer.nationality) if @volunteer.nationality.present?
tr
td= t_attr(:additional_nationality)
td= country(@volunteer.additional_nationality) if @volunteer.additional_nationality.present?
tr
- Volunteer.single_accompaniment.each do |single|
th.text-center= t_attr(single)
tbody
td= t_attr(:street)
td= @volunteer.street
tr
- Volunteer.single_accompaniment.each do |single|
td.text-center
- if @volunteer.read_attribute(single)
i.glyphicon.glyphicon-ok.text-success
- else
i.glyphicon.glyphicon-remove.text-danger
.row
.col-xs-12
h3= t_attr(:group_accompaniment)
table.table.table-striped
thead
td= t_attr(:zip)
td= @volunteer.zip
tr
- Volunteer.group_accompaniment.each do |group|
th.text-center
= t_attr(group)
tbody
td= t_attr(:city)
td= @volunteer.city
tr
td= t_attr(:email)
td= mail_to(@volunteer.email) if @volunteer.email.present?
tr
td= t_attr(:phone)
td= @volunteer.phone
- if @volunteer.language_skills.any?
= render 'language_skills/show', speaker: @volunteer
- if @volunteer.relatives.any?
= render 'relatives/show', relative: @volunteer
tr
td= t_attr(:profession)
td= @volunteer.profession
tr
td= t_attr(:education)
td= @volunteer.education
tr
td= t_attr(:motivation)
td= @volunteer.motivation
tr
td= t_attr(:experience)
td= Volunteer.human_boolean(@volunteer.experience)
tr
td= t_attr(:expectations)
td= @volunteer.expectations
tr
td= t_attr(:strengths)
td= @volunteer.strengths
tr
td= t_attr(:skills)
td= @volunteer.skills
tr
td= t_attr(:interests)
td= @volunteer.interests
- if policy(Volunteer).destroy?
tr
- Volunteer.group_accompaniment.each do |group|
td.text-center
- if @volunteer.read_attribute(group)
i.glyphicon.glyphicon-ok.text-success
- else
i.glyphicon.glyphicon-remove.text-danger
td= t_attr(:state)
td= t("simple_form.options.volunteer.state.#{@volunteer.state}")
- if @volunteer.rejected?
tr
td= t_attr(:rejection_type)
td= t("rejection_type.#{@volunteer.rejection_type}") unless @volunteer.rejection_type.blank?
tr
td= t_attr(:rejection_text)
td= @volunteer.rejection_text
tr
td= t_attr(:duration)
td= t("duration.#{@volunteer.duration}") unless @volunteer.duration.blank?
tr
td= t_attr(:region)
td= t("region.#{@volunteer.region}") unless @volunteer.region.blank?
h3= t_attr(:single_accompaniment)
.table-responsive
table.table.table-striped
thead
tr
- Volunteer.single_accompaniment.each do |single|
th.text-center= t_attr(single)
tbody
tr
- Volunteer.single_accompaniment.each do |single|
td.text-center
- if @volunteer.read_attribute(single)
i.glyphicon.glyphicon-ok.text-success
- else
i.glyphicon.glyphicon-remove.text-danger
h3= t_attr(:group_accompaniment)
.table-responsive
table.table.table-striped
thead
tr
- Volunteer.group_accompaniment.each do |group|
th.text-center
= t_attr(group)
tbody
tr
- Volunteer.group_accompaniment.each do |group|
td.text-center
- if @volunteer.read_attribute(group)
i.glyphicon.glyphicon-ok.text-success
- else
i.glyphicon.glyphicon-remove.text-danger
= render 'schedules/show', participant: @volunteer
......
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