blob: 8774998d001970d2529dcc90825942264f31c9ca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
<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.u.g' | translate}}">
<auto-complete source="searchUsers($query)"
min-length="0"
template="autocomplete-template"></auto-complete>
</tags-input>
</td>
<td>
<button class="button"
ng-click="shareWith(inputSharedWith)">
+
</button>
</td>
</tr>
<tr>
<td colspan="2">
<small>{{ 'search.result.missing' | translate}}</small>
</td>
</tr>
</thead>
</table>
<div ng-if="share_settings.cypher_progress.done > 0">
{{'cyphering' | translate}}...
<div progress-bar="share_settings.cypher_progress.percent" index="share_settings.cypher_progress.done" total="share_settings.cypher_progress.total"></div>
</div>
<div ng-if="share_settings.upload_progress.done > 0">
{{ 'uploading' | translate}}...
<div progress-bar="share_settings.upload_progress.percent" index="share_settings.upload_progress.done" total="share_settings.upload_progress.total"></div>
</div>
</div>
</div>
<div class="col-xs-12 col-md-6" ng-show="share_settings.cypher_progress.times.length > 0">
<table class="table">
<thead>
<tr>
<td>{{ 'user' | translate}}</td>
<td>{{ 'crypto.time' | translate}}</td>
</tr>
</thead>
<tr ng-repeat="user in share_settings.cypher_progress.times">
<td>
<i class="fa fa-cogs"></i>
{{user.user}}
</td>
<td>{{user.time}} s</td>
</tr>
</table>
{{ 'crypto.total.time' | translate}}: {{ calculate_total_time() }}
</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' | translate}}</td>
<td>{{ 'perm.read' | translate}}</td>
<td>{{ 'perm.write' | translate}}</td>
<td>{{ 'perm.files' | translate}}</td>
<td>{{ 'perm.revisions' | translate}}</td>
<td></td>
</tr>
</thead>
<tr ng-repeat="user in share_settings.credentialSharedWithUserAndGroup">
<td>
<i class="fa fa-user" ng-if="user.pending === false"></i>
<i class="fa fa-user-times" ng-if="user.pending === true"></i>
{{user.userId}}
<small ng-if="user.pending === true" class="pull-right col-xs-4">{{ 'pending' | translate}}</small>
</td>
<td><input type="checkbox" ng-click="setPermission(user.acl, default_permissions.permissions.READ)" ng-checked="hasPermission(user.acl, default_permissions.permissions.READ)"> </td>
<td><input type="checkbox" ng-click="setPermission(user.acl, default_permissions.permissions.WRITE)" ng-checked="hasPermission(user.acl, default_permissions.permissions.WRITE)"></td>
<td><input type="checkbox" ng-click="setPermission(user.acl, default_permissions.permissions.FILES)" ng-checked="hasPermission(user.acl, default_permissions.permissions.FILES)"></td>
<td><input type="checkbox" ng-click="setPermission(user.acl, default_permissions.permissions.HISTORY)" ng-checked="hasPermission(user.acl, default_permissions.permissions.HISTORY)"></td>
<td><i class="fa fa-trash" ng-click="unshareUser(user)"></i></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>
|