2015-08-02 11:59:11 -07:00
|
|
|
{% extends "layout.html" %}
|
|
|
|
{% block body %}
|
|
|
|
<div class="discover">
|
|
|
|
<h1>{{title}}</h1>
|
|
|
|
<form role="form" method="POST">
|
2015-10-13 09:07:17 -07:00
|
|
|
{% if g.user and g.user.role and new_user %}
|
|
|
|
<div class="form-group required">
|
|
|
|
<label for="nickname">Username</label>
|
|
|
|
<input type="text" class="form-control" name="nickname" id="nickname" value="{{ content.nickname if content.nickname != None }}">
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2015-08-02 11:59:11 -07:00
|
|
|
<div class="form-group">
|
2015-10-13 09:07:17 -07:00
|
|
|
<label for="email">Email address</label>
|
|
|
|
<input type="email" class="form-control" name="email" id="email" value="{{ content.email if content.email != None }}" required>
|
2015-08-02 11:59:11 -07:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2015-10-13 09:07:17 -07:00
|
|
|
<label for="password">Password</label>
|
2015-08-02 11:59:11 -07:00
|
|
|
<input type="password" class="form-control" name="password" id="password" value="">
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="kindle_mail">Kindle E-Mail</label>
|
2015-08-02 12:43:33 -07:00
|
|
|
<input type="text" class="form-control" name="kindle_mail" id="kindle_mail" value="{{ content.kindle_mail if content.kindle_mail != None }}">
|
2015-08-02 11:59:11 -07:00
|
|
|
</div>
|
2015-10-13 09:07:17 -07:00
|
|
|
{% if g.user and g.user.role and not profile %}
|
2015-08-02 11:59:11 -07:00
|
|
|
<div class="form-group">
|
2015-10-13 09:07:17 -07:00
|
|
|
<label for="user_role">Admin user</label>
|
|
|
|
<input type="checkbox" name="admin_user" id="admin_user" {% if content.role %}checked{% endif %}>
|
2015-08-02 11:59:11 -07:00
|
|
|
</div>
|
2015-10-13 09:07:17 -07:00
|
|
|
{% endif %}
|
|
|
|
{% if g.user and g.user.role and not profile and not new_user %}
|
2015-08-02 11:59:11 -07:00
|
|
|
<div class="checkbox">
|
|
|
|
<label>
|
|
|
|
<input type="checkbox" name="delete"> Delete this user
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
<button type="submit" class="btn btn-default">Submit</button>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
{% if downloads %}
|
|
|
|
<h2>Recent Downloads</h2>
|
|
|
|
{% for entry in downloads %}
|
|
|
|
<div class="col-sm-2">
|
|
|
|
<a class="pull-left" href="{{ url_for('show_book', id=entry.id) }}">
|
|
|
|
<img class="media-object" width="100" src="{{ url_for('get_cover', cover_path=entry.path) }}" alt="...">
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|