From 05b408ad3047e40a63c16c367500e925986490a1 Mon Sep 17 00:00:00 2001 From: Sebastian Reichel Date: Fri, 27 Jul 2012 00:25:24 +0200 Subject: add templates --- inventar/templates/404.html | 6 + .../templates/admin/inventory/change_form.html | 17 +++ inventar/templates/base.html | 33 ++++++ inventar/templates/graph.txt | 25 +++++ inventar/templates/home.html | 50 +++++++++ inventar/templates/item.html | 124 +++++++++++++++++++++ inventar/templates/search.html | 27 +++++ 7 files changed, 282 insertions(+) create mode 100644 inventar/templates/404.html create mode 100644 inventar/templates/admin/inventory/change_form.html create mode 100644 inventar/templates/base.html create mode 100644 inventar/templates/graph.txt create mode 100644 inventar/templates/home.html create mode 100644 inventar/templates/item.html create mode 100644 inventar/templates/search.html diff --git a/inventar/templates/404.html b/inventar/templates/404.html new file mode 100644 index 0000000..52ec653 --- /dev/null +++ b/inventar/templates/404.html @@ -0,0 +1,6 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block content %} +

page not found.

+{% endblock %} diff --git a/inventar/templates/admin/inventory/change_form.html b/inventar/templates/admin/inventory/change_form.html new file mode 100644 index 0000000..5ee5442 --- /dev/null +++ b/inventar/templates/admin/inventory/change_form.html @@ -0,0 +1,17 @@ +{% extends "admin/change_form.html" %} + +{% block extrahead %} + {{ block.super }} + + + + +{% endblock %} + +{% block after_related_objects %} + {{ block.super }} + +{% endblock %} diff --git a/inventar/templates/base.html b/inventar/templates/base.html new file mode 100644 index 0000000..c61e012 --- /dev/null +++ b/inventar/templates/base.html @@ -0,0 +1,33 @@ +{% load i18n %} + + + + {% block title %}KtT Inventory System{% endblock %} + + + +
+

{% block pagetitle %}KtT Inventory System{% endblock %}

+
+ +
+ + +
+ {% block content %}{% endblock %} +
+
+ + diff --git a/inventar/templates/graph.txt b/inventar/templates/graph.txt new file mode 100644 index 0000000..74e26f0 --- /dev/null +++ b/inventar/templates/graph.txt @@ -0,0 +1,25 @@ +{% load graph_extras %} +# Graph of KtT Inventory +# +# Usage: +# wget -O graph.txt "http://hackspace.elektranox.org/graph/" +# graph-easy --dot graph.txt > graph.dot +# dot -Tsvg < graph.dot > graph1.svg +# twopi -Tsvg < graph.dot > graph2.svg +# circo -Tsvg < graph.dot > graph3.svg + +graph { + label: Graph of KtT Items; + autolink: name; + linkbase: http://hackspace.elektranox.org/item/ +} + +{% autoescape off %} +{% for item in items %} +{% if item.parent %} +[{{item.one_barcode}}] { label: "{{item.name|graphescape}}" } -> [{{item.parent.one_barcode}}] +{% else %} +[{{item.one_barcode}}] { label: "{{item.name|graphescape}}" } +{% endif %} +{% endfor %} +{% endautoescape %} diff --git a/inventar/templates/home.html b/inventar/templates/home.html new file mode 100644 index 0000000..567c39e --- /dev/null +++ b/inventar/templates/home.html @@ -0,0 +1,50 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block content %} +

Verwendung:

+ +

Fall 1: Suchen eines Gegenstands

+

+

    +
  1. Den gesuchten Gegenstand links in die Suchmaske eingeben.
  2. +
  3. Die Suchergebnisse erscheinen im Hauptfenster.
  4. +
  5. Suchergebnis auswählen.
  6. +
  7. Der Pfad zum Gegenstand ist als Baum dargestellt.
  8. +
+

+ +

Fall 2: Zurückbringen eines Gegenstands

+

