Browse Source

Admin layout adjustments.
It should be a little bit more clearer now.

sh4nks 11 years ago
parent
commit
a9b41ff1ac

+ 4 - 4
flaskbb/templates/admin/admin_layout.html

@@ -6,10 +6,10 @@
     <ul class="nav nav-tabs nav-justified">
         {{ navlink('admin.overview', 'Overview') }}
         {{ navlink('admin.settings', 'Settings') }}
-        {{ navlink('admin.users', 'Users') }}
-        {{ navlink('admin.groups', 'Groups') }}
-        {{ navlink('admin.forums', 'Forums') }}
-        {{ navlink('admin.unread_reports', 'Reports') }}
+        {{ navlink('admin.users', 'Users', active=active_admin_user_nav) }}
+        {{ navlink('admin.groups', 'Groups', active=active_admin_group_nav) }}
+        {{ navlink('admin.forums', 'Forums', active=active_admin_forum_nav) }}
+        {{ navlink('admin.unread_reports', 'Reports', active=active_admin_report_nav) }}
         {{ navlink('admin.plugins', 'Plugins') }}
     </ul>
 </div>

+ 23 - 13
flaskbb/templates/admin/category_form.html

@@ -1,23 +1,33 @@
 {% set page_title = title %}
-{% set active_forum_nav=True %}
+{% set active_admin_forum_nav=True %}
 
 {% extends theme("admin/admin_layout.html") %}
 {% block admin_content %}
-{% from theme("macros.html") import horizontal_field, render_boolean_field %}
+{% from theme("macros.html") import horizontal_field, render_boolean_field, navlink with context %}
 
-<form class="form-horizontal" role="form" method="post">
-    {{ form.hidden_tag() }}
-    <legend class="">{{ title }}</legend>
-        {{ horizontal_field(form.title) }}
-        {{ horizontal_field(form.description, rows=5, div_class="col-lg-9") }}
+<div class="col-md-3">
+    <ul class="nav nav-pills nav-stacked">
+        {{ navlink('admin.forums', "Manage Forums") }}
+        {{ navlink('admin.add_forum', "Add Forum") }}
+        {{ navlink('admin.add_category', "Add Category") }}
+    </ul>
+</div>
 
-        {{ horizontal_field(form.position) }}
+<div class="col-md-9">
+    <form class="form-horizontal" role="form" method="post">
+        {{ form.hidden_tag() }}
+        <legend class="">{{ title }}</legend>
+            {{ horizontal_field(form.title) }}
+            {{ horizontal_field(form.description, rows=5, div_class="col-lg-9") }}
 
-        <div class="form-group">
-            <div class="col-lg-offset-0 col-lg-9">
-                <button type="submit" class="btn btn-success">Save</button>
+            {{ horizontal_field(form.position) }}
+
+            <div class="form-group">
+                <div class="col-lg-offset-0 col-lg-9">
+                    <button type="submit" class="btn btn-success">Save</button>
+                </div>
             </div>
-        </div>
-</form>
+    </form>
+</div>
 
 {% endblock %}

+ 28 - 19
flaskbb/templates/admin/forum_form.html

@@ -1,31 +1,40 @@
 {% set page_title = title %}
-{% set active_forum_nav=True %}
+{% set active_admin_forum_nav=True %}
 
 {% extends theme("admin/admin_layout.html") %}
 {% block admin_content %}
-{% from theme("macros.html") import horizontal_field, render_boolean_field %}
+{% from theme("macros.html") import horizontal_field, render_boolean_field, navlink with context %}
 
-<form class="form-horizontal" role="form" method="post">
-    {{ form.hidden_tag() }}
-    <legend class="">{{ title }}</legend>
-        {{ horizontal_field(form.title) }}
-        {{ horizontal_field(form.description, rows=5, div_class="col-lg-9") }}
+<div class="col-md-3">
+    <ul class="nav nav-pills nav-stacked">
+        {{ navlink('admin.forums', "Manage Forums") }}
+        {{ navlink('admin.add_forum', "Add Forum") }}
+        {{ navlink('admin.add_category', "Add Category") }}
+    </ul>
+</div>
 
