Commit 9652ab16 authored by Tugce Nur Tas's avatar Tugce Nur Tas
Browse files

adjust volunteers comment policy in views

parent 887c9d80
......@@ -21,7 +21,8 @@
th= t_attr(:profession, Volunteer)
th= sort_link @q, :working_percent
th= t_attr(:interests, Volunteer)
th= t_attr(:comments)
- if policy(Volunteer).show_acceptance?
th= t_attr(:comments)
th= sort_link @q, :external
th= t_attr(:created_by, Volunteer)
......
......@@ -120,7 +120,7 @@ fieldset
= f.input :strengths
= f.input :interests
- if policy(Volunteer).superadmin_privileges?
- if policy(Volunteer).show_acceptance?
.col-xs-12.col-md-6
= f.input :comments
= f.input :additional_comments
......@@ -44,7 +44,7 @@ tr
td = volunteer.profession
td = "#{volunteer.working_percent}%" if volunteer.working_percent.present?
td = volunteer.interests
- if policy(Volunteer).superadmin_privileges?
- if policy(Volunteer).show_acceptance?
= td_truncate_content_modal(volunteer.comments, 'Bemerkungen')
td = volunteer.external? ? t_attr(:external, Volunteer) : t_attr(:internal, Volunteer)
td
......
......@@ -100,12 +100,13 @@ h2.small Persönlicher Hintergrund
= t('volunteer_self_applicant')
- else
= link_to @volunteer.registrar.full_name, profile_link(@volunteer.registrar)
tr
td= t_attr(:comments)
td= @volunteer.comments
tr
td= t_attr(:additional_comments)
td= @volunteer.additional_comments
- if policy(Volunteer).show_acceptance?
tr
td= t_attr(:comments)
td= @volunteer.comments
tr
td= t_attr(:additional_comments)
td= @volunteer.additional_comments
.row
.col-xs-6
......
......@@ -6,6 +6,7 @@ FactoryBot.define do
title { FFaker::Lorem.unique.sentence }
necessary_volunteers 5
offer_type :internal_offer
comments { FFaker::CheesyLingo.paragraph }
after(:build) do |group_offer|
if GroupOfferCategory.any?
......
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