JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
add nice admin_users
[wfpl-cms.git] / admin_users.html
diff --git a/admin_users.html b/admin_users.html
new file mode 100644 (file)
index 0000000..731ae37
--- /dev/null
@@ -0,0 +1,84 @@
+<!DOCTYPE html>
+
+<html lang="en">
+<head>
+       <meta charset="utf-8" />
+       <title><!--~$title show {~-->Accounts<!--~}~--></title>
+       <link rel="stylesheet" href="style.css">
+</head>
+
+<body>
+<!--~$body show {~-->
+
+       <!--~form {~-->
+               <h2><!--~id unset {~-->Add a new account<!--~}~--><!--~id {~-->Edit account "~name html~"<!--~}~--></h2>
+
+               <form action="admin_users" method="post"><!--~id {~--><div style="display: none"><input type="hidden" name="edit_id" value="~id attr~"></div><!--~}~-->
+
+                       <div class="caption">Role</div>
+                       <div class="field"><select name="role"><!--~role options~--></select></div>
+
+                       <div class="caption">Name (optional)</div>
+                       <div class="field"><input type="text" name="name" value="~name attr~"></div>
+
+                       <div class="caption">Username</div>
+                       <div class="field_notes">This is used to log in. It is not case sensitive, and symbols/spaces/etc are ignored.</div>
+                       <div class="field~username_bad {~ field_error~}~"><input type="text" name="username" value="~username attr~"></div>
+
+                       <div class="caption">Password</div>
+                       <!--~editing unset {~--><div class="field_notes">If this is left blank, the user will be unable to log in.</div><!--~}~-->
+                       <!--~editing {~--><div class="field_notes">Leave this blank to leave teh password unchanged.</div><!--~}~-->
+                       <div class="field_notes">Password suggestions: ~password_suggestions {~<code class="password_suggestion">~password_suggestions html~</code>~ sep {~ ~}~~}~</div>
+                       <div class="field~password_bad {~ field_error~}~">
+                               <input type="password" name="pass1" value=""><br>
+                               <input type="password" name="pass2" value="">
+                       </div>
+
+                       <div class="caption"></div>
+                       <div class="field"><input type="submit" name="save" value="Save"></div>
+
+               </form>
+
+               <div class="caption">&nbsp;</div>
+               <div class="field"><a href="admin_users~id {~?id=~id~~}~">Cancel</a></div>
+       <!--~}~-->
+
+       <!--~listings {~-->
+               <h2>Accounts Listing</h2>
+
+               <p>On this page you can manage who can log into this site, and what sort of things they have permission to do once logged in.</p>
+
+               <!--~rows once_if {~-->
+                       <p><a href="admin_users?new=1">[Add a new account]</a></p>
+
+                       <table cellspacing="0" cellpadding="4" border="0" summary="" class="evenodd">
+                               <tr>
+                                       <th><a href="?sort=~sorting-by-role~role">Role</a></th>
+                                       <th><a href="?sort=~sorting-by-name~name">Name</a></th>
+                                       <th><a href="?sort=~sorting-by-username~username">Username</a></th>
+                                       <th><a href="?sort=~sorting-by-last_login~last_login">Last Login</a></th>
+                                       <th><a href="?sort=~sorting-by-last_active~last_active">Last Active</a></th>
+                                       <th>&nbsp;</th>
+                               </tr><!--~rows {~-->
+                               <tr>
+                                       <td class="listing"><a href="admin_users?edit_id=~id~">~role html~<!--~role empty {~--><em>(blank)</em><!--~}~--></a></td>
+                                       <td class="listing"><a href="admin_users?edit_id=~id~">~name html~<!--~name empty {~--><em>(blank)</em><!--~}~--></a></td>
+                                       <td class="listing"><a href="admin_users?edit_id=~id~">~username html~<!--~username empty {~--><em>(blank)</em><!--~}~--></a></td>
+                                       <td class="listing"><a href="admin_users?edit_id=~id~" class="unix_date">~last_login html~</a></td>
+                                       <td class="listing"><a href="admin_users?edit_id=~id~" class="unix_time">~last_active html~</a></td>
+                                       <td><a href="admin_users?admin_users_delete_id=~id~" onclick="return confirm('Permanently delete?')">[delete this account]</a></td>
+                               </tr><!--~}~-->
+
+                       </table>
+                       <p><a href="?download_csv=1">Download as CSV file</a></p>
+               <!--~}~-->
+               <!--~rows once_else {~-->
+                       <p>No accounts in database.</p>
+               <!--~}~-->
+
+               <p><a href="admin_users?new=1">[Add a new account]</a></p>
+       <!--~}~-->
+
+<!--~}~-->
+</body>
+</html>