Commit 7aea2045 authored by Chrysanthi Lagodimou's avatar Chrysanthi Lagodimou
Browse files

make matching process consistent

parent 0e986464
......@@ -24,5 +24,7 @@ tr
- if action_name == 'find_client'
td= button_link t_action(:show), client
td= button_link t('reserve'), new_assignment_url(client_id: client, volunteer_id: volunteer)
- else
- elsif client.assignment.nil?
td= button_link t('find_volunteer'), find_volunteer_client_path(id: client)
- else
td= button_link t('show_assignment'), assignment_path(client.assignment)
......@@ -4,6 +4,12 @@
.col-xs-12
h1= t('clients')
.row
= form_navigation_btn :new, with_row: false, with_col: true, cols: 4
- if policy(Client).destroy?
.col-xs-4
= button_link t('need_accompanying'), need_accompanying_clients_url
= render 'columns', clients: @clients
.row
......
......@@ -21,5 +21,11 @@ tr
= t('volunteer_self_applicant')
- if action_name == 'index'
= render 'index_actions', subject: volunteer
- if volunteer.seeking_clients?
td= button_link t('find_client'), find_client_volunteer_path(id: volunteer)
- elsif volunteer.assignments.any?
td= button_link t('show_assignments'), volunteer_path(volunteer, anchor: 'assignments')
- else
td= t('not_assignable')
- if action_name == 'seeking_clients'
td = button_link t('find_client'), find_client_volunteer_path(id: volunteer)
......@@ -2,9 +2,13 @@
.col-xs-12
h1= t('volunteers')
.row
.col-xs-6.col-md-4= form_navigation_btn :new, with_row: false
.col-xs-6.col-md-4.text-center= link_to t('volunteer_emails'), volunteer_emails_path, class: 'btn btn-default'
.col-xs-6.col-md-4.text-right= render 'state_select'
.col-xs-4.col-md-4= form_navigation_btn :new, with_row: false
.col-xs-4.col-md-4.text-center= link_to t('volunteer_emails'), volunteer_emails_path, class: 'btn btn-default'
.col-xs-4.col-md-4.text-right= render 'state_select'
.row
- if policy(Volunteer).destroy?
.col-xs-12= button_link t('seeking_clients'), seeking_clients_volunteers_url
= render 'columns', volunteers: @volunteers
......
......@@ -162,7 +162,7 @@ h3= t_attr(:volunteer_availability)
- if @volunteer.assignments.any?
.row
.col-xs-12
.col-xs-12#assignments
h3= t('assignments')
= render 'assignments/assignments_block', assignments: @volunteer.assignments
......
......@@ -429,6 +429,7 @@ de:
login: Anmelden
logout: Abmelden
need_accompanying: Ohne Begleitung
not_assignable: Nicht zuweisbar
not_authorized: Sie sind nicht berechtigt diese Aktion durchzuführen.
other_request: Sonstige Anforderungen an den/die Freiwillige/n
paper_trail:
......@@ -477,6 +478,8 @@ de:
schedule: Zeitplan
schedule_description: Wann sind Sie verfügbar?
seeking_clients: Klienten suchen
show_assignment: Begleitung anzeigen
show_assignments: Begleiteten anzeigen
show_my_profile: Mein Profil
show_profile: Profil anzeigen
simple_form:
......
......@@ -298,6 +298,7 @@ en:
confirm_delete: "Really delete %{model} %{record}?"
select_prompt: "Select %{model}"
need_accompanying: Need accompanying
not_assignable: Not assignable
not_authorized: You are not authorized to perform this action.
other_request: Other requests for volunteers
paper_trail:
......@@ -345,6 +346,8 @@ en:
schedule: Schedule
schedule_description: When are you available?
seeking_clients: Looking for clients
show_assignment: Show assignment
show_assignments: Show assignments
show_my_profile: My profile
show_profile: Show profile
simple_form:
......
......@@ -26,7 +26,7 @@ class AssignmentsTest < ApplicationSystemTestCase
test 'assign unassigned client (client side)' do
visit clients_path
click_link 'Need accompanying'
first(:link, 'Need accompanying').click
click_link 'Find volunteer'
click_link 'Reserve'
click_button 'Create Assignment'
......
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