-        {{ horizontal_field(form.category) }}
-        {{ horizontal_field(form.position) }}
+<div class="col-md-9">
+    <form class="form-horizontal" role="form" method="post">
+        {{ form.hidden_tag() }}
+        <legend class="">{{ title }}</legend>
+            {{ horizontal_field(form.title) }}
+            {{ horizontal_field(form.description, rows=5, div_class="col-lg-9") }}
 
-        {{ horizontal_field(form.external) }}
+            {{ horizontal_field(form.category) }}
+            {{ horizontal_field(form.position) }}
 
-        {{ horizontal_field(form.moderators) }}
-        {{ render_boolean_field(form.show_moderators) }}
+            {{ horizontal_field(form.external) }}
 
-        {{ render_boolean_field(form.locked) }}
+            {{ horizontal_field(form.moderators) }}
+            {{ render_boolean_field(form.show_moderators) }}
 
-        <div class="form-group">
-            <div class="col-lg-offset-0 col-lg-9">
-                <button type="submit" class="btn btn-success">Save</button>
-            </div>
-        </div>
-</form>
+            {{ render_boolean_field(form.locked) }}
 
+            <div class="form-group">
+                <div class="col-lg-offset-0 col-lg-9">
+                    <button type="submit" class="btn btn-success">Save</button>
+                </div>
+            </div>
+    </form>
+</div>
 {% endblock %}

+ 61 - 50
flaskbb/templates/admin/forums.html

@@ -1,53 +1,64 @@
 {% extends theme("admin/admin_layout.html") %}
 {% block admin_content %}
-{% from theme('macros.html') import render_pagination %}
-
-<legend>Manage Forums | <a href="{{ url_for('admin.add_forum') }}">Add Forum</a> | <a href="{{ url_for('admin.add_category') }}">Add Category</a></legend>
-
-{% for category in categories %}
-<table class="table table-bordered">
-    <thead class="categoryhead">
-        <tr>
-            <td colspan="2">
-                <div><strong><a href="{{ url_for('forum.view_category', category_id=category.id) }}">{{ category.title }}</a></strong></div>
-            </td>
-            <td valign="top" align="center" style="white-space: nowrap">
-                <a href="{{ url_for('admin.add_forum', category_id=category.id) }}">Add Forum</a> |
-                <a href="{{ url_for('admin.edit_category', category_id = category.id) }}">Edit</a> |
-                <a href="{{ url_for('admin.delete_category', category_id = category.id) }}">Delete</a>
-            </td>
-        </tr>
-    </thead>
-    <tbody class="forumbody">
-        <tr class="forum_stats">
-            <td colspan="2"><strong>Forum</strong></td>
-            <td width="85" align="center" style="white-space: nowrap"><strong>Management</strong></td>
-        </tr>
-
-        {% for forum in category.forums %}
-        <tr>
-            <td align="center" valign="center" width="4%">
-
-            </td>
-
-            <td valign="top">
-                <strong><a href="{{ url_for('forum.view_forum', forum_id=forum.id) }}">{{ forum.title }}</a></strong>
-
-                <div class="forum-description">
-                    {% autoescape false %}
-                    {{ forum.description|markup }}
-                    {% endautoescape %}
-                </div>
-            </td>
-
-            <td valign="top" align="center" style="white-space: nowrap">
-                <a href="{{ url_for('admin.edit_forum', forum_id = forum.id) }}">Edit</a> |
-                <a href="{{ url_for('admin.delete_forum', forum_id = forum.id) }}">Delete</a>
-            </td>
-        </tr>
-        {% endfor %}
-
-    </tbody>
-</table>
-{% endfor %}
+{% from theme('macros.html') import render_pagination, navlink with context %}
+
+<div class="col-md-3">
+    <ul class="nav nav-pills nav-stacked">
+        {{ navlink('admin.forums', "Manage Forums") }}
+        {{ navlink('admin.add_forum', "Add Forum") }}
+        {{ navlink('admin.add_category', "Add Category") }}
+    </ul>
+</div>
+
+
+<div class="col-md-9">
+    <legend>Manage Forums</legend>
+
+    {% for category in categories %}
+    <table class="table table-bordered">
+        <thead class="categoryhead">
+            <tr>
+                <td colspan="2">
+                    <div><strong><a href="{{ url_for('forum.view_category', category_id=category.id) }}">{{ category.title }}</a></strong></div>
+                </td>
+                <td valign="top" align="center" style="white-space: nowrap">
+                    <a href="{{ url_for('admin.add_forum', category_id=category.id) }}">Add Forum</a> |
+                    <a href="{{ url_for('admin.edit_category', category_id = category.id) }}">Edit</a> |
+                    <a href="{{ url_for('admin.delete_category', category_id = category.id) }}">Delete</a>
+                </td>
+            </tr>
+        </thead>
+        <tbody class="forumbody">
+            <tr class="forum_stats">
+                <td colspan="2"><strong>Forum</strong></td>
+                <td width="85" align="center" style="white-space: nowrap"><strong>Management</strong></td>
+            </tr>
+
+            {% for forum in category.forums %}
+            <tr>
+                <td align="center" valign="center" width="4%">
+
+                </td>
+
+                <td valign="top">
+                    <strong><a href="{{ url_for('forum.view_forum', forum_id=forum.id) }}">{{ forum.title }}</a></strong>
+
+                    <div class="forum-description">
+                        {% autoescape false %}
+                        {{ forum.description|markup }}
+                        {% endautoescape %}
+                    </div>
+                </td>
+
+                <td valign="top" align="center" style="white-space: nowrap">
+                    <a href="{{ url_for('admin.edit_forum', forum_id = forum.id) }}">Edit</a> |
+                    <a href="{{ url_for('admin.delete_forum', forum_id = forum.id) }}">Delete</a>
+                </td>
+            </tr>
+            {% endfor %}
+
+        </tbody>
+    </table>
+    {% endfor %}
+</div>
 {% endblock %}

