collection-crud/templates/gpu/index.html.twig

85 lines
2.1 KiB
Twig

{% extends 'base.html.twig' %}
{% block title %}Gpu index{% endblock %}
{% block body %}
<h2>Graphics Cards</h2>
<div class="small callout primary">
<ul>
<li>
<a href="{{ path('gpu_new') }}">Add a Graphics Card</a>
</li>
</ul>
</div>
<table class="hover scroll sortable stack">
<thead>
<tr>
<th>actions</th>
<th>Id</th>
<th>Model Name</th>
<th>GPU</th>
<th>Card Brand</th>
<th>Alternate Model Name</th>
<th>Power</th>
<th>Card Keying</th>
<th>TDP</th>
<th>Link</th>
<th>Count</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
{% for gpu in gpus %}
<tr>
<td>
<ul>
<li>
<a href="{{ path('gpu_show', {'id': gpu.id}) }}">View 👁</a>
</li>
<li>
<a href="{{ path('gpu_edit', {'id': gpu.id}) }}">Edit <span class="edit-icon">&#9998;</span></a>
</li>
</ul>
</td>
<td>{{ gpu.id }}</td>
<td>{{ gpu.gpuBrand.name }} {{ gpu.modelName }}</td>
<td>
{% if gpu.gpuCore.variant %}
{{ gpu.gpuCore.name }} ({{ gpu.gpuCore.variant }})
{% else %}
{{ gpu.gpuCore.name }}
{% endif %}
</td>
<td>{{ gpu.boardBrand.name }}</td>
<td>{{ gpu.alternateModelName }}</td>
<td>
{% if gpu.pcie6power > 0 or gpu.pcie8power > 0 %}
{% if gpu.pcie6power > 0 %}
{{ gpu.pcie6power }} PCIe 6-pin
{% endif %}
{% if gpu.pcie8power > 0 %}
{{ gpu.pcie8power }} PCIe 8-pin
{% endif %}
{% elseif gpu.molexPower > 0 %}
{{ gpu.molexPower }} Molex
{% else %}
Slot
{% endif %}
</td>
<td>{{ gpu.cardKey }}</td>
<td>{{ gpu.tdp }} W</td>
<td>{{ gpu.link }}</td>
<td>{{ gpu.count }}</td>
<td>{{ gpu.notes }}</td>
</tr>
{% else %}
<tr>
<td colspan="12">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}