mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-27 02:12:18 +00:00
Moved some templates around and added styling
This commit is contained in:
20
templates/asset_detail.html
Normal file
20
templates/asset_detail.html
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
|
|
||||||
|
{% block main %}
|
||||||
|
|
||||||
|
<h1>Asset Detail</h1>
|
||||||
|
|
||||||
|
{{ object.description }}
|
||||||
|
<br>
|
||||||
|
{{ object.category.name }}
|
||||||
|
<br>
|
||||||
|
{{ object.status.name }}
|
||||||
|
<br>
|
||||||
|
{{ object.purchased_from.name }}
|
||||||
|
<br>
|
||||||
|
<a href="{% url 'asset_update' object.pk %}">Edit</a>
|
||||||
|
<br>
|
||||||
|
<a href="{% url 'asset_delete' object.pk %}">Delete</a>
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
15
templates/asset_form.html
Normal file
15
templates/asset_form.html
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
|
|
||||||
|
{% block main %}
|
||||||
|
|
||||||
|
<h1>Asset {{ form_header|default:'Create' }}</h1>
|
||||||
|
|
||||||
|
<form method="post">
|
||||||
|
{{ form }}
|
||||||
|
{% csrf_token %}
|
||||||
|
|
||||||
|
<button type="submit">Submit</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
34
templates/asset_list.html
Normal file
34
templates/asset_list.html
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
|
{% block main %}
|
||||||
|
|
||||||
|
<h1>Asset List</h1>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Asset ID</th>
|
||||||
|
<th>Description</th>
|
||||||
|
<th>Category</th>
|
||||||
|
<th>Status</th>
|
||||||
|
<th>Quick Links</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for item in object_list %}
|
||||||
|
{# <li><a href="{% url 'asset_detail' item.pk %}">{{ item.asset_id }} - {{ item.description }}</a></li>#}
|
||||||
|
<tr>
|
||||||
|
<td><a href="{% url 'asset_detail' item.pk %}">{{ item.asset_id }}</a></td>
|
||||||
|
<td>{{ item.description }}</td>
|
||||||
|
<td>{{ item.category }}</td>
|
||||||
|
<td>{{ item.status }}</td>
|
||||||
|
<td>
|
||||||
|
<a href="{% url 'asset_detail' item.asset_id %}"><i class="material-icons">visibility</i></a>
|
||||||
|
<a href="{% url 'asset_update' item.asset_id %}"><i class="material-icons">edit</i></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
Reference in New Issue
Block a user