+ 37 - 29
flaskbb/templates/admin/group_form.html

@@ -1,35 +1,43 @@
 {% set page_title = title %}
-{% set active_forum_nav=True %}
+{% set active_admin_group_nav=True %}
 
 {% extends theme("admin/admin_layout.html") %}
 {% block admin_content %}
-{% from theme("macros.html") import horizontal_field, render_boolean_field %}
-
-<form class="form-horizontal" role="form" method="post">
-    {{ form.hidden_tag() }}
-    <legend class="">{{ title }}</legend>
-        {{ horizontal_field(form.name) }}
-        {{ horizontal_field(form.description) }}
-
-        {{ render_boolean_field(form.admin) }}
-        {{ render_boolean_field(form.super_mod) }}
-
-
-        {{ render_boolean_field(form.mod) }}
-        {{ render_boolean_field(form.banned) }}
-        {{ render_boolean_field(form.guest) }}
-
-        {{ render_boolean_field(form.editpost) }}
-        {{ render_boolean_field(form.deletepost) }}
-        {{ render_boolean_field(form.deletetopic) }}
-        {{ render_boolean_field(form.posttopic) }}
-        {{ render_boolean_field(form.postreply) }}
-
-        <div class="form-group">
-            <div class="col-lg-offset-0 col-lg-9">
-                <button type="submit" class="btn btn-success">Save</button>
+{% from theme("macros.html") import horizontal_field, render_boolean_field, navlink with context %}
+
+<div class="col-md-3">
+    <ul class="nav nav-pills nav-stacked">
+        {{ navlink('admin.groups', "Manage Groups") }}
+        {{ navlink('admin.add_group', "Add Group") }}
+    </ul>
+</div>
+
+<div class="col-md-9">
+    <form class="form-horizontal" role="form" method="post">
+        {{ form.hidden_tag() }}
+        <legend class="">{{ title }}</legend>
+            {{ horizontal_field(form.name) }}
+            {{ horizontal_field(form.description) }}
+
+            {{ render_boolean_field(form.admin) }}
+            {{ render_boolean_field(form.super_mod) }}
+
+
+            {{ render_boolean_field(form.mod) }}
+            {{ render_boolean_field(form.banned) }}
+            {{ render_boolean_field(form.guest) }}
+
+            {{ render_boolean_field(form.editpost) }}
+            {{ render_boolean_field(form.deletepost) }}
+            {{ render_boolean_field(form.deletetopic) }}
+            {{ render_boolean_field(form.posttopic) }}
+            {{ render_boolean_field(form.postreply) }}
+
+            <div class="form-group">
+                <div class="col-lg-offset-0 col-lg-9">
+                    <button type="submit" class="btn btn-success">Save</button>
+                </div>
             </div>
