OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)
This commit is contained in:
25
app/Domain/Canvas/Templates/boardDialog.blade.php
Normal file
25
app/Domain/Canvas/Templates/boardDialog.blade.php
Normal file
@@ -0,0 +1,25 @@
|
||||
@php
|
||||
$canvasTitle = $canvasTitle ?? '';
|
||||
$canvasName = $canvasName ?? '';
|
||||
@endphp
|
||||
|
||||
<form action="{{ BASE_URL }}/{{ $canvasName }}canvas/boardDialog{{ isset($_GET['id']) ? '/' . (int) $_GET['id'] : '' }}" method="post" class="formModal">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title"><i class='fa fa-plus'></i> {!! __('subtitles.create_new_board') !!}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<label>{!! __('label.title_new') !!}</label><br />
|
||||
<x-global::forms.text-input name="canvastitle" value="{{ $canvasTitle }}" placeholder="{{ __('input.placeholders.enter_title_for_board') }}"
|
||||
style="width: 100%" />
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
@if(isset($_GET['id']))
|
||||
<x-global::forms.button tag="input" inputType="submit" contentRole="primary" :labelText="__('buttons.save_board')" name="newCanvas" />
|
||||
<input type="hidden" name="editCanvas" value="{{ (int) $_GET['id'] }}">
|
||||
@else
|
||||
<input type="hidden" name="newCanvas" value="true">
|
||||
<x-global::forms.button tag="input" inputType="submit" contentRole="primary" :labelText="__('buttons.create_board')" name="newCanvas" />
|
||||
@endif
|
||||
<x-global::forms.button inputType="button" contentRole="tertiary" onclick="jQuery.nmTop().close();">{!! __('buttons.close') !!}</x-global::forms.button>
|
||||
</div>
|
||||
</form>
|
||||
54
app/Domain/Canvas/Templates/canvasComment.blade.php
Normal file
54
app/Domain/Canvas/Templates/canvasComment.blade.php
Normal file
@@ -0,0 +1,54 @@
|
||||
@php
|
||||
$canvasName = $canvasName ?? '';
|
||||
$canvasItem = $canvasItem ?? ['id' => '', 'box' => '', 'description' => ''];
|
||||
$canvasTypes = $canvasTypes ?? [];
|
||||
|
||||
$id = '';
|
||||
if (isset($canvasItem['id']) && $canvasItem['id'] != '') {
|
||||
$id = $canvasItem['id'];
|
||||
}
|
||||
@endphp
|
||||
|
||||
<script type="text/javascript">
|
||||
window.onload = function() {
|
||||
if (!window.jQuery) {
|
||||
//It's not a modal
|
||||
location.href="{{ BASE_URL }}/{{ $canvasName }}canvas/showCanvas?showModal={{ $canvasItem['id'] }}";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="showDialogOnLoad" style="display:none;">
|
||||
|
||||
<h4 class="widgettitle title-light" style="padding-bottom: 0"><i class="fas {{ $canvasTypes[$canvasItem['box']]['icon'] ?? '' }}"></i> {{ $canvasTypes[$canvasItem['box']]['title'] ?? '' }}</h4>
|
||||
<hr style="margin-top: 5px; margin-bottom: 15px;">
|
||||
|
||||
{!! $tpl->displayNotification() !!}
|
||||
|
||||
<h5 style="padding-left: 40px"><strong>{{ $canvasItem['description'] }}</strong></h5>
|
||||
|
||||
@if($id !== '')
|
||||
<br />
|
||||
<input type="hidden" name="comment" value="1" />
|
||||
<h4 class="widgettitle title-light"><span class="fa fa-comments"></span>{!! __('subtitles.discussion') !!}</h4>
|
||||
@include('comments::submodules.generalComment', ['formUrl' => '/' . $canvasName . 'canvas/editCanvasComment/' . $id])
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function(){
|
||||
|
||||
if (window.leantime && window.leantime.tiptapController) {
|
||||
leantime.tiptapController.initSimpleEditor();
|
||||
}
|
||||
|
||||
@if(! $login::userIsAtLeast($roles::$editor))
|
||||
leantime.authController.makeInputReadonly(".nyroModalCont");
|
||||
@endif
|
||||
|
||||
@if($login::userHasRole([$roles::$commenter]))
|
||||
leantime.commentsController.enableCommenterForms();
|
||||
@endif
|
||||
|
||||
})
|
||||
</script>
|
||||
227
app/Domain/Canvas/Templates/canvasDialog.blade.php
Normal file
227
app/Domain/Canvas/Templates/canvasDialog.blade.php
Normal file
@@ -0,0 +1,227 @@
|
||||
@php
|
||||
$canvasName = $canvasName ?? '';
|
||||
$currentCanvas = $currentCanvas ?? '';
|
||||
$canvasItem = $canvasItem ?? ['id' => '', 'box' => '', 'description' => '', 'status' => '', 'relates' => '', 'milestoneId' => '', 'milestoneHeadline' => ''];
|
||||
$canvasTypes = $canvasTypes ?? [];
|
||||
$hiddenStatusLabels = $statusLabels ?? [];
|
||||
$statusLabels = $statusLabels ?? [];
|
||||
$hiddenRelatesLabels = $relatesLabels ?? [];
|
||||
$relatesLabels = $relatesLabels ?? [];
|
||||
$dataLabels = $dataLabels ?? [1 => ['active' => false, 'field' => '', 'title' => ''], 2 => ['active' => false, 'field' => '', 'title' => ''], 3 => ['active' => false, 'field' => '', 'title' => '']];
|
||||
$milestones = $milestones ?? [];
|
||||
$users = $users ?? [];
|
||||
$searchCriteria = $searchCriteria ?? [];
|
||||
|
||||
$id = '';
|
||||
if (isset($canvasItem['id']) && $canvasItem['id'] != '') {
|
||||
$id = $canvasItem['id'];
|
||||
}
|
||||
@endphp
|
||||
|
||||
<script type="text/javascript">
|
||||
window.onload = function() {
|
||||
if (!window.jQuery) {
|
||||
//It's not a modal
|
||||
location.href="{{ BASE_URL }}/{{ $canvasName }}canvas/showCanvas?showModal={{ $canvasItem['id'] }}";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="" style="width:900px;">
|
||||
|
||||
<h4 class="widgettitle title-light" style="padding-bottom: 0"><i class="fas {{ $canvasTypes[$canvasItem['box']]['icon'] }}"></i> {{ $canvasTypes[$canvasItem['box']]['title'] }}</h4>
|
||||
<hr style="margin-top: 5px; margin-bottom: 15px;">
|
||||
{!! $tpl->displayNotification() !!}
|
||||
|
||||
<form class="formModal" method="post" action="{{ BASE_URL }}/{{ $canvasName }}canvas/editCanvasItem/{{ $id }}">
|
||||
|
||||
<input type="hidden" value="{{ $currentCanvas }}" name="canvasId" />
|
||||
<input type="hidden" value="{{ $canvasItem['box'] }}" name="box" id="box"/>
|
||||
<input type="hidden" value="{{ $id }}" name="itemId" id="itemId"/>
|
||||
|
||||
<label>{!! __('label.description') !!}</label>
|
||||
<x-global::forms.text-input name="description" value="{{ $canvasItem['description'] }}" style="width:100%" /><br />
|
||||
|
||||
@if(! empty($statusLabels))
|
||||
<label>{!! __('label.status') !!}</label>
|
||||
<select name="status" style="width: 50%" id="statusCanvas">
|
||||
</select><br /><br />
|
||||
@else
|
||||
<input type="hidden" name="status" value="{{ $canvasItem['status'] ?? array_key_first($hiddenStatusLabels) }}" />
|
||||
@endif
|
||||
|
||||
@if(! empty($relatesLabels))
|
||||
<label>{!! __('label.relates') !!}</label>
|
||||
<select name="relates" style="width: 50%" id="relatesCanvas">
|
||||
</select><br />
|
||||
@else
|
||||
<input type="hidden" name="relates" value="{{ $canvasItem['relates'] ?? array_key_first($hiddenRelatesLabels) }}" />
|
||||
@endif
|
||||
|
||||
@if($dataLabels[1]['active'])
|
||||
<label>{!! __($dataLabels[1]['title']) !!}</label>
|
||||
@if(isset($dataLabels[1]['type']) && $dataLabels[1]['type'] == 'int')
|
||||
<x-global::forms.text-input type="number" name="{{ $dataLabels[1]['field'] }}" value="{{ $canvasItem[$dataLabels[1]['field']] }}" /><br />
|
||||
@elseif(isset($dataLabels[1]['type']) && $dataLabels[1]['type'] == 'string')
|
||||
<x-global::forms.text-input name="{{ $dataLabels[1]['field'] }}" value="{{ $canvasItem[$dataLabels[1]['field']] }}" style="width:100%" /><br />
|
||||
@else
|
||||
<textarea style="width:100%" rows="3" cols="10" name="{{ $dataLabels[1]['field'] }}" class="modalTextArea tiptapSimple">{{ $canvasItem[$dataLabels[1]['field']] }}</textarea><br />
|
||||
@endif
|
||||
@else
|
||||
<input type="hidden" name="{{ $dataLabels[1]['field'] }}" value="" />
|
||||
@endif
|
||||
|
||||
@if($dataLabels[2]['active'])
|
||||
<label>{!! __($dataLabels[2]['title']) !!}</label>
|
||||
@if(isset($dataLabels[2]['type']) && $dataLabels[2]['type'] == 'int')
|
||||
<x-global::forms.text-input type="number" name="{{ $dataLabels[2]['field'] }}" value="{{ $canvasItem[$dataLabels[2]['field']] }}" /><br />
|
||||
@elseif(isset($dataLabels[2]['type']) && $dataLabels[2]['type'] == 'string')
|
||||
<x-global::forms.text-input name="{{ $dataLabels[2]['field'] }}" value="{{ $canvasItem[$dataLabels[2]['field']] }}" style="width:100%" /><br />
|
||||
@else
|
||||
<textarea style="width:100%" rows="3" cols="10" name="{{ $dataLabels[2]['field'] }}" class="modalTextArea tiptapSimple">{{ $canvasItem[$dataLabels[2]['field']] }}</textarea><br />
|
||||
@endif
|
||||
@else
|
||||
<input type="hidden" name="{{ $dataLabels[2]['field'] }}" value="" />
|
||||
@endif
|
||||
|
||||
@if($dataLabels[3]['active'])
|
||||
<label>{!! __($dataLabels[3]['title']) !!}</label>
|
||||
@if(isset($dataLabels[3]['type']) && $dataLabels[3]['type'] == 'int')
|
||||
<x-global::forms.text-input type="number" name="{{ $dataLabels[3]['field'] }}" value="{{ $canvasItem[$dataLabels[3]['field']] }}" /><br />
|
||||
@elseif(isset($dataLabels[3]['type']) && $dataLabels[3]['type'] == 'string')
|
||||
<x-global::forms.text-input name="{{ $dataLabels[3]['field'] }}" value="{{ $canvasItem[$dataLabels[3]['field']] }}" /><br />
|
||||
@else
|
||||
<textarea style="width:100%" rows="3" cols="10" name="{{ $dataLabels[3]['field'] }}" class="modalTextArea tiptapSimple">{{ $canvasItem[$dataLabels[3]['field']] }}</textarea><br />
|
||||
@endif
|
||||
@else
|
||||
<input type="hidden" name="{{ $dataLabels[3]['field'] }}" value="" />
|
||||
@endif
|
||||
|
||||
<input type="hidden" name="milestoneId" value="{{ $canvasItem['milestoneId'] }}" />
|
||||
<input type="hidden" name="changeItem" value="1" />
|
||||
|
||||
@if($id != '')
|
||||
<x-global::forms.button tag="a" link="{{ BASE_URL }}/{{ $canvasName }}canvas/delCanvasItem/{{ $id }}" class="{{ $canvasName }}CanvasModal delete right" state="danger" variant="outline"><i class='fa fa-trash-can'></i> {!! __('links.delete') !!}</x-global::forms.button>
|
||||
@endif
|
||||
|
||||
@if($login::userIsAtLeast($roles::$editor))
|
||||
<x-global::forms.button tag="input" inputType="submit" contentRole="primary" :labelText="__('buttons.save')" id="primaryCanvasSubmitButton" />
|
||||
<x-global::forms.button inputType="submit" contentRole="secondary" value="closeModal" id="saveAndClose" onclick="leantime.{{ $canvasName }}CanvasController.setCloseModal();">{!! __('buttons.save_and_close') !!}</x-global::forms.button>
|
||||
@endif
|
||||
|
||||
@if($id !== '')
|
||||
<br /><br />
|
||||
<h4 class="widgettitle title-light"><span class="fa fa-link"></span> {!! __('headlines.linked_milestone') !!} <i class="fa fa-question-circle-o helperTooltip" data-tippy-content="{{ __('tooltip.link_milestones_tooltip') }}"></i></h4>
|
||||
|
||||
@if($canvasItem['milestoneId'] == '')
|
||||
<center>
|
||||
<h4>{!! __('headlines.no_milestone_link') !!}</h4>
|
||||
|
||||
<div class="row" id="milestoneSelectors">
|
||||
@if($login::userIsAtLeast($roles::$editor))
|
||||
<div class="col-md-12">
|
||||
<a href="javascript:void(0);" onclick="leantime.{{ $canvasName }}CanvasController.toggleMilestoneSelectors('new');">{!! __('links.create_link_milestone') !!}</a>
|
||||
@if(count($milestones) > 0)
|
||||
| <a href="javascript:void(0);" onclick="leantime.{{ $canvasName }}CanvasController.toggleMilestoneSelectors('existing');">{!! __('links.link_existing_milestone') !!}</a>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<div class="row" id="newMilestone" style="display:none;">
|
||||
<div class="col-md-12">
|
||||
<x-global::forms.text-input width="50%" name="newMilestone" /><br />
|
||||
<input type="hidden" name="type" value="milestone" />
|
||||
<input type="hidden" name="{{ $canvasName }}canvasitemid" value="{{ $id }} " />
|
||||
<x-global::forms.button tag="input" inputType="button" :labelText="__('buttons.save')" onclick="jQuery('#primaryCanvasSubmitButton').click()" contentRole="primary" />
|
||||
<x-global::forms.button tag="input" inputType="button" :labelText="__('buttons.cancel')" onclick="leantime.{{ $canvasName }}CanvasController.toggleMilestoneSelectors('hide')" contentRole="tertiary" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="existingMilestone" style="display:none;">
|
||||
<div class="col-md-12">
|
||||
<select data-placeholder="{{ __('input.placeholders.filter_by_milestone') }}" name="existingMilestone" class="user-select">
|
||||
<option value=""></option>
|
||||
@foreach($milestones as $milestoneRow)
|
||||
<option value="{{ $milestoneRow->id }}"
|
||||
@if(isset($searchCriteria['milestone']) && $searchCriteria['milestone'] == $milestoneRow->id) selected='selected' @endif
|
||||
>{{ $milestoneRow->headline }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<input type="hidden" name="type" value="milestone" />
|
||||
<input type="hidden" name="{{ $canvasName }}canvasitemid" value="{{ $id }} " />
|
||||
<x-global::forms.button tag="input" inputType="button" :labelText="__('buttons.save')" onclick="jQuery('#primaryCanvasSubmitButton').click()" contentRole="primary" />
|
||||
<x-global::forms.button tag="input" inputType="button" :labelText="__('buttons.cancel')" onclick="leantime.{{ $canvasName }}CanvasController.toggleMilestoneSelectors('hide')" contentRole="tertiary" />
|
||||
</div>
|
||||
</div>
|
||||
</center>
|
||||
@else
|
||||
<div hx-trigger="load"
|
||||
hx-indicator=".htmx-indicator"
|
||||
hx-get="{{ BASE_URL }}/hx/tickets/milestones/showCard?milestoneId={{ $canvasItem['milestoneId'] }}">
|
||||
<div class="htmx-indicator">
|
||||
{!! __('label.loading_milestone') !!}
|
||||
</div>
|
||||
</div>
|
||||
<x-global::forms.button tag="a" link="{{ CURRENT_URL }}?removeMilestone={{ $canvasItem['milestoneId'] }}" class="{{ $canvasName }}CanvasModal delete formModal" state="danger" variant="outline"><i class="fa fa-close"></i> {!! __('links.remove') !!}</x-global::forms.button>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
</form>
|
||||
|
||||
@if($id !== '')
|
||||
<br />
|
||||
<input type="hidden" name="comment" value="1" />
|
||||
<h4 class="widgettitle title-light"><span class="fa fa-comments"></span>{!! __('subtitles.discussion') !!}</h4>
|
||||
@include('comments::submodules.generalComment', ['formUrl' => '/' . $canvasName . 'canvas/editCanvasItem/' . $id])
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function(){
|
||||
|
||||
@if(! empty($statusLabels))
|
||||
new SlimSelect({
|
||||
select: '#statusCanvas',
|
||||
showSearch: false,
|
||||
valuesUseText: false,
|
||||
data: [
|
||||
@foreach($statusLabels as $key => $data)
|
||||
@if($data['active'])
|
||||
{ innerHTML: '<i class="fas fa-fw {{ $data['icon'] }}"></i> {{ $data['title'] }}',
|
||||
text: "{{ $data['title'] }}", value: "{{ $key }}", selected: {{ $canvasItem['status'] == $key ? 'true' : 'false' }}},
|
||||
@endif
|
||||
@endforeach
|
||||
]
|
||||
});
|
||||
@endif
|
||||
|
||||
@if(! empty($relatesLabels))
|
||||
new SlimSelect({
|
||||
select: '#relatesCanvas',
|
||||
showSearch: false,
|
||||
valuesUseText: false,
|
||||
data: [
|
||||
@foreach($relatesLabels as $key => $data)
|
||||
@if($data['active'])
|
||||
{ innerHTML: '<i class="fas fa-fw {{ $data['icon'] }}"></i> {{ $data['title'] }}',
|
||||
text: "{{ $data['title'] }}", value: "{{ $key }}", selected: {{ $canvasItem['relates'] == $key ? 'true' : 'false' }}},
|
||||
@endif
|
||||
@endforeach
|
||||
]
|
||||
});
|
||||
@endif
|
||||
|
||||
if (window.leantime && window.leantime.tiptapController) {
|
||||
leantime.tiptapController.initSimpleEditor();
|
||||
}
|
||||
|
||||
@if(! $login::userIsAtLeast($roles::$editor))
|
||||
leantime.authController.makeInputReadonly(".nyroModalCont");
|
||||
@endif
|
||||
|
||||
@if($login::userHasRole([$roles::$commenter]))
|
||||
leantime.commentsController.enableCommenterForms();
|
||||
@endif
|
||||
|
||||
})
|
||||
</script>
|
||||
12
app/Domain/Canvas/Templates/delCanvas.blade.php
Normal file
12
app/Domain/Canvas/Templates/delCanvas.blade.php
Normal file
@@ -0,0 +1,12 @@
|
||||
@php
|
||||
$id = filter_var($_GET['id'], FILTER_SANITIZE_NUMBER_INT);
|
||||
@endphp
|
||||
|
||||
<h4 class="widgettitle title-light">{!! __('subtitles.delete') !!}</h4>
|
||||
|
||||
<form method="post" action="{{ BASE_URL }}/{{ $canvasName }}canvas/delCanvas/{{ $id }}">
|
||||
<p>{!! __('text.confirm_board_deletion') !!}</p><br />
|
||||
<x-global::forms.button tag="input" inputType="submit" contentRole="primary" :labelText="__('buttons.yes_delete')" name="del" />
|
||||
<x-global::forms.button tag="a" contentRole="tertiary"
|
||||
link="{{ BASE_URL }}/{{ $canvasName }}canvas/showCanvas">{!! __('buttons.back') !!}</x-global::forms.button>
|
||||
</form>
|
||||
12
app/Domain/Canvas/Templates/delCanvasItem.blade.php
Normal file
12
app/Domain/Canvas/Templates/delCanvasItem.blade.php
Normal file
@@ -0,0 +1,12 @@
|
||||
@php
|
||||
$id = filter_var($_GET['id'], FILTER_SANITIZE_NUMBER_INT);
|
||||
@endphp
|
||||
|
||||
<h4 class="widgettitle title-light">{!! __('subtitles.delete') !!}</h4>
|
||||
<hr style="margin-top: 5px; margin-bottom: 15px;">
|
||||
|
||||
<form method="post" action="{{ BASE_URL }}/{{ $canvasName }}canvas/delCanvasItem/{{ $id }}">
|
||||
<p>{!! __('text.confirm_board_item_deletion') !!}</p><br />
|
||||
<x-global::forms.button tag="input" inputType="submit" contentRole="primary" :labelText="__('buttons.yes_delete')" name="del" />
|
||||
<x-global::forms.button tag="a" contentRole="tertiary" link="{{ BASE_URL }}/{{ $canvasName }}canvas/showCanvas">{!! __('buttons.back') !!}</x-global::forms.button>
|
||||
</form>
|
||||
150
app/Domain/Canvas/Templates/element.blade.php
Normal file
150
app/Domain/Canvas/Templates/element.blade.php
Normal file
@@ -0,0 +1,150 @@
|
||||
@php
|
||||
use Leantime\Domain\Comments\Repositories\Comments;
|
||||
@endphp
|
||||
|
||||
<h4 class="widgettitle title-primary">
|
||||
@if(isset($canvasTypes[$elementName]['icon']))
|
||||
<i class="fas {{ $canvasTypes[$elementName]['icon'] }}"></i>
|
||||
@endif
|
||||
{{ $canvasTypes[$elementName]['title'] }}
|
||||
</h4>
|
||||
<div class="contentInner even status_{{ $elementName }}"
|
||||
{!! isset($canvasTypes[$elementName]['color']) ? 'style="background: ' . $canvasTypes[$elementName]['color'] . ';"' : '' !!}>
|
||||
|
||||
@foreach($canvasItems as $row)
|
||||
@php
|
||||
$filterStatus = $filter['status'] ?? 'all';
|
||||
$filterRelates = $filter['relates'] ?? 'all';
|
||||
@endphp
|
||||
|
||||
@if($row['box'] === $elementName && ($filterStatus == 'all' || $filterStatus == $row['status']) && ($filterRelates == 'all' || $filterRelates == $row['relates']))
|
||||
@php
|
||||
$comments = app()->make(Comments::class);
|
||||
$nbcomments = $comments->countComments(moduleId: $row['id']);
|
||||
@endphp
|
||||
|
||||
<div class="ticketBox" id="item_{{ $row['id'] }}">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="inlineDropDownContainer" style="float:right;">
|
||||
|
||||
@if($login::userIsAtLeast($roles::$editor))
|
||||
<a href="javascript:void(0)" class="dropdown-toggle ticketDropDown" data-toggle="dropdown">
|
||||
<i class="fa fa-ellipsis-v" aria-hidden="true"></i>
|
||||
</a>
|
||||
@endif
|
||||
|
||||
@if($login::userIsAtLeast($roles::$editor))
|
||||
|
||||
<ul class="dropdown-menu">
|
||||
<li class="nav-header">{!! __('subtitles.edit') !!}</li>
|
||||
<li><a href="#/{{ $canvasName }}canvas/editCanvasItem/{{ $row['id'] }}"
|
||||
data="item_{{ $row['id'] }}"> {!! __('links.edit_canvas_item') !!}</a></li>
|
||||
<li><a href="#/{{ $canvasName }}canvas/delCanvasItem/{{ $row['id'] }}"
|
||||
class="delete"
|
||||
data="item_{{ $row['id'] }}"> {!! __('links.delete_canvas_item') !!}</a></li>
|
||||
</ul>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<h4><a href="#/{{ $canvasName }}canvas/editCanvasItem/{{ $row['id'] }}"
|
||||
data="item_{{ $row['id'] }}">{{ $row['description'] }}</a></h4>
|
||||
|
||||
@if($row['conclusion'] != '')
|
||||
<small>{!! $tpl->escapeMinimal($row['conclusion']) !!}</small>
|
||||
@endif
|
||||
|
||||
<div class="clearfix" style="padding-bottom: 8px;"></div>
|
||||
|
||||
@if(! empty($statusLabels))
|
||||
<div class="dropdown ticketDropdown statusDropdown colorized show firstDropdown">
|
||||
<a class="dropdown-toggle f-left status label-{{ $statusLabels[$row['status']]['dropdown'] }}"
|
||||
href="javascript:void(0);" role="button"
|
||||
id="statusDropdownMenuLink{{ $row['id'] }}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="text">{{ $statusLabels[$row['status']]['title'] }}</span> <i class="fa fa-caret-down" aria-hidden="true"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu" aria-labelledby="statusDropdownMenuLink{{ $row['id'] }}">
|
||||
<li class="nav-header border">{!! __('dropdown.choose_status') !!}</li>
|
||||
@foreach($statusLabels as $key => $data)
|
||||
@if($data['active'] || true)
|
||||
<li class='dropdown-item'>
|
||||
<a href="javascript:void(0);" class="label-{{ $data['dropdown'] }}"
|
||||
data-label='{{ $data['title'] }}' data-value="{{ $row['id'] . '/' . $key }}"
|
||||
id="ticketStatusChange{{ $row['id'] }}{{ $key }}">{{ $data['title'] }}</a>
|
||||
</li>
|
||||
@endif
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(! empty($relatesLabels))
|
||||
<div class="dropdown ticketDropdown relatesDropdown colorized show firstDropdown">
|
||||
<a class="dropdown-toggle f-left relates label-{{ $relatesLabels[$row['relates']]['dropdown'] }}"
|
||||
href="javascript:void(0);" role="button"
|
||||
id="relatesDropdownMenuLink{{ $row['id'] }}" data-toggle="dropdown" aria-haspopup="true"
|
||||
aria-expanded="false">
|
||||
<span class="text">{{ $relatesLabels[$row['relates']]['title'] }}</span> <i class="fa fa-caret-down" aria-hidden="true"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu" aria-labelledby="relatesDropdownMenuLink{{ $row['id'] }}">
|
||||
<li class="nav-header border">{!! __('dropdown.choose_relates') !!}</li>
|
||||
@foreach($relatesLabels as $key => $data)
|
||||
@if($data['active'] || true)
|
||||
<li class='dropdown-item'>
|
||||
<a href="javascript:void(0);" class="label-{{ $data['dropdown'] }}"
|
||||
data-label='{{ $data['title'] }}'
|
||||
data-value="{{ $row['id'] . '/' . $key }}"
|
||||
id="ticketRelatesChange{{ $row['id'] }}{{ $key }}">{{ $data['title'] }}</a>
|
||||
</li>
|
||||
@endif
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="dropdown ticketDropdown userDropdown noBg show right lastDropdown dropRight">
|
||||
<a class="dropdown-toggle f-left" href="javascript:void(0);" role="button" id="userDropdownMenuLink{{ $row['id'] }}"
|
||||
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="text">
|
||||
@if($row['authorFirstname'] != '')
|
||||
<span id='userImage{{ $row['id'] }}'><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' width='25' style='vertical-align: middle;'/></span><span id='user{{ $row['id'] }}'></span>
|
||||
@endif
|
||||
</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" aria-labelledby="userDropdownMenuLink{{ $row['id'] }}">
|
||||
<li class="nav-header border">{!! __('dropdown.choose_user') !!}</li>
|
||||
@foreach($users as $user)
|
||||
<li class='dropdown-item'>
|
||||
<a href='javascript:void(0);' data-label='{{ sprintf(__('text.full_name'), e($user['firstname']), e($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'] }}&v={{ $user['modified'] }}' width='25' style='vertical-align: middle; margin-right:5px;'/>{{ sprintf(__('text.full_name'), e($user['firstname']), e($user['lastname'])) }}</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
<div class="pull-right" style="margin-right:10px;">
|
||||
<span class="fas fa-comments"></span> <small>{{ $nbcomments }}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if($row['milestoneHeadline'] != '')
|
||||
<br/>
|
||||
<div hx-trigger="load"
|
||||
hx-indicator=".htmx-indicator"
|
||||
hx-get="{{ BASE_URL }}/hx/tickets/milestones/showCard?milestoneId={{ $row['milestoneId'] }}">
|
||||
<div class="htmx-indicator">
|
||||
{!! __('label.loading_milestone') !!}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
<br />
|
||||
@if($login::userIsAtLeast($roles::$editor))
|
||||
<a href="#/{{ $canvasName }}canvas/editCanvasItem?type={{ $elementName }}"
|
||||
class="" id="{{ $elementName }}"
|
||||
style="padding-bottom: 10px;">{!! __('links.add_new_canvas_item') !!}</a>
|
||||
@endif
|
||||
</div>
|
||||
22
app/Domain/Canvas/Templates/helper.blade.php
Normal file
22
app/Domain/Canvas/Templates/helper.blade.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<div class="center padding-lg">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div style='width:300px' class='svgContainer'>
|
||||
{!! file_get_contents(ROOT . '/dist/images/svg/undraw_design_data_khdb.svg') !!}
|
||||
</div>
|
||||
<br />
|
||||
<h1>{!! __("headlines.$canvasName.welcome_to_board") !!}</h1><br />
|
||||
{!! __("text.$canvasName.helper_content") !!}
|
||||
<br /><br />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<p></p>
|
||||
<x-global::forms.button tag="a" link="javascript:void(0);" onclick="jQuery.nmTop().close()" contentRole="tertiary">{!! __('links.close') !!}</x-global::forms.button><br />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
3
app/Domain/Canvas/Templates/modals.blade.php
Normal file
3
app/Domain/Canvas/Templates/modals.blade.php
Normal file
@@ -0,0 +1,3 @@
|
||||
{{-- modals.blade.php - Generic template for canvas modals --}}
|
||||
{{-- Note: The modal content was previously commented out in the legacy template. --}}
|
||||
{{-- Kept as an empty partial for compatibility. The actual board dialog is boardDialog.blade.php --}}
|
||||
70
app/Domain/Canvas/Templates/showCanvasBottom.blade.php
Normal file
70
app/Domain/Canvas/Templates/showCanvasBottom.blade.php
Normal file
@@ -0,0 +1,70 @@
|
||||
@if(count($allCanvas) > 0)
|
||||
@else
|
||||
<br /><br />
|
||||
<div class='center'>
|
||||
<div class='svgContainer'>
|
||||
{!! file_get_contents(ROOT . '/dist/images/svg/undraw_design_data_khdb.svg') !!}
|
||||
</div>
|
||||
|
||||
<h3>{!! __("headlines.$canvasName.analysis") !!}</h3>
|
||||
<br />{!! __("text.$canvasName.helper_content") !!}
|
||||
|
||||
@if($login::userIsAtLeast($roles::$editor))
|
||||
<br /><br />
|
||||
<a href='javascript:void(0)' class='addCanvasLink btn btn-primary'>
|
||||
{!! __('links.icon.create_new_board') !!}</a>.
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(! empty($disclaimer) && count($allCanvas) > 0)
|
||||
<small class="align-center">{{ $disclaimer }}</small>
|
||||
@endif
|
||||
|
||||
@include('canvas::modals')
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@once @push('scripts')
|
||||
<script type="text/javascript">
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
|
||||
if(jQuery('#searchCanvas').length > 0) {
|
||||
new SlimSelect({ select: '#searchCanvas' });
|
||||
}
|
||||
|
||||
@if(isset($_GET['closeModal']))
|
||||
jQuery.nmTop().close();
|
||||
@endif
|
||||
|
||||
leantime.{{ $canvasName }}CanvasController.setRowHeights();
|
||||
leantime.canvasController.setCanvasName('{{ $canvasName }}');
|
||||
leantime.canvasController.initFilterBar();
|
||||
|
||||
@if($login::userIsAtLeast($roles::$editor))
|
||||
leantime.canvasController.initCanvasLinks();
|
||||
leantime.canvasController.initUserDropdown();
|
||||
leantime.canvasController.initStatusDropdown();
|
||||
leantime.canvasController.initRelatesDropdown();
|
||||
@else
|
||||
leantime.authController.makeInputReadonly(".maincontentinner");
|
||||
@endif
|
||||
|
||||
@if(isset($_GET['showModal']))
|
||||
@php
|
||||
if ($_GET['showModal'] == '') {
|
||||
$modalUrl = '&type=' . array_key_first($canvasTypes);
|
||||
} else {
|
||||
$modalUrl = '/' . (int) $_GET['showModal'];
|
||||
}
|
||||
@endphp
|
||||
leantime.canvasController.openModalManually("{{ BASE_URL }}/{{ $canvasName }}canvas/editCanvasItem{{ $modalUrl }}");
|
||||
window.history.pushState({},document.title, '{{ BASE_URL }}/{{ $canvasName }}canvas/showCanvas/');
|
||||
@endif
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
@endpush @endonce
|
||||
131
app/Domain/Canvas/Templates/showCanvasTop.blade.php
Normal file
131
app/Domain/Canvas/Templates/showCanvasTop.blade.php
Normal file
@@ -0,0 +1,131 @@
|
||||
@php
|
||||
$canvasTitle = '';
|
||||
$allCanvas = $allCanvas ?? [];
|
||||
$canvasIcon = $canvasIcon ?? '';
|
||||
$canvasTypes = $canvasTypes ?? [];
|
||||
$statusLabels = $statusLabels ?? [];
|
||||
$relatesLabels = $relatesLabels ?? [];
|
||||
$dataLabels = $dataLabels ?? [];
|
||||
$disclaimer = $disclaimer ?? '';
|
||||
$canvasItems = $canvasItems ?? [];
|
||||
|
||||
$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 ?? '')) {
|
||||
$canvasTitle = $canvasRow['title'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@endphp
|
||||
|
||||
<style>
|
||||
.canvas-row { margin-left: 0px; margin-right: 0px;}
|
||||
.canvas-title-only { border-radius: var(--box-radius-small); }
|
||||
h4.canvas-element-title-empty { background: white !important; border-color: white !important; }
|
||||
div.canvas-element-center-middle { text-align: center; }
|
||||
</style>
|
||||
|
||||
<div class="pageheader">
|
||||
<div class="pageicon"><span class='fa {{ $canvasIcon }}'></span></div>
|
||||
<div class="pagetitle">
|
||||
@if(count($allCanvas) > 0)
|
||||
<x-global::subjectSwitcher
|
||||
:parent="__('headline.' . $canvasName . '.board')"
|
||||
:current="$canvasTitle">
|
||||
@if($login::userIsAtLeast($roles::$editor))
|
||||
<li><a href="#/{{ $canvasName }}canvas/boardDialog">{!! __('links.icon.create_new_board') !!}</a></li>
|
||||
@endif
|
||||
<li class="border"></li>
|
||||
@foreach($allCanvas as $canvasRow)
|
||||
<li><a href="{{ BASE_URL }}/{{ $canvasName }}canvas/showCanvas/{{ $canvasRow['id'] }}">{{ e($canvasRow['title']) }}</a></li>
|
||||
@endforeach
|
||||
</x-global::subjectSwitcher>
|
||||
@else
|
||||
<h1>{!! __("headline.$canvasName.board") !!}</h1>
|
||||
@endif
|
||||
</div>
|
||||
@if(count($allCanvas) > 0)
|
||||
<div class="pageheader-right">
|
||||
<span class="dropdown dropdownWrapper headerEditDropdown">
|
||||
<a href="javascript:void(0)" class="dropdown-toggle btn btn-transparent" data-toggle="dropdown"><i class="fa-solid fa-ellipsis-v"></i></a>
|
||||
<ul class="dropdown-menu editCanvasDropdown">
|
||||
@if($login::userIsAtLeast($roles::$editor))
|
||||
<li><a href="#/{{ $canvasName }}canvas/boardDialog/{{ $currentCanvas }}" class="editCanvasLink ">{!! __('links.icon.edit') !!}</a></li>
|
||||
@endif
|
||||
<li><a href="{{ BASE_URL }}/{{ $canvasName }}canvas/export/{{ $currentCanvas }}">{!! __('links.icon.export') !!}</a></li>
|
||||
<li><a href="javascript:window.print();">{!! __('links.icon.print') !!}</a></li>
|
||||
@if($login::userIsAtLeast($roles::$editor))
|
||||
<li><a href="#/{{ $canvasName }}canvas/delCanvas/{{ $currentCanvas }}" class="delete">{!! __('links.icon.delete') !!}</a></li>
|
||||
@endif
|
||||
</ul>
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
</div><!--pageheader-->
|
||||
|
||||
<div class="maincontent">
|
||||
<div class="maincontentinner">
|
||||
|
||||
{!! $tpl->displayNotification() !!}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
|
||||
@if($login::userIsAtLeast($roles::$editor) && count($canvasTypes) == 1 && count($allCanvas) > 0)
|
||||
<x-global::forms.button tag="a" link="#/{{ $canvasName }}canvas/editCanvasItem?type={{ $elementName }}"
|
||||
contentRole="primary" id="{{ $elementName }}">{!! __('links.add_new_canvas_item' . $canvasName) !!}</x-global::forms.button>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 center">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="pull-right">
|
||||
<div class="btn-group viewDropDown">
|
||||
@if(count($allCanvas) > 0 && ! empty($statusLabels))
|
||||
@if($filter['status'] == 'all')
|
||||
<button class="btn dropdown-toggle" data-toggle="dropdown"><i class="fas fa-filter"></i> {!! __('status.all') !!} {!! __('links.view') !!}</button>
|
||||
@else
|
||||
<button class="btn dropdown-toggle" data-toggle="dropdown"><i 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 }}/{{ $canvasName }}canvas/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 }}/{{ $canvasName }}canvas/showCanvas?filter_status={{ $key }}" @if($filter['status'] == $key) class="active" @endif><i class="fas fa-fw {{ $data['icon'] }}"></i> {{ $data['title'] }}</a></li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="btn-group viewDropDown">
|
||||
@if(count($allCanvas) > 0 && ! empty($relatesLabels))
|
||||
@if($filter['relates'] == 'all')
|
||||
<button class="btn dropdown-toggle" data-toggle="dropdown"><i class="fas fa-fw fa-globe"></i> {!! __('relates.all') !!} {!! __('links.view') !!}</button>
|
||||
@else
|
||||
<button class="btn dropdown-toggle" data-toggle="dropdown"><i 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 }}/{{ $canvasName }}canvas/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 }}/{{ $canvasName }}canvas/showCanvas?filter_relates={{ $key }}" @if($filter['relates'] == $key) class="active" @endif><i class="fas fa-fw {{ $data['icon'] }}"></i> {{ $data['title'] }}</a></li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
Reference in New Issue
Block a user