Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
go
Commits
b72cbc8f
Commit
b72cbc8f
authored
Nov 16, 2016
by
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
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
go/go/templates/admin/useradmin.html
View file @
b72cbc8f
<!-- include the base html template -->
{% extends 'layouts/base.html' %}
<!-- define the page title block -->
{% block title %}
SRCT Go
•
Administration Panel
{% endblock %}
<!-- define the content block for the page -->
{% block content %}
<!-- define the page header div -->
<div
class=
"page-header"
id=
"banner"
>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<h1><strong>
<span
class=
"fa-stack fa-lg"
>
<i
class=
"fa fa-circle fa-stack-2x"
></i>
...
...
@@ -19,60 +20,77 @@ SRCT Go • Administration Panel
</span>
<i
class=
"fa"
>
Moderation Panel
</i>
</strong></h1>
</div>
</div>
</div>
<!-- define the div where we can select users from a table to judge them -->
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<h3>
Users awaiting moderation
</h3>
<form
method=
"post"
action=
"useradmin"
>
{% csrf_token %}
<table
class=
"table table-striped table-hover "
>
<thead>
<tr>
<th>
Selected
</th>
<th>
Username
</th>
<th>
Full Name
</th>
<th>
Description
</th>
</tr>
</thead>
<tbody>
{% for unapproved in need_approval %}
<tr>
<td><input
type=
"checkbox"
name=
"username"
value=
{{
unapproved.user
}}
></td>
<td>
{{ unapproved.user }}
</td>
<td>
{{ unapproved.full_name }}
</td>
<td>
{{ unapproved.description|default:"No description provided" }}
</td>
</tr>
{% empty %}
<tr>
<td>
none
</td>
<td>
none
</td>
<td>
none
</td>
<td>
none
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div
class=
"form-group"
>
<input
type=
"submit"
name=
"_approve"
value=
"Approve"
class=
"btn btn-primary btn-sm"
>
<input
type=
"submit"
name=
"_deny"
value=
"Deny"
class=
"btn btn-danger btn-sm"
>
</div>
<!-- define our useradmin form which is later submitted to add users -->
<form
method=
"post"
action=
"useradmin"
>
<!-- csrf protection -->
{% csrf_token %}
<!-- define our table of users -->
<table
class=
"table table-striped table-hover"
>
<!-- define the table head row -->
<thead>
<tr>
<th>
Selected
</th>
<th>
Username
</th>
<th>
Full Name
</th>
<th>
Description
</th>
</tr>
</thead>
<!-- define the table body rows -->
<tbody>
<!-- loop through every user in the need_approval list -->
{% for unapproved in need_approval %}
<!-- create a new row for this user -->
<tr>
<!-- checkbox to select user -->
<td>
<input
type=
"checkbox"
name=
"username"
value=
{{
unapproved.user
}}
>
</td>
<!-- username -->
<td>
{{ unapproved.user }}
</td>
<!-- user's full name -->
<td>
{{ unapproved.full_name }}
</td>
<!--
The description provided by the user (unless they
did not provide one)
-->
<td>
{{ unapproved.description|default:"No description provided" }}
</td>
</tr>
<!-- 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>
</div>
</div>
{% endblock %}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment