useradmin.html 4.63 KB
Newer Older
1 2 3 4
{% extends 'layouts/base.html' %}


{% block title %}
David Haynes's avatar
David Haynes committed
5
SRCT Go • Administration Panel
6 7 8 9 10 11 12 13 14
{% endblock %}


{% block content %}

<div class="page-header" id="banner">
  <div class="row">
    <div class="col-md-12">

15 16 17 18 19 20 21
      <h1><strong>
        <span class="fa-stack fa-lg">
          <i class="fa fa-circle fa-stack-2x"></i>
          <i class="fa fa-balance-scale fa-stack-1x fa-inverse"></i>
        </span>
        <i class="fa">Moderation Panel</i>
      </strong></h1>
22 23 24 25 26

    </div>
  </div>
</div>

27 28

<!-- TABLE 1 -->
29 30 31
<div class="row">
  <div class="col-md-12">

32
    <h3>Users awaiting moderation</h3>
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48

    <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>
49 50
          <td><input type="checkbox" name="username" value={{ unapproved.user }}></td>
          <td>{{ unapproved.user }}</td>
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
          <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">

68 69
      <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">
70
      <input type="submit" name="_block" value="Block" class="btn btn-default btn-sm btn-blockUsr" style="background-color: black; color: white;">
71

72 73 74 75 76 77 78 79

    </div>

    </form>

  </div>
</div>

80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
<!-- TABLE 2 -->
<div class="row">
  <div class="col-md-12">

    <h3>Blocked Users</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>
          <th>Is Blocked</th>
        </tr>
      </thead>
      <tbody>

      {% for blockedUsers in blocked_users %}
        <tr>
          <td><input type="checkbox" name="username" value={{ blockedUsers.user }}></td>
          <td>{{ blockedUsers.user }}</td>
          <td>{{ blockedUsers.full_name }}</td>
          <td>{{ blockedUsers.description|default:"No description provided" }}</td>
          <td>{{ blockedUsers.blocked }}</td>
        </tr>
      {% empty %}
        <tr>
          <td>none</td>
          <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"> -->
      <input type="submit" name="_unblock" value="Un-Block" class="btn btn-default btn-sm">



    </div>

    </form>

  </div>
</div>

<!-- TABLE 3 -->
<div class="row">
  <div class="col-md-12">

    <h3>Current Users</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>
          <th>Is Blocked</th>
        </tr>
      </thead>
      <tbody>

      {% for currentUsers in current_users %}
        <tr>
          <td><input type="checkbox" name="username" value={{ currentUsers.user }}></td>
          <td>{{ currentUsers.user }}</td>
          <td>{{ currentUsers.full_name }}</td>
          <td>{{ currentUsers.description|default:"No description provided" }}</td>
          <td>{{ currentUsers.blocked }}</td>
        </tr>
      {% empty %}
        <tr>
          <td>none</td>
          <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="_remove" value="Remove" class="btn btn-danger btn-sm">
181
      <input type="submit" name="_block" value="Block" class="btn btn-default btn-sm btn-blockUsr" style="background-color: black; color: white;">
182 183 184 185 186 187 188 189 190 191 192
      <!-- <input type="submit" name="_unblock" value="Un-Block" class="btn btn-default btn-sm"> -->



    </div>

    </form>

  </div>
</div>

193 194

{% endblock %}