-        </div>
-</form>
-
+    </form>
+</div>
 {% endblock %}

+ 37 - 28
flaskbb/templates/admin/groups.html

@@ -1,34 +1,43 @@
 {% extends theme("admin/admin_layout.html") %}
 {% block admin_content %}
-{% from theme('macros.html') import render_pagination %}
+{% from theme('macros.html') import render_pagination, navlink with context %}
 
-<legend>Manage Groups | <a href="{{ url_for('admin.add_group') }}">Add Group</a></legend>
-
-<div class="pull-left" style="padding-bottom: 10px">
-    {{ render_pagination(groups, url_for('admin.groups')) }}
+<div class="col-md-3">
+    <ul class="nav nav-pills nav-stacked">
+        {{ navlink('admin.groups', "Manage Groups") }}
+        {{ navlink('admin.add_group', "Add Group") }}
+    </ul>
 </div>
 
-<table class="table table-bordered">
-    <thead>
-        <tr>
-            <th>#</th>
-            <th>Group Name</th>
-            <th>Description</th>
-            <th>Manage</th>
-        </tr>
-    </thead>
-    <tbody>
-        {% for group in groups.items %}
-        <tr>
-            <td>{{ group.id }}</td>
-            <td><a href="#">{{ group.name }}</a></td>
-            <td>{{ group.description }}</td>
-            <td>
-                <a href="{{ url_for('admin.edit_group', group_id = group.id) }}">Edit</a> |
-                <a href="{{ url_for('admin.delete_group', group_id = group.id) }}">Delete</a>
-            </td>
-        </tr>
-        {% endfor %}
-    </tbody>
-</table>
+<div class="col-md-9">
+    <legend>Manage Groups</legend>
+
+    <div class="pull-left" style="padding-bottom: 10px">
+        {{ render_pagination(groups, url_for('admin.groups')) }}
+    </div>
+
+    <table class="table table-bordered">
+        <thead>
+            <tr>
+                <th>#</th>
+                <th>Group Name</th>
+                <th>Description</th>
+                <th>Manage</th>
+            </tr>
+        </thead>
+        <tbody>
+            {% for group in groups.items %}
+            <tr>
+                <td>{{ group.id }}</td>
+                <td><a href="#">{{ group.name }}</a></td>
+                <td>{{ group.description }}</td>
+                <td>
+                    <a href="{{ url_for('admin.edit_group', group_id = group.id) }}">Edit</a> |
+                    <a href="{{ url_for('admin.delete_group', group_id = group.id) }}">Delete</a>
+                </td>
+            </tr>
+            {% endfor %}
+        </tbody>
+    </table>
+</div>
 {% endblock %}

+ 29 - 28
flaskbb/templates/admin/overview.html

@@ -1,32 +1,33 @@
 {% extends theme("admin/admin_layout.html") %}
 {% block admin_content %}
 
