OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)
This commit is contained in:
133
app/Domain/Tickets/Templates/milestoneDialog.blade.php
Normal file
133
app/Domain/Tickets/Templates/milestoneDialog.blade.php
Normal file
@@ -0,0 +1,133 @@
|
||||
@php
|
||||
$currentMilestone = $milestone ?? null;
|
||||
$milestones = $milestones ?? [];
|
||||
$statusLabels = $statusLabels ?? [];
|
||||
@endphp
|
||||
|
||||
<script type="text/javascript">
|
||||
window.onload = function() {
|
||||
if (!window.jQuery) {
|
||||
//It's not a modal
|
||||
location.href="{{ BASE_URL }}/tickets/roadmap?showMilestoneModal={{ $currentMilestone->id }}";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="modal-icons">
|
||||
@if (isset($currentMilestone->id) && $currentMilestone->id != '')
|
||||
<a href="#/tickets/delMilestone/{{ $currentMilestone->id }}" class="danger" data-tippy-content="Delete"><i class='fa fa-trash-can'></i></a>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<h4 class="widgettitle title-light">{!! __('headline.milestone') !!} </h4>
|
||||
|
||||
{!! $tpl->displayNotification() !!}
|
||||
|
||||
<form class="formModal" method="post" action="{{ BASE_URL }}/tickets/editMilestone/{{ $currentMilestone->id }}" style="min-width: 250px;">
|
||||
|
||||
<label>{!! __('label.milestone_title') !!}</label>
|
||||
<x-global::forms.text-input name="headline" value="{{ $currentMilestone->headline }}" placeholder="{{ __('label.milestone_title') }}" /><br />
|
||||
|
||||
<label class="control-label">{!! __('label.project') !!}</label>
|
||||
<select name="projectId" class="tw-w-full">
|
||||
@foreach ($allAssignedprojects as $project)
|
||||
@if (empty($project['type']) || $project['type'] == 'project')
|
||||
<option value="{{ $project['id'] }}"
|
||||
@if (!empty($currentMilestone->projectId) && $currentMilestone->projectId == $project['id'])
|
||||
selected
|
||||
@elseif (session('currentProject') == $project['id'])
|
||||
selected
|
||||
@endif
|
||||
>{{ $project['name'] }}</option>
|
||||
@endif
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
<label>{!! __('label.todo_status') !!}</label>
|
||||
<select id="status-select" name="status" class="span11"
|
||||
data-placeholder="{{ isset($statusLabels[$currentMilestone->status]) ? $statusLabels[$currentMilestone->status]['name'] : '' }}">
|
||||
|
||||
@foreach ($statusLabels as $key => $label)
|
||||
<option value="{{ $key }}"
|
||||
@if ($currentMilestone->status == $key) selected='selected' @endif
|
||||
>{{ $label['name'] }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
<label>{!! __('label.dependent_on') !!}</label>
|
||||
<select name="dependentMilestone" class="span11">
|
||||
<option value="">{!! __('label.no_dependency') !!}</option>
|
||||
@foreach ($milestones as $milestoneRow)
|
||||
@if ($milestoneRow->id !== $currentMilestone->id)
|
||||
<option value="{{ $milestoneRow->id }}"
|
||||
@if ($currentMilestone->milestoneid == $milestoneRow->id) selected='selected' @endif
|
||||
>{{ $milestoneRow->headline }} </option>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
</select>
|
||||
|
||||
<label>{!! __('label.owner') !!}</label>
|
||||
<select data-placeholder="{{ __('input.placeholders.filter_by_user') }}"
|
||||
name="editorId" class="user-select span11">
|
||||
<option value="">{!! __('dropdown.not_assigned') !!}</option>
|
||||
@foreach ($users as $userRow)
|
||||
<option value="{{ $userRow['id'] }}"
|
||||
@if ($currentMilestone->editorId == $userRow['id']) selected='selected' @endif
|
||||
>{{ $userRow['firstname'] }} {{ $userRow['lastname'] }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
<label>{!! __('label.color') !!}</label>
|
||||
<input type="text" name="tags" autocomplete="off" value="{{ $currentMilestone->tags }}" placeholder="{{ __('input.placeholders.pick_a_color') }}" class="simpleColorPicker"/><br />
|
||||
|
||||
<label>{!! __('label.planned_start_date') !!}</label>
|
||||
<input type="text" name="editFrom" autocomplete="off" value="{{ format($currentMilestone->editFrom)->date() }}" placeholder="{{ __('language.dateformat') }}" id="milestoneEditFrom" /><br />
|
||||
|
||||
<label>{!! __('label.planned_end_date') !!}</label>
|
||||
<input type="text" name="editTo" autocomplete="off" value="{{ format($currentMilestone->editTo)->date() }}" placeholder="{{ __('language.dateformat') }}" id="milestoneEditTo" /><br />
|
||||
|
||||
<label>{!! __('label.outcome_impact') !!}</label>
|
||||
<textarea name="outcomeImpact" rows="3" class="tw-w-full"
|
||||
placeholder="{{ __('input.placeholders.outcome_impact') }}">{{ $currentMilestone->outcomeImpact }}</textarea><br />
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<x-global::forms.button tag="input" inputType="submit" contentRole="primary" :labelText="__('buttons.save')" />
|
||||
</div>
|
||||
<div class="col-md-6 align-right padding-top-sm">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
@if (isset($currentMilestone->id) && $currentMilestone->id !== '')
|
||||
<br />
|
||||
<input type="hidden" name="comment" value="1" />
|
||||
|
||||
@include('comments::submodules.generalComment', ['formUrl' => '/tickets/editMilestone/'.$currentMilestone->id])
|
||||
@endif
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function(){
|
||||
|
||||
@if (isset($_GET['closeModal']))
|
||||
jQuery.nmTop().close();
|
||||
return;
|
||||
@endif
|
||||
|
||||
leantime.ticketsController.initSimpleColorPicker();
|
||||
leantime.ticketsController.initMilestoneDates();
|
||||
|
||||
@if (!$login::userIsAtLeast($roles::$editor))
|
||||
leantime.authController.makeInputReadonly(".nyroModalCont");
|
||||
@endif
|
||||
|
||||
@if ($login::userHasRole([$roles::$commenter]))
|
||||
leantime.commentsController.enableCommenterForms();
|
||||
@endif
|
||||
|
||||
|
||||
})
|
||||
</script>
|
||||
Reference in New Issue
Block a user