diff --git a/src/Controller/PartController.php b/src/Controller/PartController.php index 64c4cbc3..a624d3c9 100644 --- a/src/Controller/PartController.php +++ b/src/Controller/PartController.php @@ -59,7 +59,7 @@ class PartController extends AbstractController $filename = $part->getMasterPictureFilename(true); - return $this->render('show_part_info.html.twig', + return $this->render('Parts/show_part_info.html.twig', [ "part" => $part, "main_image" => $attachmentFilenameService->attachmentPathToAbsolutePath($filename) @@ -86,7 +86,7 @@ class PartController extends AbstractController $this->addFlash('info', 'part.edited_flash'); } - return $this->render('edit_part_info.html.twig', + return $this->render('Parts/edit_part_info.html.twig', [ "part" => $part, "form" => $form->createView(), diff --git a/templates/edit_part_info.html.twig b/templates/Parts/edit_part_info.html.twig similarity index 100% rename from templates/edit_part_info.html.twig rename to templates/Parts/edit_part_info.html.twig diff --git a/templates/Parts/show_part_info.html.twig b/templates/Parts/show_part_info.html.twig new file mode 100644 index 00000000..464caaa2 --- /dev/null +++ b/templates/Parts/show_part_info.html.twig @@ -0,0 +1,323 @@ +{% extends "main_card.html.twig" %} + +{% block title %} + {% trans %}part.info.title{% endtrans %} {{ part.name }} +{% endblock %} + +{% block card_title %} + + {% trans %}part.info.title{% endtrans %} "{{ part.name }}" +
+ {% trans %}id.label{% endtrans %}: {{ part.id }} +
+{% endblock %} + +{% block card_content %} + +
+
+
+
+ +
+
+
{{ part.manufacturer.name ?? ""}}
+

{{ part.name }} + {# You need edit permission to use the edit button #} + {% if is_granted('edit', part) %} + + {% endif %} +

+
{{ part.description|bbCode }}
+
+ + {{ part.category.fullPath ?? "-"}} +
+
+ + {{ part.storelocation.fullPath ?? "-"}} +
+
+ + {{ part.instock }} + / + {{ part.mininstock }} + +
+
+ + {{ part.footprint.fullPath ?? "-"}} +
+
+ + {{ "TODO" }} +
+ {# + {% if part.comment != "" %} +
+ +
+ {{ part.comment|nl2br }} +
+
+ {% endif %} #} +
+
+ +
+ +
+ {% if part.comment is not empty %} +
+
+ {{ part.comment|bbCode }} +
+
+ {% endif %} +
+ Test +
+
+ +
+
+ TODO +
+
+
+
+ + +
+
+
+
+
+ +
+ +
+ +
+ +
+
+ +
+ +
+
+ + + +
+
+
+
+
+
+ +

+ +
+ +
+
+ +
+ +
+
+ + + +
+
+
+
+
+
+ +

+ + {# + {if $can_order_read && !$instock_unknown} +
+ +
+
+ {if $manual_order_exists} + + + {else} + {if $auto_order_exists} + {% trans %}The part is listed under "Parts marked for ordering", because the in stock amount is less than the minimum in stock value.{% endtrans %} + {else} + +
+
+ + + +
+ {/if} + {/if} +
+
+
+ {/if} + #} + +

+ +
+ +

{{ part.addedDate | localizeddate("long")}} + {#{if !empty($creation_user)} {% trans %}by{% endtrans %} + {if $can_visit_user} + {$creation_user} + {else} + {$creation_user} + {/if} + {/if} #} +

+
+ +

+ +
+ +

{{ part.lastModified | localizeddate("long") }} + {# {if !empty($last_modified_user)} {% trans %}by{% endtrans %} + {if $can_visit_user} + {$last_modified_user} + {else} + {$last_modified_user} + {/if} + {/if} #} +

+
+ +

+ + {# +
+ {if $can_generate_barcode} + {if count($barcode_profiles) > 0} + + + +
+ + + + + +
+ {else} + + + + + + + {/if} +
+ +

+ {/if} + +
+ +
+ +

+ +
+ +
+
+ #} +
+ + +{% endblock %} \ No newline at end of file diff --git a/templates/show_part_info.html.twig b/templates/show_part_info.html.twig deleted file mode 100644 index af7928f2..00000000 --- a/templates/show_part_info.html.twig +++ /dev/null @@ -1,328 +0,0 @@ -{% extends "base.html.twig" %} - -{% block title %} - {% trans %}part.info.title{% endtrans %} {{ part.name }} -{% endblock %} - -{% block content %} -
-
- - {% trans %}part.info.title{% endtrans %} "{{ part.name }}" -
- {% trans %}id.label{% endtrans %}: {{ part.id }} -
-
- -
-
-
-
-
- -
-
-
{{ part.manufacturer.name ?? ""}}
-

{{ part.name }} - {# You need edit permission to use the edit button #} - {% if is_granted('edit', part) %} - - {% endif %} -

-
{{ part.description|bbCode }}
-
- - {{ part.category.fullPath ?? "-"}} -
-
- - {{ part.storelocation.fullPath ?? "-"}} -
-
- - {{ part.instock }} - / - {{ part.mininstock }} - -
-
- - {{ part.footprint.fullPath ?? "-"}} -
-
- - {{ "TODO" }} -
- {# - {% if part.comment != "" %} -
- -
- {{ part.comment|nl2br }} -
-
- {% endif %} #} -
-
- -
- -
- {% if part.comment is not empty %} -
-
- {{ part.comment|bbCode }} -
-
- {% endif %} -
- Test -
-
- -
-
- TODO -
-
-
-
- - -
-
-
-
-
- -
- -
- -
- -
-
- -
- -
-
- - - -
-
-
-
-
-
- -

- -
- -
-
- -
- -
-
- - - -
-
-
-
-
-
- -

- - {# - {if $can_order_read && !$instock_unknown} -
- -
-
- {if $manual_order_exists} - - - {else} - {if $auto_order_exists} - {% trans %}The part is listed under "Parts marked for ordering", because the in stock amount is less than the minimum in stock value.{% endtrans %} - {else} - -
-
- - - -
- {/if} - {/if} -
-
-
- {/if} - #} - -

- -
- -

{{ part.addedDate | localizeddate("long")}} - {#{if !empty($creation_user)} {% trans %}by{% endtrans %} - {if $can_visit_user} - {$creation_user} - {else} - {$creation_user} - {/if} - {/if} #} -

-
- -

- -
- -

{{ part.lastModified | localizeddate("long") }} - {# {if !empty($last_modified_user)} {% trans %}by{% endtrans %} - {if $can_visit_user} - {$last_modified_user} - {else} - {$last_modified_user} - {/if} - {/if} #} -

-
- -

- - {# -
- {if $can_generate_barcode} - {if count($barcode_profiles) > 0} - - - -
- - - - - -
- {else} - - - - - - - {/if} -
- -

- {/if} - -
- -
- -

- -
- -
-
- #} -
- -
- -
- - -{% endblock %} \ No newline at end of file