From 65cc4f603c37de005906c753dbafe5b41e9e9ee2 Mon Sep 17 00:00:00 2001 From: Renzo Bauen Date: Thu, 17 Oct 2024 00:08:47 +0200 Subject: [PATCH] Backend of Kennelmanagement finished, exept Icons and Languages --- Configuration/Icons.php | 24 +++ Configuration/TCA/Overrides/pages.php | 29 +++ .../RecordTypes/Kennel/Assets/Icon.svg | 13 +- .../{EditorInterface.yaml => config.yaml} | 0 .../de.Labels.xlf => language/de.labels.xlf} | 0 .../Labels.xlf => language/labels.xlf} | 0 .../RecordTypes/Litter/assets/icon.svg | 14 ++ ContentBlocks/RecordTypes/Litter/config.yaml | 123 ++++++++++++ .../RecordTypes/Litter/language/de.labels.xlf | 12 ++ .../RecordTypes/Litter/language/labels.xlf | 11 ++ .../RecordTypes/Pedigree/assets/icon.svg | 10 + .../RecordTypes/Pedigree/config.yaml | 181 ++++++++++++++++++ .../Pedigree/language/de.labels.xlf | 12 ++ .../RecordTypes/Pedigree/language/labels.xlf | 11 ++ .../Public/ContentBlocks/conpassione/kennel | 2 +- .../Public/ContentBlocks/conpassione/litter | 1 + .../Public/ContentBlocks/conpassione/pedigree | 1 + Resources/Public/Icons/Dpg.svg | 7 + Resources/Public/Icons/Kennel.svg | 11 ++ Resources/Public/Icons/Pedigree.svg | 10 + 20 files changed, 469 insertions(+), 3 deletions(-) create mode 100644 Configuration/Icons.php create mode 100644 Configuration/TCA/Overrides/pages.php rename ContentBlocks/RecordTypes/Kennel/{EditorInterface.yaml => config.yaml} (100%) rename ContentBlocks/RecordTypes/Kennel/{Source/Language/de.Labels.xlf => language/de.labels.xlf} (100%) rename ContentBlocks/RecordTypes/Kennel/{Source/Language/Labels.xlf => language/labels.xlf} (100%) create mode 100644 ContentBlocks/RecordTypes/Litter/assets/icon.svg create mode 100644 ContentBlocks/RecordTypes/Litter/config.yaml create mode 100644 ContentBlocks/RecordTypes/Litter/language/de.labels.xlf create mode 100644 ContentBlocks/RecordTypes/Litter/language/labels.xlf create mode 100644 ContentBlocks/RecordTypes/Pedigree/assets/icon.svg create mode 100644 ContentBlocks/RecordTypes/Pedigree/config.yaml create mode 100644 ContentBlocks/RecordTypes/Pedigree/language/de.labels.xlf create mode 100644 ContentBlocks/RecordTypes/Pedigree/language/labels.xlf create mode 120000 Resources/Public/ContentBlocks/conpassione/litter create mode 120000 Resources/Public/ContentBlocks/conpassione/pedigree create mode 100644 Resources/Public/Icons/Dpg.svg create mode 100644 Resources/Public/Icons/Kennel.svg create mode 100644 Resources/Public/Icons/Pedigree.svg diff --git a/Configuration/Icons.php b/Configuration/Icons.php new file mode 100644 index 0000000..a82c4c9 --- /dev/null +++ b/Configuration/Icons.php @@ -0,0 +1,24 @@ + [ + 'provider' => SvgIconProvider::class, + 'source' => 'EXT:cpkm/Resources/Public/Icons/Kennel.svg', + ], + + 'tx-conpassione-pedigree' => [ + 'provider' => SvgIconProvider::class, + 'source' => 'EXT:cpkm/Resources/Public/Icons/Pedigree.svg', + ], + +/* 'tx-myext-bitmapicon' => [ + 'provider' => BitmapIconProvider::class, + 'source' => 'EXT:my_extension/Resources/Public/Icons/mybitmap.png', + // All icon providers provide the possibility to register an icon that spins + 'spinning' => true, + ],*/ +]; diff --git a/Configuration/TCA/Overrides/pages.php b/Configuration/TCA/Overrides/pages.php new file mode 100644 index 0000000..eae5187 --- /dev/null +++ b/Configuration/TCA/Overrides/pages.php @@ -0,0 +1,29 @@ + 'Kennels', + 'icon' => 'tx-conpassione-kennellist', + 'value' => 'kennellist' + ]; + + $GLOBALS['TCA']['pages']['ctrl']['typeicon_classes']['contains-kennellist'] = 'tx-conpassione-kennellist'; + + // zusätzliche Icons für Folder-Seiten + $GLOBALS['TCA']['pages']['columns']['module']['config']['items'][] = [ + 'label' => 'Pedigree', + 'icon' => 'tx-conpassione-pedigree', + 'value' => 'pedigree' + ]; + $GLOBALS['TCA']['pages']['ctrl']['typeicon_classes']['contains-pedigree'] = 'tx-conpassione-pedigree'; +}); diff --git a/ContentBlocks/RecordTypes/Kennel/Assets/Icon.svg b/ContentBlocks/RecordTypes/Kennel/Assets/Icon.svg index 723b4d8..e41f8c5 100644 --- a/ContentBlocks/RecordTypes/Kennel/Assets/Icon.svg +++ b/ContentBlocks/RecordTypes/Kennel/Assets/Icon.svg @@ -1,2 +1,11 @@ - + + + + + + + + + + + diff --git a/ContentBlocks/RecordTypes/Kennel/EditorInterface.yaml b/ContentBlocks/RecordTypes/Kennel/config.yaml similarity index 100% rename from ContentBlocks/RecordTypes/Kennel/EditorInterface.yaml rename to ContentBlocks/RecordTypes/Kennel/config.yaml diff --git a/ContentBlocks/RecordTypes/Kennel/Source/Language/de.Labels.xlf b/ContentBlocks/RecordTypes/Kennel/language/de.labels.xlf similarity index 100% rename from ContentBlocks/RecordTypes/Kennel/Source/Language/de.Labels.xlf rename to ContentBlocks/RecordTypes/Kennel/language/de.labels.xlf diff --git a/ContentBlocks/RecordTypes/Kennel/Source/Language/Labels.xlf b/ContentBlocks/RecordTypes/Kennel/language/labels.xlf similarity index 100% rename from ContentBlocks/RecordTypes/Kennel/Source/Language/Labels.xlf rename to ContentBlocks/RecordTypes/Kennel/language/labels.xlf diff --git a/ContentBlocks/RecordTypes/Litter/assets/icon.svg b/ContentBlocks/RecordTypes/Litter/assets/icon.svg new file mode 100644 index 0000000..f1c492e --- /dev/null +++ b/ContentBlocks/RecordTypes/Litter/assets/icon.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/ContentBlocks/RecordTypes/Litter/config.yaml b/ContentBlocks/RecordTypes/Litter/config.yaml new file mode 100644 index 0000000..0ae80e9 --- /dev/null +++ b/ContentBlocks/RecordTypes/Litter/config.yaml @@ -0,0 +1,123 @@ +name: conpassione/litter +typeName: conpassione-litter +title: 'Litter' +group: csbp +table: tx_cpkm_domain_model_litter +languageAware: false +labelField: + - l_date + - l_name +sortField: + - identifier: l_date + order: asc +security: + ignorePageTypeRestriction: true +prefixFields: false +fields: + - identifier: p_litter + type: Palette + fields: + - identifier: l_kennel + type: Select + renderType: selectSingle + foreign_table: tx_cpkm_domain_model_kennel + foreign_table_where: 'ORDER BY tx_cpkm_domain_model_kennel.k_name' + items: + - label: '---' + value: 0 + minitems: 0 + maxitems: 1 + - identifier: l_name + type: Text + required: true + size: 30 + - identifier: l_date + type: DateTime + format: date + - type: Linebreak + - identifier: l_status + type: Select + renderType: selectSingle + default: 0 + items: + - label: '---' + value: 0 + - label: 'Deckmeldung' + value: 1 + - label: 'Wurfmeldung' + value: 2 + - label: 'leer geblieben' + value: 3 + minitems: 0 + maxitems: 1 + - identifier: p_litterparents + type: Palette + fields: + - identifier: l_father + type: Select + renderType: selectSingle + items: + - label: '---' + value: 0 + foreign_table: tx_cpkm_domain_model_pedigree + foreign_table_where: 'AND tx_cpkm_domain_model_pedigree.p_sex=1 ORDER BY tx_cpkm_domain_model_pedigree.p_name' + minitems: 0 + maxitems: 1 + default: 0 + - identifier: l_mother + type: Select + renderType: selectSingle + items: + - label: '---' + value: 0 + foreign_table: tx_cpkm_domain_model_pedigree + foreign_table_where: 'AND tx_cpkm_domain_model_pedigree.p_sex=0 ORDER BY tx_cpkm_domain_model_pedigree.p_name' + minitems: 0 + maxitems: 1 + default: 0 + + - identifier: p_puppies + type: Palette + fields: + - identifier: l_females + type: Number + format: integer + default: 0 + range: + lower: 0 + upper: 10 + - identifier: l_males + type: Number + format: integer + default: 0 + range: + lower: 0 + upper: 10 + - identifier: infotab + type: Tab + - identifier: p_img + type: Palette + fields: + - identifier: l_images + type: File + extendedPalette: true + minitems: 0 + maxitems: 4 + allowed: common-image-types + cropVariants: + litter: + title: Pedigree + allowedAspectRatios: + portrait: + title: Portrait + value: 3 / 4 + landscape: + title: Landscape + value: 4 / 3 + - type: Linebreak + - identifier: l_comment + type: Textarea + rows: 5 + enableRichtext: true + richtextConfiguration: cpdefault + diff --git a/ContentBlocks/RecordTypes/Litter/language/de.labels.xlf b/ContentBlocks/RecordTypes/Litter/language/de.labels.xlf new file mode 100644 index 0000000..30502b0 --- /dev/null +++ b/ContentBlocks/RecordTypes/Litter/language/de.labels.xlf @@ -0,0 +1,12 @@ + + + +
+ + + Litter + Wurf + + + + diff --git a/ContentBlocks/RecordTypes/Litter/language/labels.xlf b/ContentBlocks/RecordTypes/Litter/language/labels.xlf new file mode 100644 index 0000000..6caf126 --- /dev/null +++ b/ContentBlocks/RecordTypes/Litter/language/labels.xlf @@ -0,0 +1,11 @@ + + + +
+ + + Litter + + + + diff --git a/ContentBlocks/RecordTypes/Pedigree/assets/icon.svg b/ContentBlocks/RecordTypes/Pedigree/assets/icon.svg new file mode 100644 index 0000000..57f84a5 --- /dev/null +++ b/ContentBlocks/RecordTypes/Pedigree/assets/icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/ContentBlocks/RecordTypes/Pedigree/config.yaml b/ContentBlocks/RecordTypes/Pedigree/config.yaml new file mode 100644 index 0000000..499269f --- /dev/null +++ b/ContentBlocks/RecordTypes/Pedigree/config.yaml @@ -0,0 +1,181 @@ +name: conpassione/pedigree +typeName: conpassione-pedigree +title: 'Pedigree' +group: csbp +table: tx_cpkm_domain_model_pedigree +languageAware: false +labelField: + - p_name + - p_birth_date + - p_sex +sortField: + - identifier: p_name + order: asc +security: + ignorePageTypeRestriction: true +prefixFields: false +fields: + - identifier: p_dog + type: Palette + fields: + - identifier: p_name + type: Text + required: true + size: 30 + - identifier: p_kennel + type: Select + renderType: selectSingle + foreign_table: tx_cpkm_domain_model_kennel + foreign_table_where: 'ORDER BY tx_cpkm_domain_model_kennel.k_name' + items: + - label: '---' + value: 0 + minitems: 0 + maxitems: 1 + - identifier: p_birth_date + type: DateTime + format: date + - type: Linebreak + - identifier: p_sex + type: Select + renderType: selectSingle + default: 0 + items: + - label: 'Female' + value: 0 + - label: 'Male' + value: 1 + minitems: 0 + maxitems: 1 + - identifier: p_variety + type: Select + renderType: selectSingle + default: 0 + items: + - label: '---' + value: 0 + - label: 'Museau Normal' + value: 1 + - label: 'Face Rase' + value: 2 + minitems: 0 + maxitems: 1 + - type: Linebreak + - identifier: p_status + type: Select + renderType: selectSingle + default: 0 + items: + - label: '---' + value: 0 + - label: 'angekört' + value: 1 + - label: 'aktiv' + value: 2 + - label: 'inaktiv' + value: 3 + minitems: 0 + maxitems: 1 + - identifier: p_color + type: Text + size: 20 + - identifier: p_size + type: Number + format: decimal + default: 0 + range: + lower: 0 + upper: 70 + - identifier: p_chip_number + type: Text + size: 20 + - identifier: p_shsb_number + type: Text + size: 10 + + - identifier: p_parents + type: Palette + fields: + - identifier: p_father + type: Select + renderType: selectSingle + items: + - label: '---' + value: 0 + foreign_table: tx_cpkm_domain_model_pedigree + foreign_table_where: 'AND tx_cpkm_domain_model_pedigree.uid <> ###THIS_UID### AND tx_cpkm_domain_model_pedigree.p_sex=1 ORDER BY tx_cpkm_domain_model_pedigree.p_name' + minitems: 0 + maxitems: 1 + default: 0 + - identifier: p_mother + type: Select + renderType: selectSingle + items: + - label: '---' + value: 0 + foreign_table: tx_cpkm_domain_model_pedigree + foreign_table_where: 'AND tx_cpkm_domain_model_pedigree.uid <> ###THIS_UID### AND tx_cpkm_domain_model_pedigree.p_sex=0 ORDER BY tx_cpkm_domain_model_pedigree.p_name' + minitems: 0 + maxitems: 1 + default: 0 + + - identifier: ownertab + type: Tab + - identifier: p_owner + type: Palette + fields: + - identifier: p_first_name + type: Text + size: 20 + - identifier: p_last_name + type: Text + size: 20 + - type: Linebreak + - identifier: p_address + type: Textarea + size: 30 + rows: 5 + - type: Linebreak + - identifier: p_phone + type: Text + size: 20 + - identifier: p_mobile + type: Text + size: 20 + - type: Linebreak + - identifier: p_email + type: Text + size: 20 + - identifier: p_web + type: Text + size: 20 + + - identifier: infotab + type: Tab + - identifier: p_attachements + type: Palette + fields: + - identifier: p_images + type: File + extendedPalette: true + minitems: 0 + maxitems: 3 + allowed: common-image-types + cropVariants: + pedigree: + title: Pedigree + allowedAspectRatios: + portrait: + title: Portrait + value: 3 / 4 + landscape: + title: Landscape + value: 4 / 3 + - type: Linebreak + - identifier: p_result_doc + type: File + allowed: 'doc,pdf' + minitems: 0 + maxitems: 1 + relationship: oneToMany + extendedPalette: false diff --git a/ContentBlocks/RecordTypes/Pedigree/language/de.labels.xlf b/ContentBlocks/RecordTypes/Pedigree/language/de.labels.xlf new file mode 100644 index 0000000..d66842f --- /dev/null +++ b/ContentBlocks/RecordTypes/Pedigree/language/de.labels.xlf @@ -0,0 +1,12 @@ + + + +
+ + + Pedigree + Stammbaum + + + + diff --git a/ContentBlocks/RecordTypes/Pedigree/language/labels.xlf b/ContentBlocks/RecordTypes/Pedigree/language/labels.xlf new file mode 100644 index 0000000..374f251 --- /dev/null +++ b/ContentBlocks/RecordTypes/Pedigree/language/labels.xlf @@ -0,0 +1,11 @@ + + + +
+ + + Pedigree + + + + diff --git a/Resources/Public/ContentBlocks/conpassione/kennel b/Resources/Public/ContentBlocks/conpassione/kennel index 46fc104..d0434f8 120000 --- a/Resources/Public/ContentBlocks/conpassione/kennel +++ b/Resources/Public/ContentBlocks/conpassione/kennel @@ -1 +1 @@ -../../../../ContentBlocks/RecordTypes/Kennel/Assets/ \ No newline at end of file +../../../../ContentBlocks/RecordTypes/Kennel/assets/ \ No newline at end of file diff --git a/Resources/Public/ContentBlocks/conpassione/litter b/Resources/Public/ContentBlocks/conpassione/litter new file mode 120000 index 0000000..ffb210c --- /dev/null +++ b/Resources/Public/ContentBlocks/conpassione/litter @@ -0,0 +1 @@ +../../../../ContentBlocks/RecordTypes/Litter/assets/ \ No newline at end of file diff --git a/Resources/Public/ContentBlocks/conpassione/pedigree b/Resources/Public/ContentBlocks/conpassione/pedigree new file mode 120000 index 0000000..2a21b77 --- /dev/null +++ b/Resources/Public/ContentBlocks/conpassione/pedigree @@ -0,0 +1 @@ +../../../../ContentBlocks/RecordTypes/Pedigree/assets/ \ No newline at end of file diff --git a/Resources/Public/Icons/Dpg.svg b/Resources/Public/Icons/Dpg.svg new file mode 100644 index 0000000..6c3ebe3 --- /dev/null +++ b/Resources/Public/Icons/Dpg.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Resources/Public/Icons/Kennel.svg b/Resources/Public/Icons/Kennel.svg new file mode 100644 index 0000000..e41f8c5 --- /dev/null +++ b/Resources/Public/Icons/Kennel.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/Resources/Public/Icons/Pedigree.svg b/Resources/Public/Icons/Pedigree.svg new file mode 100644 index 0000000..57f84a5 --- /dev/null +++ b/Resources/Public/Icons/Pedigree.svg @@ -0,0 +1,10 @@ + + + + + + + + + +