mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
Group app access bulk operations in one panel.
This commit is contained in:
parent
5deb621fae
commit
4c11f28657
1 changed files with 45 additions and 34 deletions
|
@ -24,14 +24,6 @@
|
|||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<a href="#/apps/{{../settings.id}}/access/remove" class="btn btn-danger slide back">
|
||||
<span class="glyphicon glyphicon-trash"></span> Remove all access
|
||||
</a>
|
||||
<p class="text-danger">
|
||||
No users will have access to {{settings.label}}.
|
||||
</p>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="panel-body">
|
||||
{{#if settings.allow_everyone}}
|
||||
|
@ -41,51 +33,70 @@
|
|||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h2 class="panel-title">Add access</h2>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="panel-footer">
|
||||
{{#if users}}
|
||||
<form method="POST" action="#/apps/{{settings.id}}/access/add" class="row">
|
||||
<input type="hidden" name="app" value="{{settings.id}}">
|
||||
<div class="col-xs-9 col-sm-9">
|
||||
<div class="col-xs-9 col-sm-6">
|
||||
<select name="user" required class="form-control">
|
||||
<option value="" default disabled selected>Select user</option>
|
||||
{{#users}}<option value="{{value}}">{{label}}</option>{{/users}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-xs-3 col-sm-3">
|
||||
<div class="col-xs-3 col-sm-6">
|
||||
<input type="submit" class="btn btn-success slide back" value="Add">
|
||||
</div>
|
||||
</form>
|
||||
{{else}}
|
||||
<p class="text-warning">No users to add.</p>
|
||||
<p class="text-warning">No more users to add.</p>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#if users}}
|
||||
<div class="panel-footer">
|
||||
<a href="#/apps/{{settings.id}}/access/add" class="btn btn-success slide back">
|
||||
<span class="glyphicon glyphicon-plus"></span> Add all access
|
||||
</a>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
{{#unless settings.allow_everyone}}
|
||||
<div class="panel-group" id="accordion">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h2 class="panel-title">Clear access</h2>
|
||||
<h2 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
|
||||
Bulk operations
|
||||
</a>
|
||||
</h2>
|
||||
</div>
|
||||
<div id="collapseOne" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<a href="#/apps/{{settings.id}}/access/clear" class="btn btn-warning slide back">
|
||||
<span class="glyphicon glyphicon-trash"></span> Clear all access
|
||||
</a>
|
||||
<p class="text-warning">
|
||||
Every user will have access to {{settings.label}}.
|
||||
</p>
|
||||
{{#if users}}
|
||||
<div class="container">
|
||||
<p class="">
|
||||
All existing users will have access to {{settings.label}}.
|
||||
</p>
|
||||
<a href="#/apps/{{settings.id}}/access/add" class="btn btn-success slide back">
|
||||
<span class="glyphicon glyphicon-plus"></span> Add access to all
|
||||
</a>
|
||||
</div>
|
||||
<hr>
|
||||
{{/if}}
|
||||
{{#if settings.allowed_users}}
|
||||
<div class="container">
|
||||
<p class="">
|
||||
No users will have access to {{settings.label}}.
|
||||
</p>
|
||||
<a href="#/apps/{{../settings.id}}/access/remove" class="btn btn-danger slide back">
|
||||
<span class="glyphicon glyphicon-trash"></span> Remove all access
|
||||
</a>
|
||||
</div>
|
||||
<hr>
|
||||
{{/if}}
|
||||
{{#unless settings.allow_everyone}}
|
||||
<div class="container">
|
||||
<p class="">
|
||||
Every user will have access to {{settings.label}}.
|
||||
</p>
|
||||
<a href="#/apps/{{settings.id}}/access/clear" class="btn btn-primary slide back">
|
||||
<span class="glyphicon glyphicon-trash"></span> Clear all access
|
||||
</a>
|
||||
</div>
|
||||
{{/unless}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/unless}}
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue