Commit 0e5df5e4 authored by Jacob Priddy's avatar Jacob Priddy 👌
Browse files

Make group relations link back to their group entry on groups.

parent 59318547
Pipeline #12523 passed with stages
in 2 minutes and 29 seconds
...@@ -44,6 +44,12 @@ ...@@ -44,6 +44,12 @@
{{ $row[$header] }} {{ $row[$header] }}
</a> </a>
</td> </td>
@elseif($header === 'group_id')
<td>
<a href="{{ route('web.admin.groups.index', ['query' => $row[$header]]) }}">
Group ID: {{ $row[$header] }}
</a>
</td>
@else @else
<td> <td>
{{ $row[$header] }} {{ $row[$header] }}
......
...@@ -18,6 +18,7 @@ class WebPresenter extends BasePresenter implements Presenter ...@@ -18,6 +18,7 @@ class WebPresenter extends BasePresenter implements Presenter
$this->groups = array_map(static function (Group $group) { $this->groups = array_map(static function (Group $group) {
return [ return [
'id' => $group->getId(), 'id' => $group->getId(),
'group_id' => $group->getId(),
'title' => $group->getTitle(), 'title' => $group->getTitle(),
'description' => $group->getDescription(), 'description' => $group->getDescription(),
]; ];
...@@ -30,7 +31,7 @@ class WebPresenter extends BasePresenter implements Presenter ...@@ -30,7 +31,7 @@ class WebPresenter extends BasePresenter implements Presenter
return [ return [
'groups' => $this->webPaginate($this->groups), 'groups' => $this->webPaginate($this->groups),
'headers' => [ 'headers' => [
'ID' => 'id', 'ID' => 'group_id',
'Title' => 'title', 'Title' => 'title',
'Description' => 'description', 'Description' => 'description',
], ],
......
...@@ -18,6 +18,7 @@ class WebPresenter extends BasePresenter implements Presenter ...@@ -18,6 +18,7 @@ class WebPresenter extends BasePresenter implements Presenter
$this->groups = array_map(static function (Group $group): array { $this->groups = array_map(static function (Group $group): array {
return [ return [
'id' => $group->getId(), 'id' => $group->getId(),
'group_id' => $group->getId(),
'title' => $group->getTitle(), 'title' => $group->getTitle(),
'description' => $group->getDescription(), 'description' => $group->getDescription(),
]; ];
...@@ -30,7 +31,7 @@ class WebPresenter extends BasePresenter implements Presenter ...@@ -30,7 +31,7 @@ class WebPresenter extends BasePresenter implements Presenter
return [ return [
'groups' => $this->webPaginate($this->groups), 'groups' => $this->webPaginate($this->groups),
'headers' => [ 'headers' => [
'ID' => 'id', 'ID' => 'group_id',
'Title' => 'title', 'Title' => 'title',
'Description' => 'description', 'Description' => 'description',
], ],
......
...@@ -18,6 +18,7 @@ class WebPresenter extends BasePresenter implements Presenter ...@@ -18,6 +18,7 @@ class WebPresenter extends BasePresenter implements Presenter
$this->groups = array_map(static function (Group $group) { $this->groups = array_map(static function (Group $group) {
return [ return [
'id' => $group->getId(), 'id' => $group->getId(),
'group_id' => $group->getId(),
'title' => $group->getTitle(), 'title' => $group->getTitle(),
'description' => $group->getDescription(), 'description' => $group->getDescription(),
]; ];
...@@ -30,7 +31,7 @@ class WebPresenter extends BasePresenter implements Presenter ...@@ -30,7 +31,7 @@ class WebPresenter extends BasePresenter implements Presenter
return [ return [
'groups' => $this->webPaginate($this->groups), 'groups' => $this->webPaginate($this->groups),
'headers' => [ 'headers' => [
'ID' => 'id', 'ID' => 'group_id',
'Title' => 'title', 'Title' => 'title',
'Description' => 'description', 'Description' => 'description',
], ],
......
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