expressCart/views/users.hbs

30 lines
1.3 KiB
Handlebars
Raw Normal View History

2018-02-12 05:47:26 +10:00
{{> partials/menu}}
<div class="col-sm-9">
2018-01-07 04:55:48 +10:00
<div class="row">
<div class="col-md-8">
<h2>Users <span class="pull-right"><a href="/admin/user/new" class="btn btn-outline-success">{{ @root.__ "New user" }}</a></span></h2>
2018-01-07 04:55:48 +10:00
<ul class="list-group">
{{#each users}}
<li class="list-group-item">
<strong>{{ @root.__ "User" }}:</strong> {{this.usersName}} - ({{this.userEmail}})
2018-02-12 05:47:26 +10:00
<span class="pull-right">
<strong>{{ @root.__ "Role" }}: </strong>
2018-01-07 04:55:48 +10:00
{{#isAnAdmin this.isAdmin}}
<span>Admin</span>
2019-11-07 16:36:20 +10:00
{{#if ../this.isOwner}}
(Owner)
{{/if}}
2018-01-07 04:55:48 +10:00
{{else}}
<span>{{ @root.__ "User" }}</span>
2018-01-07 04:55:48 +10:00
{{/isAnAdmin}}
{{#isAnAdmin ../session.isAdmin}}
2019-11-06 20:48:16 +10:00
<a href="/admin/user/edit/{{../this._id}}"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></a>
2019-12-16 14:45:02 +10:00
<a href="#" class="userDelete" data-id="{{../this._id}}"><span class="glyphicon glyphicon-trash" aria-hidden="true"></a>
2018-01-07 04:55:48 +10:00
{{/isAnAdmin}}
</span>
</li>
{{/each}}
</ul>
</div>
</div>
</div>