Commit b72cbc8f authored by David Haynes's avatar David Haynes
Browse files

useradmin.html comments

- two divs, a table and a form -- ez comments
parent 322d4edd
Pipeline #471 passed with stage
in 7 minutes and 11 seconds
<!-- include the base html template -->
{% extends 'layouts/base.html' %} {% extends 'layouts/base.html' %}
<!-- define the page title block -->
{% block title %} {% block title %}
SRCT Go &bull; Administration Panel SRCT Go &bull; Administration Panel
{% endblock %} {% endblock %}
<!-- define the content block for the page -->
{% block content %} {% block content %}
<!-- define the page header div -->
<div class="page-header" id="banner"> <div class="page-header" id="banner">
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<h1><strong> <h1><strong>
<span class="fa-stack fa-lg"> <span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i> <i class="fa fa-circle fa-stack-2x"></i>
...@@ -19,60 +20,77 @@ SRCT Go &bull; Administration Panel ...@@ -19,60 +20,77 @@ SRCT Go &bull; Administration Panel
</span> </span>
<i class="fa">Moderation Panel</i> <i class="fa">Moderation Panel</i>
</strong></h1> </strong></h1>
</div> </div>
</div> </div>
</div> </div>
<!-- define the div where we can select users from a table to judge them -->
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<h3>Users awaiting moderation</h3> <h3>Users awaiting moderation</h3>
<!-- define our useradmin form which is later submitted to add users -->
<form method="post" action="useradmin">{% csrf_token %} <form method="post" action="useradmin">
<!-- csrf protection -->
<table class="table table-striped table-hover "> {% csrf_token %}
<thead>
<tr> <!-- define our table of users -->
<th>Selected</th> <table class="table table-striped table-hover">
<th>Username</th> <!-- define the table head row -->
<th>Full Name</th> <thead>
<th>Description</th> <tr>
</tr> <th>Selected</th>
</thead> <th>Username</th>
<tbody> <th>Full Name</th>
<th>Description</th>
{% for unapproved in need_approval %} </tr>
<tr> </thead>
<td><input type="checkbox" name="username" value={{ unapproved.user }}></td>
<td>{{ unapproved.user }}</td> <!-- define the table body rows -->
<td>{{ unapproved.full_name }}</td> <tbody>
<td>{{ unapproved.description|default:"No description provided" }}</td> <!-- loop through every user in the need_approval list -->
</tr> {% for unapproved in need_approval %}
{% empty %} <!-- create a new row for this user -->
<tr> <tr>
<td>none</td> <!-- checkbox to select user -->
<td>none</td> <td>
<td>none</td> <input type="checkbox" name="username" value={{ unapproved.user }}>
<td>none</td> </td>
</tr> <!-- username -->
{% endfor %} <td>{{ unapproved.user }}</td>
<!-- user's full name -->
</tbody> <td>{{ unapproved.full_name }}</td>
</table> <!--
The description provided by the user (unless they
<div class="form-group"> did not provide one)
-->
<input type="submit" name="_approve" value="Approve" class="btn btn-primary btn-sm"> <td>
<input type="submit" name="_deny" value="Deny" class="btn btn-danger btn-sm"> {{ unapproved.description|default:"No description provided" }}
</td>
</tr>
</div>
<!-- if the list is empty.. display a blank row -->
{% empty %}
<tr>
<td>none</td>
<td>none</td>
<td>none</td>
<td>none</td>
</tr>
{% endfor %}
</tbody>
</table>
<!-- define the div that contains submit buttons for our form -->
<div class="form-group">
<!-- approve selected users -->
<input type="submit" name="_approve" value="Approve"
class="btn btn-primary btn-sm">
<!-- approve selected users -->
<input type="submit" name="_deny" value="Deny"
class="btn btn-danger btn-sm">
</div>
</form> </form>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment