Part-DB.Part-DB-server/templates/Projects/info/info.html.twig

67 lines
3 KiB
Twig
Raw Normal View History

2022-12-31 14:17:46 +01:00
{% extends "main_card.html.twig" %}
{% import "helper.twig" as helper %}
{% block title %}
{% trans %}project.info.title{% endtrans %}: {{ project.name }}
{% endblock %}
{% block content %}
{{ helper.breadcrumb_entity_link(project) }}
{{ parent() }}
{# {% include "Projects/_info_card.html.twig" %} #}
{# {{ datatables.datatable(datatable, 'elements/datatables/datatables', 'projects') }} #}
{# {% include "Parts/lists/_action_bar.html.twig" with {'url_options': {'category': entity.iD}} %}
{% include "Parts/lists/_parts_list.html.twig" %} #}
{% endblock %}
{% block card_title %}
{% if project.masterPictureAttachment is not null and attachment_manager.isFileExisting(project.masterPictureAttachment) %}
<img class="hoverpic ms-0 me-1 d-inline" {{ stimulus_controller('elements/hoverpic') }} data-thumbnail="{{ entity_url(project.masterPictureAttachment, 'file_view') }}" src="{{ attachment_thumbnail(project.masterPictureAttachment, 'thumbnail_sm') }}">
{% else %}
{{ helper.entity_icon(project, "me-1") }}
{% endif %}
{% trans %}project.info.title{% endtrans %}:&nbsp;<b>{{ project.name }}</b>
{% endblock %}
{% block card_content %}
<ul class="nav nav-tabs" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="info-tab" data-bs-toggle="tab" data-bs-target="#info-tab-pane"
type="button" role="tab" aria-controls="info-tab-pane" aria-selected="true">
<i class="fa-solid fa-circle-info fa-fw"></i>
{% trans %}project.info.info.label{% endtrans %}
</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="bom-tab" data-bs-toggle="tab" data-bs-target="#bom-tab-pane"
type="button" role="tab" aria-controls="bom-tab-pane" aria-selected="false">
<i class="fa-solid fa-list-check fa-fw"></i>
{% trans %}project_bom_entry.label{% endtrans %}
<span class="badge bg-secondary">{{ project.bomEntries | length }}</span></button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="attachments-tab" data-bs-toggle="tab" data-bs-target="#attachments-tab-pane"
type="button" role="tab" aria-controls="attachments-tab-pane" aria-selected="false">BOM</button>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane fade show active" id="info-tab-pane" role="tabpanel" aria-labelledby="info-tab" tabindex="0">
{% include "Projects/info/_info.html.twig" %}
</div>
<div class="tab-pane fade" id="bom-tab-pane" role="tabpanel" aria-labelledby="bom-tab" tabindex="0">
{% include "Projects/info/_bom.html.twig" %}
</div>
<div class="tab-pane fade" id="attachments-tab-pane" role="tabpanel" aria-labelledby="attachments-tab" tabindex="0">
Attachments
</div>
</div>
{% endblock %}