diff --git a/app/Domain/Goalcanvas/Controllers/Dashboard.php b/app/Domain/Goalcanvas/Controllers/Dashboard.php index 5aed828c8..f10874ded 100644 --- a/app/Domain/Goalcanvas/Controllers/Dashboard.php +++ b/app/Domain/Goalcanvas/Controllers/Dashboard.php @@ -305,12 +305,6 @@ public function run() } } - // request - // $filter['status'] = request('filter_status', session('filter_status', 'all')); - // session(['filter_status' => $filter['status']]); - // $filter['relates'] = request('filter_relates', session('filter_relates', 'all')); - // session(['filter_relates' => $filter['relates']]); - $filter['status'] = $_GET['filter_status'] ?? (session("filter_status") ?? 'all'); session(["filter_status" => $filter['status']]); $filter['relates'] = $_GET['filter_relates'] ?? (session("filter_relates") ?? 'all'); diff --git a/app/Domain/Goalcanvas/Controllers/DelCanvas.php b/app/Domain/Goalcanvas/Controllers/DelCanvas.php index 151d33af9..02e5f0aba 100644 --- a/app/Domain/Goalcanvas/Controllers/DelCanvas.php +++ b/app/Domain/Goalcanvas/Controllers/DelCanvas.php @@ -4,13 +4,27 @@ * Controller / Delete Canvas */ + namespace Leantime\Domain\Goalcanvas\Controllers { + // use AWS\CRT\HTTP\Response; + use Symfony\Component\HttpFoundation\Response; + + /** * */ class DelCanvas extends \Leantime\Domain\Canvas\Controllers\DelCanvas { protected const CANVAS_NAME = 'goal'; + + public function get($params):Response + { + $id = filter_var($params['id'] ?? '', FILTER_SANITIZE_NUMBER_INT); + $this->tpl->assign('id', $id); + + return $this->tpl->displayPartial('goalcanvas.delCanvas'); + + } } } diff --git a/app/Domain/Goalcanvas/Controllers/DelCanvasItem.php b/app/Domain/Goalcanvas/Controllers/DelCanvasItem.php index 7406bf7fa..c70253209 100644 --- a/app/Domain/Goalcanvas/Controllers/DelCanvasItem.php +++ b/app/Domain/Goalcanvas/Controllers/DelCanvasItem.php @@ -5,6 +5,7 @@ */ namespace Leantime\Domain\Goalcanvas\Controllers { + use Symfony\Component\HttpFoundation\Response; /** * @@ -12,6 +13,14 @@ class DelCanvasItem extends \Leantime\Domain\Canvas\Controllers\DelCanvasItem { protected const CANVAS_NAME = 'goal'; + public function get($params):Response + { + $id = filter_var($params['id'] ?? '', FILTER_SANITIZE_NUMBER_INT); + $this->tpl->assign('id', $id); + + return $this->tpl->displayPartial('goalcanvas.delCanvasItem'); + + } } diff --git a/app/Domain/Goalcanvas/Controllers/EditCanvasItem.php b/app/Domain/Goalcanvas/Controllers/EditCanvasItem.php index bff0b2bc8..3a284339b 100644 --- a/app/Domain/Goalcanvas/Controllers/EditCanvasItem.php +++ b/app/Domain/Goalcanvas/Controllers/EditCanvasItem.php @@ -116,6 +116,8 @@ public function get($params): Response $comments = []; } + $this->tpl->assign('id', $canvasItem['id']??""); + $this->tpl->assign('canvasId', $canvasItem['canvasId']); $this->tpl->assign('comments', $comments); @@ -123,6 +125,7 @@ public function get($params): Response $allProjectMilestones = $this->ticketService->getAllMilestones(["sprint" => '', "type" => "milestone", "currentProject" => session("currentProject")]); $this->tpl->assign('milestones', $allProjectMilestones); + $this->tpl->assign('currentCanvas', $canvasItem['canvasId']); $this->tpl->assign('canvasItem', $canvasItem); $this->tpl->assign('canvasIcon', $this->canvasRepo->getIcon()); diff --git a/app/Domain/Goalcanvas/Templates/bigRockDialog.blade.php b/app/Domain/Goalcanvas/Templates/bigRockDialog.blade.php index 3e73bb1e9..1388cf0b0 100644 --- a/app/Domain/Goalcanvas/Templates/bigRockDialog.blade.php +++ b/app/Domain/Goalcanvas/Templates/bigRockDialog.blade.php @@ -1,19 +1,19 @@

- {{ empty($bigRock["title"]) ? __('label.create_new_goalboard') : __('label.goalboard') }} {{ $bigRock["title"] }}

