mirror of
https://github.com/journeyman-cc/smeagol.git
synced 2026-04-12 18:05:06 +00:00
Seems all to be working now. You can't actually delete users through the user
interface, but you can add and edit them.
This commit is contained in:
parent
de7a553a86
commit
09fe67a26e
13 changed files with 351 additions and 193 deletions
|
|
@ -10,30 +10,27 @@
|
|||
</head>
|
||||
<body>
|
||||
<header class="wiki">
|
||||
<!-- navbar -->
|
||||
<div id="nav">
|
||||
{% if user %}
|
||||
<p class="user" id="user">You are logged in as {{user}} | <a href="passwd">change password</a></p>
|
||||
<!-- navbar -->
|
||||
<div id="nav">
|
||||
{% if user %}
|
||||
<p class="user" id="user">You are logged in as {{user}} | <a href="passwd">change password</a></p>
|
||||
{% endif %}
|
||||
<img id="nav-icon" src="{{servlet-context}}/img/threelines.png" alt="Menu"/>
|
||||
<ul id="nav-menu" class="nav">
|
||||
<li class="{{wiki-selected}}"><a href="{{servlet-context}}/">Home</a></li>
|
||||
{% if admin %}
|
||||
<li class="{{admin-selected}}"><a href="{{servlet-context}}/edit-users">Edit users</a></li>
|
||||
{% endif %}
|
||||
<img id="nav-icon" src="{{servlet-context}}/img/threelines.png" alt="Menu"/>
|
||||
<ul id="nav-menu" class="nav">
|
||||
<li class="{{wiki-selected}}"><a href="{{servlet-context}}/">Home</a></li>
|
||||
<li class="{{auth-selected}}"><a href="{{servlet-context}}/auth">
|
||||
{% if user %}
|
||||
Log out
|
||||
{% else %}
|
||||
Log in
|
||||
{% endif %}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<h1>{{title}}</h1>
|
||||
{{header|safe}}
|
||||
</header>
|
||||
<div id="side-bar" class="wiki">
|
||||
{{side-bar|safe}}
|
||||
</div>
|
||||
|
||||
<div id="main-container" class="container">
|
||||
<li class="{{auth-selected}}"><a href="{{servlet-context}}/auth">
|
||||
{% if user %}
|
||||
Log out
|
||||
{% else %}
|
||||
Log in
|
||||
{% endif %}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<h1>{{title}}</h1>
|
||||
{{header|safe}}
|
||||
{% if message %}
|
||||
<div id="message">
|
||||
<p class="message">{{message}}</p>
|
||||
|
|
@ -44,7 +41,12 @@
|
|||
<p class="error">{{error}}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</header>
|
||||
<div id="side-bar" class="wiki">
|
||||
{{side-bar|safe}}
|
||||
</div>
|
||||
|
||||
<div id="main-container" class="container">
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
|
@ -62,8 +64,8 @@
|
|||
<footer>
|
||||
<div id="credits">
|
||||
<div>
|
||||
One Wiki to rule them all ||
|
||||
<img height="16" width="16" alt="one wiki to rule them all" src="img/smeagol.png"/>Smeagol wiki engine {{version}} ||
|
||||
<img height="16" width="16" alt="one wiki to rule them all" src="img/smeagol.png"/>One Wiki to rule them all ||
|
||||
Smeagol wiki engine {{version}} ||
|
||||
<img height="16" width="16" alt="The Web Engineering Factory & Toolworks" src="http://www.weft.scot/images/weft.logo.64.png"> Developed by <a href="http://www.weft.scot/">WEFT</a>
|
||||
</div>
|
||||
<div>
|
||||
|
|
|
|||
32
resources/templates/edit-user.html
Normal file
32
resources/templates/edit-user.html
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{% extends "templates/base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div id="content" class="edit">
|
||||
<form action="{{servlet-context}}/edit-user" method="POST">
|
||||
<p class="widget">
|
||||
<label for="target">Username</label>
|
||||
<input type="text" name="target" id="target" value="{{target}}" required/>
|
||||
</p>
|
||||
<p class="widget">
|
||||
<label for="pass1">New password</label>
|
||||
<input name="pass1" id="pass1" type="password"/>
|
||||
</p>
|
||||
<p class="widget">
|
||||
<label for="pass2">And again</label>
|
||||
<input name="pass2" id="pass2" type="password"/>
|
||||
</p>
|
||||
<p class="widget">
|
||||
<label for="email">Email address</label>
|
||||
<input name="email" id="email" type="text" value="{{details.email}}" required/>
|
||||
</p>
|
||||
<p class="widget">
|
||||
<label for="admin">Is administrator?</label>
|
||||
<input name="admin" id="admin" type="checkbox" {% if details.admin %}checked{% endif %}/>
|
||||
</p>
|
||||
<p class="widget">
|
||||
<label for="submit">When you have finished editing</label>
|
||||
<input name="submit" id="submit" type="submit" class="action" value="Save!"/>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
12
resources/templates/edit-users.html
Normal file
12
resources/templates/edit-users.html
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{% extends "templates/base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div id="content">
|
||||
<ul>
|
||||
{% for user in users %}
|
||||
<li><a href="edit-user?target={{user}}">{{user}}</a></li>
|
||||
{% endfor %}
|
||||
<li><a href="edit-user">Add new user</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
@ -3,20 +3,20 @@
|
|||
<div id="content" class="auth">
|
||||
<form action="{{servlet-context}}/passwd" method="POST">
|
||||
<p class="widget">
|
||||
<label for="password">Your password</label>
|
||||
<label for="oldpass">Your password</label>
|
||||
<input name="oldpass" id="oldpass" type="password" required/>
|
||||
</p>
|
||||
<p class="widget">
|
||||
<label for="password">New password</label>
|
||||
<label for="pass1">New password</label>
|
||||
<input name="pass1" id="pass1" type="password" required/>
|
||||
</p>
|
||||
<p class="widget">
|
||||
<label for="password">And again</label>
|
||||
<label for="pass2">And again</label>
|
||||
<input name="pass2" id="pass2" type="password" required/>
|
||||
</p>
|
||||
<p class="widget">
|
||||
<label for="submit">To edit this wiki</label>
|
||||
<input name="action" id="action" type="submit" class="action" value="Login!"/>
|
||||
<input name="action" id="action" type="submit" class="action" value="Change password!"/>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -2,10 +2,12 @@
|
|||
|
||||
{% block content %}
|
||||
<div id="content" class="wiki">
|
||||
{% if editable %}
|
||||
<ul class="minor-controls">
|
||||
<li><a href="{{servlet-context}}/edit?page={{title}}">Edit this page</a></li>
|
||||
<li><a href="history?page={{page}}">History</a></li>
|
||||
</ul>
|
||||
{{content|safe}}
|
||||
{% endif %}
|
||||
{{content|safe}}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue