From f9c7bb2c4beb12b120974ad92e7f6a7d3ccb7320 Mon Sep 17 00:00:00 2001 From: Nick Date: Sat, 1 Jun 2024 11:43:51 +0200 Subject: [PATCH] display project namespaces --- app/Http/Controllers/IssueController.php | 2 +- app/Http/Controllers/TimeController.php | 2 +- resources/lang/en/messages.php | 1 + resources/lang/ru/messages.php | 1 + .../gitpab/project/index_table.blade.php | 9 +++++- .../gitpab/time/index_filter_form.blade.php | 28 +++++++++---------- 6 files changed, 26 insertions(+), 17 deletions(-) diff --git a/app/Http/Controllers/IssueController.php b/app/Http/Controllers/IssueController.php index 446a244..c1e98ed 100644 --- a/app/Http/Controllers/IssueController.php +++ b/app/Http/Controllers/IssueController.php @@ -41,7 +41,7 @@ protected function prepareDataForIndex(FormRequest $request, array $data) $data, [ 'assigneeList' => $contributorRepository->getItemsForSelect(), - 'projectsList' => $projectRepository->getItemsForSelect(), + 'projectsList' => $projectRepository->getItemsForSelect(null, null, 'id', 'path_with_namespace'), 'labelList' => $labelRepository->getItemsForSelect(null, null, 'name'), 'milestoneList' => $milestoneRepository->getItemsForSelect(null, null, 'id', 'title'), 'total' => [ diff --git a/app/Http/Controllers/TimeController.php b/app/Http/Controllers/TimeController.php index 3e30fdb..acd1d09 100644 --- a/app/Http/Controllers/TimeController.php +++ b/app/Http/Controllers/TimeController.php @@ -58,7 +58,7 @@ protected function prepareDataForIndex(FormRequest $request, array $data) $data, [ 'authorsList' => $contributorRepository->getItemsForSelect(), - 'projectsList' => $projectRepository->getItemsForSelect(), + 'projectsList' => $projectRepository->getItemsForSelect(null, null, 'id', 'path_with_namespace'), 'labelList' => $labelRepository->getItemsForSelect(null, null, 'name'), 'milestoneList' => $milestoneRepository->getItemsForSelect(null, null, 'id', 'title'), 'total' => [ diff --git a/resources/lang/en/messages.php b/resources/lang/en/messages.php index f42e718..7f4e8a8 100644 --- a/resources/lang/en/messages.php +++ b/resources/lang/en/messages.php @@ -93,4 +93,5 @@ 'of' => 'of', 'Logout' => 'Logout', 'Act t&m/labels CSV' => 'Act t&m/labels CSV', + 'Domain' => 'Domain', ]; \ No newline at end of file diff --git a/resources/lang/ru/messages.php b/resources/lang/ru/messages.php index 3eb1f3d..6058086 100644 --- a/resources/lang/ru/messages.php +++ b/resources/lang/ru/messages.php @@ -93,4 +93,5 @@ 'of' => 'из', 'Logout' => 'Выход', 'Act t&m/labels CSV' => 'Акт t&m/метки CSV', + 'Domain' => 'Домен', ]; \ No newline at end of file diff --git a/resources/views/gitpab/project/index_table.blade.php b/resources/views/gitpab/project/index_table.blade.php index d58254c..485de02 100644 --- a/resources/views/gitpab/project/index_table.blade.php +++ b/resources/views/gitpab/project/index_table.blade.php @@ -18,6 +18,10 @@ 'orderLinkParams' => $orderLinkParams, ]) + @include('partial.table.thcell', [ + 'label' => __('messages.Domain'), + ]) + @include('partial.table.thcell', [ 'column' => $columnTitleName, 'label' => $columnTitleLabel, @@ -54,9 +58,12 @@ @forelse ($itemsList->items() as $key => $item) {{ $item->id }} + + {{ parse_url($item->web_url)['host'] ?? null }} + - {{ (isset($columnTitleName)) ? $item->{$columnTitleName} : $item->title }} + {{ $item->path_with_namespace }} diff --git a/resources/views/gitpab/time/index_filter_form.blade.php b/resources/views/gitpab/time/index_filter_form.blade.php index 47a8f56..287cd34 100644 --- a/resources/views/gitpab/time/index_filter_form.blade.php +++ b/resources/views/gitpab/time/index_filter_form.blade.php @@ -31,18 +31,7 @@ ]) -
-
- @include('partial.form.element.select', [ - 'name' => 'projects[]', - 'list' => $projectsList, - 'selected' => $request->input('projects'), - 'options' => ['multiple' => 'multiple'], - 'label' => __('messages.Projects'), - ]) -
-
-
+
@include('partial.form.element.date_range', [ 'name' => 'date_range', @@ -54,10 +43,21 @@ ])
+
+
+ @include('partial.form.element.select', [ + 'name' => 'projects[]', + 'list' => $projectsList, + 'selected' => $request->input('projects'), + 'options' => ['multiple' => 'multiple'], + 'label' => __('messages.Projects'), + ]) +
+
-
+
@include('partial.form.element.select', [ 'name' => 'labels[]', @@ -68,7 +68,7 @@ ])
-
+
@include('partial.form.element.select', [ 'name' => 'milestones[]',