First models and views

This commit is contained in:
2022-03-09 18:13:09 +01:00
parent fea6cdcf96
commit 6171384e14
13 changed files with 303 additions and 4 deletions

View File

@@ -0,0 +1,4 @@
<h1>Container: {{ container.named_id }}</h1>
<div>{{ container.description }}</div>
<div>Color: {{ container.color }}</div>
<div>Container Type: <a href='/container/type/{{ container.container_type.id }}'>{{ container.container_type.named_id }}</a></div>

View File

@@ -0,0 +1,8 @@
<h1>Container: {{ container_type.named_id }}</h1>
<div>{{ container_type.description }}</div>
<table>
<tr><td>Width:</td><td>{{ container_type.width }} mm</td><td>Inner Width:</td><td>{{ container_type.inner_width }} mm</td></tr>
<tr><td>Length:</td><td>{{ container_type.length }} mm</td><td>Inner Length:</td><td>{{ container_type.inner_length }} mm</td></tr>
<tr><td>Height:</td><td>{{ container_type.height }} mm</td><td>Inner Height:</td><td>{{ container_type.inner_height }} mm</td></tr>
<tr><td>Has Cover:</td><td>{% if container_type.has_cover %} yes {% else %} no {% endif %}</td><td>Can hold Containers:</td><td>{% if container_type.contains_container %} yes {% else %} no {% endif %}</td></tr>
</table>

View File

@@ -0,0 +1,24 @@
<div>
<div>New Container:</div>
{% if container_list %}
<ul>
{% for container in container_list %}
<li><a href="/container/{{ container.id }}/">{{ container.named_id }} {{ container.description }}</a></li>
{% endfor %}
</ul>
{% else %}
<p>No container are available.</p>
{% endif %}
</div>
<div>
<div>New Container Types:</div>
{% if container_type_list %}
<ul>
{% for ctype in container_type_list %}
<li><a href="/container/type/{{ ctype.id }}/">{{ ctype.named_id }} {{ ctype.description }}</a></li>
{% endfor %}
</ul>
{% else %}
<p>No container types are available.</p>
{% endif %}
</div>