added pages to modify and save users.

also move alot of validation code to the form classes.
This commit is contained in:
2015-07-24 10:14:16 +01:00
parent f1972a9738
commit f3d2a9e6ac
7 changed files with 248 additions and 45 deletions

View File

@@ -41,7 +41,7 @@
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
{% for page, link in menu.menu_items.items %}
<li{% if menu.current_page = page %} class="active"{% endif %}><a href="{{ link }}">{{ page }}</a></li>
<li {% if menu.current_page = page %} class="active"{% endif %}><a href="{{ link }}">{{ page }}</a></li>
{% endfor %}
</ul>
</div><!--/.nav-collapse -->

View File

@@ -2,6 +2,16 @@
{% block title %}CBreader - Settings{% endblock %}
{% block breadcrumb %}
{% for crumb in breadcrumbs %}
{% if not forloop.last %}
<li><a href="{{ crumb.url }}">{{ crumb.name }}</a></li>
{% else %}
<li class="active">{{ crumb.name }}</li>
{% endif %}
{% endfor %}
{% endblock %}
{% block content %}
{% if error_message %}
<div class="alert alert-danger" role="alert">{{ error_message|safe }}</div>
@@ -13,7 +23,7 @@
{% csrf_token %}
{% for item in form %}
<div class="form-group">
<label for="base_directory">{{ item.help_text }}</label>
<label for="{{ item.id_for_label }}">{{ item.help_text }}</label>
{{ item }}
</div>
{% endfor %}

View File

@@ -2,6 +2,16 @@
{% block title %}CBreader - Users{% endblock %}
{% block breadcrumb %}
{% for crumb in breadcrumbs %}
{% if not forloop.last %}
<li><a href="{{ crumb.url }}">{{ crumb.name }}</a></li>
{% else %}
<li class="active">{{ crumb.name }}</li>
{% endif %}
{% endfor %}
{% endblock %}
{% block content %}
<table class="table table-striped table-bordered table-hover">
<thead>
@@ -23,8 +33,9 @@
{% endfor %}
</tbody>
</table>
</table>
<a class="btn btn-default" href="/comic/settings/users/add/" role="button">Add User</a>
{% endblock %}
{% block script %}