From 6acc69b519422171eb661edbe192bf2074ce6d8f Mon Sep 17 00:00:00 2001 From: Johan Lundberg Date: Wed, 2 Apr 2014 17:25:00 +0200 Subject: Added more views for content. --- templates/apps/content/cluster.html | 59 +++++++++++++++++++++++++++++++++++++ templates/apps/content/domain.html | 50 +++++++++++++++++++++++++++++++ templates/apps/content/user.html | 27 ++++++++++++----- 3 files changed, 128 insertions(+), 8 deletions(-) create mode 100644 templates/apps/content/cluster.html create mode 100644 templates/apps/content/domain.html (limited to 'templates/apps') diff --git a/templates/apps/content/cluster.html b/templates/apps/content/cluster.html new file mode 100644 index 0000000..6d30690 --- /dev/null +++ b/templates/apps/content/cluster.html @@ -0,0 +1,59 @@ +{% extends "base.html" %} +{% block js %} + + + + + +{% endblock %} +{% block content %} + +{% if cluster_name %} +

Storage for {{cluster_name}}

+
+ Total storage: {{ total_bytecount|filesizeformat }} +
+
+
+
+ + + + + + + + {% for domain in domains %} + + + + + + + {% endfor %} + +
DomainNumber of filesStorage usedPercent
{{ domain.domain }}{{ domain.number_of_files }}{{ domain.domain_bytes|filesizeformat}}{% widthratio domain.domain_bytes total_bytecount 100 %}%
+
+{% endif %} +{% endblock %} + +{% block widgets %} + +{% endblock %} \ No newline at end of file diff --git a/templates/apps/content/domain.html b/templates/apps/content/domain.html new file mode 100644 index 0000000..5efd236 --- /dev/null +++ b/templates/apps/content/domain.html @@ -0,0 +1,50 @@ +{% extends "base.html" %} +{% block js %} + + + + + +{% endblock %} +{% block content %} +

Content for {{domain}}

+
+ Number of files: {{ total_files }} | Total storage: {{ total_bytecount|filesizeformat }} +
+
+
+
+ + + + + + + + {% for user in users %} + + + + + + + {% endfor %} + +
UsernameNumber of filesStorage usedPercent
{{ user.username }}{{ user.number_of_files }}{{ user.bytecount|filesizeformat }}{% widthratio user.bytecount total_bytecount 100 %}%
+
+{% endblock %} + +{% block widgets %} + +{% endblock %} \ No newline at end of file diff --git a/templates/apps/content/user.html b/templates/apps/content/user.html index b02ad77..697bba7 100644 --- a/templates/apps/content/user.html +++ b/templates/apps/content/user.html @@ -2,17 +2,28 @@ {% block js %} + + {% endblock %} -{% load content_tags %} {% block content %}

Content for {{username}}

- Number of files: {{ content|length }} | Total storage: {{ total_bytecount.bytecount__sum|humanize_bytes }} + Number of files: {{ content|length }} | Total storage: {{ total_bytecount.bytecount__sum|filesizeformat }}


@@ -26,14 +37,14 @@ {% for item in content %} - {{ item.created }} - {{ item.name }} + {{ item.created|date:"d/m/Y H:i:s" }} + {{ item.name }} {{ item.type }} - {{ item.bytecount|humanize_bytes }} - {{ item.modified }} + {{ item.bytecount|filesizeformat }} + {{ item.modified|date:"d/m/Y H:i:s" }} {{ item.views }} - {{ item.lastviewed }} + {{ item.lastviewed|date:"d/m/Y H:i:s" }} {% endfor %} -- cgit v1.1