+

    +
  1. Alle Gegenständen ist mindestens ein viertstelliger Code zugewiesen.
  2. +
  3. Dieser kann einfach links in das Code Suchfeld eingetragen werden.
  4. +
  5. Man gelangt so direkt zu der Info Seite des Gegenstands.
  6. +
  7. Unter dem Pfad lässt sich der Ablageort des Gegenstands finden.
  8. +
+

+ +

Fall 3: Einräumen einer Kiste/eines Schrankes/...

+

+

    +
  1. Die Seite des Gegenstands öffnen, der befüllt werden soll.
  2. +
  3. Dort gibt es ein Feld "Kinderelemente", welche alle Gegenstände listet, + die Unterlemente sind.
  4. +
+

+ +

Sonstige Erklärungen

+

+

    +
  1. Einige Gegenstände haben temporär einen gesonderten Ort. Der Pfad zu diesem wird + direkt unter dem normalen Pfad dargestellt.
  2. +
  3. Ob Gegenstände frei zur Verfügung stehen lässt sich an dem "in Benutzung" Feld + erkennen (Das Icon sind zwei Zahnräder).
  4. +
  5. Bei einigen Gegenständen handelt es sich um Dauerleihgaben von Mitgliedern. Dies + lässt sich am Besitzer Feld erkennen. Das Feld ist nur bei Gegenständen vorhanden, + welche auch einen Besitzer haben (Das Icon ist eine Person).
  6. +
+

+ + +{% endblock %} diff --git a/inventar/templates/item.html b/inventar/templates/item.html new file mode 100644 index 0000000..d144a18 --- /dev/null +++ b/inventar/templates/item.html @@ -0,0 +1,124 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block content %} + {% if user.is_authenticated %} +

{{ name }} [edit]

+ {% else %} +

{{ name }}

+ {% endif %} + + + + + + + + + + + + + + + + + + {% if image %} + + + + + {% endif %} + + + + {% if in_use %} + + {% else %} + + {% endif %} + + + + + + + + {% if temporary_parent %} + + + + + {% endif %} + + {% if children %} + + + + + {% endif %} + + + + + + + {% if owner %} + + + + + {% endif %} +
{% trans "Name" %}{{ name }}
{% trans {{ codes }}
{% trans
{{ description }}
{% trans {% trans
{% trans TrueFalse
{% trans + {% for p in parentpath %} + {% if p.one_barcode %} +
  • {{ p.name }} [{{ p.barcodes }}] + {% else %} +
    • {{ p.name }} [{{ p.barcodes }}] + {% endif %} + {% endfor %} + {% for p in parentpath %} +
    + {% endfor %} +
{% trans + {% for p in temporary_parentpath %} + {% if p.one_barcode %} +
  • {{ p.name }} [{{ p.barcodes }}] + {% else %} +
    • {{ p.name }} [{{ p.barcodes }}] + {% endif %} + {% endfor %} + {% for p in temporary_parentpath %} +
    + {% endfor %} +
{% trans + {% if children %} + + {% else %} + {% trans "No Children defined!" %} + {% endif %} +
{% trans + {% if tags %} +
    + {% for tag in tags %} + {% if tag.icon %} +
  • {{ tag.name }}
  • + {% else %} +
  • {{ tag.name }}
  • + {% endif %} + {% endfor %} +
+ {% else %} + {% trans "No Tags defined!" %} + {% endif %} +
{% trans {{ owner }}
+{% endblock %} diff --git a/inventar/templates/search.html b/inventar/templates/search.html new file mode 100644 index 0000000..5a1f1cf --- /dev/null +++ b/inventar/templates/search.html @@ -0,0 +1,27 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block content %} +

{% trans "searching for" %}: {{ term }}

+ + {% if results %} + + + + + + {% for result in results %} + {% cycle 'row1' 'row2' as rowcolor silent %} + + {% if result.one_barcode %} + + {% else %} + + {% endif %} + + + {% endfor %} +
{% trans "Name" %}{% trans "Codes" %}
{{ result.name }}{{ result.name }}{{ result.barcodes }}
+ {% else %} + {% endif %} +{% endblock %} -- cgit v1.2.3