summaryrefslogtreecommitdiff
path: root/templates/mod
diff options
context:
space:
mode:
authorMichael Save <savetheinternet@tinyboard.org>2012-04-14 22:28:21 +1000
committerMichael Save <savetheinternet@tinyboard.org>2012-04-14 22:28:21 +1000
commit87281687ed3ed06fd76d7bbb6c29404bb883418a (patch)
treeb343c1751d8f351ba87d2337d83014865a84f80e /templates/mod
parent1437a121f759731db35ea8c35c7f2ebbb2a42f5d (diff)
promote/demote users, started on rebuild
Diffstat (limited to 'templates/mod')
-rw-r--r--templates/mod/rebuild.html71
-rw-r--r--templates/mod/users.html6
2 files changed, 76 insertions, 1 deletions
diff --git a/templates/mod/rebuild.html b/templates/mod/rebuild.html
new file mode 100644
index 00000000..763eb624
--- /dev/null
+++ b/templates/mod/rebuild.html
@@ -0,0 +1,71 @@
+<form style="width:200px;margin:auto" action="?/rebuild" method="post">
+ <ul id="rebuild">
+ <li style="margin-bottom:8px">
+ <input type="checkbox" name="rebuild_all" id="rebuild_all" onchange="toggleall(this.checked)">
+ <label for="rebuild_all"><strong>Toggle all</strong></label>
+ <script>
+ function toggleall(val) {
+ /* TODO: something more suitable for all browsers? */
+ var elements = document.getElementById('rebuild').querySelectorAll('input');
+ for (i in elements) {
+ elements[i].checked = val;
+ }
+ }
+ </script>
+ </li>
+ <li>
+ <input type="checkbox" name="rebuild_cache" id="rebuild_cache" checked>
+ <label for="rebuild_cache">Flush cache</label>
+ </li>
+ <li>
+ <input type="checkbox" name="rebuild_javascript" id="rebuild_javascript" checked>
+ <label for="rebuild_javascript">Rebuild Javascript</label>
+ </li>
+ <li>
+ <input type="checkbox" name="rebuild_index" id="rebuild_index" checked>
+ <label for="rebuild_index">Rebuild index pages</label>
+ </li>
+ <li>
+ <input type="checkbox" name="rebuild_thread" id="rebuild_thread" checked>
+ <label for="rebuild_thread">Rebuild thread pages</label>
+ </li>
+ <li>
+ <input type="checkbox" name="rebuild_themes" id="rebuild_themes" checked>
+ <label for="rebuild_themes">Rebuild themes</label>
+ </li>
+ <li>
+ <input type="checkbox" name="rebuild_posts" id="rebuild_posts">
+ <label for="rebuild_posts">Rebuild replies</label>
+ </li>
+ </ul>
+
+ <hr>
+
+ <ul id="boards">
+ <li style="margin-bottom:8px">
+ <input type="checkbox" name="boards_all" id="boards_all" onchange="toggleallboards(this.checked)" checked>
+ <label for="boards_all"><strong>All boards</strong></label>
+ <script>
+ function toggleallboards(val) {
+ /* TODO: something more suitable for all browsers? */
+ var elements = document.getElementById('boards').querySelectorAll('input');
+ for (i in elements) {
+ elements[i].checked = val;
+ }
+ }
+ </script>
+ </li>
+ {% for board in boards %}
+ <li>
+ <input type="checkbox" name="board_{{ board.uri }}" id="board-{{ board.uri }}" checked>
+ <label for="board-{{ board.uri }}">
+ {{ config.board_abbreviation|sprintf(board.uri) }} - {{ board.title }}
+ </label>
+ </li>
+ {% endfor %}
+ </ul>
+
+ <p style="text-align:center">
+ <input type="submit" value="Rebuild">
+ </p>
+</form>
diff --git a/templates/mod/users.html b/templates/mod/users.html
index aeacc8b5..63d799d5 100644
--- a/templates/mod/users.html
+++ b/templates/mod/users.html
@@ -30,7 +30,11 @@
</td>
<td>
{% if mod|hasPermission(config.mod.modlog) %}
- <span title="{{ user.action|e }}">{{ user.last|ago }}</span>
+ {% if user.last %}
+ <span title="{{ user.action|e }}">{{ user.last|ago }}</span>
+ {% else %}
+ <em>never</em>
+ {% endif %}
{% else %}
&ndash;
{% endif %}