Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/passman.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrantje <brantje@gmail.com>2016-09-23 13:03:37 +0300
committerbrantje <brantje@gmail.com>2016-09-23 13:03:37 +0300
commit25d1f98e6fa1d64773641a27a0f765006acae5ce (patch)
tree538a8cd67b4d959c9ba946df62973d52e8c53864 /templates/views/partials/forms/share_credential/basics.html
parentf547ca83a7f71981be34aba8092d52183d1ed22c (diff)
Added search for users / groups to frontend
Diffstat (limited to 'templates/views/partials/forms/share_credential/basics.html')
-rw-r--r--templates/views/partials/forms/share_credential/basics.html35
1 files changed, 28 insertions, 7 deletions
diff --git a/templates/views/partials/forms/share_credential/basics.html b/templates/views/partials/forms/share_credential/basics.html
index f2f88080..92fe1cc7 100644
--- a/templates/views/partials/forms/share_credential/basics.html
+++ b/templates/views/partials/forms/share_credential/basics.html
@@ -1,19 +1,29 @@
<div class="row">
<div class="col-xs-12 col-md-6">
<div>
- <table class="table">
+ <table class="table sharing_table">
<thead>
<tr>
- <td><input type="text" placeholder="Search user or groups"></td>
+ <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>
<td>
- <select>
+ <select ng-model="selectedAccessLevel">
<option ng-repeat="lvl in accessLevels"
value="{{lvl.value}}">
{{lvl.label}}
</option>
</select>
- <button class="button">
+ <button class="button"
+ ng-click="shareWith(inputSharedWith, selectedAccessLevel)">
+
</button>
</td>
@@ -25,7 +35,8 @@
</div>
<div class="row">
<div class="col-xs-12 col-md-6">
- <table class="table shared_table">
+ <table class="table shared_table"
+ ng-show="share_settings.credentialSharedWithUserAndGroup.length > 0">
<thead>
<tr>
<td>User / group</td>
@@ -33,9 +44,19 @@
</tr>
</thead>
<tr ng-repeat="user in share_settings.credentialSharedWithUserAndGroup">
- <td>{{user.userId}}</td>
+ <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>
<td>{{user.accessLevel}}</td>
</tr>
</table>
</div>
-</div> \ No newline at end of file
+</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> \ No newline at end of file