Manage Consumables
diff --git a/ordr2/templates/admin/user_list.jinja2 b/ordr2/templates/admin/user_list.jinja2
new file mode 100644
index 0000000..5582222
--- /dev/null
+++ b/ordr2/templates/admin/user_list.jinja2
@@ -0,0 +1,90 @@
+{% extends "ordr2:templates/layout.jinja2" %}
+{% import 'ordr2:templates/macros.jinja2' as macros with context %}
+
+{% block subtitle %} Admin | Users {% endblock subtitle %}
+
+{% block content %}
+
+
+
+
+
+
+
+ Users
+
+
+ {{ macros.filter_box('Role', 'role', roles) }}
+
+
+
+
+
+
+{% endblock content %}
diff --git a/ordr2/templates/macros.jinja2 b/ordr2/templates/macros.jinja2
index 7fb24ba..95f5943 100644
--- a/ordr2/templates/macros.jinja2
+++ b/ordr2/templates/macros.jinja2
@@ -14,3 +14,61 @@
{% endfor %}
{% endfor %}
{%- endmacro %}
+
+
+{% macro filter_box(title, query_key, items) -%}
+
+{%- endmacro %}
+
+
+{% macro sortable_table_header(title, sort_by) -%}
+
+{%- endmacro %}
+
+
+{% macro pagination_helper(page, text=None, css_class='') -%}
+ {% set is_active = 'active' if page == context.pages.current %}
+ {% set is_disabled = 'disabled' if not page %}
+ {% set url = context.url( (context.query_key_current_page, page) ) if page %}
+
+ {{ text if text else page }}
+
+{%- endmacro %}}
+
+{% macro pagination() -%}
+ {% if context.pages and context.pages.last > 1 %}
+
+ {% endif %}
+{%- endmacro %}
+
+
diff --git a/ordr2/views/admin.py b/ordr2/views/admin.py
index 8f7749f..93b4a04 100644
--- a/ordr2/views/admin.py
+++ b/ordr2/views/admin.py
@@ -29,3 +29,15 @@ def admin_section(context, request):
processed.'''.format(request.resource_url(context, 'users'))
)
return {}
+
+
+@view_config(
+ context='ordr2:resources.UserList',
+ permission='view',
+ renderer='ordr2:templates/admin/user_list.jinja2'
+ )
+def user_list(context, request):
+ ''' display the user list '''
+ users = context.items()
+ roles = [(role.name, role.value.capitalize()) for role in Role]
+ return {'users':users, 'roles':roles}