Commit 98df662b authored by Harry Glatz's avatar Harry Glatz
Browse files

[TASK] Add intial files for teambox

parent b7d7d0a7
......@@ -66,6 +66,14 @@ mod.wizards {
CType = ce_accordion
}
}
ce_teamcollection {
iconIdentifier = default-icon
title = Team Collection
description = TeamColletion
tt_content_defValues {
CType = ce_teamcollection
}
}
}
show = *
......
<?php
/**
* t3olayout Content Element | Teamcollection
*/
/***************
* Register fields
*/
$ce_teamcollection_fields = array(
'view' => array(
'exclude' => 0,
'label' => 'View',
'config' => array(
'type' => 'select',
'renderType' => 'selectSingle',
'items' => array(
array('Simple Single View', 'simplesingle'),
array('Team Collection', 'teamcollecton'),
)
),
),
'tx_teamcollection' => Array(
'label' => 'Teammember:',
'config' => Array(
'type' => 'group',
'internal_type' => 'db',
'allowed' => 'tx_teamcollection',
'MM' => 'tt_content_tx_teamcollection_mm',
'size' => '20',
'maxitems' => '100000',
'minitems' => '1',
'show_thumbs' => '1',
'wizards' => array(
'suggest' => array(
'type' => 'suggest',
'default' => array(
'searchWholePhrase' => 1
),
'pages' => array(
'searchCondition' => 'doktype = 1'
)
)
)
)
),
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content', $ce_teamcollection_fields);
/***************
* Add Content Element: ce-teamcollection
*/
if (!is_array($GLOBALS['TCA']['tt_content']['types']['ce_teamcollection'])) {
$GLOBALS['TCA']['tt_content']['types']['ce_teamcollection'] = [];
}
/***************
* Add content element to seletor list
*/
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
'tt_content',
'CType',
[
'Teamcollection',
'ce_teamcollection',
'default-icon'
],
'--div--',
'after'
);
/***************
* Assign Icon
*/
$GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['ce_teamcollection'] = 'default-icon';
/***************
* Configure element type
*/
$GLOBALS['TCA']['tt_content']['types']['ce_teamcollection'] = array_replace_recursive(
$GLOBALS['TCA']['tt_content']['types']['ce_teamcollection'],
[
'showitem' => '
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.general;general,
header,
header_layout,
subheader,
view,
tx_teamcollection,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.appearance,
layout;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:layout_formlabel,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.appearanceLinks;appearanceLinks,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,
hidden;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:field.default.hidden,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.access;access,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.extended,
--div--;LLL:EXT:lang/locallang_tca.xlf:sys_category.tabs.category,categories
'
]
);
<?php
return [
'ctrl' => [
'label' => 'Title',
'label_alt' => 'title',
'sortby' => 'sorting',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'title' => 'Teammember',
'delete' => 'deleted',
'versioningWS' => 2,
'versioning_followPages' => true,
'origUid' => 't3_origuid',
'hideAtCopy' => false,
'prependAtCopy' => 'LLL:EXT:lang/locallang_general.xlf:LGL.prependAtCopy',
'transOrigPointerField' => 'l10n_parent',
'transOrigDiffSourceField' => 'l10n_diffsource',
'languageField' => 'sys_language_uid',
'dividers2tabs' => true,
'enablecolumns' => [
'disabled' => 'hidden',
'starttime' => 'starttime',
'endtime' => 'endtime',
],
'typeicon_classes' => [
'default' => 'default-icon'
],
],
'interface' => [
'showRecordFieldList' => '
contacttype,
title,
image,
email,
shortdescription,
bodytext,
link,
',
],
'types' => [
'1' => [
'showitem' => '
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.general;general,
contacttype,
title,
image,
email,
shortdescription,
bodytext,
link,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.visibility;visibility,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.access;access,
',
'columnsOverrides' => [
'bodytext' => [
'config' => [
'enableRichtext' => true,
'richtextConfiguration' => 'default'
]
],
'shortdescription' => [
'config' => [
'enableRichtext' => true,
'richtextConfiguration' => 'default'
]
]
],
],
],
'palettes' => [
'1' => [
'showitem' => ''
],
'access' => [
'showitem' => '
starttime;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:starttime_formlabel,
endtime;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:endtime_formlabel
',
'canNotCollapse' => 1
],
'general' => [
'showitem' => '
tt_content
',
'canNotCollapse' => 1
],
'visibility' => [
'showitem' => '
hidden;LLL:EXT:bootstrap_package/Resources/Private/Language/Backend.xlf:tab_item
',
'canNotCollapse' => 1
],
],
'columns' => [
'hidden' => [
'exclude' => 1,
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.hidden',
'config' => [
'type' => 'check',
'items' => [
'1' => [
'0' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:hidden.I.0'
]
]
]
],
'starttime' => [
'exclude' => 1,
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.starttime',
'config' => [
'type' => 'input',
'size' => '13',
'max' => '20',
'eval' => 'datetime',
'default' => '0'
],
'l10n_mode' => 'exclude',
'l10n_display' => 'defaultAsReadonly'
],
'endtime' => [
'exclude' => 1,
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.endtime',
'config' => [
'type' => 'input',
'size' => '13',
'max' => '20',
'eval' => 'datetime',
'default' => '0',
'range' => [
'upper' => mktime(0, 0, 0, 12, 31, 2020)
]
],
'l10n_mode' => 'exclude',
'l10n_display' => 'defaultAsReadonly'
],
'sys_language_uid' => [
'exclude' => 1,
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'foreign_table' => 'sys_language',
'foreign_table_where' => 'ORDER BY sys_language.title',
'items' => [
[
'LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages',
-1
],
[
'LLL:EXT:lang/locallang_general.xlf:LGL.default_value',
0
]
],
'allowNonIdValues' => true,
]
],
'l10n_parent' => [
'displayCond' => 'FIELD:sys_language_uid:>:0',
'exclude' => 1,
'label' => 'LLL:EXT:lang/locallang_general.php:LGL.l18n_parent',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'items' => [
['', 0],
],
'foreign_table' => 'tx_teamcollection',
'foreign_table_where' => 'AND tx_teamcollection.uid=###REC_FIELD_l10n_parent### AND tx_teamcollection.sys_language_uid IN (-1,0)',
]
],
'l10n_diffsource' => [
'config' => [
'type' => 'passthrough'
]
],
'contacttype' => array(
'exclude' => 0,
'label' => 'Contact Type',
'config' => array(
'type' => 'select',
'renderType' => 'selectSingle',
'default' => 'person',
'items' => array(
array('Person', 'person'),
array('Team', 'team'),
)
),
),
'title' => array(
'l10n_mode' => 'prefixLangTitle',
'l10n_cat' => 'text',
'label' => 'Title',
'config' => $GLOBALS['TCA']['tt_content']['columns']['header']['config'],
),
'image' => array(
'l10n_mode' => 'prefixLangTitle',
'l10n_cat' => 'text',
'label' => 'image',
'config' => $GLOBALS['TCA']['tt_content']['columns']['image']['config'],
),
'bodytext' => array(
'l10n_mode' => 'prefixLangTitle',
'l10n_cat' => 'Text',
'label' => 'Text',
'config' => $GLOBALS['TCA']['tt_content']['columns']['bodytext']['config'],
),
'shortdescription' => array(
'l10n_mode' => 'prefixLangTitle',
'l10n_cat' => 'Text',
'label' => 'Shortdescription',
'config' => $GLOBALS['TCA']['tt_content']['columns']['bodytext']['config'],
),
'email' => array(
'l10n_mode' => 'prefixLangTitle',
'l10n_cat' => 'text',
'label' => 'Email',
'config' => $GLOBALS['TCA']['tt_content']['columns']['header']['config'],
),
'link' => array(
'exclude' => 1,
'label' => 'Link',
'config' => array(
'type' => 'input',
'wizards' => array(
'link' => array(
'type' => 'popup',
'title' => 'Link',
'icon' => 'EXT:backend/Resources/Public/Images/FormFieldWizard/wizard_link.gif',
'module' => array(
'name' => 'wizard_element_browser',
'urlParameters' => array(
'mode' => 'wizard',
),
),
'JSopenParams' => 'height=300,width=500,status=0,menubar=0,scrollbars=1',
),
),
),
),
],
];
\ No newline at end of file
tt_content.ce_teamcollection =< lib.default
tt_content.ce_teamcollection {
templateName = Teamcollection
dataProcessing {
10 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
10 {
table = tx_teamcollection
pidInList = root,-1
recursive = 2
selectFields = tx_teamcollection.*
join = tt_content_tx_teamcollection_mm ON tt_content_tx_teamcollection_mm.uid_foreign = tx_teamcollection.uid
where.data = field:###selectedteamcollection### // field:uid
where.intval = 1
where.wrap = tt_content_tx_teamcollection_mm.uid_local=|
orderBy = tt_content_tx_teamcollection_mm.sorting
as = tx_teamcollection_items
dataProcessing {
10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
10 {
references.fieldName = image
as = image
}
}
}
}
}
\ No newline at end of file
<div xmlns="http://www.w3.org/1999/xhtml" lang="en"
xmlns:v="http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers"
xmlns:f="http://xsd.helhum.io/ns/typo3/cms-fluid/master/ViewHelpers"
data-namespace-typo3-fluid="true">
<f:layout name="Default"/>
<f:section name="Main">
<f:render section="{data.view}" arguments="{_all}"/>
</f:section>
<f:section name="teamcollection">
<div class="container">
<h1>{data.header}</h1>
<div class="row">
<f:for each="{tx_teamcollection_items}" as="teamitem" iteration="teamiter">
<div class="col-md-6 col-lg-3 col-sm-12">
<div class="card">
<f:image image="{teamitem.image.0}" alt="{teamitem.data.title}" class="card-img-top"/>
<div class="card-body">
<h4 class="card-title">{teamitem.data.title}</h4>
<p class="card-text">{teamitem.data.shortdescription -> f:format.html()}</p>
<a class="btn btn-primary" data-toggle="modal" data-target="#modal{teamiter.cycle}">Open
details</a>
</div>
</div>
<div class="modal fade" id="modal{teamiter.cycle}" tabindex="-1" role="dialog"
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">{teamitem.data.title}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<f:image image="{teamitem.image.0}" alt="{teamitem.data.title}"
class="img-fluid"/>
<i>{teamitem.data.shortdescription -> f:format.html()}</i>
{teamitem.data.bodytext -> f:format.html()}
<f:if condition="{teamitem.data.email}">
<div class="email">E-Mail:
<f:link.email email="{teamitem.data.email}">{teamitem.data.email}
</f:link.email>
</div>
<f:if condition="{teamitem.data.link}">
<f:link.typolink class="btn btn-primary"
parameter="{teamitem.data.link}"/>
</f:if>
</f:if>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close
</button>
</div>
</div>
</div>
</div>
</div>
</f:for>
</div>
</div>
</f:section>
<f:section name="simplesingle">
<div class="container">
<h1>{data.header}</h1>
<div class="row">
<f:for each="{tx_teamcollection_items}" as="teamitem" iteration="teamiter">
<div class="col-md-6 col-lg-3 col-sm-12">
<div class="card">
<f:image image="{teamitem.image.0}" alt="{teamitem.data.title}" class="card-img-top"/>
<div class="card-body">
<h4 class="card-title">{teamitem.data.title}</h4>
<p class="card-text">{teamitem.data.shortdescription -> f:format.html()}</p>
<a class="btn btn-primary" data-toggle="modal" data-target="#modal{teamiter.cycle}">Open
details</a>
</div>
</div>
<div class="modal fade" id="modal{teamiter.cycle}" tabindex="-1" role="dialog"
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">{teamitem.data.title}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<f:image image="{teamitem.image.0}" alt="{teamitem.data.title}"
class="img-fluid"/>
<i>{teamitem.data.shortdescription -> f:format.html()}</i>
{teamitem.data.bodytext -> f:format.html()}
<f:if condition="{teamitem.data.email}">
<div class="email">E-Mail:
<f:link.email email="{teamitem.data.email}">{teamitem.data.email}
</f:link.email>
</div>
<f:if condition="{teamitem.data.link}">
<f:link.typolink class="btn btn-primary"
parameter="{teamitem.data.link}"/>
</f:if>
</f:if>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close
</button>
</div>
</div>
</div>
</div>
</div>
</f:for>
</div>
</div>
</f:section>
</div>
\ No newline at end of file
......@@ -17,3 +17,5 @@ call_user_func(function () {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_slider_item');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_accordion_item');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_teamcollection');
......@@ -24,6 +24,8 @@ CREATE TABLE tt_content (
tx_slider_item int(11) DEFAULT '0' NOT NULL,
tx_accordion_item int(11) DEFAULT '0' NOT NULL,
tx_teamcollection int(11) DEFAULT '0' NOT NULL,
view varchar(255) DEFAULT '' NOT NULL,
tx_listing_container int(11) DEFAULT '0' NOT NULL,
tx_listing_items int(11) DEFAULT '0' NOT NULL,
......@@ -126,3 +128,62 @@ CREATE TABLE tx_accordion_item (
KEY t3ver_oid (t3ver_oid,t3ver_wsid),
KEY language (l10n_parent,sys_language_uid)
);
#
# Table structure for table 'tt_content_tx_teamcollection_mm'
#
CREATE TABLE tt_content_tx_teamcollection_mm (
uid_local int(11) unsigned DEFAULT '0' NOT NULL,
uid_foreign int(11) unsigned DEFAULT '0' NOT NULL,
tablenames varchar(30) NOT NULL,
sorting int(11) unsigned DEFAULT '0' NOT NULL,
KEY uid_local (uid_local),
KEY uid_foreign (uid_foreign)
);
#
# Table structure for table 'tx_teamcollection'
#
CREATE TABLE tx_teamcollection (
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
tt_content int(11) unsigned DEFAULT '0',
contacttype varchar(255) DEFAULT '' NOT NULL,
title varchar(255) DEFAULT '' NOT NULL,
image varchar(255) DEFAULT '' NOT NULL,
email varchar(255) DEFAULT '' NOT NULL,
shortdescription text NOT NULL,
bodytext text NOT NULL,
link varchar(255) DEFAULT '' NOT NULL,
tstamp int(11) unsigned DEFAULT '0' NOT NULL,
crdate int(11) unsigned DEFAULT '0' NOT NULL,
cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
deleted tinyint(4) unsigned DEFAULT '0' NOT NULL,
hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
starttime int(11) unsigned DEFAULT '0' NOT NULL,
endtime int(11) unsigned DEFAULT '0' NOT NULL,
t3ver_oid int(11) DEFAULT '0' NOT NULL,
t3ver_id int(11) DEFAULT '0' NOT NULL,
t3ver_wsid int(11) DEFAULT '0' NOT NULL,
t3ver_label varchar(255) DEFAULT '' NOT NULL,
t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
t3ver_stage int(11) DEFAULT '0' NOT NULL,
t3ver_count int(11) DEFAULT '0' NOT NULL,
t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
t3ver_move_id int(11) DEFAULT '0' NOT NULL,
sorting int(11) DEFAULT '0' NOT NULL,
t3_origuid int(11) DEFAULT '0' NOT NULL,
sys_language_uid int(11) DEFAULT '0' NOT NULL,
l10n_parent int(11) DEFAULT '0' NOT NULL,
l10n_diffsource mediumblob NOT NULL,
l10n_state text,
PRIMARY KEY (uid),
KEY parent (pid),
KEY t3ver_oid (t3ver_oid,t3ver_wsid),
KEY language (l10n_parent,sys_language_uid)
);
\ No newline at end of file
Supports Markdown
0%