| 1 | {{define "up"}}/templates{{end}} |
| 2 | {{define "content"}} |
| 3 | <div rst-stack><h1>{{copy .Title}}</h1> |
| 4 | {{$sp := .Library.Specialist}} |
| 5 | {{if $sp.Required}}<p>{{copy "specialists.required"}}</p>{{end}} |
| 6 | <form method="post" action="{{if $sp.Key}}/specialists/{{$sp.Key}}/edit{{else}}/specialists{{end}}" equipo-form rst-stack> |
| 7 | <input type="hidden" name="request_id" value="{{.Library.RequestID}}"> |
| 8 | <input type="hidden" name="revision" value="{{$sp.Revision}}"> |
| 9 | {{if $sp.Required}}<p>{{copy (printf "nav.%s" $sp.Key)}}</p><input type="hidden" name="name" value="{{$sp.Name}}">{{else}}<label>{{copy "specialists.name"}}<input rst-input name="name" value="{{$sp.Name}}" maxlength="120" required></label>{{end}} |
| 10 | <label>{{copy "specialists.icon"}}<select rst-input name="icon">{{range .Library.Icons}}<option value="{{.}}"{{if eq . $sp.Icon}} selected{{end}}>{{.}}</option>{{end}}</select></label> |
| 11 | <label>{{copy "specialists.instructions"}}<textarea rst-input name="instructions" rows="6" maxlength="16384">{{$sp.StandingInstructions}}</textarea></label> |
| 12 | <label>{{copy "specialist.concurrent"}}<input rst-input name="max_concurrent" type="number" min="1" max="100" value="{{$sp.MaxConcurrent}}" required></label> |
| 13 | <fieldset><legend>{{copy "specialists.models"}}</legend> |
| 14 | {{range $i,$model := .Library.Models}} |
| 15 | <label>{{copy "specialist.provider"}}<input rst-input name="model.{{$i}}.provider" value="{{$model.Provider}}"></label> |
| 16 | <label>{{copy "specialist.family"}}<input rst-input name="model.{{$i}}.family" value="{{$model.Family}}"></label> |
| 17 | <label>{{copy "specialist.model"}}<input rst-input name="model.{{$i}}.name" value="{{$model.Model}}"></label> |
| 18 | {{end}}</fieldset> |
| 19 | <fieldset><legend>{{copy "specialists.projects"}}</legend> |
| 20 | {{range .Library.Projects}}<label><input type="checkbox" name="project" value="{{.ID}}"{{if .Selected}} checked{{end}}>{{.Name}}</label>{{end}} |
| 21 | </fieldset> |
| 22 | <h2>{{copy "specialists.tools"}}</h2><p>{{copy "specialists.unavailable"}}</p> |
| 23 | <button rst-btn="primary" type="submit">{{copy "form.save"}}</button> |
| 24 | </form> |
| 25 | {{if $sp.Key}}{{if not $sp.Required}}{{if not $sp.Archived}} |
| 26 | <form method="post" action="/specialists/{{$sp.Key}}/archive"><input type="hidden" name="request_id" value="{{.Library.RequestID}}-archive"><input type="hidden" name="revision" value="{{$sp.Revision}}"><button rst-btn type="submit">{{copy "specialists.archive"}}</button></form> |
| 27 | {{end}}{{end}}{{end}}</div> |
| 28 | {{end}} |
| 29 | |