aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask/templates/oauth2/group.html
diff options
context:
space:
mode:
authorAlexander_Kabui2024-01-02 13:21:07 +0300
committerAlexander_Kabui2024-01-02 13:21:07 +0300
commit70c4201b332e0e2c0d958428086512f291469b87 (patch)
treeaea4fac8782c110fc233c589c3f0f7bd34bada6c /gn2/wqflask/templates/oauth2/group.html
parent5092eb42f062b1695c4e39619f0bd74a876cfac2 (diff)
parent965ce5114d585624d5edb082c710b83d83a3be40 (diff)
downloadgenenetwork2-70c4201b332e0e2c0d958428086512f291469b87.tar.gz
merge changes
Diffstat (limited to 'gn2/wqflask/templates/oauth2/group.html')
-rw-r--r--gn2/wqflask/templates/oauth2/group.html114
1 files changed, 114 insertions, 0 deletions
diff --git a/gn2/wqflask/templates/oauth2/group.html b/gn2/wqflask/templates/oauth2/group.html
new file mode 100644
index 00000000..f4c29d18
--- /dev/null
+++ b/gn2/wqflask/templates/oauth2/group.html
@@ -0,0 +1,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>
+ &nbsp;
+ <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%}