/tasks edits a task in place (V-509)
The open list carries the text, the date and the importance as an inline form
with a save button. The status is not in it: that ladder is one-way and has
its own two buttons.
The step-up gate was re-argued rather than inherited, which is what the task
asked for, and edit stays ungated. It rewrites a line on a list he reads
himself, the same blast radius drop already has here, and the store refuses
the two edits that would cost something. A collision is named ("another open
task already says this"), not merged.
A weight outside the three rungs keeps its own option in the select, or
saving an unrelated edit would silently reset it to normal.
This commit is contained in:
+18
-3
@@ -60,12 +60,27 @@
|
||||
<h2 class=card-title>open <span class=badge>{{len .Open}}</span></h2>
|
||||
<div class=hint>most pressing first — by the deadlines and the urgency you gave. nothing about a task is guessed; the only signal that is not yours is age, which lifts anything sitting here for weeks.</div>
|
||||
{{if .Open}}<div class=scroll><table>
|
||||
<tr><th>task</th><th>why</th><th>from</th><th>due</th><th>captured</th><th></th><th></th></tr>
|
||||
<tr><th>task</th><th>why</th><th>from</th><th>captured</th><th></th><th></th></tr>
|
||||
{{range .Open}}<tr>
|
||||
<td class=text-max>{{.Text}}</td>
|
||||
<!-- The text, the date and the importance are editable in place (V-509): a
|
||||
dictated task can carry a typo, and a deadline moves. The status is not
|
||||
here — that ladder is one-way and has its own two buttons. -->
|
||||
<td class=text-max><form method=post action=/tasks class=inline-form>
|
||||
<input type=hidden name=id value="{{.ID}}">
|
||||
<input type=hidden name=action value=edit>
|
||||
<input type=text name=text value="{{.Text}}" size=30 required>
|
||||
<input type=date name=due value="{{.DueValue}}" title="due date">
|
||||
<select name=weight title=importance>
|
||||
<!-- Any weight that is not one of the three rungs keeps its own option, or
|
||||
saving an unrelated edit would silently reset it to normal. -->
|
||||
{{if and (ne .Weight 0) (ne .Weight 2) (ne .Weight 3)}}<option value={{.Weight}} selected>{{.Weight}}</option>{{end}}
|
||||
<option value=0 {{if eq .Weight 0}}selected{{end}}>normal</option>
|
||||
<option value=2 {{if eq .Weight 2}}selected{{end}}>важно</option>
|
||||
<option value=3 {{if eq .Weight 3}}selected{{end}}>срочно</option>
|
||||
</select>
|
||||
<button class="btn btn-muted">save</button></form></td>
|
||||
<td class=hint>{{.Why}}</td>
|
||||
<td class=hint>{{.Source}}</td>
|
||||
<td>{{.Due}}</td>
|
||||
<td class=muted>{{.Created}}</td>
|
||||
<td><form method=post action=/tasks class=inline-form>
|
||||
<input type=hidden name=id value="{{.ID}}">
|
||||
|
||||
Reference in New Issue
Block a user