Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
services
t3o sites
typo3.org
typo3.org
Commits
23d14e66
Commit
23d14e66
authored
Jul 12, 2017
by
Thomas Löffler
Browse files
Merge branch '70-event-detail-view' into 'develop'
Resolve "Event detail view" Closes
#70
See merge request
!62
parents
55750a07
3d78f4d1
Pipeline
#1486
passed with stages
in 5 minutes
Changes
10
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
html/typo3conf/ext/t3org_layout/Classes/Domain/Model/Event.php
0 → 100644
View file @
23d14e66
<?php
namespace
T3o\T3orgLayout\Domain\Model
;
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
use
TYPO3\CMS\Core\Utility\GeneralUtility
;
use
TYPO3\CMS\Extbase\Service\FlexFormService
;
/**
* Event
*
* @author Torben Hansen <derhansen@gmail.com>
*/
class
Event
extends
\
DERHANSEN\SfEventMgt\Domain\Model\Event
{
/**
* @var string
*/
protected
$skills
;
/**
* @return array
*/
public
function
getSkills
():
array
{
$flexFormService
=
GeneralUtility
::
makeInstance
(
FlexFormService
::
class
);
return
$flexFormService
->
convertFlexFormContentToArray
(
$this
->
skills
);
}
}
html/typo3conf/ext/t3org_layout/Configuration/TCA/Overrides/tx_sfeventmgt_domain_model_event.php
0 → 100644
View file @
23d14e66
<?php
$GLOBALS
[
'TCA'
][
'tx_sfeventmgt_domain_model_event'
][
'columns'
][
'skills'
]
=
[
'label'
=>
'Skills'
,
'config'
=>
[
'type'
=>
'LLL:EXT:t3org_layout/Resources/Private/Language/locallang.xlf:tx_t3org_layout.events.skills'
,
'ds'
=>
[
'default'
=>
'
<T3DataStructure>
<sheets>
<sSection>
<ROOT>
<TCEforms>
<sheetTitle>section</sheetTitle>
</TCEforms>
<type>array</type>
<el>
<skills>
<title>Skills</title>
<type>array</type>
<section>1</section>
<el>
<skill>
<type>array</type>
<title>Skill</title>
<el>
<title>
<TCEforms>
<label>Title</label>
<config>
<type>input</type>
</config>
</TCEforms>
</title>
</el>
</skill>
</el>
</skills>
</el>
</ROOT>
</sSection>
</sheets>
</T3DataStructure>
'
,
],
],
];
\
TYPO3\CMS\Core\Utility\ExtensionManagementUtility
::
addToAllTCAtypes
(
'tx_sfeventmgt_domain_model_event'
,
'skills'
,
''
,
'after:program'
);
html/typo3conf/ext/t3org_layout/Resources/Private/Extensions/SfEventMgt/Partials/Event/Detail/ImagesAndFiles.html
0 → 100644
View file @
23d14e66
<f:if
condition=
"{event.image}"
>
<div
class=
"event-detail-row"
>
<div
class=
"event-detail-value event-image"
>
<f:for
each=
"{event.image}"
as=
"image"
>
<f:render
partial=
"Rendering/Image"
arguments=
"{file: image, maxWidth: {phone: '768', tablet: '248', desktop: '800', full: '800'}}"
/>
</f:for>
</div>
<div
class=
"clear"
></div>
</div>
</f:if>
<f:if
condition=
"{event.additionalImage}"
>
<div
class=
"event-detail-row"
>
<div
class=
"event-detail-value event-additional-image"
>
<f:for
each=
"{event.additionalImage}"
as=
"image"
>
<f:render
partial=
"Rendering/Image"
arguments=
"{file: image, maxWidth: {phone: '768', tablet: '248', desktop: '800', full: '800'}}"
/>
</f:for>
</div>
<div
class=
"clear"
></div>
</div>
</f:if>
<f:if
condition=
"{event.files}"
>
<div
class=
"event-detail-row"
>
<div
class=
"event-detail-value files"
>
<f:for
each=
"{event.files}"
as=
"file"
>
<f:if
condition=
"{file.originalResource.title}"
>
<f:then>
<a
href=
"{file.originalResource.publicUrl}"
target=
"_blank"
>
{file.originalResource.title}
</a>
</f:then>
<f:else>
<a
href=
"{file.originalResource.publicUrl}"
target=
"_blank"
>
<f:translate
key=
"detail.download"
/>
</a>
</f:else>
</f:if>
</f:for>
</div>
<div
class=
"clear"
></div>
</div>
</f:if>
\ No newline at end of file
html/typo3conf/ext/t3org_layout/Resources/Private/Extensions/SfEventMgt/Partials/Event/Detail/Location.html
0 → 100644
View file @
23d14e66
<f:if
condition=
"{event.location}"
>
<div
class=
"card card-size-small"
>
<div
class=
"row"
>
<div
class=
"col-md-4 hidden-sm-down text-center"
>
<i
class=
"fa fa-map-marker fa-5x text-primary"
aria-hidden=
"true"
></i></div>
<div
class=
"col-md-8"
>
<h3>
<f:translate
key=
"tx_sfeventmgt_domain_model_event.location"
/>
</h3>
<address>
{event.location.address}
<br>
{event.location.zip} {event.location.city}
<br>
{event.location.country}
</address>
</div>
</div>
<div
class=
"embed-responsive embed-responsive-16by9"
>
<iframe
class=
"embed-responsive-item"
width=
"500"
height=
"280"
frameborder=
"0"
scrolling=
"no"
marginheight=
"0"
marginwidth=
"0"
src=
"https://maps.google.com/maps?q={event.location.longitude},{event.location.latitude}&hl=es;z=14&output=embed"
></iframe>
</div>
</div>
</f:if>
\ No newline at end of file
html/typo3conf/ext/t3org_layout/Resources/Private/Extensions/SfEventMgt/Partials/Event/Detail/Program.html
0 → 100644
View file @
23d14e66
<f:if
condition=
"{event.program}"
>
<div
class=
"card card-size-small"
>
<div
class=
"row"
>
<div
class=
"col"
>
{event.program -> f:format.html()}
</div>
</div>
</div>
</f:if>
\ No newline at end of file
html/typo3conf/ext/t3org_layout/Resources/Private/Extensions/SfEventMgt/Partials/Event/Detail/Skills.html
0 → 100644
View file @
23d14e66
<f:if
condition=
"{event.skills}"
>
<div
class=
"card card-size-small"
>
<h3><f:translate
key=
"tx_t3org_layout.events.skills"
extensionName=
"t3org_layout"
/></h3>
<ul
class=
"list-style-t3o"
>
<f:for
each=
"{event.skills.skills}"
as=
"item"
>
<li>
{item.skill.title}
</li>
</f:for>
</ul>
</div>
</f:if>
\ No newline at end of file
html/typo3conf/ext/t3org_layout/Resources/Private/Extensions/SfEventMgt/Templates/Event/Detail.html
0 → 100644
View file @
23d14e66
<html
xmlns:f=
"http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
data-namespace-typo3-fluid=
"true"
>
<f:layout
name=
"Default"
/>
<f:section
name=
"main"
>
<f:if
condition=
"{event}"
>
<div
class=
"container"
>
<div
class=
"event"
>
<div
class=
"row"
>
<div
class=
"col-md-8"
>
<header>
<h1>
{event.title}
</h1>
<div
class=
"small font--monospace"
>
<span
class=
"font-color--brand-primary"
>
<time
datetime=
"{f:format.date(date:event.startdate, format:'Y-m-d')}"
>
<f:format.date
date=
"{event.startdate}"
format=
"%d. %b %G"
/>
</time>
<f:if
condition=
"{event.enddate}"
>
<time
datetime=
"{f:format.date(date:event.enddate, format:'Y-m-d')}"
>
-
<f:format.date
date=
"{event.enddate}"
format=
"%d. %b %G"
/>
</time>
</f:if>
</span>
<f:if
condition=
"{event.location.city}"
>
<div>
{event.location.city}, {event.location.country}
</div>
</f:if>
</div>
</header>
<div
class=
"mt-5"
>
{event.description -> f:format.html()}
</div>
<f:render
partial=
"Event/Detail/ImagesAndFiles"
arguments=
"{event:event}"
/>
<div
class=
"event__actions text-right mt-3"
>
<f:if
condition=
"{event.enableRegistration}"
>
<f:link.action
action=
"registration"
arguments=
"{event : event}"
pageUid=
"{settings.registrationPid}"
class=
"btn btn-primary"
>
<f:translate
key=
"t3o.event.button.signup"
default=
"Signup"
/>
</f:link.action>
</f:if>
<f:if
condition=
"{event.link}"
>
<f:link.typolink
parameter=
"{event.link}"
class=
"btn btn-secondary ml-3"
>
<f:translate
key=
"tx_sfeventmgt_domain_model_event.link"
/>
<i
class=
"fa fa-external-link ml-2"
aria-hidden=
"true"
></i>
</f:link.typolink>
</f:if>
</div>
</div>
<aside
class=
"col-md-4"
>
<f:if
condition=
"{event.organisator.name}"
>
<header>
<h4>
<f:translate
key=
"tx_sfeventmgt_domain_model_event.organisator"
/>
</h4>
<div
class=
"row"
>
<div
class=
"col-md-4"
>
<f:render
partial=
"Rendering/Image"
arguments=
"{file: event.organisator.image, maxWidth: {phone: '400', tablet: '400', desktop: '400', full: '400'}}"
/>
</div>
<div
class=
"col-md-8"
>
<h4>
{event.organisator.name -> f:format.raw()}
</h4>
</div>
</div>
<p
class=
"text-muted mt-3"
>
<f:if
condition=
"{event.organisator.email}"
>
E-mail:
<f:link.email
class=
"text-muted"
email=
"{event.organisator.email}"
/>
<br
/>
</f:if>
<f:if
condition=
"{event.organisator.phone}"
>
Phone:
<a
class=
"text-muted"
href=
"tel:{event.organisator.phone}"
>
{event.organisator.phone}
</a>
</f:if>
</p>
</header>
</f:if>
</aside>
</div>
<div
class=
"card-container"
>
<f:render
partial=
"Event/Detail/Location"
arguments=
"{event:event}"
/>
<f:render
partial=
"Event/Detail/Program"
arguments=
"{event:event}"
/>
<f:render
partial=
"Event/Detail/Skills"
arguments=
"{event:event}"
/>
</div>
</div>
</div>
</f:if>
</f:section>
</html>
html/typo3conf/ext/t3org_layout/Resources/Private/Language/locallang.xlf
0 → 100755
View file @
23d14e66
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff
version=
"1.0"
>
<file
source-language=
"en"
datatype=
"plaintext"
original=
"messages"
date=
"2015-06-23T11:36:30Z"
>
<body>
<trans-unit
id=
"tx_t3org_layout.events.skills"
>
<source>
Skills
</source>
</trans-unit>
</body>
</file>
</xliff>
html/typo3conf/ext/t3org_layout/ext_tables.sql
0 → 100644
View file @
23d14e66
#
#
Table
structure
for
table
'tx_sfeventmgt_domain_model_event'
#
CREATE
TABLE
tx_sfeventmgt_domain_model_event
(
skills
text
,
);
html/typo3conf/ext/t3org_layout/ext_typoscript_setup.txt
0 → 100644
View file @
23d14e66
config.tx_extbase {
persistence {
classes {
DERHANSEN\SfEventMgt\Domain\Model\Event {
subclasses {
Tx_t3orgLayout_Event = T3o\T3orgLayout\Domain\Model\Event
}
}
T3o\T3orgLayout\Domain\Model\Event {
mapping {
tableName = tx_sfeventmgt_domain_model_event
recordType = Tx_t3orgLayout_Event
}
}
}
}
objects {
DERHANSEN\SfEventMgt\Domain\Model\Event.className = T3o\T3orgLayout\Domain\Model\Event
}
}
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment