handout.html
| 1 | {{define "title"}}{{.H.Title}}{{end}} |
| 2 | {{define "content"}} |
| 3 | {{$h := .H}} |
| 4 | {{if .PatientID}}<nav aria-label="breadcrumb"><ul><li><a href="/patienten">Patienten</a></li><li><a href="/patient/{{.PatientID}}">{{.PatientName}}</a></li><li>{{$h.Title}}</li></ul></nav>{{end}} |
| 5 | <article> |
| 6 | <form method="post" action="/handout/{{$h.ID}}"> |
| 7 | <div class="grid"> |
| 8 | <label>Titel <input name="title" value="{{$h.Title}}" required></label> |
| 9 | <label>Für <input name="recipient" value="{{$h.Recipient}}" placeholder="Name (optional)"></label> |
| 10 | </div> |
| 11 | <label>Hinweise oben im Handout |
| 12 | <textarea name="notes" rows="3" placeholder="z. B. Übungen 1× täglich, Schmerz bis 3/10 ist in Ordnung">{{$h.Notes}}</textarea> |
| 13 | </label> |
| 14 | <div class="actions"> |
| 15 | <button type="submit" class="secondary">Speichern</button> |
| 16 | <a role="button" href="/handout/{{$h.ID}}/druck" target="_blank">Druckansicht / PDF</a> |
| 17 | </div> |
| 18 | </form> |
| 19 | </article> |
| 20 | |
| 21 | <h3>Übungen</h3> |
| 22 | {{range $i, $it := .Items}} |
| 23 | <article class="item" id="u{{$it.Entry.ID}}"> |
| 24 | <div class="item-head"> |
| 25 | <strong>{{add1 $i}}. <a href="/eintrag/{{$it.Entry.ID}}">{{$it.Entry.Title}}</a></strong> |
| 26 | <span class="item-actions"> |
| 27 | {{if $i}}<form method="post" action="/handout/{{$h.ID}}/uebung/{{$it.Entry.ID}}/hoch" class="inline"><button type="submit" class="link" title="Nach oben">▲</button></form>{{end}} |
| 28 | <form method="post" action="/handout/{{$h.ID}}/uebung/{{$it.Entry.ID}}/loeschen" class="inline"><button type="submit" class="link" title="Entfernen">✕</button></form> |
| 29 | </span> |
| 30 | </div> |
| 31 | <form method="post" action="/handout/{{$h.ID}}/uebung/{{$it.Entry.ID}}" class="row"> |
| 32 | <input name="dosage" value="{{$it.Dosage}}" placeholder="Dosierung" aria-label="Dosierung"> |
| 33 | <input name="note" value="{{$it.Note}}" placeholder="Persönlicher Hinweis (optional)" aria-label="Hinweis"> |
| 34 | <button type="submit" class="secondary outline">Übernehmen</button> |
| 35 | </form> |
| 36 | </article> |
| 37 | {{else}} |
| 38 | <p class="muted">Noch keine Übungen.</p> |
| 39 | {{end}} |
| 40 | |
| 41 | {{if .Exercises}} |
| 42 | <form method="post" action="/handout/{{$h.ID}}/uebung" class="row"> |
| 43 | <select name="entry" aria-label="Übung" required> |
| 44 | <option value="">Übung hinzufügen …</option> |
| 45 | {{range .Exercises}}<option value="{{.ID}}">{{with .Region}}{{.}}: {{end}}{{.Title}}</option>{{end}} |
| 46 | </select> |
| 47 | <button type="submit">Hinzufügen</button> |
| 48 | </form> |
| 49 | {{else}} |
| 50 | <p class="muted">Alle Übungen sind bereits drin – <a href="/eintrag/neu?art=uebung">neue Übung anlegen</a>.</p> |
| 51 | {{end}} |
| 52 | |
| 53 | <div class="actions spaced"> |
| 54 | <form method="post" action="/handout/{{$h.ID}}/kopieren" class="inline"><button type="submit" class="secondary outline">Als Vorlage kopieren</button></form> |
| 55 | <details class="danger"> |
| 56 | <summary>Handout löschen …</summary> |
| 57 | <form method="post" action="/handout/{{$h.ID}}/loeschen"><button type="submit" class="danger">Endgültig löschen</button></form> |
| 58 | </details> |
| 59 | </div> |
| 60 | {{end}} |
| 61 |