2016-09-21 02:03:37 +08:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-12 col-md-6">
|
|
|
|
<div>
|
2016-09-23 18:03:37 +08:00
|
|
|
<table class="table sharing_table">
|
2016-09-21 02:03:37 +08:00
|
|
|
<thead>
|
|
|
|
<tr>
|
2016-09-23 18:03:37 +08:00
|
|
|
<td>
|
|
|
|
<tags-input ng-model="inputSharedWith"
|
|
|
|
replace-spaces-with-dashes="false"
|
|
|
|
add-from-autocomplete-only="true"
|
|
|
|
placeholder="Search users or groups...">
|
|
|
|
<auto-complete source="searchUsers($query)"
|
|
|
|
min-length="0"
|
|
|
|
template="autocomplete-template"></auto-complete>
|
|
|
|
</tags-input>
|
|
|
|
</td>
|
2016-09-21 02:03:37 +08:00
|
|
|
|
|
|
|
<td>
|
2016-09-23 18:03:37 +08:00
|
|
|
<select ng-model="selectedAccessLevel">
|
2016-09-21 02:03:37 +08:00
|
|
|
<option ng-repeat="lvl in accessLevels"
|
|
|
|
value="{{lvl.value}}">
|
|
|
|
{{lvl.label}}
|
|
|
|
</option>
|
|
|
|
</select>
|
2016-09-23 18:03:37 +08:00
|
|
|
<button class="button"
|
|
|
|
ng-click="shareWith(inputSharedWith, selectedAccessLevel)">
|
2016-09-21 02:03:37 +08:00
|
|
|
+
|
|
|
|
</button>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-12 col-md-6">
|
2016-09-23 18:03:37 +08:00
|
|
|
<table class="table shared_table"
|
|
|
|
ng-show="share_settings.credentialSharedWithUserAndGroup.length > 0">
|
2016-09-21 02:03:37 +08:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<td>User / group</td>
|
|
|
|
<td>Access</td>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tr ng-repeat="user in share_settings.credentialSharedWithUserAndGroup">
|
2016-09-23 18:03:37 +08:00
|
|
|
<td>
|
|
|
|
<i class="fa fa-user" ng-if="user.type === 'user'"></i>
|
|
|
|
<i class="fa fa-group" ng-if="user.type === 'group'"></i>
|
|
|
|
{{user.userId}}
|
|
|
|
</td>
|
2016-09-21 02:03:37 +08:00
|
|
|
<td>{{user.accessLevel}}</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</div>
|
2016-09-23 18:03:37 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<script type="text/ng-template" id="autocomplete-template">
|
|
|
|
<i class="fa fa-user" ng-if="data.type === 'user'"></i>
|
|
|
|
<i class="fa fa-group" ng-if="data.type === 'group'"></i>
|
|
|
|
{{data.text}}
|
|
|
|
</script>
|