-<table class="table table-bordered">
-    <thead>
-        <tr>
-            <th colspan="4">Global Statistics</th>
-        </tr>
-    </thead>
-    <tbody>
-        <tr>
-            <td><b>FlaskBB Version</b></td>
-            <td>{{ flaskbb_version }}</td>
-            <td><b>Posts</b></td>
-            <td>{{ post_count }}</td>
-        </tr>
-        <tr>
-            <td><b>Python Version</b></td>
-            <td>{{ python_version }}</td>
-            <td><b>Topics</b></td>
-            <td>{{ topic_count }}</td>
-        </tr>
-        <tr>
-            <td><b>Flask Version</b></td>
-            <td>{{ flask_version }}</td>
-            <td><b>Users</b></td>
-            <td>{{ user_count }}</td>
-        </tr>
-    </tbody>
-</table>
-
+<div class="col-md-12">
+    <table class="table table-bordered">
+        <thead>
+            <tr>
+                <th colspan="4">Global Statistics</th>
+            </tr>
+        </thead>
+        <tbody>
+            <tr>
+                <td><b>FlaskBB Version</b></td>
+                <td>{{ flaskbb_version }}</td>
+                <td><b>Posts</b></td>
+                <td>{{ post_count }}</td>
+            </tr>
+            <tr>
+                <td><b>Python Version</b></td>
+                <td>{{ python_version }}</td>
+                <td><b>Topics</b></td>
+                <td>{{ topic_count }}</td>
+            </tr>
+            <tr>
+                <td><b>Flask Version</b></td>
+                <td>{{ flask_version }}</td>
+                <td><b>Users</b></td>
+                <td>{{ user_count }}</td>
+            </tr>
+        </tbody>
+    </table>
+</div>
 {% endblock %}

+ 44 - 33
flaskbb/templates/admin/reports.html

@@ -1,39 +1,50 @@
+{% set active_admin_report_nav=True %}
+
 {% extends theme("admin/admin_layout.html") %}
 {% block admin_content %}
-{% from theme('macros.html') import render_pagination %}
-
-<legend>Manage Reports | <a href="{{ url_for('admin.unread_reports') }}">Unread Reports</a></legend>
+{% from theme('macros.html') import render_pagination, navlink with context %}
 
-<div class="pull-left" style="padding-bottom: 10px">
-    {{ render_pagination(reports, url_for('admin.reports')) }}
+<div class="col-md-3">
+    <ul class="nav nav-pills nav-stacked">
+        {{ navlink('admin.unread_reports', "Show unread reports") }}
+        {{ navlink('admin.reports', "Show all reports") }}
+    </ul>
 </div>
 
-<table class="table table-bordered">
-    <thead>
-        <tr>
-            <th>#</th>
-            <th>Poster</th>
-            <th>Topic</th>
-            <th>Reporter</th>
-            <th>Reason</th>
-            <th>Reported</th>
-        </tr>
-    </thead>
-    <tbody>
-        {% for report in reports.items %}
-        <tr>
-            <td>{{ report.id }}</td>
-            <td>{{ report.post.user.username }}</td>
-            <td>{{ report.post.topic.title }}</td>
-            <td>{{ report.reporter.username }}</td>
-            <td>{{ report.reason }}</td>
-            <td>{{ report.reported|time_since }}</td>
-        </tr>
-        {% else %}
-        <tr>
-            <td colspan="6">No reports.</td>
-        </tr>
-        {% endfor %}
-    </tbody>
-</table>
+<div class="col-md-9">
+    <legend>All Reports</legend>
+
+    <div class="pull-left" style="padding-bottom: 10px">
+        {{ render_pagination(reports, url_for('admin.reports')) }}
+    </div>
+
+    <table class="table table-bordered">
+        <thead>
+            <tr>
+                <th>#</th>
+                <th>Poster</th>
+                <th>Topic</th>
+                <th>Reporter</th>
+                <th>Reason</th>
+                <th>Reported</th>
+            </tr>
+        </thead>
+        <tbody>
+            {% for report in reports.items %}
+            <tr>
+                <td>{{ report.id }}</td>
+                <td>{{ report.post.user.username }}</td>
+                <td>{{ report.post.topic.title }}</td>
+                <td>{{ report.reporter.username }}</td>
+                <td>{{ report.reason }}</td>
+                <td>{{ report.reported|time_since }}</td>
+            </tr>
+            {% else %}
+            <tr>
+                <td colspan="6">No reports.</td>
+            </tr>
+            {% endfor %}
+        </tbody>
+    </table>
+</div>
 {% endblock %}

