Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
- Loading branch information
Showing
8 changed files
with
338 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
<%inherit file="base.tmpl"/> | ||
<%block name="extra_head"> | ||
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> | ||
</%block> | ||
<%block name="content"> | ||
<!-- New Page Modal --> | ||
<div class="modal fade" id="newPage" tabindex="-1" role="dialog" aria-labelledby="newPageLabel" aria-hidden="true"> | ||
<form method="POST" action="/new/page"> | ||
<div class="modal-dialog"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | ||
<h4 class="modal-title" id="newPageLabel">Create New Page?</h4> | ||
</div> | ||
<div class="modal-body"> | ||
<input class="form-control" name="title" id="title" placeholder="Title"> | ||
</div> | ||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | ||
<button type="submit" class="btn btn-primary">Create Page</button> | ||
</div> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
|
||
<!-- New Post Modal --> | ||
<div class="modal fade" id="newPost" tabindex="-1" role="dialog" aria-labelledby="newPostLabel" aria-hidden="true"> | ||
<form method="POST" action="/new/post"> | ||
<div class="modal-dialog"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | ||
<h4 class="modal-title" id="newPostLabel">Create New Post?</h4> | ||
</div> | ||
<div class="modal-body"> | ||
<input class="form-control" name="title" id="title" placeholder="Title"> | ||
</div> | ||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | ||
<button type="submit" class="btn btn-primary">Create Post</button> | ||
</div> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
|
||
|
||
<h1 class="title">Users</h1> | ||
|
||
<table class="table table-hover"> | ||
<thead><tr> | ||
<th>Username</th> | ||
<th>Real name</th> | ||
<th>Can edit users</th> | ||
<th>Actions</th> | ||
</tr></thead> | ||
% for user, data in USERS.items(): | ||
<tr> | ||
<td>${user}</td> | ||
<td>${data['name']}</td> | ||
<td> | ||
% if data['can_edit_users']: | ||
<i class="fa fa-check"></i> | ||
% else: | ||
<i class="fa fa-times"></i> | ||
% endif | ||
</td> | ||
<td> | ||
<div class="btn-group" role="group"> | ||
<a href="/users/${user}" class="btn btn-info btn-xs"><i class="fa fa-pencil"></i></a> | ||
% if user == USERNAME: | ||
<a href="#" class="btn btn-danger btn-xs disabled"><i class="fa fa-trash"></i></a> | ||
% else: | ||
<a href="/users/${user}/delete" class="btn btn-danger btn-xs"><i class="fa fa-trash"></i></a> | ||
% endif | ||
</div> | ||
</tr> | ||
% endfor | ||
<tr><form action="/users/create/new" method="POST"> | ||
<td><input name="name" placeholder="User to create"></td> | ||
<td></td> | ||
<td></td> | ||
<td><button type="submit" class="btn btn-success btn-xs"><i class="fa fa-check"></button></td> | ||
</form></tr> | ||
</table> | ||
|
||
</%block> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<%inherit file="base.tmpl"/> | ||
<%block name="extra_head"> | ||
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> | ||
</%block> | ||
<%block name="content"> | ||
<!-- New Page Modal --> | ||
<div class="modal fade" id="newPage" tabindex="-1" role="dialog" aria-labelledby="newPageLabel" aria-hidden="true"> | ||
<form method="POST" action="/new/page"> | ||
<div class="modal-dialog"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | ||
<h4 class="modal-title" id="newPageLabel">Create New Page?</h4> | ||
</div> | ||
<div class="modal-body"> | ||
<input class="form-control" name="title" id="title" placeholder="Title"> | ||
</div> | ||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | ||
<button type="submit" class="btn btn-primary">Create Page</button> | ||
</div> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
|
||
<!-- New Post Modal --> | ||
<div class="modal fade" id="newPost" tabindex="-1" role="dialog" aria-labelledby="newPostLabel" aria-hidden="true"> | ||
<form method="POST" action="/new/post"> | ||
<div class="modal-dialog"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | ||
<h4 class="modal-title" id="newPostLabel">Create New Post?</h4> | ||
</div> | ||
<div class="modal-body"> | ||
<input class="form-control" name="title" id="title" placeholder="Title"> | ||
</div> | ||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | ||
<button type="submit" class="btn btn-primary">Create Post</button> | ||
</div> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
|
||
|
||
<h1 class="title">Really delete <tt>${user}</tt>?</h1> | ||
<a class="btn btn-danger" href="./really_delete">Yes, really.</a> | ||
<a class="btn btn-default" href="/users">No</a> | ||
</%block> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
<%inherit file="base.tmpl"/> | ||
<%block name="extra_head"> | ||
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> | ||
</%block> | ||
<%block name="content"> | ||
<!-- New Page Modal --> | ||
<div class="modal fade" id="newPage" tabindex="-1" role="dialog" aria-labelledby="newPageLabel" aria-hidden="true"> | ||
<form method="POST" action="/new/page"> | ||
<div class="modal-dialog"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | ||
<h4 class="modal-title" id="newPageLabel">Create New Page?</h4> | ||
</div> | ||
<div class="modal-body"> | ||
<input class="form-control" name="title" id="title" placeholder="Title"> | ||
</div> | ||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | ||
<button type="submit" class="btn btn-primary">Create Page</button> | ||
</div> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
|
||
<!-- New Post Modal --> | ||
<div class="modal fade" id="newPost" tabindex="-1" role="dialog" aria-labelledby="newPostLabel" aria-hidden="true"> | ||
<form method="POST" action="/new/post"> | ||
<div class="modal-dialog"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | ||
<h4 class="modal-title" id="newPostLabel">Create New Post?</h4> | ||
</div> | ||
<div class="modal-body"> | ||
<input class="form-control" name="title" id="title" placeholder="Title"> | ||
</div> | ||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | ||
<button type="submit" class="btn btn-primary">Create Post</button> | ||
</div> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
|
||
% if not new: | ||
<h1 class="title">Editing profile <tt>${name}</tt></h1> | ||
% else: | ||
<h1 class="title">Creating profile <tt>${name}</tt></h1> | ||
% endif | ||
|
||
<form action="/users/${name}/save" method="POST"> | ||
<div class="form-group"> | ||
<label for="name">Real name</label> | ||
<input class="form-control" id="name" name="name" value="${user['name']}" | ||
placeholder="Real name" required> | ||
</div> | ||
<div class="form-group"> | ||
% if user['password']: | ||
<label for="passwd">New password (leave empty to keep previous):</label> | ||
% else: | ||
<label for="passwd">Password:</label> | ||
% endif | ||
<input type="password" class="form-control" id="password" name="password" | ||
% if user['password']: | ||
placeholder="New password" | ||
% else: | ||
placeholder="Password" required | ||
% endif | ||
> | ||
</div> | ||
<div class="checkbox"><label> | ||
<input type="checkbox" name="can_edit_users" | ||
% if user['can_edit_users']: | ||
checked | ||
% endif | ||
% if name == USERNAME: | ||
disabled | ||
% endif | ||
> Can edit users | ||
</label></div> | ||
<button type="submit" class="btn btn-default">Save</button> | ||
</form> | ||
|
||
</%block> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters