Release 1.5.16
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
<textarea id="role-description-edit" name="description" class="form-control" rows="5">{{role.description}}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer d-flex justify-content-end gap-2 flex-wrap">
|
||||
<div class="card-footer d-flex justify-content-end flex-wrap">
|
||||
<div class="btn-group" role="group" aria-label="Role actions">
|
||||
{{{saveActionButtons formId="role-edit-form" saveLabel="Save" saveAndCloseLabel="Save and Close" saveAndCloseValue="close" showSaveAndNew=false}}}
|
||||
</div>
|
||||
@@ -35,45 +35,50 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card card-outline card-secondary admin-form-card">
|
||||
<div class="card-header">
|
||||
<div class="card card-outline card-secondary admin-form-card" data-table-search-container>
|
||||
<div class="card-header d-flex flex-wrap align-items-center justify-content-between">
|
||||
<h3 class="card-title">Users</h3>
|
||||
<div class="input-group input-group-sm flex-shrink-1 ms-auto" style="width: min(14rem, 100%);">
|
||||
<span class="input-group-text" aria-hidden="true"><i class="bi bi-search"></i></span>
|
||||
<input type="search" class="form-control" placeholder="Search users" aria-label="Search users" data-table-search />
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<div class="card-body table-responsive p-0">
|
||||
<div class="px-3 pt-3">
|
||||
<p class="text-body-secondary mb-3">Choose the users who should belong to this role.</p>
|
||||
</div>
|
||||
{{#if users.length}}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-sm align-middle mb-0 w-100">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 1%" scope="col">Select</th>
|
||||
<th scope="col">Name</th>
|
||||
<th scope="col">Username</th>
|
||||
<th scope="col">Roles</th>
|
||||
<table class="table table-striped w-100 mb-0 align-middle" data-table-searchable>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 1%" scope="col" data-sortable="false">Select</th>
|
||||
<th scope="col" data-table-sort-key="user">Username</th>
|
||||
<th scope="col" data-table-sort-key="name">Name</th>
|
||||
<th scope="col" data-table-sort-key="roles">Roles</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#if users.length}}
|
||||
{{#each users}}
|
||||
<tr data-table-search-row>
|
||||
<td data-label="Select">
|
||||
<input class="form-check-input" type="checkbox" name="user_ids[]" value="{{id}}" {{#if isSelected}}checked{{/if}} />
|
||||
</td>
|
||||
<td data-label="Username">
|
||||
<div class="user-cell">
|
||||
<div>{{username}}</div>
|
||||
</div>
|
||||
</td>
|
||||
<td data-label="Name">{{#if name}}{{name}}{{else}}-{{/if}}</td>
|
||||
<td data-label="Roles" class="text-body-secondary">{{#if roleNames}}{{roleNames}}{{else}}No roles assigned{{/if}}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each users}}
|
||||
<tr>
|
||||
<td>
|
||||
<input class="form-check-input" type="checkbox" name="user_ids[]" value="{{id}}" {{#if isSelected}}checked{{/if}} />
|
||||
</td>
|
||||
<td>{{name}}</td>
|
||||
<td class="text-body-secondary">{{username}}</td>
|
||||
<td class="text-body-secondary">{{#if roleNames}}{{roleNames}}{{else}}No roles assigned{{/if}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="px-3 pb-3">
|
||||
<div class="alert alert-warning mb-0">Create at least one user before assigning this role.</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
{{else}}
|
||||
<tr data-table-search-empty-default><td colspan="4" class="empty">No users found.</td></tr>
|
||||
{{/if}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{> table-pagination pagination=pagination basePath=roleEditBasePath}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user