about summary refs log tree commit diff
path: root/gn2/wqflask/templates/oauth2/join-requests.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/join-requests.html
parent5092eb42f062b1695c4e39619f0bd74a876cfac2 (diff)
parent965ce5114d585624d5edb082c710b83d83a3be40 (diff)
downloadgenenetwork2-70c4201b332e0e2c0d958428086512f291469b87.tar.gz
merge changes
Diffstat (limited to 'gn2/wqflask/templates/oauth2/join-requests.html')
-rw-r--r--gn2/wqflask/templates/oauth2/join-requests.html73
1 files changed, 73 insertions, 0 deletions
diff --git a/gn2/wqflask/templates/oauth2/join-requests.html b/gn2/wqflask/templates/oauth2/join-requests.html
new file mode 100644
index 00000000..833b4e93
--- /dev/null
+++ b/gn2/wqflask/templates/oauth2/join-requests.html
@@ -0,0 +1,73 @@
+{%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()}}
+
+  <div class="container-fluid">
+    <div class="row">
+      <table class="table">
+	<caption>Join Requests</caption>
+	<thead>
+	  <tr>
+	    <th>Name</th>
+	    <th>Email</th>
+	    <th>Request Date/Time</th>
+	    <th>Status</th>
+	    <th>Message</th>
+	    <th colspan="2" style="text-align: center;">Actions</th>
+	  </tr>
+	</thead>
+
+	<tbody>
+	  {%for request in requests%}
+	  <tr>
+	    <td>{{request.name}}</td>
+	    <td>{{request.email}}</td>
+	    <td>{{datetime_string(request.timestamp)}}</td>
+	    <td>{{request.status}}</td>
+	    <td>{{request.message}}</td>
+	    <td>
+	      <form method="POST"
+		    action="{{url_for('oauth2.group.accept_join_request')}}">
+		<input type="hidden" name="request_id"
+		       value="{{request.request_id}}" />
+		<input type="submit" class="btn btn-primary" value="Accept"
+		       {%if request.status != "PENDING"%}
+		       disabled="disabled"
+		       {%endif%} />
+	      </form>
+	    </td>
+	    <td>
+	      <form method="POST"
+		    action="{{url_for('oauth2.group.reject_join_request')}}">
+		<input type="hidden" name="request_id"
+		       value="{{request.request_id}}" />
+		<input type="submit" class="btn btn-danger" value="Reject"
+		       {%if request.status != "PENDING"%}
+		       disabled="disabled"
+		       {%endif%} />
+	      </form>
+	    </td>
+	  </tr>
+	  {%else%}
+	  <tr>
+	    <td colspan="3">
+	      {%if error is defined %}
+	      {{display_error("Join Requests", error)}}
+	      {%else%}
+	      No one has requested to join your group yet.
+	      {%endif%}
+	    </td>
+	  </tr>
+	  {%endfor%}
+	</tbody>
+      </table>
+    </div>
+  </div>
+</div>
+{%endblock%}