{% extends "index_page.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%}