overseer/views/index.twig
Gregory Ballantine d95be2e185
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Added ability to limit dashboard results
2024-05-24 12:35:01 -04:00

101 lines
2.3 KiB
Twig

{% extends 'layout.twig' %}
{% block title %}Home{% endblock %}
{% block content %}
<!-- page header -->
<header class="row">
<div class="columns twelve">
<h1>Welcome to Overseer!</h1>
</div>
</header>
<section id="record-actions" class="row">
<div class="columns four">
<a href="/item/add">
<p><i class="fa-solid fa-plus"></i> Add Item</p>
</a>
</div>
<div class="columns four">
<a href="/license/add">
<p><i class="fa-solid fa-plus"></i> Add License</p>
</a>
</div>
<div class="columns four">
<a href="/item/search">
<p><i class="fa-solid fa-search"></i> Search</p>
</a>
</div>
</section>
<hr>
<section class="row">
<div class="columns twelve">
<h3>Recently updated hardware:</h3>
<table class="u-full-width">
<thead>
<tr>
<th>Name</th>
<th>Manufacturer</th>
<th>Type</th>
<th>Updated at</th>
</tr>
</thead>
<tbody>
{% for item in inventory %}
<tr>
<td><a href="/item/{{ item.id }}">{{ item.name }}</a></td>
<td>{{ item.manufacturer }}</td>
<td>{{ item.type }}</td>
<td>{{ item.updatedAt | date("m/d/Y h:i:s A") }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</section>
<section class="row">
<div class="columns twelve">
<h3>Recently updated licenses:</h3>
<table class="u-full-width">
<thead>
<tr>
<th>Name</th>
<th>Manufacturer</th>
<th>Updated at</th>
</tr>
</thead>
<tbody>
{% for license in licenses %}
<tr>
<td><a href="/license/{{ 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>
<section class="row">
<div class="columns twelve">
<form id="filter-form" class="u-full-width" action="/" method="post">
<select id="filter-limit" name="limit">
<option value="5">5</option>
<option value="10">10</option>
<option value="20">20</option>
<option value="35">35</option>
<option value="50">50</option>
</select>
</form>
</div>
</section>
{% endblock %}