Skip to content

Commit

Permalink
Backend of Kennelmanagement finished, exept Icons and Languages
Browse files Browse the repository at this point in the history
  • Loading branch information
conpassione committed Oct 16, 2024
1 parent f3ed3ad commit 65cc4f6
Show file tree
Hide file tree
Showing 20 changed files with 469 additions and 3 deletions.
24 changes: 24 additions & 0 deletions Configuration/Icons.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php
declare(strict_types=1);

use TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider;
use TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider;

return [
'tx-conpassione-kennellist' => [
'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,
],*/
];
29 changes: 29 additions & 0 deletions Configuration/TCA/Overrides/pages.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

declare(strict_types=1);
defined('TYPO3') or die();

use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;

call_user_func(static function(): void {
// clear the default items for "layout" field to allow for consistent adding of additional items with addItems in
// PageTSConfig (instead of a combination of altLabels and addItems
$GLOBALS['TCA']['pages']['columns']['layout']['config']['items'] = [];

// zusätzliche Icons für Folder-Seiten
$GLOBALS['TCA']['pages']['columns']['module']['config']['items'][] = [
'label' => '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';
});
13 changes: 11 additions & 2 deletions ContentBlocks/RecordTypes/Kennel/Assets/Icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions ContentBlocks/RecordTypes/Litter/assets/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
123 changes: 123 additions & 0 deletions ContentBlocks/RecordTypes/Litter/config.yaml
Original file line number Diff line number Diff line change
@@ -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

12 changes: 12 additions & 0 deletions ContentBlocks/RecordTypes/Litter/language/de.labels.xlf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file datatype="plaintext" original="Labels.xlf" source-language="en" target-language="de" date="2024-10-15T09:53:33+00:00" product-name="conpassione/kennel">
<header/>
<body>
<trans-unit id="title" resname="title">
<source>Litter</source>
<target>Wurf</target>
</trans-unit>
</body>
</file>
</xliff>
11 changes: 11 additions & 0 deletions ContentBlocks/RecordTypes/Litter/language/labels.xlf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file datatype="plaintext" original="Labels.xlf" source-language="en" date="2024-10-15T09:53:33+00:00" product-name="conpassione/kennel">
<header/>
<body>
<trans-unit id="title" resname="title">
<source>Litter</source>
</trans-unit>
</body>
</file>
</xliff>
10 changes: 10 additions & 0 deletions ContentBlocks/RecordTypes/Pedigree/assets/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 65cc4f6

Please sign in to comment.