+ {{ empty($bigRock['title']) ? __('label.create_new_goalboard') : __('label.goalboard') }} {{ $bigRock['title'] }} + -{!! $tpl->displayNotification(); !!} - -
+
-
+

- +
@@ -23,27 +23,25 @@ - diff --git a/app/Domain/Goalcanvas/Templates/canvasComment.blade.php b/app/Domain/Goalcanvas/Templates/canvasComment.blade.php index 070ee1072..849304601 100644 --- a/app/Domain/Goalcanvas/Templates/canvasComment.blade.php +++ b/app/Domain/Goalcanvas/Templates/canvasComment.blade.php @@ -23,7 +23,7 @@ window.onload = function() { if (!window.jQuery) { //It's not a modal - location.href = "/canvas/showCanvas?showModal="; + location.href = "/canvas/showCanvas?showModal="; } } @@ -36,18 +36,16 @@
- {!! $tpl->displayNotification() !!} - -
{{ $tpl->e($canvasItem['description']) }}
+
{{ $canvasItem['description'] }}
@if ($id !== '')

- {{ $tpl->__('subtitles.discussion') }} + {{ __('subtitles.discussion') }}

@php - $tpl->assign("formUrl", "/{{ $canvasName }}canvas/editCanvasComment/" . $id . ""); + $tpl->assign("formUrl", "/goalcanvas/editCanvasComment/" . $id . ""); $tpl->displaySubmodule('comments-generalComment'); @endphp @endif @@ -59,14 +57,14 @@ leantime.editorController.initSimpleEditor(); - + @if(!$login::userIsAtLeast($roles::$editor)) leantime.authController.makeInputReadonly(".nyroModalCont"); - + @endif; - + @if($login::userHasRole([$roles::$commenter])) leantime.commentsController.enableCommenterForms(); - + @endif; }) diff --git a/app/Domain/Goalcanvas/Templates/canvasDialog.blade.php b/app/Domain/Goalcanvas/Templates/canvasDialog.blade.php index f61fa9c54..0785ab8c4 100644 --- a/app/Domain/Goalcanvas/Templates/canvasDialog.blade.php +++ b/app/Domain/Goalcanvas/Templates/canvasDialog.blade.php @@ -1,182 +1,169 @@ @extends($layout) @section('content') - -@php - -$canvasName = 'goal'; - -$canvasItem = $tpl->get('canvasItem'); -$canvasTypes = $tpl->get('canvasTypes'); -$hiddenStatusLabels = $tpl->get('statusLabels'); -$statusLabels = $statusLabels ?? $hiddenStatusLabels; -$hiddenRelatesLabels = $tpl->get('relatesLabels'); -$relatesLabels = $relatesLabels ?? $hiddenRelatesLabels; -$dataLabels = $tpl->get('dataLabels'); - -$id = ""; -if (isset($canvasItem['id']) && $canvasItem['id'] != '') { -$id = $canvasItem['id']; -} - -$currentCanvas = $tpl->get('currentCanvas'); - -if (isset($_GET['canvasId'])) { -$currentCanvas = (int)$_GET['canvasId']; -} - -@endphp - - - -
- -

+ + +
+ +

+ {{ $canvasTypes[$canvasItem['box']]['title'] }}

+ + +
+ + + + + + + +
+ +
+ + @if (!empty($relatesLabels)) + +
+ @else + + @endif +
+

+ {{ __('Metrics') }}

+ + @dispatchEvent('beforeMeasureGoalContainer', $canvasItem) +
+ +
+
- {{ $tpl->displayNotification() }} +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
- +
+ @if ($login::userIsAtLeast($roles::$editor)) + + + @endif + + @if ($id !== '') +


+ +

{{ __('subtitles.discussion') }}

+ @php + $formUrl = '/strategyPro/editCanvasItem/' . $id; + @endphp + @include('comments.generalComment', [ + 'formUrl' => '/goalcanvas/editCanvasComment/' . $id, + ]) + @endif +
- - - - - + @if ($id != '') + + {{ __('links.delete') }} + + @endif -
- -
+ + + +
+ + - -@endsection \ No newline at end of file + + }); + +@endsection diff --git a/app/Domain/Goalcanvas/Templates/dashboard.blade.php b/app/Domain/Goalcanvas/Templates/dashboard.blade.php index b861b7467..08b731fe0 100644 --- a/app/Domain/Goalcanvas/Templates/dashboard.blade.php +++ b/app/Domain/Goalcanvas/Templates/dashboard.blade.php @@ -78,8 +78,6 @@
-{!! $tpl->displayNotification() !!} -
diff --git a/app/Domain/Goalcanvas/Templates/delCanvas.blade.php b/app/Domain/Goalcanvas/Templates/delCanvas.blade.php index 47bc018b7..cb24385b3 100644 --- a/app/Domain/Goalcanvas/Templates/delCanvas.blade.php +++ b/app/Domain/Goalcanvas/Templates/delCanvas.blade.php @@ -1,29 +1,15 @@ @extends($layout) @section('content') +