+ 2 - 2
flaskbb/templates/admin/settings.html

@@ -12,7 +12,7 @@
             {% endif %}
         {% endfor %}
     </ul>
-</div><!--/.col-sm-3 -->
+</div><!--/.col-md-3 -->
 
 <div class="col-md-9">
 <legend>{{ active_group.name }}</legend>
@@ -34,7 +34,7 @@
         {% endif %}
     {%  endfor %}
 
-    <button type="submit" class="btn btn-default">Save</button>
+    <button type="submit" class="btn btn-success">Save</button>
 
 </form>
 </div>

+ 48 - 37
flaskbb/templates/admin/unread_reports.html

@@ -1,43 +1,54 @@
+{% set active_admin_report_nav=True %}
+
 {% extends theme("admin/admin_layout.html") %}
 {% block admin_content %}
-{% from theme('macros.html') import render_pagination %}
-
-<legend>Manage Reports | <a href="{{ url_for('admin.reports') }}">All Reports</a></legend>
+{% from theme('macros.html') import render_pagination, navlink with context %}
 
-<div class="pull-left" style="padding-bottom: 10px">
-    {{ render_pagination(reports, url_for('admin.unread_reports')) }}
+<div class="col-md-3">
+    <ul class="nav nav-pills nav-stacked">
+        {{ navlink('admin.unread_reports', "Show unread reports") }}
+        {{ navlink('admin.reports', "Show all reports") }}
+    </ul>
 </div>
 
-<table class="table table-bordered">
-    <thead>
-        <tr>
-            <th>#</th>
-            <th>Poster</th>
-            <th>Topic</th>
-            <th>Reporter</th>
-            <th>Reason</th>
-            <th>Reported</th>
-            <th><a href="{{ url_for('admin.report_markread') }}">Mark all as Read</a></th>
-        </tr>
-    </thead>
-    <tbody>
-        {% for report in reports.items %}
-        <tr>
-            <td>{{ report.id }}</td>
-            <td>{{ report.post.user.username }}</td>
-            <td>{{ report.post.topic.title }}</td>
-            <td>{{ report.reporter.username }}</td>
-            <td>{{ report.reason }}</td>
-            <td>{{ report.reported|time_since }}</td>
-            <td>
-                <a href="{{ url_for('admin.report_markread', report_id=report.id) }}">Mark as Read</a>
-            </td>
-        </tr>
-        {% else %}
-        <tr>
-            <td colspan="7">No unread reports.</td>
-        </tr>
-        {% endfor %}
-    </tbody>
-</table>
+<div class="col-md-9">
+    <legend>Unread Reports</legend>
+
+    <div class="pull-left" style="padding-bottom: 10px">
+        {{ render_pagination(reports, url_for('admin.unread_reports')) }}
+    </div>
+
+    <table class="table table-bordered">
+        <thead>
+            <tr>
+                <th>#</th>
+                <th>Poster</th>
+                <th>Topic</th>
+                <th>Reporter</th>
+                <th>Reason</th>
+                <th>Reported</th>
+                <th><a href="{{ url_for('admin.report_markread') }}">Mark all as Read</a></th>
+            </tr>
+        </thead>
+        <tbody>
+            {% for report in reports.items %}
+            <tr>
+                <td>{{ report.id }}</td>
+                <td>{{ report.post.user.username }}</td>
+                <td>{{ report.post.topic.title }}</td>
+                <td>{{ report.reporter.username }}</td>
+                <td>{{ report.reason }}</td>
+                <td>{{ report.reported|time_since }}</td>
+                <td>
+                    <a href="{{ url_for('admin.report_markread', report_id=report.id) }}">Mark as Read</a>
+                </td>
+            </tr>
+            {% else %}
+            <tr>
+                <td colspan="7">No unread reports.</td>
+            </tr>
+            {% endfor %}
+        </tbody>
+    </table>
+</div>
 {% endblock %}

