overseer/views/search.twig

67 lines
1.6 KiB
Twig
Raw Normal View History

2024-05-21 10:20:54 -04:00
{% extends 'layout.twig' %}
{% block title %}Search{% endblock %}
{% block content %}
<!-- page header -->
<header class="row">
<div class="columns twelve">
<h1>Searching for "{{ query }}"</h1>
</div>
</header>
2024-05-21 10:34:05 -04:00
{% if item_results|length > 0 %}
2024-05-21 10:33:07 -04:00
<section id="search-results" class="row">
<div class="columns twelve">
<h3>Hardware components:</h3>
<table class="u-full-width">
<thead>
2024-05-21 10:20:54 -04:00
<tr>
2024-05-21 10:33:07 -04:00
<th>Name</th>
<th>Type</th>
<th>Updated at</th>
2024-05-21 10:20:54 -04:00
</tr>
2024-05-21 10:33:07 -04:00
</thead>
<tbody>
{% for item in item_results %}
<tr>
<td><a href="/item/{{ item.id }}">{{ item.name }}</a></td>
<td>{{ item.type }}</td>
<td>{{ item.updatedAt | date("m/d/Y h:i:s A") }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</section>
{% endif %}
2024-05-21 10:34:05 -04:00
{% if license_results|length > 0 %}
2024-05-21 10:33:07 -04:00
<section id="search-results" class="row">
<div class="columns twelve">
<h3>Software licenses:</h3>
<table class="u-full-width">
<thead>
<tr>
<th>Name</th>
<th>Vendor</th>
<th>Updated at</th>
</tr>
</thead>
<tbody>
{% for license in license_results %}
<tr>
<td><a href="/item/{{ license.id }}">{{ license.name }}</a></td>
<td>{{ license.manufacturer }}</td>
<td>{{ license.updatedAt | date("m/d/Y h:i:s A") }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</section>
{% endif %}
2024-05-21 10:20:54 -04:00
{% endblock %}