diff --git a/app/Entities/Users/User.php b/app/Entities/Users/User.php index dadcbe0..992c7cc 100644 --- a/app/Entities/Users/User.php +++ b/app/Entities/Users/User.php @@ -20,7 +20,7 @@ class User extends Authenticatable public function nameLink() { - return link_to_route('users.show', $this->name, [$this->id], ['target' => '_blank']); + return link_to_route('users.show', $this->name, [$this]); } /** diff --git a/resources/views/layouts/user.blade.php b/resources/views/layouts/user.blade.php index 1c56675..3db8ff8 100755 --- a/resources/views/layouts/user.blade.php +++ b/resources/views/layouts/user.blade.php @@ -5,6 +5,7 @@ @endsection @section('content') +@include('users.partials.breadcrumb')

{!! link_to_route('users.edit', trans('user.edit'), [$user], ['id' => 'edit-user-' . $user->id, 'class' => 'btn btn-warning']) !!} diff --git a/resources/views/users/index.blade.php b/resources/views/users/index.blade.php index ffc1c8e..50cdbf2 100755 --- a/resources/views/users/index.blade.php +++ b/resources/views/users/index.blade.php @@ -25,7 +25,7 @@ @forelse($users as $key => $user) {{ 1 + $key }} - {{ $user->name }} + {{ $user->nameLink() }} {{ $user->email }} {!! $user->roleList() !!} diff --git a/resources/views/users/partials/breadcrumb.blade.php b/resources/views/users/partials/breadcrumb.blade.php new file mode 100644 index 0000000..fef5422 --- /dev/null +++ b/resources/views/users/partials/breadcrumb.blade.php @@ -0,0 +1,5 @@ + diff --git a/tests/Feature/ManageJobsTest.php b/tests/Feature/ManageJobsTest.php index 4f4f606..c1f3a64 100644 --- a/tests/Feature/ManageJobsTest.php +++ b/tests/Feature/ManageJobsTest.php @@ -130,7 +130,7 @@ class ManageJobsTest extends TestCase $this->visit(route('projects.jobs.index', $project->id)); $this->click('show-job-'.$job->id); $this->seePageIs(route('jobs.show', $project->id)); - $this->see(trans('job.show')); + $this->see(trans('job.detail')); $this->see($job->name); $this->see(formatRp($job->price)); $this->see($job->worker->name);