14
14
<h1 ><i class =" fas {{ $canvasTypes [$canvasItem [' box' ]][' icon' ] } }" ></i >
15
15
{{ $canvasTypes [$canvasItem [' box' ]][' title' ] } } </h1 >
16
16
17
-
18
17
<form class =" formModal" method =" post" action =" {{ BASE_URL . " /goalcanvas/editCanvasItem/$id " } }" >
19
18
20
19
<input type =" hidden" value =" {{ $currentCanvas } }" name =" canvasId" >
23
22
<input type =" hidden" name =" milestoneId" value =" {{ $canvasItem [' milestoneId' ] ?? ' ' } }" >
24
23
<input type =" hidden" name =" changeItem" value =" 1" >
25
24
26
- <div class =" col-md-8" >
27
- <label >{{ __ (' label.what_is_your_goal' ) } } </label >
28
- <input type =" text" name =" title" value =" {{ $canvasItem [' title' ] } }" style =" width :100% " ><br >
29
-
30
- @if (! empty ($relatesLabels ) )
31
- <label >{{ __ (' label.relates' ) } } </label >
32
- <select name =" relates" style =" width : 50% " id =" relatesCanvas" >
33
- </select ><br >
34
- @else
35
- <input type =" hidden" name =" relates"
36
- value =" {{ $canvasItem [' relates' ] ?? array_key_first ($hiddenRelatesLabels ) } }" >
37
- @endif
38
- <br >
39
- <h4 class =" widgettitle title-light" style =" margin-bottom :0px ;" ><i class =" fa-solid fa-ranking-star" ></i >
40
- {{ __ (' Metrics' ) } } </h4 >
41
-
42
- @dispatchEvent (' beforeMeasureGoalContainer' , $canvasItem )
43
- <div id =" measureGoalContainer" >
44
- <label >{{ __ (' text.what_metric_will_you_be_using' ) } } </label >
45
- <input type =" text" name =" description" value =" {{ $canvasItem [' description' ] } }"
46
- style =" width :100% " ><br >
47
- </div >
48
-
49
- <div class =" row" >
50
- <div class =" col-md-3" >
51
- <label >{{ __ (' label.starting_value' ) } } </label >
52
- <input type =" number" step =" 0.01" name =" startValue" value =" {{ $canvasItem [' startValue' ] } }"
53
- style =" width :105px " >
54
- </div >
55
- <div class =" col-md-3" >
56
- <label >{{ __ (' label.current_value' ) } } </label >
57
- <input type =" number" step =" 0.01" name =" currentValue" id =" currentValueField"
58
- value =" {{ $canvasItem [' currentValue' ] } }"
59
- @if ($canvasItem [' setting' ] == ' linkAndReport' ) readonly data-tippy-content =" Current value calculated from child goals" @endif
60
- style =" width :105px " >
61
- </div >
62
- <div class =" col-md-3" >
63
- <label >{{ __ (' label.goal_value' ) } } </label >
64
- <input type =" number" step =" 0.01" name =" endValue" value =" {{ $canvasItem [' endValue' ] } }"
65
- style =" width :105px " >
25
+ <div class =" row" >
26
+ <div class =" col-md-8" >
27
+ <label >{{ __ (' label.what_is_your_goal' ) } } </label >
28
+ <input type =" text" name =" title" value =" {{ $canvasItem [' title' ] } }" style =" width :100% " ><br >
29
+
30
+ @if (! empty ($relatesLabels ) )
31
+ <label >{{ __ (' label.relates' ) } } </label >
32
+ <select name =" relates" style =" width : 50% " id =" relatesCanvas" >
33
+ </select ><br >
34
+ @else
35
+ <input type =" hidden" name =" relates"
36
+ value =" {{ $canvasItem [' relates' ] ?? array_key_first ($hiddenRelatesLabels ) } }" >
37
+ @endif
38
+ <br >
39
+ <h4 class =" widgettitle title-light" style =" margin-bottom :0px ;" ><i class =" fa-solid fa-ranking-star" ></i >
40
+ {{ __ (' Metrics' ) } } </h4 >
41
+
42
+ @dispatchEvent (' beforeMeasureGoalContainer' , $canvasItem )
43
+ <div id =" measureGoalContainer" >
44
+ <label >{{ __ (' text.what_metric_will_you_be_using' ) } } </label >
45
+ <input type =" text" name =" description" value =" {{ $canvasItem [' description' ] } }"
46
+ style =" width :100% " ><br >
66
47
</div >
67
- <div class =" col-md-3" >
68
- <label >{{ __ (' label.type' ) } } </label >
69
- <select name =" metricType" >
70
- <option value =" number" @if ($canvasItem [' metricType' ] == ' number' ) selected @endif >
71
- {{ __ (' label.number' ) } } </option >
72
- <option value =" percent" @if ($canvasItem [' metricType' ] == ' percent' ) selected @endif >
73
- {{ __ (' label.percent' ) } } </option >
74
- <option value =" currency" @if ($canvasItem [' metricType' ] == ' currency' ) selected @endif >
75
- {{ __ (' language.currency' ) } } </option >
76
- </select >
48
+
49
+ <div class =" row" >
50
+ <div class =" col-md-3" >
51
+ <label >{{ __ (' label.starting_value' ) } } </label >
52
+ <input type =" number" step =" 0.01" name =" startValue" value =" {{ $canvasItem [' startValue' ] } }"
53
+ style =" width :105px " >
54
+ </div >
55
+ <div class =" col-md-3" >
56
+ <label >{{ __ (' label.current_value' ) } } </label >
57
+ <input type =" number" step =" 0.01" name =" currentValue" id =" currentValueField"
58
+ value =" {{ $canvasItem [' currentValue' ] } }"
59
+ @if ($canvasItem [' setting' ] == ' linkAndReport' ) readonly data-tippy-content =" Current value calculated from child goals" @endif
60
+ style =" width :105px " >
61
+ </div >
62
+ <div class =" col-md-3" >
63
+ <label >{{ __ (' label.goal_value' ) } } </label >
64
+ <input type =" number" step =" 0.01" name =" endValue" value =" {{ $canvasItem [' endValue' ] } }"
65
+ style =" width :105px " >
66
+ </div >
67
+ <div class =" col-md-3" >
68
+ <label >{{ __ (' label.type' ) } } </label >
69
+ <select name =" metricType" >
70
+ <option value =" number" @if ($canvasItem [' metricType' ] == ' number' ) selected @endif >
71
+ {{ __ (' label.number' ) } } </option >
72
+ <option value =" percent" @if ($canvasItem [' metricType' ] == ' percent' ) selected @endif >
73
+ {{ __ (' label.percent' ) } } </option >
74
+ <option value =" currency" @if ($canvasItem [' metricType' ] == ' currency' ) selected @endif >
75
+ {{ __ (' language.currency' ) } } </option >
76
+ </select >
77
+ </div >
77
78
</div >
79
+
80
+ <br >
81
+ @if ($login :: userIsAtLeast ($roles :: $editor ) )
82
+ <input type =" submit" value =" {{ __ (' buttons.save' ) } }" id =" primaryCanvasSubmitButton" >
83
+ <button type =" submit" class =" btn btn-primary" id =" saveAndClose" value =" closeModal"
84
+ onclick =" leantime.goalCanvasController.setCloseModal();" >{{ __ (' buttons.save_and_close' ) } } </button >
85
+ @endif
86
+
87
+ @if ($id !== ' ' )
88
+ <br /><br /><br />
89
+ <input type =" hidden" name =" comment" value =" 1" />
90
+ <h4 class =" widgettitle title-light" ><span
91
+ class =" fa fa-comments" ></span >{{ __ (' subtitles.discussion' ) } } </h4 >
92
+ @php
93
+ $tpl -> assign (' formUrl' , ' /goalcanvas/editCanvasItem/' . $id . ' ' );
94
+ $tpl -> displaySubmodule (' comments-generalComment' );
95
+ @endphp
96
+ @endif
78
97
</div >
79
98
80
- <br >
81
- @if ($login :: userIsAtLeast ($roles :: $editor ) )
82
- <input type =" submit" value =" {{ __ (' buttons.save' ) } }" id =" primaryCanvasSubmitButton" >
83
- <button type =" submit" class =" btn btn-primary" id =" saveAndClose" value =" closeModal"
84
- onclick =" leantime.goalCanvasController.setCloseModal();" >{{ __ (' buttons.save_and_close' ) } } </button >
85
- @endif
86
-
87
- @if ($id !== ' ' )
88
- <br /><br /><br />
89
- <input type =" hidden" name =" comment" value =" 1" />
90
- <h4 class =" widgettitle title-light" ><span
91
- class =" fa fa-comments" ></span >{{ $tpl -> __ (' subtitles.discussion' ) } } </h4 >
92
- @php
93
- $tpl -> assign (' formUrl' , ' /goalcanvas/editCanvasItem/' . $id . ' ' );
94
- $tpl -> displaySubmodule (' comments-generalComment' );
95
- @endphp
96
- @endif
99
+ <div class =" col-md-4" >
100
+ @if (! empty ($statusLabels ) )
101
+ <label >{{ __ (" label.status" ) } } </label >
102
+ <select name =" status" style =" width : 50% " id =" statusCanvas" >
103
+ </select ><br /><br />
104
+ @else
105
+ <input type =" hidden" name =" status" value =" {{ $canvasItem [' status' ] ?? array_key_first ($hiddenStatusLabels ) } }" />
106
+ @endif
107
+
108
+ <h4 class =" widgettitle title-light" style =" margin-bottom :0px ;" ><i class =" fa-solid fa-calendar" ></i > {{ __ (' label.dates' ) } } </h4 >
109
+
110
+ <label >{{ __ (' label.start_date' ) } } </label >
111
+ <input type =" text" autocomplete =" off" value =" {{ format ($canvasItem [' startDate' ])-> date () } }" name =" startDate" class =" startDate" />
112
+
113
+ <label >{{ __ (' label.end_date' ) } } </label >
114
+ <input type =" text" autocomplete =" off" value =" {{ format ($canvasItem [' endDate' ])-> date () } }" name =" endDate" class =" endDate" />
115
+
116
+ @if ($id !== ' ' )
117
+ <br /><br />
118
+ <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 >
119
+
120
+ @if ($canvasItem [' milestoneId' ] == ' ' )
121
+ <center >
122
+ <h4 >{{ __ (" headlines.no_milestone_link" ) } } </h4 >
123
+ <div class =" row" id =" milestoneSelectors" >
124
+ @if ($login :: userIsAtLeast ($roles :: $editor ) )
125
+ <div class =" col-md-12" >
126
+ <a href =" javascript:void(0);" onclick =" leantime.goalCanvasController.toggleMilestoneSelectors('new');" >{{ __ (" links.create_link_milestone" ) } } </a >
127
+ @if (count ($tpl -> get (' milestones' )) > 0 )
128
+ | <a href =" javascript:void(0);" onclick =" leantime.goalCanvasController.toggleMilestoneSelectors('existing');" >{{ __ (" links.link_existing_milestone" ) } } </a >
129
+ @endif
130
+ </div >
131
+ @endif
132
+ </div >
133
+ <div class =" row" id =" newMilestone" style =" display :none ;" >
134
+ <div class =" col-md-12" >
135
+ <input type =" text" width =" 50%" name =" newMilestone" ></textarea ><br />
136
+ <input type =" hidden" name =" type" value =" milestone" />
137
+ <input type =" hidden" name =" goalcanvasitemid" value =" {{ $id } }" />
138
+ <input type =" button" value =" {{ __ (" buttons.save" ) } }" onclick =" jQuery('#primaryCanvasSubmitButton').click()" class =" btn btn-primary" />
139
+ <input type =" button" value =" {{ __ (" buttons.cancel" ) } }" onclick =" leantime.goalCanvasController.toggleMilestoneSelectors('hide')" class =" btn btn-primary" />
140
+ </div >
141
+ </div >
142
+
143
+ <div class =" row" id =" existingMilestone" style =" display :none ;" >
144
+ <div class =" col-md-12" >
145
+ <select data-placeholder =" {{ __ (" input.placeholders.filter_by_milestone" ) } }" name =" existingMilestone" class =" user-select" >
146
+ <option value =" " ></option >
147
+ @foreach ($tpl -> get (' milestones' ) as $milestoneRow )
148
+ <option value =" {{ $milestoneRow -> id } }" {{ isset ($searchCriteria [' milestone' ]) && ($searchCriteria [' milestone' ] == $milestoneRow -> id ) ? ' selected' : ' ' } } >
149
+ {{ $milestoneRow -> headline } }
150
+ </option >
151
+ @endforeach
152
+ </select >
153
+ <input type =" hidden" name =" type" value =" milestone" />
154
+ <input type =" hidden" name =" goalcanvasitemid" value =" {{ $id } }" />
155
+ <input type =" button" value =" {{ __ (" buttons.save" ) } }" onclick =" jQuery('#primaryCanvasSubmitButton').click()" class =" btn btn-primary" />
156
+ <input type =" button" value =" {{ __ (" buttons.cancel" ) } }" onclick =" leantime.goalCanvasController.toggleMilestoneSelectors('hide')" class =" btn btn-primary" />
157
+ </div >
158
+ </div >
159
+ </center >
160
+ @else
161
+ <div hx-trigger =" load"
162
+ hx-indicator =" .htmx-indicator"
163
+ hx-get =" {{ BASE_URL } } /hx/tickets/milestones/showCard?milestoneId={{ $canvasItem [' milestoneId' ] } }" >
164
+ <div class =" htmx-indicator" >
165
+ {{ __ (" label.loading_milestone" ) } }
166
+ </div >
167
+ </div >
168
+ <a href =" {{ BASE_URL } } /goalcanvas/editCanvasItem/{{ $id } } ?removeMilestone={{ $canvasItem [' milestoneId' ] } }" class =" goalCanvasModal delete formModal" ><i class =" fa fa-close" ></i > {{ __ (" links.remove" ) } } </a >
169
+ @endif
170
+ @endif
171
+ </div >
97
172
</div >
98
173
99
174
@if ($id != ' ' )
100
- <a href =" {{ BASE_URL . " goalcanvas/delCanvasItem/$id " } }" class =" formModal delete right" >
175
+ <a href =" {{ BASE_URL . " / goalcanvas/delCanvasItem/$id " } }" class =" formModal delete right" >
101
176
<i class =' fa fa-trash-can' ></i > {{ __ (' links.delete' ) } }
102
177
</a >
103
178
@endif
104
179
105
180
</form >
106
181
107
-
108
182
</div >
109
183
110
184
<script type =" text/javascript" >
@@ -164,4 +238,4 @@ class="fa fa-comments"></span>{{ $tpl->__('subtitles.discussion') }}</h4>
164
238
165
239
});
166
240
</script >
167
- @endsection
241
+ @endsection
0 commit comments