{!!__("subtitles.delete") !!}

-@php -/** - * delCanvas.inc template - Generic template for deleting canvas - * - * Required variables: - * - $canvasName Name of current canvas - * - $csrf_token CSRF token (if used in your application) - */ - -$id = filter_var($_GET['id'] ?? '', FILTER_SANITIZE_NUMBER_INT); -$canvasName = 'goal' -@endphp - -

{{ __("subtitles.delete") }}

- -
+ @if(isset($csrf_token)) @endif

{{ __('text.confirm_board_deletion') }}


- {{ __('buttons.back') }} + {{ __('buttons.back') }}
@endsection \ No newline at end of file diff --git a/app/Domain/Goalcanvas/Templates/delCanvasItem.blade.php b/app/Domain/Goalcanvas/Templates/delCanvasItem.blade.php index a6908c91d..835f549f4 100644 --- a/app/Domain/Goalcanvas/Templates/delCanvasItem.blade.php +++ b/app/Domain/Goalcanvas/Templates/delCanvasItem.blade.php @@ -1,25 +1,12 @@ @extends($layout) @section('content') -@php - -/** - * delCanvasItem.inc template - Generic template for deleting canvas item - * - * Required variables: - * - $canvasName Name of current canvas - */ - -$id = filter_var($_GET['id'], FILTER_SANITIZE_NUMBER_INT); -$canvasName = 'goal' -@endphp - -

__("subtitles.delete") ?>

+

{!! __("subtitles.delete") !!}


-
+

{{ __('text.confirm_board_item_deletion') }}


- {{ __('buttons.back') }} + {{ __('buttons.back') }}
@endsection diff --git a/app/Domain/Goalcanvas/Templates/showBottomCanvas.blade.php b/app/Domain/Goalcanvas/Templates/showBottomCanvas.blade.php index 8f044e7e1..1bc564221 100644 --- a/app/Domain/Goalcanvas/Templates/showBottomCanvas.blade.php +++ b/app/Domain/Goalcanvas/Templates/showBottomCanvas.blade.php @@ -1,25 +1,25 @@ @if (count($tpl->get('allCanvas')) > 0) @else -

-
-
- {!! file_get_contents(ROOT . "/dist/images/svg/undraw_design_data_khdb.svg") !!} -
+

+
+
+ {!! file_get_contents(ROOT . '/dist/images/svg/undraw_design_data_khdb.svg') !!} +
-

{{ __("headlines.$canvasName.analysis") }}

-
{{ __("text.$canvasName.helper_content") }} +

{{ __("headlines.$canvasName.analysis") }}

+
{{ __("text.$canvasName.helper_content") }} - @if ($login::userIsAtLeast($roles::$editor)) -

- - {{ __("links.icon.create_new_board") }} - - @endif -
+ @if ($login::userIsAtLeast($roles::$editor)) +

+ + {{ __('links.icon.create_new_board') }} + + @endif +
@endif @if (!empty($disclaimer) && count($tpl->get('allCanvas')) > 0) -{{ $disclaimer }} + {{ $disclaimer }} @endif {!! $tpl->viewFactory->make($tpl->getTemplatePath('canvas', 'modals'), $__data)->render() !!} @@ -30,38 +30,37 @@ \ No newline at end of file + diff --git a/app/Language/en-US.ini b/app/Language/en-US.ini index 44a8c2364..1beac3609 100644 --- a/app/Language/en-US.ini +++ b/app/Language/en-US.ini @@ -2517,3 +2517,12 @@ text.welcome_to_leantime_content = "

Hi There 👋

We're excited to see headlines.set_up_your_account = "Set up your account" text.challenges_brings_you_here = "Tell us about the challenge that brings you here." text.point_to_where_it_hurts = "🩺 Point to where it hurts" + +text.what_metric_will_you_be_using = "How will you measure this objective. What metric will you be using." + +label.starting_value = "Starting Value" +label.currennt_value = "Current Value" +label.goal_value = "Goal Value" +label.type = "Type" +label.number = "Number" +label.percent = "% Percent" \ No newline at end of file