Initial commit
CI / test (push) Canceled after 0s

This commit is contained in:
2026-09-12 22:22:17 +02:00
commit 904d14b64c
314 changed files with 31884 additions and 0 deletions
@@ -0,0 +1,37 @@
{{define "role_editor"}}
<section class='panel role-editor' id='{{.ID}}' data-role-editor>
<h3>{{.Title}}</h3>
<p>{{.Description}}</p>
<label for='{{.ID}}-select'>Rolle</label>
<select id='{{.ID}}-select' data-role-select>
{{range $index, $role := .Roles}}<option value='role-{{$index}}'>{{$role.Label}}</option>{{end}}
<option value='new'>Neu</option>
</select>
{{range $index, $role := .Roles}}
<div data-role-pane='role-{{$index}}' {{if neInt $index 0}}hidden{{end}}>
{{if $role.Editable}}
<form method='POST' action='{{gardenAwarePath $.UpdateAction $.Garden}}' class='role-editor-form'>
<input type='hidden' name='csrf_token' value='{{$.CSRFToken}}'>
<input type='hidden' name='name' value='{{$role.Name}}'>
<input type='hidden' name='scope' value='{{$.Scope}}'>
{{if $role.EditLabel}}<label>Bezeichnung<input name='label' value='{{$role.Label}}' required></label>{{else}}<h4>{{$role.Label}}</h4>{{end}}
<fieldset><legend>Rechte</legend>{{range $.Permissions}}<label class='checkbox'><input type='checkbox' name='permissions' value='{{.Name}}' {{if containsString $role.Permissions .Name}}checked{{end}}> {{.Label}} <span class='muted'>{{.Name}}</span></label>{{end}}</fieldset>
<div class='actions'><button>Speichern</button>{{if $role.Deletable}}<button class='danger' formaction='{{gardenAwarePath $.DeleteAction $.Garden}}'>Rolle löschen</button>{{end}}</div>
</form>
{{else}}<p class='status'>{{$role.Label}} besitzt unveränderliche Eigentümerrechte.</p>{{end}}
</div>
{{end}}
<div data-role-pane='new' {{if .Roles}}hidden{{end}}>
<form method='POST' action='{{gardenAwarePath .CreateAction .Garden}}' class='role-editor-form'>
<input type='hidden' name='csrf_token' value='{{.CSRFToken}}'>
<input type='hidden' name='scope' value='{{.Scope}}'>
<label>Interner Name<input name='name' placeholder='helfer' required></label>
<label>Bezeichnung<input name='label' required></label>
<fieldset><legend>Rechte</legend>{{range .Permissions}}<label class='checkbox'><input type='checkbox' name='permissions' value='{{.Name}}'> {{.Label}} <span class='muted'>{{.Name}}</span></label>{{end}}</fieldset>
<button>Rolle anlegen</button>
</form>
</div>
</section>
{{end}}