expressCart/views/users.hbs

30 lines
1.1 KiB
Handlebars
Raw Normal View History

2018-02-12 05:47:26 +10:00
{{> partials/menu}}
2020-02-01 16:59:30 +10:00
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4">
<div class="col-sm-12">
<h2>{{ @root.__ "Users" }} <span class="float-right"><a href="/admin/user/new" class="btn btn-outline-success">{{ @root.__ "New user" }}</a></span></h2>
</div>
<div class="col-md-12">
<ul class="list-group">
{{#each users}}
<li class="list-group-item">
<strong>{{ @root.__ "User" }}:</strong> {{this.usersName}} - ({{this.userEmail}})
<span class="float-right">
<strong>{{ @root.__ "Role" }}: </strong>
{{#isAnAdmin this.isAdmin}}
<span>Admin</span>
{{#if ../this.isOwner}}
(Owner)
{{/if}}
{{else}}
<span>{{ @root.__ "User" }}</span>
{{/isAnAdmin}}
{{#isAnAdmin @root.session.isAdmin}}
<a href="/admin/user/edit/{{../this._id}}"><i class="feather" data-feather="edit"></i></a>
<a href="#" class="userDelete text-danger" data-id="{{../this._id}}"><i class="feather" data-feather="trash-2"></i></a>
{{/isAnAdmin}}
</span>
</li>
{{/each}}
</ul>
2018-01-07 04:55:48 +10:00
</div>
2020-02-01 16:59:30 +10:00
</main>