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

changes after rebasing

parent 1ca9cda0
......@@ -65,7 +65,7 @@ h1= @client.contact.full_name
tr
td= t_attr(:created_by)
td= link_to @client.user.full_name, url_for(@client.user.profile || @client.user)
td= link_to @client.user.full_name, profile_link(@client.user)
- if policy(Client).comments?
tr
......
......@@ -13,7 +13,7 @@
h2= t_attr(:associated_users)
ul
- @department.user.each do |user|
li= link_to user.full_name, profile_path(user.profile)
li= link_to user.full_name, profile_link(user)
- if @department.group_offers.active.any?
h2.m-b-20= t('group_offers', count: 2)
......
tr
td= reminder_mailing.t_enum(:kind)
td= link_to reminder_mailing.creator.full_name, profile_path(reminder_mailing.creator.profile)
td= link_to reminder_mailing.creator.full_name, profile_link(reminder_mailing.creator)
td
- if reminder_mailing.sending_triggered
bermittelt am #{l(reminder_mailing.updated_at.to_date)}
......
......@@ -19,15 +19,15 @@ tr
- if volunteer.self_applicant?
= t('volunteer_self_applicant')
- else
= link_to volunteer.registrar.full_name, url_for(volunteer.registrar.profile || volunteer.registrar)
- if action_index?
= render 'index_actions', subject: volunteer
td
- if volunteer.seeking_clients?
= button_link t('find_client'), find_client_volunteer_path(id: volunteer)
- elsif volunteer.assignments.any? || volunteer.group_assignments.any?
= button_link t('.show_assignments'), volunteer_path(volunteer, anchor: 'assignments')
- else
= t('not_assignable')
= link_to volunteer.registrar.full_name, profile_link(volunteer.registrar)
- if action_index?
td= render 'index_actions', subject: volunteer
td
- if volunteer.seeking_clients?
= button_link t('find_client'), find_client_volunteer_path(id: volunteer)
- elsif volunteer.assignments.any? || volunteer.group_assignments.any?
= button_link t('.show_assignments'), volunteer_path(volunteer, anchor: 'assignments')
- else
= t('not_assignable')
- if action_name == 'seeking_clients'
td = button_link t('find_client'), find_client_volunteer_path(id: volunteer)
......@@ -130,7 +130,7 @@ h3 Persönlicher Hintergrund
- if @volunteer.self_applicant?
= t('volunteer_self_applicant')
- else
= link_to @volunteer.registrar.full_name, url_for(@volunteer.registrar.profile || @volunteer.registrar)
= link_to @volunteer.registrar.full_name, profile_link(@volunteer.registrar)
h3= t_attr(:single_accompaniment)
.table-responsive
......
require 'application_system_test_case'
class ClientsTest < ApplicationSystemTestCase
setup do
@superadmin = create :user, email: 'superadmin@example.com'
@department_manager = create :department_manager, email: 'department@example.com'
......@@ -54,9 +55,8 @@ class ClientsTest < ApplicationSystemTestCase
click_button 'Create Client'
assert page.has_text? 'Client was successfully created.'
@superadmin.clients.each do |client|
assert page.has_link? client.user.full_name, href: profile_path(client.user.profile)
assert page.has_link? client.user.full_name, href: /profiles\/#{client.user.profile.id}/
assert page.has_link? client.contact.primary_email
end
end
......
......@@ -62,7 +62,7 @@ class DepartmentsTest < ApplicationSystemTestCase
assert page.has_text? 'department@aoz.ch'
assert page.has_text? '0441234567'
assocable_users.each do |user|
assert page.has_link? user.full_name, href: profile_path(user.profile)
assert page.has_link? user.full_name, href: /profiles\/#{user.profile.id}/
end
assert page.has_link? 'Edit'
assert page.has_link? 'Back'
......
......@@ -69,7 +69,7 @@ class ReminderMailingsTest < ApplicationSystemTestCase
href: group_offer_path(group_assignment.group_offer)
click_link 'Emails versenden'
assert page.has_link? ReminderMailing.order('created_at asc').last.creator.full_name,
href: profile_path(ReminderMailing.order('created_at asc').last.creator.profile)
href: /profiles\/#{ReminderMailing.order('created_at asc').last.creator.profile.id}/
assert page.has_text?(
"Übermittelt am #{I18n.l(ReminderMailing.created_desc.first.updated_at.to_date)} " +
I18n.l(ReminderMailing.created_desc.first.created_at.to_date)
......@@ -137,7 +137,7 @@ class ReminderMailingsTest < ApplicationSystemTestCase
href: group_offer_path(group_assignment.group_offer)
click_link 'Emails versenden'
assert page.has_link? ReminderMailing.order('created_at asc').last.creator.full_name,
href: profile_path(ReminderMailing.order('created_at asc').last.creator.profile)
href: /profiles\/#{ReminderMailing.order('created_at asc').last.creator.profile.id}/
assert page.has_text?(
"Übermittelt am #{I18n.l(ReminderMailing.created_desc.first.updated_at.to_date)} " +
I18n.l(ReminderMailing.created_desc.first.created_at.to_date)
......
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