passman/templates/views/partials/forms/share_credential/basics.html
Marcos Zuriaga 38299973d0
Removed group sharing logics
Added user sharing crypto times to the UI
2016-10-01 15:18:22 +02:00

85 lines
No EOL
2.2 KiB
HTML

<div class="row">
<div class="col-xs-12 col-md-6">
<div>
<table class="table sharing_table">
<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>
<td>
<select ng-model="selectedAccessLevel">
<option ng-repeat="lvl in accessLevels"
value="{{lvl.value}}">
{{lvl.label}}
</option>
</select>
<button class="button"
ng-click="shareWith(inputSharedWith, selectedAccessLevel)">
+
</button>
</td>
</tr>
</thead>
</table>
<div ng-if="share_settings.cypher_progress.done > 0">
Cyphering...
<div progress-bar="share_settings.cypher_progress.percent" index="share_settings.cypher_progress.done" total="share_settings.cypher_progress.total"></div>
</div>
</div>
</div>
<div class="col-xs-12 col-md-6">
<table class="table">
<thead>
<tr>
<td>User</td>
<td>Crypto time</td>
</tr>
</thead>
<tr ng-repeat="user in share_settings.cypher_progress.times">
<td>
<i class="fa fa-user"></i>
{{user.user}}
</td>
<td>{{user.time}} s</td>
</tr>
</table>
</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">
<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>
<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>