swirl/views/system/user/detail.jet
2018-04-16 20:47:20 +08:00

70 lines
2.3 KiB
Go

{{ extends "_base" }}
{{ block body_content() }}
<div class="container">
<nav class="breadcrumb has-succeeds-separator is-small is-marginless" aria-label="breadcrumbs">
<ul>
<li><a href="/">{{ i18n("menu.home") }}</a></li>
<li><a href="/system/user/">{{ i18n("menu.user") }}</a></li>
<li class="is-active"><a>{{ i18n("menu.detail") }}</a></li>
</ul>
</nav>
</div>
<section class="hero is-small is-light">
<div class="hero-body">
<div class="container">
<h2 class="title is-2">
{{ .User.Name }}
</h2>
</div>
</div>
</section>
<nav class="navbar has-shadow">
<div class="container">
<div class="navbar-brand">
<a class="navbar-item is-tab is-active" href="/system/user/{{.User.LoginName}}/detail">{{ i18n("menu.detail") }}</a>
<a class="navbar-item is-tab" href="/system/user/{{.User.LoginName}}/edit">{{ i18n("menu.edit") }}</a>
</div>
</div>
</nav>
<section class="section">
<div class="container">
<dl class="is-horizontal">
<dt class="has-text-left">{{ i18n("field.login-name") }}</dt>
<dd>{{ .User.LoginName }}</dd>
<dt class="has-text-left">{{ i18n("field.email") }}</dt>
<dd>{{ .User.Email }}</dd>
<dt class="has-text-left">Administrator</dt>
<dd>{{ .User.Admin ? "Yes" : "No" }}</dd>
<dt class="has-text-left">{{ i18n("field.type") }}</dt>
<dd class="is-capitalized">{{ .User.Type }}</dd>
<dt class="has-text-left">{{ i18n("field.status") }}</dt>
<dd>{{ .User.Status == 1 ? "Active" : "Blocked" }}</dd>
<dt class="has-text-left">{{ i18n("field.created-at") }}</dt>
<dd>{{ time(.User.CreatedAt) }}</dd>
<dt class="has-text-left">{{ i18n("field.updated-at") }}</dt>
<dd>{{ time(.User.UpdatedAt) }}</dd>
{{if .Roles}}
<dt class="has-text-left">{{ i18n("field.role") }}</dt>
<dd>
<div class="tags">
{{ roles := .Roles }}
{{ range .User.Roles }}
{{if name, ok := roles[.]; ok}}
<span class="tag is-success">{{ name }}</span>
{{end}}
{{ end }}
</div>
</dd>
{{end}}
</dl>
<a href="/system/user/" class="button is-primary">
<span class="icon"><i class="fas fa-reply"></i></span>
<span>{{ i18n("button.return") }}</span>
</a>
</div>
</section>
{{ end }}