Skip to content

Commit

Permalink
Merge pull request #2721 from Leantime/add-edit-milestone-fix
Browse files Browse the repository at this point in the history
Fixed UI of add-edit milestone modal
  • Loading branch information
marcelfolaron authored Oct 3, 2024
2 parents 0d78562 + b6a9b1a commit 4b604c9
Showing 1 changed file with 51 additions and 50 deletions.
101 changes: 51 additions & 50 deletions app/Domain/Tickets/Templates/partials/milestoneDialog.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,81 +34,83 @@
placeholder="{!! $tpl->__('label.milestone_title') !!}"
labelText="{!! $tpl->__('label.milestone_title') !!}"
/>
<br />


<x-global::forms.select
name="projectId"
class="w-full"
labelText="{!! __('label.project') !!}"
name="projectId"
id="projectId"
labelText="{{ __('label.project') }}"
>
@foreach ($allAssignedprojects as $project)
@if (empty($project['type']) || $project['type'] == 'project')
<x-global::forms.select.select-option
value="{{ $project['id'] }}"
:selected="(!empty($currentMilestone->projectId) && $currentMilestone->projectId == $project['id']) || session('currentProject') == $project['id']">
{!! $tpl->escape($project['name']) !!}
</x-global::forms.select.select-option>
@if (empty($project['type']) || $project['type'] == "project")
<x-global::forms.select.option
:value="$project['id']"
:selected="(!empty($currentMilestone->projectId) && $currentMilestone->projectId == $project['id']) || session('currentProject') == $project['id']"
>
{{ $project['name'] }}
</x-global::forms.select.option>
@endif
@endforeach
</x-global::forms.select>


<x-global::forms.select
id="status-select"
name="status"
class="span11"
:placeholder="isset($statusLabels[$currentMilestone->status]) ? $statusLabels[$currentMilestone->status]['name'] : ''"
labelText="{!! __('label.todo_status') !!}"
name="status"
id="status-select"
labelText="{{ __('label.todo_status') }}"
:data-placeholder="isset($statusLabels[$currentMilestone->status]) ? $statusLabels[$currentMilestone->status]['name'] : ''"
>
@foreach ($statusLabels as $key => $label)
<x-global::forms.select.select-option
value="{{ $key }}"
:selected="$currentMilestone->status == $key">
{!! $tpl->escape($label['name']) !!}
</x-global::forms.select.select-option>
<x-global::forms.select.option
:value="$key"
:selected="$currentMilestone->status == $key"
>
{{ $label["name"] }}
</x-global::forms.select.option>
@endforeach
</x-global::forms.select>


<x-global::forms.select
name="dependentMilestone"
class="span11"
labelText="{!! __('label.dependent_on') !!}"
name="dependentMilestone"
id="dependentMilestone"
labelText="{{ __('label.dependent_on') }}"
>
<x-global::forms.select.select-option value="">
{!! __('label.no_dependency') !!}
</x-global::forms.select.select-option>

@foreach ($tpl->get('milestones') as $milestoneRow)
<x-global::forms.select.option :value="''">
{{ __('label.no_dependency') }}
</x-global::forms.select.option>
@foreach ($milestones as $milestoneRow)
@if ($milestoneRow->id !== $currentMilestone->id)
<x-global::forms.select.select-option
value="{{ $milestoneRow->id }}"
:selected="$currentMilestone->milestoneid == $milestoneRow->id">
{!! $tpl->escape($milestoneRow->headline) !!}
</x-global::forms.select.select-option>
<x-global::forms.select.option
:value="$milestoneRow->id"
:selected="$currentMilestone->milestoneid == $milestoneRow->id"
>
{{ $milestoneRow->headline }}
</x-global::forms.select.option>
@endif
@endforeach
</x-global::forms.select>


<x-global::forms.select
name="editorId"
class="user-select span11"
:placeholder="__('input.placeholders.filter_by_user')"
labelText="{!! __('label.owner') !!}"
name="editorId"
id="editorId"
:data-placeholder="__('input.placeholders.filter_by_user')"
:label-text="__('label.owner')"
>
<x-global::forms.select.select-option value="">
{!! __('dropdown.not_assigned') !!}
</x-global::forms.select.select-option>

@foreach ($tpl->get('users') as $userRow)
<x-global::forms.select.select-option
value="{{ $userRow['id'] }}"
:selected="$currentMilestone->editorId == $userRow['id']">
{!! $tpl->escape($userRow['firstname']) . ' ' . $tpl->escape($userRow['lastname']) !!}
</x-global::forms.select.select-option>
<x-global::forms.select.option :value="''">
{{ __('dropdown.not_assigned') }}
</x-global::forms.select.option>
@foreach ($users as $userRow)
<x-global::forms.select.option
:value="$userRow['id']"
:selected="$currentMilestone->editorId == $userRow['id']"
>
{!! $userRow['firstname'] !!} {!! $userRow['lastname'] !!}
</x-global::forms.select.option>
@endforeach
</x-global::forms.select>


<x-global::forms.text-input
type="text"
name="tags"
Expand All @@ -118,7 +120,7 @@ class="user-select span11"
autocomplete="off"
class="simpleColorPicker"
/>
<br />

<x-global::forms.text-input
type="text"
name="editFrom"
Expand All @@ -128,7 +130,6 @@ class="simpleColorPicker"
labelText="{!! $tpl->__('label.planned_start_date') !!}"
autocomplete="off"
/>
<br />

<x-global::forms.text-input
type="text"
Expand Down

0 comments on commit 4b604c9

Please sign in to comment.