Skip to content

Commit

Permalink
variable name update and feedback review
Browse files Browse the repository at this point in the history
  • Loading branch information
muhtasimhafiz committed Aug 14, 2024
1 parent 6f68fe1 commit 4d0f450
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 21 deletions.
6 changes: 6 additions & 0 deletions app/Domain/Canvas/Controllers/ShowCanvas.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,12 @@ public function run()
}
}

$filter['status'] = $_GET['filter_status'] ?? (session('filter_status') ?? 'all');
session(['filter_status' => $filter['status']]);
$filter['relates'] = $_GET['filter_relates'] ?? (session('filter_relates') ?? 'all');
session(['filter_relates' => $filter['relates']]);

$this->tpl->assign('filter', $filter);
$this->tpl->assign('currentCanvas', $currentCanvasId);
$this->tpl->assign('canvasIcon', $this->canvasRepo->getIcon());
$this->tpl->assign('canvasTypes', $this->canvasRepo->getCanvasTypes());
Expand Down
4 changes: 2 additions & 2 deletions app/Domain/Goalcanvas/Templates/canvasComment.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
@endphp

<script type="text/javascript">
window.onloa39d = function() {
window.onload = function() {
if (!window.jQuery) {
//It's not a modal
location.href = "<?= BASE_URL ?>/goalcanvas/showCanvas?showModal=<?= $canvasItem['id']; ?>";
location.href = "{{ BASE_URL }} /goalcanvas/showCanvas?showModal={{ $canvasItem['id'] }}";
}
}
</script>
Expand Down
4 changes: 2 additions & 2 deletions app/Domain/Goalcanvas/Templates/canvasDialog.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
window.onload = function() {
if (!window.jQuery) {
//It's not a modal
location.href = "<?= BASE_URL ?>/goalcanvas/showCanvas?showModal=<?php echo $canvasItem['id']; ?>";
location.href = "{{ BASE_URL }}/goalcanvas/showCanvas?showModal={{ $canvasItem['id'] }}";
}
}
</script>
Expand Down Expand Up @@ -90,7 +90,7 @@
<h4 class="widgettitle title-light"><span
class="fa fa-comments"></span>{{ $tpl->__('subtitles.discussion') }}</h4>
@php
$tpl->assign('formUrl', '/strategyPro/editCanvasItem/' . $id . '');
$tpl->assign('formUrl', '/goalcanvas/editCanvasItem/' . $id . '');
$tpl->displaySubmodule('comments-generalComment');
@endphp
@endif
Expand Down
4 changes: 2 additions & 2 deletions app/Domain/Goalcanvas/Templates/delCanvasItem.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<h4 class="widgettitle title-light">{!! __("subtitles.delete") !!}</h4>
<hr style="margin-top: 5px; margin-bottom: 15px;">

<form method="post" action="<?=BASE_URL ?>/goalcanvas/delCanvasItem/{{ $id }}">
<form method="post" action="{{ BASE_URL }}/goalcanvas/delCanvasItem/{{ $id }}">
<p>{{ __('text.confirm_board_item_deletion') }}</p><br />
<input type="submit" value="{{ __('buttons.yes_delete') }}" name="del" class="button" />
<a class="btn btn-secondary" href="<?=BASE_URL ?>/goalcanvas/showCanvas">{{ __('buttons.back') }}</a>
<a class="btn btn-secondary" href="{{ BASE_URL }}/goalcanvas/showCanvas">{{ __('buttons.back') }}</a>
</form>
@endsection
25 changes: 10 additions & 15 deletions app/Domain/Goalcanvas/Templates/showCanvas.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@
$canvasTitle = '';
$filter['status'] = $_GET['filter_status'] ?? (session('filter_status') ?? 'all');
session(['filter_status' => $filter['status']]);
$filter['relates'] = $_GET['filter_relates'] ?? (session('filter_relates') ?? 'all');
session(['filter_relates' => $filter['relates']]);
//get canvas title
foreach ($allCanvas as $canvasRow) {
if ($canvasRow['id'] == $currentCanvas) {
Expand Down Expand Up @@ -64,7 +59,7 @@ class="fa-solid fa-ellipsis-v"></i></a>
</li>
@endif
<li><a
href="<?= BASE_URL ?>/goalcanvas/export/{{ $currentCanvas }}">{{ __('links.icon.export') }}</a>
href="{{ BASE_URL }} /goalcanvas/export/{{ $currentCanvas }}">{{ __('links.icon.export') }}</a>
</li>
<li><a href="javascript:window.print();">{{ __('links.icon.print') }}</a></li>
@if ($login::userIsAtLeast($roles::$editor))
Expand All @@ -88,7 +83,7 @@ class="delete">{{ __('links.icon.delete') }}</a></li>
<li class="border"></li>
@foreach ($allCanvas as $canvasRow)
<li><a
href='<?= BASE_URL ?>/goalcanvas/showCanvas/{{ $canvasRow['id'] }}'>{{ $canvasRow['title'] }}</a>
href='{{ BASE_URL }} /goalcanvas/showCanvas/{{ $canvasRow['id'] }}'>{{ $canvasRow['title'] }}</a>
</li>
@endforeach
</ul>
Expand Down Expand Up @@ -128,11 +123,11 @@ class="fas fa-fw {{ __($statusLabels[$filter['status']]['icon']) }}"></i>
{{ $statusLabels[$filter['status']]['title'] }} {{ __('links.view') }}</button>
@endif
<ul class="dropdown-menu">
<li><a href="<?= BASE_URL ?>/goalcanvas/showCanvas?filter_status=all" @if ($filter['status'] == 'all')
<li><a href="{{ BASE_URL }} /goalcanvas/showCanvas?filter_status=all" @if ($filter['status'] == 'all')
class="active"
@endif><i class="fas fa-globe"></i> {{ __('status.all') }}</a></li>
@foreach ($statusLabels as $key => $data)
<li><a href="<?= BASE_URL ?>/goalcanvas/showCanvas?filter_status={{ $key }}"
<li><a href="{{ BASE_URL }} /goalcanvas/showCanvas?filter_status={{ $key }}"
@if ($filter['status'] == $key)
class="active"
@endif><i class="fas fa-fw {{ $data['icon'] }}"></i>
Expand All @@ -154,11 +149,11 @@ class="fas fa-fw {{ __($relatesLabels[$filter['relates']]['icon']) }}"></i>
{{ $relatesLabels[$filter['relates']]['title'] }} {{ __('links.view') }}</button>
@endif
<ul class="dropdown-menu">
<li><a href="<?= BASE_URL ?>/goalcanvas/showCanvas?filter_relates=all" @if ($filter['relates'] == 'all')
<li><a href="{{ BASE_URL }} /goalcanvas/showCanvas?filter_relates=all" @if ($filter['relates'] == 'all')
class="active"
@endif><i class="fas fa-globe"></i> {{ __('relates.all') }}</a></li>
@foreach ($relatesLabels as $key => $data)
<li><a href="<?= BASE_URL ?>/goalcanvas/showCanvas?filter_relates={{ $key }}"
<li><a href="{{ BASE_URL }} /goalcanvas/showCanvas?filter_relates={{ $key }}"
@if ($filter['relates'] == $key)
class="active"
@endif><i class="fas fa-fw {{ $data['icon'] }}"></i>
Expand Down Expand Up @@ -337,14 +332,14 @@ class="dropdown ticketDropdown userDropdown noBg show right lastDropdown dropRig
<span class="text">
@if ($row['authorFirstname'] != '')
<span id='userImage{{ $row['id'] }}'>
<img src='<?= BASE_URL ?>/api/users?profileImage={{ $row['author'] }}'
<img src='{{ BASE_URL }} /api/users?profileImage={{ $row['author'] }}'
width='25'
style='vertical-align: middle;' />
</span>
<span id='user{{ $row['id'] }}'></span>
@else
<span id='userImage{{ $row['id'] }}'>
<img src='<?= BASE_URL ?>/api/users?profileImage=false'
<img src='{{ BASE_URL }} /api/users?profileImage=false'
width='25'
style='vertical-align: middle;' />
</span>
Expand All @@ -362,7 +357,7 @@ class="dropdown ticketDropdown userDropdown noBg show right lastDropdown dropRig
data-label='{{ sprintf(__('text.full_name'), $user['firstname'], $user['lastname']) }}'
data-value='{{ $row['id'] . '_' . $user['id'] . '_' . $user['profileId'] }}'
id='userStatusChange{{ $row['id'] . $user['id'] }}'>
<img src='<?= BASE_URL ?>/api/users?profileImage={{ $user['id'] }}'
<img src='{{ BASE_URL }} /api/users?profileImage={{ $user['id'] }}'
width='25'
style='vertical-align: middle; margin-right:5px;' />
{{ sprintf(__('text.full_name'), $user['firstname'], $user['lastname']) }}
Expand All @@ -386,7 +381,7 @@ class="fas fa-comments"></span></a>
@if ($row['milestoneHeadline'] != '')
<br />
<div hx-trigger="load" hx-indicator=".htmx-indicator"
hx-get="<?= BASE_URL ?>/hx/tickets/milestones/showCard?milestoneId={{ $row['milestoneId'] }}">
hx-get="{{ BASE_URL }} /hx/tickets/milestones/showCard?milestoneId={{ $row['milestoneId'] }}">
<div class="htmx-indicator">
{{ __('label.loading_milestone') }}
</div>
Expand Down

0 comments on commit 4d0f450

Please sign in to comment.