| 1 | {{define "up"}}{{template "settings-up" .}}{{end}} |
| 2 | {{define "up-label"}}{{template "settings-up-label" .}}{{end}} |
| 3 | {{define "title"}}{{if eq .Settings.Section "autonomy"}}{{copy "autonomy.title"}}{{else if eq .Settings.Section "copy"}}{{copy "copy.title"}}{{else}}{{if eq .Settings.Section "housekeeping"}}{{copy "settings.housekeeping"}}{{else if .Settings.Root}}{{copy "nav.settings"}}{{else}}{{copy "thinking.title"}}{{end}}{{end}}{{end}} |
| 4 | {{define "content"}} |
| 5 | <div equipo-settings-layout data-section="{{.Settings.Section}}"{{if .Settings.Root}} data-root{{end}} data-settings-live> |
| 6 | <template equipo-saved-template><span equipo-saved-tick role="status">{{icon "check"}}<span>{{copy "settings.saved"}}</span></span></template> |
| 7 | {{template "settings-nav" .}} |
| 8 | <section equipo-settings-body equipo-settings-section id="{{.Settings.Section}}"> |
| 9 | {{if eq .Settings.Section "thinking"}}{{template "settings-head" (dict "Title" "thinking.title" "Lede" "thinking.lede")}} |
| 10 | {{template "thinking-form" (dict "Thinking" .Settings.Thinking "From" "settings")}} |
| 11 | {{else if eq .Settings.Section "autonomy"}}{{template "autonomy-settings" .}} |
| 12 | {{else if eq .Settings.Section "copy"}}{{template "settings-head" (dict "Title" "copy.title" "Lede" "copy.lede")}} |
| 13 | {{range .Settings.CopyProjects}}<section equipo-sp-group><div equipo-sp-group-head><h2>{{.Title}}</h2></div> |
| 14 | <form method="post" action="/settings/copy"> |
| 15 | <input type="hidden" name="project" value="{{.ID}}"><input type="hidden" name="revision" value="{{.CopyRevision}}"> |
| 16 | <div equipo-sp-card><div equipo-sp-row><div equipo-sp-label><label equipo-sp-title for="copy-on-{{.ID}}">{{copy "copy.delegate"}}</label><p equipo-sp-desc>{{copy "copy.help"}}</p></div><span equipo-sp-control><label rst-switch><input id="copy-on-{{.ID}}" type="checkbox" name="copy_enabled"{{if .CopyOwner}} checked{{end}}><span rst-switch-track aria-hidden="true"></span></label></span></div></div> |
| 17 | <div equipo-copy-actions><button rst-btn="primary" type="submit" data-copy-save>{{copy "copy.save"}}</button></div> |
| 18 | </form> |
| 19 | <details><summary>{{copy "copy.import"}}</summary><form equipo-copy-form method="post" action="/settings/copy/import"> |
| 20 | <input type="hidden" name="project" value="{{.ID}}"><label for="copy-result-{{.ID}}">{{copy "copy.result"}}</label><textarea rst-input id="copy-result-{{.ID}}" name="result" maxlength="32768" required></textarea><button rst-btn type="submit">{{copy "copy.import_save"}}</button> |
| 21 | </form></details></section>{{end}} |
| 22 | <details equipo-sp-group><summary>{{copy "copy.recovery"}}</summary> |
| 23 | <form equipo-copy-form method="post" action="/settings/copy/recover"> |
| 24 | <label for="copy-task">{{copy "copy.task_id"}}</label><input rst-input id="copy-task" name="task" required> |
| 25 | <label for="copy-candidate">{{copy "copy.candidate"}}</label><input rst-input id="copy-candidate" name="candidate" pattern="[a-f0-9]{40}" required> |
| 26 | <label for="copy-tooling">{{copy "copy.tooling"}}</label><input rst-input id="copy-tooling" name="tooling" pattern="[a-f0-9]{40}" required> |
| 27 | <label for="copy-references">{{copy "copy.references"}}</label><textarea rst-input id="copy-references" name="references" maxlength="4000"></textarea> |
| 28 | <button rst-btn type="submit">{{copy "copy.recover"}}</button></form></details> |
| 29 | {{else if eq .Settings.Section "places"}}{{template "settings-head" (dict "Title" "places.title" "Lede" "settings.places_about")}} |
| 30 | {{with .Settings.Places}}<ul equipo-places>{{range .}}<li equipo-place><p equipo-place-line>{{.Line}}</p>{{with .State}}<p equipo-place-state>{{.}}</p>{{end}}{{with .Deploy}}<p equipo-place-deploy>{{.}}</p>{{end}}{{range .Lost}}<p equipo-place-lost>{{.}}</p>{{end}}</li>{{end}}</ul>{{else}}<p equipo-places-empty>{{copy "places.empty"}}</p>{{end}} |
| 31 | {{else if eq .Settings.Section "housekeeping"}}{{template "settings-head" (dict "Title" "settings.housekeeping" "Lede" "housekeeping.settings.lede")}} |
| 32 | {{with .HousekeepingSettings}}{{template "housekeeping-settings" .}}{{end}} |
| 33 | {{end}} |
| 34 | </section> |
| 35 | </div> |
| 36 | {{end}} |
| 37 | |