blob: f4c29d18e4a80a67d24af77425f91de9cdcdb95f (
about) (
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
{%extends "base.html"%}
{%from "oauth2/profile_nav.html" import profile_nav%}
{%from "oauth2/display_error.html" import display_error%}
{%block title%}View User{%endblock%}
{%block content%}
<div class="container" style="min-width: 1250px;">
{{profile_nav("group", user_privileges)}}
{{flash_me()}}
{%if group_error is defined%}
<div class="row" style="text-align:center;line-height:5em;">
{{display_error("Group", group_error)}}
</div>
{%else%}
<div class="container-fluid">
<div class="row">
{%if group_join_requests_error is defined %}
{{display_error("Join Requests", group_join_requests_error)}}
{%else%}
<a href="{{url_for('oauth2.group.list_join_requests')}}"
class="btn btn-info">
Requests ({{group_join_requests | count}})
</a>
{%endif%}
</div>
<div class="row">
<table class="table">
<caption>Group Information</caption>
<thead>
<tr>
<th>Name</th>
<th colspan="2" style="text-align: center;">Metadata</th>
<th colspan="2" style="text-align: center;">Actions</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="{{group.group_metadata.items() | count + 1}}">
{{group.group_name}}
</td>
<td><strong>Key</strong></td>
<td><strong>Value</strong></td>
<td rowspan="{{group.group_metadata.items() | count + 1}}"
style="text-align: center;">
<a href="{{url_for('oauth2.group.edit_group', group_id=group.group_id)}}"
class="btn btn-info" title="Edit group information">Edit</a>
</td>
<td rowspan="{{group.group_metadata.items() | count + 1}}"
style="text-align: center;">
<a href="{{url_for('oauth2.group.edit_group', group_id=group.group_id)}}"
class="btn btn-danger" title="Delete this group">Delete</a>
</td>
</tr>
{%for key,val in group.group_metadata.items()%}
<tr>
<td>{{key.split("_") | map("capitalize") | join(" ")}}</td>
<td>{{val}}</td>
</tr>
{%endfor%}
</tbody>
</table>
</div>
</div>
<div class="container-fluid">
<table class="table">
<caption>Group Users</caption>
<thead>
<tr>
<th>Name</th>
<th>Email</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{%for user in users%}
<tr>
<td>{{user.name}}</td>
<td>{{user.email}}</td>
<td>
<a href="url_for('oauth2.group.remove_user', user_id=user.user_id)"
title="Remove this user from being a member of this group."
class="btn btn-danger">Remove</a>
</td>
</tr>
{%else%}
<tr>
<td colspan="3">
{%if user_error is defined%}
<span class="glyphicon glyphicon-exclamation-sign text-danger">
</span>
<strong class="text-danger">{{user_error.error}}</strong>
{{user_error.error_description}}
{%else%}
No users found for this group
{%endif%}
</td>
</tr>
{%endfor%}
</tbody>
</table>
</div>
{%endif%}
</div>
{%endblock%}
|