mirror of
https://github.com/cuigh/swirl
synced 2025-01-06 19:11:29 +00:00
97 lines
2.6 KiB
Go
97 lines
2.6 KiB
Go
{{ extends "../../_layouts/default" }}
|
|
|
|
{{ block body() }}
|
|
<section class="hero is-dark">
|
|
<div class="hero-body">
|
|
<div class="container has-text-centered">
|
|
<h1 class="title is-2">ROLE</h1>
|
|
<h2 class="subtitle is-5">
|
|
A role is a user group with same rights. User can belong to multiple roles.
|
|
</h2>
|
|
</div>
|
|
</div>
|
|
<div class="hero-foot">
|
|
<div class="container">
|
|
<nav class="tabs is-boxed">
|
|
<ul>
|
|
<li class="is-active">
|
|
<a href="/system/role/">Roles</a>
|
|
</li>
|
|
<li>
|
|
<a href="/system/user/">Users</a>
|
|
</li>
|
|
<li>
|
|
<a href="/system/setting/">Settings</a>
|
|
</li>
|
|
<li>
|
|
<a href="/system/event/">Events</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<div class="container">
|
|
<nav class="breadcrumb has-succeeds-separator is-small is-marginless" aria-label="breadcrumbs">
|
|
<ul>
|
|
<li><a href="/">Dashboard</a></li>
|
|
<li><a href="/system/role/">Roles</a></li>
|
|
<li class="is-active"><a>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">
|
|
{{ .Role.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/role/{{.Role.ID}}/detail">Detail</a>
|
|
<a class="navbar-item is-tab" href="/system/role/{{.Role.ID}}/edit">Edit</a>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<section class="section">
|
|
<div class="container">
|
|
<dl>
|
|
<dt class="has-text-left">Description</dt>
|
|
<dd>{{ .Role.Description }}</dd>
|
|
<dt class="has-text-left">Permissions</dt>
|
|
<dd>
|
|
<table class="table is-bordered is-fullwidth">
|
|
<tbody>
|
|
{{ cps := .CheckedPerms }}
|
|
{{range .Perms}}
|
|
<tr>
|
|
<th width="150" class="is-vertical-middle has-bg-white-ter">
|
|
{{ .Name }}
|
|
</th>
|
|
<td>
|
|
<div class="tags">
|
|
{{range .Perms}}
|
|
<span class="tag is-{{isset(cps[.Key]) ? "success" : "grey"}}">{{ .Text }}</span>
|
|
{{end}}
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<a href="/system/role/" class="button is-primary">
|
|
<span class="icon"><i class="fa fa-reply"></i></span>
|
|
<span>Return</span>
|
|
</a>
|
|
</div>
|
|
</section>
|
|
{{ end }} |