passman/templates/views/partials/forms/share_credential/basics.html

62 lines
1.6 KiB
HTML
Raw Normal View History

2016-09-21 02:03:37 +08:00
<div class="row">
<div class="col-xs-12 col-md-6">
<div>
<table class="table sharing_table">
2016-09-21 02:03:37 +08:00
<thead>
<tr>
<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>
<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>
<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">
<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">
<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>
</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>