Renamed parts/ templates folder to recommended snake_case style

This commit is contained in:
Jan Böhmer 2023-02-04 23:05:39 +01:00
parent e8efe81f79
commit 9097220026
41 changed files with 63 additions and 63 deletions

View file

@ -113,7 +113,7 @@ class PartController extends AbstractController
}
return $this->render(
'Parts/info/show_part_info.html.twig',
'parts/info/show_part_info.html.twig',
[
'part' => $part,
'datatable' => $table,
@ -176,7 +176,7 @@ class PartController extends AbstractController
$this->addFlash('error', 'part.edited_flash.invalid');
}
return $this->renderForm('Parts/edit/edit_part_info.html.twig',
return $this->renderForm('parts/edit/edit_part_info.html.twig',
[
'part' => $part,
'form' => $form,
@ -318,7 +318,7 @@ class PartController extends AbstractController
$this->addFlash('error', 'part.created_flash.invalid');
}
return $this->renderForm('Parts/edit/new_part.html.twig',
return $this->renderForm('parts/edit/new_part.html.twig',
[
'part' => $new_part,
'form' => $form,

View file

@ -163,7 +163,7 @@ class PartListsController extends AbstractController
$this->denyAccessUnlessGranted('@categories.read');
return $this->showListWithFilter($request,
'Parts/lists/category_list.html.twig',
'parts/lists/category_list.html.twig',
function (PartFilter $filter) use ($category) {
$filter->getCategory()->setOperator('INCLUDING_CHILDREN')->setValue($category);
}, function (FormInterface $filterForm) {
@ -185,7 +185,7 @@ class PartListsController extends AbstractController
$this->denyAccessUnlessGranted('@footprints.read');
return $this->showListWithFilter($request,
'Parts/lists/footprint_list.html.twig',
'parts/lists/footprint_list.html.twig',
function (PartFilter $filter) use ($footprint) {
$filter->getFootprint()->setOperator('INCLUDING_CHILDREN')->setValue($footprint);
}, function (FormInterface $filterForm) {
@ -207,7 +207,7 @@ class PartListsController extends AbstractController
$this->denyAccessUnlessGranted('@manufacturers.read');
return $this->showListWithFilter($request,
'Parts/lists/manufacturer_list.html.twig',
'parts/lists/manufacturer_list.html.twig',
function (PartFilter $filter) use ($manufacturer) {
$filter->getManufacturer()->setOperator('INCLUDING_CHILDREN')->setValue($manufacturer);
}, function (FormInterface $filterForm) {
@ -229,7 +229,7 @@ class PartListsController extends AbstractController
$this->denyAccessUnlessGranted('@storelocations.read');
return $this->showListWithFilter($request,
'Parts/lists/store_location_list.html.twig',
'parts/lists/store_location_list.html.twig',
function (PartFilter $filter) use ($storelocation) {
$filter->getStorelocation()->setOperator('INCLUDING_CHILDREN')->setValue($storelocation);
}, function (FormInterface $filterForm) {
@ -251,7 +251,7 @@ class PartListsController extends AbstractController
$this->denyAccessUnlessGranted('@suppliers.read');
return $this->showListWithFilter($request,
'Parts/lists/supplier_list.html.twig',
'parts/lists/supplier_list.html.twig',
function (PartFilter $filter) use ($supplier) {
$filter->getSupplier()->setOperator('INCLUDING_CHILDREN')->setValue($supplier);
}, function (FormInterface $filterForm) {
@ -273,7 +273,7 @@ class PartListsController extends AbstractController
$tag = trim($tag);
return $this->showListWithFilter($request,
'Parts/lists/tags_list.html.twig',
'parts/lists/tags_list.html.twig',
function (PartFilter $filter) use ($tag) {
$filter->getTags()->setOperator('ANY')->setValue($tag);
}, function (FormInterface $filterForm) {
@ -314,7 +314,7 @@ class PartListsController extends AbstractController
$searchFilter = $this->searchRequestToFilter($request);
return $this->showListWithFilter($request,
'Parts/lists/search_list.html.twig',
'parts/lists/search_list.html.twig',
null,
null,
[
@ -334,6 +334,6 @@ class PartListsController extends AbstractController
*/
public function showAll(Request $request, DataTableFactory $dataTable)
{
return $this->showListWithFilter($request,'Parts/lists/all_list.html.twig');
return $this->showListWithFilter($request,'parts/lists/all_list.html.twig');
}
}

View file

@ -1,4 +1,4 @@
{% form_theme form with ['Parts/edit/edit_form_styles.html.twig'] %}
{% form_theme form with ['parts/edit/edit_form_styles.html.twig'] %}
{% import 'components/collection_type.macro.html.twig' as collection %}

View file

@ -1,6 +1,6 @@
{# Renders a editable list of all attachments. form is the Attachment CollectionType #}
{% macro attachment_edit_list(form, part_mode = false) %}
{% form_theme form with ['Parts/edit/edit_form_styles.html.twig'] %}
{% form_theme form with ['parts/edit/edit_form_styles.html.twig'] %}
{% import 'components/collection_type.macro.html.twig' as collection %}
<div {{ collection.controller(form, 'attachment.edit.delete.confirm') }}>

View file

@ -1,4 +1,4 @@
{% form_theme form with ['Parts/edit/edit_form_styles.html.twig'] %}
{% form_theme form with ['parts/edit/edit_form_styles.html.twig'] %}
{% import 'components/collection_type.macro.html.twig' as collection %}
<div {{ collection.controller(form.partLots, 'part_lot.edit.delete.confirm') }}>

View file

@ -1,5 +1,5 @@
{# Leave this template at bootstrap 4 for now, as it otherwise destroys our layout #}
{% form_theme form.orderdetails with ['Parts/edit/edit_form_styles.html.twig', "bootstrap_4_layout.html.twig"] %}
{% form_theme form.orderdetails with ['parts/edit/edit_form_styles.html.twig', "bootstrap_4_layout.html.twig"] %}
{% import 'components/collection_type.macro.html.twig' as collection %}
<div {{ collection.controller(form.orderdetails, 'orderdetails.edit.delete.confirm') }}>

View file

@ -1,4 +1,4 @@
{% form_theme form with ['Parts/edit/edit_form_styles.html.twig'] %}
{% form_theme form with ['parts/edit/edit_form_styles.html.twig'] %}
{% import 'components/collection_type.macro.html.twig' as collection %}

View file

@ -70,25 +70,25 @@
<div class="tab-content">
<div class="tab-pane fade show active p-2" id="common" role="tabpanel">
{% include "Parts/edit/_main.html.twig" %}
{% include "parts/edit/_main.html.twig" %}
</div>
<div class="tab-pane fade p-2" id="manufacturer" role="tabpanel">
{% include "Parts/edit/_manufacturer.html.twig" %}
{% include "parts/edit/_manufacturer.html.twig" %}
</div>
<div class="tab-pane fade p-2" id="advanced" role="tabpanel">
{% include "Parts/edit/_advanced.html.twig" %}
{% include "parts/edit/_advanced.html.twig" %}
</div>
<div class="tab-pane fade p-2" id="part_lots" role="tabpanel">
{% include "Parts/edit/_lots.html.twig" %}
{% include "parts/edit/_lots.html.twig" %}
</div>
<div class="tab-pane fade p-2" id="attachments" role="tabpanel">
{% include "Parts/edit/_attachments.html.twig" %}
{% include "parts/edit/_attachments.html.twig" %}
</div>
<div class="tab-pane fade p-2" id="orderdetails" role="tabpanel">
{% include "Parts/edit/_orderdetails.html.twig" %}
{% include "parts/edit/_orderdetails.html.twig" %}
</div>
<div class="tab-pane fade p-2" id="specifications" role="tabpanel">
{% include "Parts/edit/_specifications.html.twig" %}
{% include "parts/edit/_specifications.html.twig" %}
</div>
<div class="tab-pane fade p-2" id="comment" role="tabpanel">
{{ form_widget(form.comment)}}

View file

@ -1,4 +1,4 @@
{% extends "Parts/edit/edit_part_info.html.twig" %}
{% extends "parts/edit/edit_part_info.html.twig" %}
{% block card_border %}border-success{% endblock %}
{% block card_type %}bg-success text-white{% endblock %}

View file

@ -2,7 +2,7 @@
<div class="row">
<div class="col-md-3 col-lg-4 col-3 mt-auto mb-auto">
{% include "Parts/info/_picture.html.twig" %}
{% include "parts/info/_picture.html.twig" %}
</div>
<div class="col-md-9 col-lg-8 col-7">
<h5 class="text-muted pt-2" title="{% trans %}manufacturer.label{% endtrans %}">

View file

@ -1,7 +1,7 @@
{% import "helper.twig" as helper %}
{% import "LabelSystem/dropdown_macro.html.twig" as dropdown %}
{% include "Parts/info/_withdraw_modal.html.twig" %}
{% include "parts/info/_withdraw_modal.html.twig" %}
<div class="table-responsive">
<table class="table table-striped table-hover">

View file

@ -31,11 +31,11 @@
{% block card_content %}
<div class="row">
<div class="col-md-9">
{% include "Parts/info/_main_infos.html.twig" %}
{% include "parts/info/_main_infos.html.twig" %}
</div>
<div class="col-md-3 offset-md-0 col-9 offset-3">
{% include "Parts/info/_sidebar.html.twig" %}
{% include "parts/info/_sidebar.html.twig" %}
</div>
</div>
@ -127,42 +127,42 @@
{% endif %}
<div class="tab-pane fade show active" id="part_lots" role="tabpanel" aria-labelledby="part_lots-tab">
{% include "Parts/info/_part_lots.html.twig" %}
{% include "parts/info/_part_lots.html.twig" %}
</div>
{% if part.attachments is not empty %}
<div class="tab-pane fade" id="attachments" role="tabpanel" aria-labelledby="attachment-tab">
{% include "Parts/info/_attachments_info.html.twig" %}
{% include "parts/info/_attachments_info.html.twig" %}
</div>
{% endif %}
{% if part.orderdetails is not empty %}
<div class="tab-pane fade" id="suppliers" role="tabpanel" aria-labelledby="supplier-tab">
{% include "Parts/info/_order_infos.html.twig" %}
{% include "parts/info/_order_infos.html.twig" %}
</div>
{% endif %}
<div class="tab-pane fade" id="projects" role="tabpanel" aria-labelledby="projects-tab">
{% include "Parts/info/_projects.html.twig" %}
{% include "parts/info/_projects.html.twig" %}
</div>
<div class="tab-pane fade" id="history" role="tabpanel" aria-labelledby="history-tab">
{% include "Parts/info/_history.html.twig" %}
{% include "parts/info/_history.html.twig" %}
</div>
<div class="tab-pane fade" id="tools" role="tabpanel" aria-labelledby="tools-tab">
{% include "Parts/info/_tools.html.twig" %}
{% include "parts/info/_tools.html.twig" %}
</div>
{% if part.parameters is not empty or description_params is not empty or comment_params is not empty %}
<div class="tab-pane fade" id="specifications" role="tabpanel" aria-labelledby="tools-tab">
{% include "Parts/info/_specifications.html.twig" %}
{% include "parts/info/_specifications.html.twig" %}
</div>
{% endif %}
<div class="tab-pane fade" id="extended_info" role="tabpanel" aria-labelledby="extended_info-tab">
{% include "Parts/info/_extended_infos.html.twig" %}
{% include "parts/info/_extended_infos.html.twig" %}
</div>
</div>

View file

@ -106,7 +106,7 @@
{% if entity.attachments is not empty %}
<div class="tab-pane fade" id="v-pills-attachments" role="tabpanel" aria-labelledby="v-pills-attachments-tab">
{% include "Parts/info/_attachments_info.html.twig" with {"part": entity} %}
{% include "parts/info/_attachments_info.html.twig" with {"part": entity} %}
</div>
{% endif %}
@ -134,6 +134,6 @@
</div>
{% if filterForm is defined %}
{% include "Parts/lists/_filter.html.twig" %}
{% include "parts/lists/_filter.html.twig" %}
{% endif %}
</div>

View file

@ -21,10 +21,10 @@
</div>
</div>
{% include "Parts/lists/_filter.html.twig" %}
{% include "parts/lists/_filter.html.twig" %}
</div>
{% include "Parts/lists/_action_bar.html.twig" with {'url_options': {}} %}
{% include "Parts/lists/_parts_list.html.twig" %}
{% include "parts/lists/_action_bar.html.twig" with {'url_options': {}} %}
{% include "parts/lists/_parts_list.html.twig" %}
{% endblock %}

View file

@ -6,10 +6,10 @@
{% block content %}
{% include "Parts/lists/_info_card.html.twig" with {'header_label': 'category.label'} %}
{% include "parts/lists/_info_card.html.twig" with {'header_label': 'category.label'} %}
{% include "Parts/lists/_action_bar.html.twig" with {'url_options': {'category': entity.iD}} %}
{% include "parts/lists/_action_bar.html.twig" with {'url_options': {'category': entity.iD}} %}
{% include "Parts/lists/_parts_list.html.twig" %}
{% include "parts/lists/_parts_list.html.twig" %}
{% endblock %}

View file

@ -6,10 +6,10 @@
{% block content %}
{% include "Parts/lists/_info_card.html.twig" with {'header_label': 'footprint.label'} %}
{% include "parts/lists/_info_card.html.twig" with {'header_label': 'footprint.label'} %}
{% include "Parts/lists/_action_bar.html.twig" with {'url_options': {'footprint': entity.iD}} %}
{% include "parts/lists/_action_bar.html.twig" with {'url_options': {'footprint': entity.iD}} %}
{% include "Parts/lists/_parts_list.html.twig" %}
{% include "parts/lists/_parts_list.html.twig" %}
{% endblock %}

View file

@ -6,7 +6,7 @@
{% block content %}
{% embed "Parts/lists/_info_card.html.twig" with {'header_label': 'manufacturer.label'} %}
{% embed "parts/lists/_info_card.html.twig" with {'header_label': 'manufacturer.label'} %}
{% block quick_links %}
<div class="mb-2">
{% import "components/quick_links.macro.html.twig" as quick_links %}
@ -15,8 +15,8 @@
{% endblock %}
{% endembed %}
{% include "Parts/lists/_action_bar.html.twig" with {'url_options': {'manufacturer': entity.iD}} %}
{% include "parts/lists/_action_bar.html.twig" with {'url_options': {'manufacturer': entity.iD}} %}
{% include "Parts/lists/_parts_list.html.twig" %}
{% include "parts/lists/_parts_list.html.twig" %}
{% endblock %}

View file

@ -74,9 +74,9 @@
</div>
{% include "Parts/lists/_filter.html.twig" %}
{% include "parts/lists/_filter.html.twig" %}
</div>
{% include "Parts/lists/_parts_list.html.twig" %}
{% include "parts/lists/_parts_list.html.twig" %}
{% endblock %}

View file

@ -6,10 +6,10 @@
{% block content %}
{% include "Parts/lists/_info_card.html.twig" with {'header_label': 'storelocation.label'} %}
{% include "parts/lists/_info_card.html.twig" with {'header_label': 'storelocation.label'} %}
{% include "Parts/lists/_action_bar.html.twig" with {'url_options': {'storelocation': entity.iD}} %}
{% include "parts/lists/_action_bar.html.twig" with {'url_options': {'storelocation': entity.iD}} %}
{% include "Parts/lists/_parts_list.html.twig" %}
{% include "parts/lists/_parts_list.html.twig" %}
{% endblock %}

View file

@ -6,7 +6,7 @@
{% block content %}
{% embed "Parts/lists/_info_card.html.twig" with {'header_label': 'supplier.label'} %}
{% embed "parts/lists/_info_card.html.twig" with {'header_label': 'supplier.label'} %}
{% block quick_links %}
<div class="mb-2">
{% import "components/quick_links.macro.html.twig" as quick_links %}
@ -15,8 +15,8 @@
{% endblock %}
{% endembed %}
{% include "Parts/lists/_action_bar.html.twig" with {'url_options': {'supplier': entity.iD}} %}
{% include "parts/lists/_action_bar.html.twig" with {'url_options': {'supplier': entity.iD}} %}
{% include "Parts/lists/_parts_list.html.twig" %}
{% include "parts/lists/_parts_list.html.twig" %}
{% endblock %}

View file

@ -21,11 +21,11 @@
</div>
</div>
{% include "Parts/lists/_filter.html.twig" %}
{% include "parts/lists/_filter.html.twig" %}
</div>
{% include "Parts/lists/_action_bar.html.twig" with {'url_options': {}} %}
{% include "parts/lists/_action_bar.html.twig" with {'url_options': {}} %}
{% include "Parts/lists/_parts_list.html.twig" %}
{% include "parts/lists/_parts_list.html.twig" %}
{% endblock %}

View file

@ -104,7 +104,7 @@
{% if project.attachments is not empty %}
<div class="tab-pane fade" id="v-pills-attachments" role="tabpanel" aria-labelledby="v-pills-attachments-tab">
{% include "Parts/info/_attachments_info.html.twig" with {"part": project} %}
{% include "parts/info/_attachments_info.html.twig" with {"part": project} %}
</div>
{% endif %}

View file

@ -92,7 +92,7 @@
{% include "projects/info/_builds.html.twig" %}
</div>
<div class="tab-pane fade" id="attachments-tab-pane" role="tabpanel" aria-labelledby="attachments-tab" tabindex="0">
{% include "Parts/info/_attachments_info.html.twig" with {"part": project} %}
{% include "parts/info/_attachments_info.html.twig" with {"part": project} %}
</div>
<div class="tab-pane fade" id="parameters-tab-pane" role="tabpanel" aria-labelledby="parameters-tab">
{% for name, parameters in project.groupedParameters %}