Fix role and templates for participants
This commit is contained in:
parent
95249fe665
commit
a3be8fe8db
2 changed files with 15 additions and 8 deletions
|
@ -26,7 +26,8 @@ var (
|
|||
},
|
||||
|
||||
"participant": map[string][]int{
|
||||
"Response": []int{PermissionUpdate},
|
||||
"Participant": []int{PermissionRead},
|
||||
"Response": []int{PermissionUpdate},
|
||||
},
|
||||
|
||||
"subscriber": map[string][]int{
|
||||
|
|
|
@ -1,20 +1,23 @@
|
|||
{{ define "content" }}
|
||||
|
||||
{{$isAdmin := .Claims|isAdmin}}
|
||||
{{$isAdmin := .Claims|isAdmin}}
|
||||
{{$isSchool := .Claims|isSchool}}
|
||||
{{$isParticipant := .Claims|isParticipant}}
|
||||
|
||||
<div class="container">
|
||||
|
||||
|
||||
{{if not $isParticipant}}
|
||||
{{template "breadcrumb" toSlice "Partecipanti" (all "Participant") (.Data|string) "current"}}
|
||||
{{template "show_header" dict "title" (.Data|string) "updatePath" (.Data.ID|update "Participant") "deletePath" (.Data.ID|delete "Participant")}}
|
||||
|
||||
{{end}}
|
||||
|
||||
<h2 class="karmen-relation-header">Informazioni generali</h2>
|
||||
<dl class="row">
|
||||
<dt class="col-sm-3">Username</dt>
|
||||
<dd class="col-sm-9">{{.Data.User.Username}}</dd>
|
||||
<dd class="col-sm-9"><code>{{.Data.User.Username}}</code></dd>
|
||||
<dt class="col-sm-3">Password</dt>
|
||||
<dd class="col-sm-9">{{.Data.User.Password}}</dd>
|
||||
<dd class="col-sm-9"><code>{{.Data.User.Password}}</code></dd>
|
||||
<dt class="col-sm-3">Categoria</dt>
|
||||
<dd class="col-sm-9">{{.Data.Category}}</dd>
|
||||
|
||||
|
@ -35,6 +38,7 @@
|
|||
|
||||
</dl>
|
||||
|
||||
{{if or $isAdmin $isSchool}}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
|
@ -49,7 +53,8 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{end}}
|
||||
|
||||
{{if $isAdmin}}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
@ -80,7 +85,9 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{end}}
|
||||
|
||||
{{if or $isAdmin $isParticipant}}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
|
@ -95,7 +102,6 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{end}}
|
||||
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue