Commit dd098b57 authored by Chrysanthi Lagodimou's avatar Chrysanthi Lagodimou Committed by Tugce Nur Tas
Browse files

link to not terminated assignments

parent 940fcbd1
......@@ -47,3 +47,8 @@ $navbar-default-bg: $white;
// Print preview
$print-preview-shadow: 0 0 .5cm rgba(0, 0, 0, .5);
.alert-warning {
position: fixed;
width: inherit;
z-index: 1;
}
......@@ -5,4 +5,4 @@ td.index-action-cell.hidden-print
- if policy(subject.class).destroy? && controller_name != 'clients' && subject.class != Volunteer
span= link_to t_action(:delete), subject, confirm_deleting(subject)
- if subject.class == Volunteer && policy(Volunteer).terminate? && !subject.resigned?
span= link_to 'Beenden', terminate_volunteer_path(subject)
span= link_to 'Beenden', terminate_volunteer_path(subject), method: :put
......@@ -53,7 +53,7 @@ nav.navbar.section-navigation.hidden-print
= link_to 'Dossier Freiwillig Engagiert erstellen', new_volunteer_certificate_path(assignment.volunteer)
- else
= link_to 'Dossier Freiwillig Engagiert', volunteer_certificate_path(assignment.volunteer, assignment.volunteer.certificates.last)
= link_to 'Freiwillige/n beenden', terminate_volunteer_path(assignment.volunteer) unless assignment.volunteer.resigned?
= link_to 'Freiwillige/n beenden', terminate_volunteer_path(assignment.volunteer), method: :put unless assignment.volunteer.resigned?
- if policy(Assignment).verify_termination?
td
= link_to_if(assignment.termination_verified_by.blank?, 'Beendigung Quittieren',
......
......@@ -53,7 +53,7 @@ nav.navbar.section-navigation.hidden-print
= link_to 'Dossier Freiwillig Engagiert erstellen', new_volunteer_certificate_path(assignment.volunteer)
- else
= link_to 'Dossier Freiwillig Engagiert', volunteer_certificate_path(assignment.volunteer, assignment.volunteer.certificates.last)
= link_to 'Freiwillige/n beenden', terminate_volunteer_path(assignment.volunteer) unless assignment.volunteer.resigned?
= link_to 'Freiwillige/n beenden', terminate_volunteer_path(assignment.volunteer), method: :put unless assignment.volunteer.resigned?
- if policy(GroupAssignment).verify_termination?
td
= link_to_if(assignment.termination_verified_by.blank?, 'Beendigung Quittieren',
......
......@@ -13,7 +13,7 @@ nav.navbar.section-navigation
- if policy(@volunteer).terminate?
li.button-acceptance = link_to t(".acceptance.#{@volunteer.acceptance}"), '#',
class: "btn btn-acceptance-#{@volunteer.acceptance}"
li= button_link 'Beenden', terminate_volunteer_path(@volunteer) unless @volunteer.resigned?
li= link_to 'Beenden', terminate_volunteer_path(@volunteer), class: 'btn btn-default', method: :put unless @volunteer.resigned?
- if policy(Volunteer).superadmin_privileges?
ul.list-inline
- if @volunteer.seeking_clients?
......
......@@ -92,7 +92,7 @@ Rails.application.routes.draw do
end
resources :volunteers, except: [:destroy], concerns: :search do
get :terminate, on: :member
put :terminate, on: :member
get :find_client, on: :member, to: 'assignments#find_client'
get :seeking_clients, on: :collection
resources :billing_expenses, except: [:edit, :update]
......
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