summaryrefslogtreecommitdiffstats
path: root/inventar
diff options
context:
space:
mode:
authorSebastian Reichel <sre@ring0.de>2012-07-27 01:36:26 +0200
committerSebastian Reichel <sre@ring0.de>2012-07-27 01:36:26 +0200
commitf07de9c031d7612b8ca656c34ebce57f6856b6b2 (patch)
treea711318f19dff5e5231b7482ce4177c2c72816e6 /inventar
parentffdfc69cc69503e71c0f001c3e8d8a2f06abb578 (diff)
downloadktt-inventory-system-f07de9c031d7612b8ca656c34ebce57f6856b6b2.tar.bz2
add new statistics page
Diffstat (limited to 'inventar')
-rw-r--r--inventar/templates/base.html1
-rw-r--r--inventar/templates/stats.html17
-rw-r--r--inventar/urls.py2
3 files changed, 20 insertions, 0 deletions
diff --git a/inventar/templates/base.html b/inventar/templates/base.html
index c61e012..d72414a 100644
--- a/inventar/templates/base.html
+++ b/inventar/templates/base.html
@@ -15,6 +15,7 @@
<ul>
<li><a href="{% url home %}"><img src="/static/home.svg" width="24" height="24" /> {% trans "Home" %}</a></li>
<li><a href="{% url admin:index %}"><img src="/static/admin.svg" width="24" height="24" /> {% trans "Admin Area" %}</a></li>
+ <li><a href="{% url stats %}"><img src="/static/stats.svg" width="24" height="24" /> {% trans "Statistics" %}</a></li>
<li><br></li>
<li>{% trans "Search Item" %}:
<ul>
diff --git a/inventar/templates/stats.html b/inventar/templates/stats.html
new file mode 100644
index 0000000..10829a7
--- /dev/null
+++ b/inventar/templates/stats.html
@@ -0,0 +1,17 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+ <h2>Statistics:</h2>
+
+ <ul>
+ <li>Number of codes: {{ number_of_codes }}
+ <li>Number of items: {{ number_of_items }}
+ <ul>
+ <li>with parent: {{ number_of_items_with_parent }}
+ <li>without parent: {{ number_of_items_without_parent }}
+ </ul>
+ </ul>
+
+ Work in Progress...
+{% endblock %}
diff --git a/inventar/urls.py b/inventar/urls.py
index b77dae7..3510ae0 100644
--- a/inventar/urls.py
+++ b/inventar/urls.py
@@ -7,6 +7,7 @@ from inventory.views import home
from inventory.views import item
from inventory.views import search
from inventory.views import graph
+from inventory.views import stats
urlpatterns = patterns('',
url(r'^$', home, name='home'),
@@ -14,6 +15,7 @@ urlpatterns = patterns('',
url(r'^item/(?P<selectedid>[0-9A-Za-z]{4})/$', item, name='item'),
url(r'^search/(?P<term>[^/]+)/$', search, name='search'),
url(r'^graph/$', graph, name='graph'),
+ url(r'^stats/$', stats, name='stats'),
url(r'^admin/', include(admin.site.urls)),
)