+ 31 - 23
flaskbb/templates/admin/user_form.html

@@ -1,32 +1,40 @@
 {% set page_title = title %}
-{% set active_forum_nav=True %}
+{% set active_admin_user_nav=True %}
 
 {% extends theme("admin/admin_layout.html") %}
 {% block admin_content %}
-{% from theme("macros.html") import horizontal_field %}
+{% from theme("macros.html") import horizontal_field, navlink with context %}
 
-<form class="form-horizontal" role="form" method="post">
-    {{ form.hidden_tag() }}
-    <legend class="">{{ title }}</legend>
-        {{ horizontal_field(form.username) }}
-        {{ horizontal_field(form.email) }}
-        {{ horizontal_field(form.password) }}
-        {{ horizontal_field(form.birthday) }}
-        {{ horizontal_field(form.gender) }}
-        {{ horizontal_field(form.location) }}
-        {{ horizontal_field(form.website) }}
-        {{ horizontal_field(form.avatar) }}
-        {{ horizontal_field(form.primary_group) }}
-        {{ horizontal_field(form.secondary_groups) }}
-        {{ horizontal_field(form.signature, rows=5, div_class="col-sm-9") }}
-        {{ horizontal_field(form.notes, rows=12, div_class="col-sm-9") }}
+<div class="col-md-3">
+    <ul class="nav nav-pills nav-stacked">
+        {{ navlink('admin.users', "Manage Users") }}
+        {{ navlink('admin.add_user', "Add User") }}
+    </ul>
+</div><!--/.col-md-3 -->
 
+<div class="col-md-9">
+    <form class="form-horizontal" role="form" method="post">
+        {{ form.hidden_tag() }}
+        <legend class="">{{ title }}</legend>
+            {{ horizontal_field(form.username) }}
+            {{ horizontal_field(form.email) }}
+            {{ horizontal_field(form.password) }}
+            {{ horizontal_field(form.birthday) }}
+            {{ horizontal_field(form.gender) }}
+            {{ horizontal_field(form.location) }}
+            {{ horizontal_field(form.website) }}
+            {{ horizontal_field(form.avatar) }}
+            {{ horizontal_field(form.primary_group) }}
+            {{ horizontal_field(form.secondary_groups) }}
+            {{ horizontal_field(form.signature, rows=5, div_class="col-sm-9") }}
+            {{ horizontal_field(form.notes, rows=12, div_class="col-sm-9") }}
 
-        <div class="form-group">
-            <div class="col-sm-offset-3 col-sm-9">
-                <button type="submit" class="btn btn-success">Save</button>
-            </div>
-        </div>
-</form>
 
+            <div class="form-group">
+                <div class="col-sm-offset-3 col-sm-9">
+                    <button type="submit" class="btn btn-success">Save</button>
+                </div>
+            </div>
+    </form>
+</div>
 {% endblock %}

+ 56 - 48
flaskbb/templates/admin/users.html

@@ -1,56 +1,64 @@
 {% extends theme("admin/admin_layout.html") %}
 {% block admin_content %}
-{% from theme('macros.html') import render_pagination %}
-{% from theme("macros.html") import render_field, group_field %}
+{% from theme('macros.html') import render_pagination, render_field, group_field, navlink with context %}
 
-<legend>Manage Users | <a href="{{ url_for('admin.add_user') }}">Add User</a></legend>
+<div class="col-md-3">
+    <ul class="nav nav-pills nav-stacked">
+        {{ navlink('admin.users', "Manage Users") }}
+        {{ navlink('admin.add_user', "Add User") }}
+    </ul>
+</div><!--/.col-md-3 -->
 
