2014-03-02 19:30:46 +01:00
|
|
|
<div class="pull-left">
|
2014-05-07 15:23:16 +02:00
|
|
|
<a href="#/apps/{{settings.id}}" class="btn btn-default slide back">
|
|
|
|
<span class="fa-chevron-left"></span> {{settings.label}}
|
|
|
|
</a>
|
2014-03-02 19:30:46 +01:00
|
|
|
</div>
|
|
|
|
<div class="pull-right">
|
|
|
|
</div>
|
|
|
|
<div class="clearfix"></div>
|
2014-05-13 01:30:22 +02:00
|
|
|
<h1 class="view-title">{{t 'app_access_title' settings.label}}</h1>
|
2014-03-02 19:30:46 +01:00
|
|
|
|
|
|
|
<div class="br"></div>
|
|
|
|
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
2014-05-13 01:30:22 +02:00
|
|
|
<h2 class="panel-title"><span class="fa-fw fa-users"></span> {{t 'allowed_users'}}</h2>
|
2014-03-02 19:30:46 +01:00
|
|
|
</div>
|
|
|
|
{{#if settings.allowed_users}}
|
|
|
|
<div class="list-group">
|
|
|
|
{{#each settings.allowed_users}}
|
|
|
|
<div class="list-group-item">
|
|
|
|
<a href="#/apps/{{../settings.id}}/access/remove/{{username}}" class="btn btn-danger slide back pull-right">
|
2014-05-13 01:30:22 +02:00
|
|
|
<span class="fa-trash-o"></span> {{t 'remove_access'}}
|
2014-03-02 19:30:46 +01:00
|
|
|
</a>
|
|
|
|
<h3 class="list-group-item-heading">{{fullname}} ({{mail}})</h3>
|
2014-05-13 01:30:22 +02:00
|
|
|
<a href="#/users/{{username}}">{{t 'view_user_profile' username}}</a>
|
2014-03-02 19:30:46 +01:00
|
|
|
</div>
|
|
|
|
{{/each}}
|
|
|
|
</div>
|
|
|
|
{{else}}
|
|
|
|
<div class="panel-body">
|
|
|
|
{{#if settings.allow_everyone}}
|
2014-05-13 01:30:22 +02:00
|
|
|
<p class="text-success">{{t 'everyone_has_access'}}</p>
|
2014-03-02 19:30:46 +01:00
|
|
|
{{else}}
|
2014-05-13 01:30:22 +02:00
|
|
|
<p class="text-warning">{{t 'no_allowed_users'}}</p>
|
2014-03-02 19:30:46 +01:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2014-03-03 17:53:33 +01:00
|
|
|
<div class="panel-footer">
|
2014-03-02 19:30:46 +01:00
|
|
|
{{#if users}}
|
|
|
|
<form method="POST" action="#/apps/{{settings.id}}/access/add" class="row">
|
|
|
|
<input type="hidden" name="app" value="{{settings.id}}">
|
2014-03-03 17:53:33 +01:00
|
|
|
<div class="col-xs-9 col-sm-6">
|
2014-03-02 19:30:46 +01:00
|
|
|
<select name="user" required class="form-control">
|
2014-05-13 01:30:22 +02:00
|
|
|
<option value="" default disabled selected>{{t 'select_user'}}</option>
|
2014-03-02 19:30:46 +01:00
|
|
|
{{#users}}<option value="{{value}}">{{label}}</option>{{/users}}
|
|
|
|
</select>
|
|
|
|
</div>
|
2014-03-03 17:53:33 +01:00
|
|
|
<div class="col-xs-3 col-sm-6">
|
2014-05-13 01:30:22 +02:00
|
|
|
<input type="submit" class="btn btn-success slide back" value="{{t 'add'}}">
|
2014-03-02 19:30:46 +01:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
{{else}}
|
2014-05-13 01:30:22 +02:00
|
|
|
<p class="text-warning">{{t 'no_user_to_add'}}</p>
|
2014-03-02 19:30:46 +01:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2014-03-03 17:53:33 +01:00
|
|
|
<div class="panel-group" id="accordion">
|
2014-03-02 19:30:46 +01:00
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
2014-03-03 17:53:33 +01:00
|
|
|
<h2 class="panel-title">
|
|
|
|
<a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
|
2014-05-13 01:30:22 +02:00
|
|
|
<span class="fa-fw fa-wrench"></span> {{t 'operations'}}
|
2014-03-03 17:53:33 +01:00
|
|
|
</a>
|
|
|
|
</h2>
|
2014-03-02 19:30:46 +01:00
|
|
|
</div>
|
2014-03-03 17:53:33 +01:00
|
|
|
<div id="collapseOne" class="panel-collapse collapse">
|
2014-03-02 19:30:46 +01:00
|
|
|
<div class="panel-body">
|
2014-03-03 17:53:33 +01:00
|
|
|
{{#if users}}
|
|
|
|
<div class="container">
|
2014-05-13 01:30:22 +02:00
|
|
|
<p>{{t 'app_access_addall_desc' settings.label}}</p>
|
2014-03-03 17:53:33 +01:00
|
|
|
<a href="#/apps/{{settings.id}}/access/add" class="btn btn-success slide back">
|
2014-05-13 01:30:22 +02:00
|
|
|
<span class="fa-plus"></span> {{t 'app_access_addall_btn'}}
|
2014-03-03 17:53:33 +01:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
{{/if}}
|
|
|
|
{{#if settings.allowed_users}}
|
|
|
|
<div class="container">
|
2014-05-13 01:30:22 +02:00
|
|
|
<p>{{t 'app_access_removeall_desc' settings.label}}</p>
|
2014-03-03 17:53:33 +01:00
|
|
|
<a href="#/apps/{{../settings.id}}/access/remove" class="btn btn-danger slide back">
|
2014-05-13 01:30:22 +02:00
|
|
|
<span class="fa-trash-o"></span> {{t 'app_access_removeall_btn'}}
|
2014-03-03 17:53:33 +01:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
{{/if}}
|
|
|
|
{{#unless settings.allow_everyone}}
|
|
|
|
<div class="container">
|
2014-05-13 01:30:22 +02:00
|
|
|
<p>{{t 'app_access_clearall_desc' settings.label}}</p>
|
2014-03-03 17:53:33 +01:00
|
|
|
<a href="#/apps/{{settings.id}}/access/clear" class="btn btn-primary slide back">
|
2014-05-13 01:30:22 +02:00
|
|
|
<span class="fa-unlock-alt"></span> {{t 'app_access_clearall_btn'}}
|
2014-03-03 17:53:33 +01:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{{/unless}}
|
|
|
|
</div>
|
2014-03-02 19:30:46 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2014-03-03 17:53:33 +01:00
|
|
|
</div>
|