47 lines
1.9 KiB
Text
47 lines
1.9 KiB
Text
|
{{ define "content" }}
|
||
|
<main role="main" class="container">
|
||
|
<h1>{{ .Title }}</h1>
|
||
|
<p class="text-left">{{ .Description }}</p>
|
||
|
{{ range .Flashes}}
|
||
|
<div class="alert alert-{{ .Type }}" role="alert">
|
||
|
{{ .Message }}
|
||
|
</div>
|
||
|
{{ end }}
|
||
|
{{ $buttonTitleRevoke := .ButtonTitleRevoke }}
|
||
|
{{ $unknownLabel := .LabelUnknown }}
|
||
|
{{ $neverLabel := .LabelNever }}
|
||
|
{{ if .ConsentSessions }}
|
||
|
<table class="table table-striped">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th>{{ .ApplicationTitle }}</th>
|
||
|
<th>{{ .SubjectTitle }}</th>
|
||
|
<th>{{ .GrantedTitle }}</th>
|
||
|
<th>{{ .ExpiresTitle }}</th>
|
||
|
<th>{{ .ActionsTitle }}</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
{{ range .ConsentSessions }}
|
||
|
<tr>
|
||
|
<td>{{ .GetClientName }}</td>
|
||
|
<td>{{ .Subject }}</td>
|
||
|
<td>{{ if .GrantedAt }}<span
|
||
|
title="{{ .GrantedAt }}">{{ .GrantedAt | humantime }}</span>{{ else }}{{ $unknownLabel }}{{ end }}
|
||
|
</td>
|
||
|
<td>{{ if .Expires }}<span
|
||
|
title="{{ .Expires }}">{{ .Expires | humantime }}</span>{{ else }}{{ $neverLabel }}{{ end }}
|
||
|
</td>
|
||
|
<td><a href="/revoke-consent/{{ .GetID }}?subject={{ .Subject }}" class="btn btn-danger"
|
||
|
role="button">{{ $buttonTitleRevoke }}</a></td>
|
||
|
</tr>
|
||
|
{{ end }}
|
||
|
</tbody>
|
||
|
</table>
|
||
|
{{ else}}
|
||
|
<div class="alert alert-info">
|
||
|
{{ .NoConsentGiven }}
|
||
|
</div>
|
||
|
{{ end}}
|
||
|
</main>
|
||
|
{{ end }}
|