diff options
author | Arun Isaac | 2023-12-29 18:55:37 +0000 |
---|---|---|
committer | Arun Isaac | 2023-12-29 19:01:46 +0000 |
commit | 204a308be0f741726b9a620d88fbc22b22124c81 (patch) | |
tree | b3cf66906674020b530c844c2bb4982c8a0e2d39 /gn2/wqflask/templates/oauth2/group.html | |
parent | 83062c75442160427b50420161bfcae2c5c34c84 (diff) | |
download | genenetwork2-204a308be0f741726b9a620d88fbc22b22124c81.tar.gz |
Namespace all modules under gn2.
We move all modules under a gn2 directory. This is important for
"correct" packaging and deployment as a Guix service.
Diffstat (limited to 'gn2/wqflask/templates/oauth2/group.html')
-rw-r--r-- | gn2/wqflask/templates/oauth2/group.html | 114 |
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> + + <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%} |