1
0
mirror of https://github.com/raseels-repos/golang-saas-starter-kit.git synced 2025-06-06 23:46:29 +02:00

122 lines
5.4 KiB
Plaintext
Raw Permalink Normal View History

2019-08-05 03:25:24 -08:00
{{define "title"}}User - {{ .user.Name }}{{end}}
2019-08-04 23:27:02 -08:00
{{define "style"}}
{{end}}
{{define "content"}}
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/users">Users</a></li>
<li class="breadcrumb-item"><a href="{{ .urlUsersView }}">{{ if eq .userAccount.Status.Value "invited" }}{{ .user.Email }}{{else}}{{ .user.Name }}{{end}}</a></li>
<li class="breadcrumb-item active" aria-current="page">View</li>
</ol>
</nav>
<div class="d-sm-flex align-items-center justify-content-between mb-4">
<h1 class="h3 mb-0 text-gray-800">
{{ if eq .userAccount.Status.Value "invited" }}{{ .user.Email }}{{else}}{{ .user.Name }}{{end}}
</h1>
{{ if HasRole $._Ctx "admin" }}
<!-- a href="/user/update" class="d-none d-sm-inline-block btn btn-sm btn-primary shadow-sm"><i class="far fa-edit fa-sm text-white-50 mr-1"></i>Edit Details</a -->
{{ end }}
</div>
<div class="card shadow">
<div class="card-header py-3 d-flex flex-row align-items-center justify-content-between">
<h6 class="m-0 font-weight-bold text-dark">User Details</h6>
<div class="dropdown no-arrow show">
<a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<i class="fas fa-ellipsis-v fa-sm fa-fw text-gray-400"></i>
</a>
{{ if HasRole $._Ctx "admin" }}
<div class="dropdown-menu dropdown-menu-right shadow animated--fade-in" aria-labelledby="dropdownMenuLink" x-placement="bottom-end" style="position: absolute; transform: translate3d(-156px, 19px, 0px); top: 0px; left: 0px; will-change: transform;">
<div class="dropdown-header">Actions</div>
<a href="{{ .urlUsersUpdate }}" class="dropdown-item">Update Details</a>
{{ $ctxUser := ContextUser $._Ctx }}
{{ if $ctxUser }}
{{ if ne .user.ID $ctxUser.ID }}
<a href="{{ .urlUserVirtualLogin }}" class="dropdown-item">Virtual Login</a>
<form method="post"><input type="hidden" name="action" value="archive" /><input type="submit" value="Archive User" class="dropdown-item"></form>
{{ end }}
2019-08-05 03:25:24 -08:00
{{ end }}
</div>
2019-08-05 01:13:03 -08:00
{{ end }}
</div>
2019-08-04 23:27:02 -08:00
</div>
<div class="card-body">
2019-08-04 23:27:02 -08:00
<div class="row mt-2">
<div class="col-lg-2 mb-2">
2019-08-04 23:27:02 -08:00
<img src="{{ .user.Gravatar.Medium }}" alt="gravatar image" class="rounded">
</div>
<div class="col-md-5">
<p>
<small>Name</small><br/>
{{if .user.FirstName }}
<b>{{ .user.Name }}</b>
{{else}}
<em>Not Set</em>
{{end}}
</p>
<p>
<small>Email</small><br/>
<b>{{ .user.Email }}</b>
</p>
{{if .user.Timezone }}
<p>
<small>Timezone</small><br/>
<b>{{.user.Timezone }}</b>
</p>
{{end}}
</div>
<div class="col-md-5">
<p>
<small>Roles</small><br/>
{{ if .userAccount }}
<b>
{{ range $r := .userAccount.Roles.Options }}{{ if $r.Selected }}
2019-08-05 17:12:28 -08:00
{{ if eq $r.Value "admin" }}
<span class="text-pink"><i class="far fa-kiss-wink-heart mr-1"></i>{{ $r.Title }}</span>
{{else}}
2019-08-05 17:12:28 -08:00
<span class="text-purple"><i class="far fa-user-circle mr-1"></i>{{ $r.Title }}</span>
{{end}}
2019-08-05 17:12:28 -08:00
{{ end }}{{ end }}
</b>
2019-08-04 23:27:02 -08:00
{{ end }}
</p>
<p>
<small>Status</small><br/>
{{ if .userAccount }}
<b>
{{ if eq .userAccount.Status.Value "active" }}
<span class="text-green"><i class="fas fa-circle mr-1"></i>{{ .userAccount.Status.Title }}</span>
{{ else if eq .userAccount.Status.Value "invited" }}
<span class="text-aqua"><i class="far fa-dot-circle mr-1"></i>{{ .userAccount.Status.Title }}</span>
{{else}}
<span class="text-orange"><i class="fas fa-circle-notch mr-1"></i>{{.userAccount.Status.Title }}</span>
{{end}}
</b>
{{ end }}
</p>
<p>
<small>ID</small><br/>
<b>{{ .user.ID }}</b>
2019-08-04 23:27:02 -08:00
</p>
</div>
</div>
</div>
</div>
{{end}}
{{define "js"}}
{{end}}