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{
|
||||
|
|
|
@ -2,19 +2,22 @@
|
|||
|
||||
{{$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,6 +53,7 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{if $isAdmin}}
|
||||
<div class="row">
|
||||
|
@ -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