Commit 1aaf89da authored by Stefan Busemann's avatar Stefan Busemann

Merge branch '597-prototype-add-case-study-list-view-2' into 'master'

Resolve "[PROTOTYPE] Add case study list view"

Closes #597

See merge request !544
parents 294fc148 81b2a9d4
......@@ -77,3 +77,91 @@
.card .teaser-box__content {
height: calc(100% + 30px);
}
.casestudy-teaser {
margin-bottom: 30px;
a {
position: relative;
overflow: hidden;
display: block;
&:after {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
content: "";
z-index: 2;
-webkit-transition: all 0.25s ease;
transition: all 0.25s ease;
background-color: rgba(0, 0, 0, 0.75);
box-shadow: inset 0 0 140px rgba(0, 0, 0, 0.75);
}
&:hover {
&:after {
box-shadow: inset 0 0 140px rgba(0, 0, 0, 0.5);
background-color: rgba(0, 0, 0, 0.5);
}
img.casestudy-teaser-bg-img {
width: 105%;
top: -2.5%;
}
}
@include media-breakpoint-up(lg) {
height: 190px;
}
@include media-breakpoint-only(md) {
height: 15vh;
}
@include media-breakpoint-down(sm) {
height: 30vh;
}
}
img.casestudy-teaser-bg-img {
position: absolute;
top: 0;
left: 50%;
-webkit-transform: translate(-50%, 0);
transform: translate(-50%, 0);
display: block;
width: 100%;
height: 102%;
-webkit-transition: all 0.25s ease-in-out;
transition: all 0.25s ease-in-out;
object-fit: cover;
}
img.casestudy-teaser-logo {
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
width: auto;
max-width: 60%;
max-height: 50%;
margin: 0;
z-index: 1000;
}
i.fa {
width: 20px;
height: 20px;
font-size: calculate_rem(20);
color: #fff;
position: absolute;
bottom: 20px;
left: 50%;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
z-index: 9;
}
}
......@@ -75,6 +75,15 @@ mod.wizards {
CType = ce_jumbotron
}
}
ce_casestudylogo {
iconIdentifier = default-icon
title = LLL:EXT:t3olayout/Resources/Private/Language/locallang_db.xlf:element.case_study.title
description = LLL:EXT:t3olayout/Resources/Private/Language/locallang_db.xlf:element.case_study.desc
tt_content_defValues {
CType = ce_casestudylogo
}
}
}
show = *
......
<?php
/**
* t3olayout Content Element | Slider
*/
/***************
* Register fields
*/
$ce_casestudylogo = [
'tx_casestudy_logo_item' => [
'exclude' => 0,
'label' => 'Add Case Study Logo Item',
'config' => [
'type' => 'inline',
'foreign_table' => 'tx_casestudy_logo_item',
'foreign_field' => 'tt_content',
'maxitems' => 99,
'appearance' => [
'collapseAll' => true,
'useSortable' => true,
'showSynchronizationLink' => false,
'showAllLocalizationLink' => true,
'showPossibleLocalizationRecords' => false,
'showRemovedLocalizationRecords' => false,
'expandSingle' => true,
'enabledControls' => [
'localize' => true,
],
],
'behaviour' => [
'localizationMode' => 'select',
'mode' => 'select',
'localizeChildrenAtParentLocalization' => true,
],
],
],
];
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content', $ce_casestudylogo);
/***************
* Add Content Element: Logo Slider
*/
if (!is_array($GLOBALS['TCA']['tt_content']['types']['ce_casestudylogo'])) {
$GLOBALS['TCA']['tt_content']['types']['ce_casestudylogo'] = [];
}
/***************
* Add content element to selector list
*/
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
'tt_content',
'CType',
[
'Case Study Logo',
'ce_casestudylogo',
'default-icon'
],
'--div--',
'after'
);
/***************
* Assign Icon
*/
$GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['ce_casestudylogo'] = 'default-icon';
/***************
* Configure element type
*/
$GLOBALS['TCA']['tt_content']['types']['ce_casestudylogo'] = array_replace_recursive(
$GLOBALS['TCA']['tt_content']['types']['ce_casestudylogo'],
[
'showitem' => '
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.general;general,
tx_casestudy_logo_item,
--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' => 'link',
'label_alt' => 'link',
'sortby' => 'sorting',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'title' => 'LLL:EXT:t3olayout/Resources/Private/Language/locallang_db.xlf:case_study.title',
'delete' => 'deleted',
'versioningWS' => true,
'origUid' => 't3_origuid',
'hideTable' => true,
'hideAtCopy' => true,
'prependAtCopy' => 'LLL:EXT:lang/Resources/Private/Language/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' => '
hidden,
',
],
'types' => [
'1' => [
'showitem' => '
link,
background_media,
logo_media,
--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,'
],
],
'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
],
'visibility' => [
'showitem' => '
hidden;LLL:EXT:bootstrap_package/Resources/Private/Language/Backend.xlf:accordion_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' => true,
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
'config' => [
'type' => 'input',
'renderType' => 'inputDateTime',
'eval' => 'datetime',
'default' => 0
],
'l10n_mode' => 'exclude',
'l10n_display' => 'defaultAsReadonly'
],
'endtime' => [
'exclude' => true,
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
'config' => [
'type' => 'input',
'renderType' => 'inputDateTime',
'eval' => 'datetime',
'default' => 0,
'range' => [
'upper' => mktime(0, 0, 0, 1, 1, 2038)
]
],
'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_casestudy_logo_item',
'foreign_table_where' => 'AND tx_casestudy_logo_item.uid=###REC_FIELD_l10n_parent### AND tx_casestudy_logo_item.sys_language_uid IN (-1,0)',
]
],
'l10n_diffsource' => [
'config' => [
'type' => 'passthrough'
]
],
'link' => [
'l10n_mode' => 'prefixLangTitle',
'l10n_cat' => 'text',
'label' => 'LLL:EXT:t3olayout/Resources/Private/Language/locallang_db.xlf:element.case_study.link',
'config' => [
'type' => 'input',
'eval' => 'required'
],
],
'background_media' => [
'label' => 'LLL:EXT:t3olayout/Resources/Private/Language/locallang_db.xlf:element.case_study.bgimage',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
'background_media',
[
'collapseAll' => 1,
'maxitems' => 1,
]
),
],
'logo_media' => [
'label' => 'LLL:EXT:t3olayout/Resources/Private/Language/locallang_db.xlf:element.case_study.logoimage',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
'logo_media',
[
'collapseAll' => 1,
'maxitems' => 1,
]
),
],
],
];
tt_content.ce_casestudylogo =< lib.default
tt_content.ce_casestudylogo {
templateName = CaseStudyLogo
dataProcessing {
10 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
10 {
table = tx_casestudy_logo_item
pidInList.field = pid
where {
data = field:uid
intval = 1
wrap = tt_content=|
}
orderBy = sorting
as = slides
dataProcessing {
10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
10 {
references.fieldName = background_media
as = media
}
20 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
20 {
references.fieldName = logo_media
as = logomedia
}
}
}
}
}
......@@ -17,6 +17,21 @@
<trans-unit id="element.ce_feuser.desc">
<source>Frontend User Profile With User selection, Avatar, Name, Text, And Button</source>
</trans-unit>
<trans-unit id="element.case_study.link">
<source>Link</source>
</trans-unit>
<trans-unit id="element.case_study.bgimage">
<source>Background Image</source>
</trans-unit>
<trans-unit id="element.case_study.logoimage">
<source>Logo Image</source>
</trans-unit>
<trans-unit id="element.case_study.title">
<source>Case Study Logo</source>
</trans-unit>
<trans-unit id="element.case_study.desc">
<source>Add a case study item with link, background image and logo image</source>
</trans-unit>
</body>
</file>
</xliff>
<div xmlns="http://www.w3.org/1999/xhtml" lang="en" xmlns:f="http://xsd.helhum.io/ns/typo3/cms-fluid/master/ViewHelpers"
data-namespace-typo3-fluid="true">
<f:if condition="{slides}">
<div class="container">
<div class="casestudy-list">
<div class="row">
<f:for each="{slides}" as="singleItem" iteration="iteration">
<div class="col-lg-4">
<div class="casestudy-teaser">
<f:if condition="{singleItem.data.link}">
<f:link.typolink parameter="{singleItem.data.link}" target="_blank">
<f:if condition="{singleItem.media}">
<f:image image="{singleItem.media.0.originalFile}" width="353c" maxHeight="194c" class="casestudy-teaser-bg-img" title="{singleItem.media.0.title}"/>
</f:if>
<f:if condition="{singleItem.logomedia}">
<f:image image="{singleItem.logomedia.0.originalFile}" title="{singleItem.logomedia.0.title}" width="212c" class="casestudy-teaser-logo"/>
</f:if>
<i class="fa fa-arrow-right"></i>
</f:link.typolink>
</f:if>
</div>
</div>
</f:for>
</div>
</div>
</div>
</f:if>
</div>
......@@ -17,3 +17,4 @@ 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_casestudy_logo_item');
......@@ -22,6 +22,7 @@ CREATE TABLE tt_content (
t3o_svgicon int(11) DEFAULT '0' NOT NULL,
t3o_feuser int(11) DEFAULT '0' NOT NULL,
t3o_contact_check int(11) DEFAULT '0' NOT NULL,
tx_casestudy_logo_item int(11) DEFAULT '0' NOT NULL,
tx_slider_disable_control int(11) DEFAULT '0' NOT NULL,
tx_slider_item int(11) DEFAULT '0' NOT NULL,
......@@ -89,3 +90,85 @@ CREATE TABLE tx_slider_item (
KEY t3ver_oid (t3ver_oid,t3ver_wsid),
KEY language (l10n_parent,sys_language_uid)
);
#
# Table structure for table 'tx_casestudy_logo_item'
#
CREATE TABLE tx_casestudy_logo_item (
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
tt_content int(11) unsigned DEFAULT '0',
link VARCHAR(255) DEFAULT '' NOT NULL,
background_media int(11) unsigned DEFAULT '0',
logo_media int(11) unsigned DEFAULT '0',
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,
PRIMARY KEY (uid),
KEY parent (pid),
KEY t3ver_oid (t3ver_oid,t3ver_wsid),
KEY language (l10n_parent,sys_language_uid)
);
#
# Table structure for table 'tx_accordion_item'
#
CREATE TABLE tx_accordion_item (
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
tt_content int(11) unsigned DEFAULT '0',
header VARCHAR(255) DEFAULT '' NOT NULL,
bodytext text,
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,
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment