31 lines
921 B
Twig
31 lines
921 B
Twig
|
{% extends 'layout.twig' %}
|
||
|
|
||
|
{% block title %}List of Hardware Components{% endblock %}
|
||
|
|
||
|
{% block content %}
|
||
|
<p><a href="{{ url_for('component.add') }}">Create new Hardware Component</a></p>
|
||
|
|
||
|
{% if components | length > 0 %}
|
||
|
<table class="u-full-width">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th>Component name</th>
|
||
|
<th>Type</th>
|
||
|
<th>Last updated</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
{% for c in components %}
|
||
|
<tr>
|
||
|
<td><a href="{{ url_for('component.view', { component_id: c.id }) }}">{{ c.name }}</a></td>
|
||
|
<td>{{ c.type }}</td>
|
||
|
<td>{{ c.updated_at | date("F jS \\a\\t g:ia") }}</td>
|
||
|
</tr>
|
||
|
{% endfor %}
|
||
|
</tbody>
|
||
|
</table>
|
||
|
{% else %}
|
||
|
<p>There are no hardware components in the database - perhaps you should <a href="{{ url_for('component.add') }}">create one</a>?</p>
|
||
|
{% endif %}
|
||
|
{% endblock %}
|