176 lines
8.4 KiB
PHP
176 lines
8.4 KiB
PHP
@extends($layout)
|
|
|
|
@section('content')
|
|
|
|
@php
|
|
$canvasItem = $canvasItem ?? [];
|
|
$canvasTypes = $canvasTypes ?? [];
|
|
|
|
$id = '';
|
|
if (isset($canvasItem['id']) && $canvasItem['id'] != '') {
|
|
$id = $canvasItem['id'];
|
|
}
|
|
@endphp
|
|
|
|
{!! $tpl->displayNotification() !!}
|
|
|
|
<form class="formModal" method="post" action="{{ BASE_URL }}/ideas/ideaDialog/{{ $id }}">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-8">
|
|
|
|
<input type="hidden" value="{{ $currentCanvas }}" name="canvasId"/>
|
|
<input type="hidden" value="{{ $tpl->escape($canvasItem['box']) }}" name="box" id="box"/>
|
|
<input type="hidden" value="{{ $id }}" name="itemId" id="itemId"/>
|
|
<input type="hidden" name="status" value="{{ $canvasItem['status'] }}" />
|
|
<input type="hidden" value="{{ $id }}" name="id" autocomplete="off" readonly/>
|
|
|
|
<input type="hidden" name="milestoneId" value="{{ $canvasItem['milestoneId'] }}"/>
|
|
<input type="hidden" name="changeItem" value="1"/>
|
|
|
|
<x-global::forms.text-input name="description" variant="headline" style="width:99%;" value="{{ $tpl->escape($canvasItem['description']) }}"
|
|
placeholder="{{ __('input.placeholders.short_name') }}" /><br/>
|
|
|
|
<input type="text" value="{{ $tpl->escape($canvasItem['tags']) }}" name="tags" id="tags" />
|
|
|
|
<textarea rows="3" cols="10" name="data" class="tiptapComplex"
|
|
placeholder="">{!! $tpl->escapeMinimal($canvasItem['data']) !!}</textarea><br/>
|
|
|
|
<x-global::forms.button tag="input" inputType="submit" contentRole="primary" :labelText="__('buttons.save')" id="primaryCanvasSubmitButton" />
|
|
<x-global::forms.button contentRole="secondary" inputType="submit" value="closeModal" id="saveAndClose">{!! __('buttons.save_and_close') !!}</x-global::forms.button>
|
|
|
|
@if ($id !== '')
|
|
<br/>
|
|
<hr>
|
|
<input type="hidden" name="comment" value="1"/>
|
|
|
|
<h4 class="widgettitle title-light"><span class="fa fa-submodules.generalComment"></span>{!! __('subtitles.discussion') !!}</h4>
|
|
@include('comments::submodules.generalComment', ['formUrl' => BASE_URL . '/ideas/ideaDialog/' . $id])
|
|
@endif
|
|
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
@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>
|
|
|
|
<ul class="sortableTicketList" style="width:99%">
|
|
@if ($canvasItem['milestoneId'] == '')
|
|
<li class="ui-state-default center" id="milestone_0">
|
|
<h4>{!! __('headlines.no_milestone_link') !!}</h4>
|
|
{!! __('text.use_milestone_to_track_idea') !!}<br/>
|
|
<div class="row" id="milestoneSelectors">
|
|
@if ($login::userIsAtLeast($roles::$editor))
|
|
<div class="col-md-12">
|
|
<a href="javascript:void(0);"
|
|
onclick="leantime.ideasController.toggleMilestoneSelectors('new');">{!! __('links.create_link_milestone') !!}</a>
|
|
| <a href="javascript:void(0);"
|
|
onclick="leantime.ideasController.toggleMilestoneSelectors('existing');">{!! __('links.link_existing_milestone') !!}</a>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
<div class="row" id="newMilestone" style="display:none;">
|
|
<div class="col-md-12">
|
|
<x-global::forms.textarea name="newMilestone"></x-global::forms.textarea><br/>
|
|
<input type="hidden" name="type" value="milestone"/>
|
|
<input type="hidden" name="leancanvasitemid" value="{{ $id }} "/>
|
|
<x-global::forms.button tag="input" inputType="button" :labelText="__('buttons.save')" onclick="jQuery('#primaryCanvasSubmitButton').click()"
|
|
contentRole="primary"/>
|
|
<a href="javascript:void(0);"
|
|
onclick="leantime.ideasController.toggleMilestoneSelectors('hide');">
|
|
<i class="fas fa-times"></i> {!! __('links.cancel') !!}
|
|
</a>
|
|
</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="">{!! __('text.all_milestones') !!}</option>
|
|
@foreach ($milestones as $milestoneRow)
|
|
<option value="{{ $milestoneRow->id }}"
|
|
@if (isset($searchCriteria['milestone']) && ($searchCriteria['milestone'] == $milestoneRow->id))
|
|
selected='selected'
|
|
@endif
|
|
>{{ $tpl->escape($milestoneRow->headline) }}</option>
|
|
@endforeach
|
|
</select>
|
|
<input type="hidden" name="type" value="milestone"/>
|
|
<input type="hidden" name="leancanvasitemid" value="{{ $id }} "/>
|
|
<x-global::forms.button tag="input" inputType="button" :labelText="__('buttons.save')" onclick="jQuery('#primaryCanvasSubmitButton').click()"
|
|
contentRole="primary"/>
|
|
<a href="javascript:void(0);"
|
|
onclick="leantime.ideasController.toggleMilestoneSelectors('hide');">
|
|
<i class="fas fa-times"></i> {!! __('links.cancel') !!}
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
@else
|
|
<li class="ui-state-default" id="milestone_{{ $canvasItem['milestoneId'] }}"
|
|
class="leanCanvasMilestone">
|
|
|
|
<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>
|
|
<a href="{{ CURRENT_URL }}?removeMilestone={{ $canvasItem['milestoneId'] }}" class="ideaCanvasModal delete formModal"><i class="fa fa-close"></i> {!! __('links.remove') !!}</a>
|
|
|
|
</li>
|
|
@endif
|
|
|
|
</ul>
|
|
|
|
@endif
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
<div class="showDialogOnLoad" >
|
|
@if ($id != '')
|
|
<x-global::forms.button tag="a" link="{{ BASE_URL }}/ideas/delCanvasItem/{{ $id }}" class="ideaModal delete right" state="danger" variant="outline"><i
|
|
class="fa fa-trash"></i> {!! __('links.delete') !!}</x-global::forms.button>
|
|
@endif
|
|
</div>
|
|
|
|
@once
|
|
@push('scripts')
|
|
<script type="text/javascript">
|
|
window.onload = function () {
|
|
if (!window.jQuery) {
|
|
//It's not a modal
|
|
location.href = "{{ BASE_URL }}/ideas/showBoards?showIdeaModal={{ $canvasItem['id'] }}";
|
|
}
|
|
}
|
|
|
|
jQuery(document).ready(function(){
|
|
|
|
if (window.leantime && window.leantime.tiptapController) {
|
|
leantime.tiptapController.initComplexEditor();
|
|
}
|
|
leantime.ticketsController.initTagsInput();
|
|
|
|
@if (!$login::userIsAtLeast($roles::$editor))
|
|
leantime.authController.makeInputReadonly(".nyroModalCont");
|
|
@endif
|
|
|
|
@if ($login::userHasRole([$roles::$commenter]))
|
|
leantime.submodules.generalCommentController.enableCommenterForms();
|
|
@endif
|
|
|
|
})
|
|
</script>
|
|
@endpush
|
|
@endonce
|
|
|
|
@endsection
|