cadoles-arcad/template/layouts/admin_user_info.html.tmpl

101 lines
4.0 KiB
Cheetah

{{define "title"}}Informations de l'utilisateur - Administration - Arcad{{end}}
{{define "body"}}
{{template "header" .}}
<section class="home is-fullheight section">
<div class="container">
<div class="columns">
<div class="column is-2">
{{template "admin_menu" ""}}
</div>
<div class="column is-10">
{{template "flash" .}}
<div class="level">
<div class="level-left">
<a class="button level-item" href="/admin/users">← Retour</a>
</div>
<div class="level-right">
<a class="button level-item is-danger" href="/admin/users/{{ .User.ID }}/delete">Supprimer</a>
</div>
</div>
<form class="has-margin-top-small" action="/admin/users/{{ .User.ID }}" method="post">
<div class="columns">
<div class="column is-6">
<h5 class="is-size-5">Informations de l'utilisateur</h5>
<div class="field">
<label class="label">Pseudonyme</label>
<div class="control">
<input class="input" type="text"
name="nickname"
value="{{if .Form}}{{ .Form.Get "nickname" }}{{else}}{{ .User.Nickname }}{{end}}">
</div>
</div>
{{ .csrfField }}
<div class="buttons" style="justify-content:flex-end">
<button type="submit" class="button is-primary is-normal">Modifier</button>
</div>
<div class="field">
<label class="label">Date de création</label>
<div class="control">
<p class="input" readonly>
{{ localeTimeFormat .User.CreationTime "02/01/2006 15:04" "fr_FR" }}
</p>
</div>
</div>
<div class="field">
<label class="label">Date de dernière connexion</label>
<div class="control">
<p class="input" readonly>
{{ localeTimeFormat .User.LastSeenTime "02/01/2006 15:04" "fr_FR" }}
</p>
</div>
</div>
{{with .User.LastUserAgent}}
<div class="field">
<label class="label">Dernier système d'exploitation utilisé</label>
<div class="control">
<p class="input" readonly>
{{ .OS.Name.StringTrimPrefix }} {{ .OS.Version.Major }}.{{ .OS.Version.Minor }}.{{ .OS.Version.Patch }}
</p>
</div>
</div>
<div class="field">
<label class="label">Dernier navigateur utilisé</label>
<div class="control">
<p class="input" readonly>
{{ .Browser.Name.StringTrimPrefix }} {{ .Browser.Version.Major }}.{{ .Browser.Version.Minor }}.{{ .Browser.Version.Patch }}
</p>
</div>
</div>
<div class="field">
<label class="label">Dernier type de terminal utilisé</label>
<div class="control">
<p class="input" readonly>
{{ .DeviceType.StringTrimPrefix }}
</p>
</div>
</div>
{{end}}
</div>
<div class="column is-6">
<h5 class="is-size-5">Carte de membre</h5>
<div class="box has-margin-top-small">
<figure class="image is-3by2">
<a href="/admin/users/{{ .User.ID }}/card" rel="Member card" download="ArcadBox-Member-{{ .User.Nickname }}">
<img src="/admin/users/{{ .User.ID }}/card" />
</a>
</figure>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</section>
{{end}}
{{define "body_script"}}
<script defer src="/admin.js"></script>
{{end}}
{{template "base" .}}