-<div class="pull-left" style="padding-bottom: 10px">
-    {{ render_pagination(users, url_for('admin.users')) }}
-</div>
-<div class="pull-right" style="padding-bottom: 10px">
-    <form role="form" method="post">
-        <div class="input-group">
-            {{ search_form.hidden_tag() }}
-            {{ group_field(search_form.search_query) }}
-      <span class="input-group-btn">
-        <button class="btn btn-primary" type="button">Search</button>
-      </span>
-        </div>
-    </form>
-</div>
+<div class="col-md-9">
+    <legend>Manage Users</legend>
 
-<table class="table table-bordered">
-    <thead>
-        <tr>
-            <th>#</th>
-            <th>Username</th>
-            <th>Posts</th>
-            <th>Date registered</th>
-            <th>Group</th>
-            <th>Manage</th>
-        </tr>
-    </thead>
-    <tbody>
-        {% for user in users.items %}
-            <tr>
-                <td>{{ user.id }}</td>
-                <td><a href="{{ url_for('user.profile', username=user.username) }}">{{ user.username }}</a></td>
-                <td>{{ user.post_count }}</td>
-                <td>{{ user.date_joined|format_date('%b %d %Y') }}</td>
-                <td>{{ user.primary_group.name }}</td>
-                <td>
-                    <a href="{{ url_for('admin.edit_user', user_id = user.id) }}">Edit</a> |
-                    <a href="{{ url_for('admin.delete_user', user_id = user.id) }}">Delete</a>
-                </td>
-            </tr>
-        {% else %}
+    <div class="pull-left" style="padding-bottom: 10px">
+        {{ render_pagination(users, url_for('admin.users')) }}
+    </div>
+    <div class="pull-right" style="padding-bottom: 10px">
+        <form role="form" method="post">
+            <div class="input-group">
+                {{ search_form.hidden_tag() }}
+                {{ group_field(search_form.search_query) }}
+          <span class="input-group-btn">
+            <button class="btn btn-primary" type="button">Search</button>
+          </span>
+            </div>
+        </form>
+    </div>
+
+    <table class="table table-bordered">
+        <thead>
             <tr>
-                <td colspan="6">
-                    No users found matching your search query
-                </td>
+                <th>#</th>
+                <th>Username</th>
+                <th>Posts</th>
+                <th>Date registered</th>
+                <th>Group</th>
+                <th>Manage</th>
             </tr>
-        {% endfor %}
-    </tbody>
-</table>
+        </thead>
+        <tbody>
+            {% for user in users.items %}
+                <tr>
+                    <td>{{ user.id }}</td>
+                    <td><a href="{{ url_for('user.profile', username=user.username) }}">{{ user.username }}</a></td>
+                    <td>{{ user.post_count }}</td>
+                    <td>{{ user.date_joined|format_date('%b %d %Y') }}</td>
+                    <td>{{ user.primary_group.name }}</td>
+                    <td>
+                        <a href="{{ url_for('admin.edit_user', user_id = user.id) }}">Edit</a> |
+                        <a href="{{ url_for('admin.delete_user', user_id = user.id) }}">Delete</a>
+                    </td>
+                </tr>
+            {% else %}
+                <tr>
+                    <td colspan="6">
+                        No users found matching your search query
+                    </td>
+                </tr>
+            {% endfor %}
+        </tbody>
+    </table>
+</div>
 {% endblock %}

+ 2 - 2
flaskbb/templates/macros.html

@@ -165,8 +165,8 @@
 {% endmacro %}
 
 
-{% macro navlink(endpoint, name) %}
-<li {% if endpoint == request.endpoint %}class="active"{% endif %}>
+{% macro navlink(endpoint, name, active=False) %}
+<li {% if endpoint == request.endpoint or active %}class="active"{% endif %}>
     <a href={{ url_for(endpoint) }}>{{ name }}</a>
 </li>
 {% endmacro %}