75 lines
2.9 KiB
PHP
75 lines
2.9 KiB
PHP
@extends($layout)
|
|
|
|
@section('content')
|
|
|
|
@php
|
|
$currentSprint = $sprint;
|
|
$id = '';
|
|
if (isset($currentSprint->id)) {
|
|
$id = $currentSprint->id;
|
|
}
|
|
$currentProject = session('currentProject');
|
|
@endphp
|
|
|
|
<h4 class="widgettitle title-light"><i class="fa fa-list-1-2"></i> {!! __('label.sprint') !!} {{ $currentSprint->name }}</h4>
|
|
|
|
{!! $tpl->displayNotification() !!}
|
|
|
|
<form class="formModal" method="post" action="{{ BASE_URL }}/sprints/editSprint/{{ $id }}">
|
|
|
|
<label>{!! __('label.sprint_name') !!}</label>
|
|
<x-global::forms.text-input name="name" value="{{ $currentSprint->name }}" placeholder="{{ __('label.sprint_name') }}" /><br />
|
|
|
|
<label>{!! __('label.project') !!}</label>
|
|
@if (! empty($lockProject))
|
|
{{-- Program sprint: project is fixed to the owning program and cannot be reassigned. --}}
|
|
@php $lockedProject = $allAssignedprojects[0] ?? null; @endphp
|
|
<input type="hidden" name="projectId" value="{{ $lockedProject['id'] ?? $currentProject }}" />
|
|
<select disabled>
|
|
<option selected>{{ $tpl->escape($lockedProject['name'] ?? '') }}</option>
|
|
</select><br />
|
|
@else
|
|
<select name="projectId">
|
|
@foreach ($allAssignedprojects as $project)
|
|
<option value="{{ $project['id'] }}"
|
|
@if ((isset($currentSprint) && ($currentSprint->projectId == $project['id'] || $currentProject == $project['id'])) || (! isset($currentSprint) && $currentProject == $project['id']))
|
|
selected
|
|
@endif
|
|
>{{ $tpl->escape($project['name']) }}</option>
|
|
@endforeach
|
|
</select><br />
|
|
@endif
|
|
|
|
<br /><br />
|
|
<p>{!! __('label.sprint_dates') !!}</p><br/>
|
|
<label>{!! __('label.first_day') !!}</label>
|
|
<input type="text" name="startDate" autocomplete="off" value="{{ format($currentSprint->startDate)->date() }}" placeholder="{{ __('language.dateformat') }}" id="sprintStart" /><br />
|
|
|
|
<label>{!! __('label.last_day') !!}</label>
|
|
<input type="text" name="endDate" autocomplete="off" value="{{ format($currentSprint->endDate)->date() }} " placeholder="{{ __('language.dateformat') }}" id="sprintEnd" />
|
|
|
|
<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">
|
|
@if (isset($currentSprint->id) && $currentSprint->id != '' && $login::userIsAtLeast($roles::$editor))
|
|
<a href="{{ BASE_URL }}/sprints/delSprint/{{ $currentSprint->id }}" class="delete formModal sprintModal"><i class="fa fa-trash"></i> {!! __('links.delete_sprint') !!}</a>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|
|
|
|
@once
|
|
@push('scripts')
|
|
<script>
|
|
leantime.ticketsController.initSprintDates();
|
|
</script>
|
|
@endpush
|
|
@endonce
|
|
|
|
@endsection
|