mirror of
https://github.com/cuigh/swirl
synced 2025-01-03 17:42:29 +00:00
66 lines
1.9 KiB
Go
66 lines
1.9 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/role/">{{ i18n("menu.role") }}</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">
|
|
{{ .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">{{ i18n("menu.detail") }}</a>
|
|
<a class="navbar-item is-tab" href="/system/role/{{.Role.ID}}/edit">{{ i18n("menu.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="fas fa-reply"></i></span>
|
|
<span>{{ i18n("button.return") }}</span>
|
|
</a>
|
|
</div>
|
|
</section>
|
|
{{ end }} |