-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'surfcamp-team-jacuzzi-fil'
# Conflicts: # local_packages/psi/Resources/Public/Css/main.css
- Loading branch information
Showing
6 changed files
with
713 additions
and
5 deletions.
There are no files selected for viewing
59 changes: 59 additions & 0 deletions
59
local_packages/psi/Classes/ViewHelpers/SubpagesViewHelper.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?php | ||
|
||
namespace Jacuzzi\Psi\ViewHelpers; | ||
|
||
use TYPO3\CMS\Core\Database\Connection; | ||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; | ||
use TYPO3\CMS\Core\Database\ConnectionPool; | ||
use TYPO3\CMS\Core\Utility\GeneralUtility; | ||
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface; | ||
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic; | ||
class SubpagesViewHelper extends AbstractViewHelper | ||
{ | ||
|
||
use CompileWithRenderStatic; | ||
|
||
/** | ||
* Initialize arguments | ||
*/ | ||
public function initializeArguments() | ||
{ | ||
parent::initializeArguments(); | ||
$this->registerArgument('uid', 'int', 'the UID of the Page to Look for Subpages', true); | ||
} | ||
|
||
/** | ||
* @param array $arguments | ||
* @param \Closure $renderChildrenClosure | ||
* @param RenderingContextInterface $renderingContext | ||
* @return string | ||
*/ | ||
public static function renderStatic( | ||
array $arguments, | ||
\Closure $renderChildrenClosure, | ||
RenderingContextInterface $renderingContext | ||
): array { | ||
|
||
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class) | ||
->getQueryBuilderForTable('pages'); | ||
$resultsArray = []; | ||
$id = (int)$arguments['uid']; | ||
|
||
$results = $queryBuilder | ||
->select('*') | ||
->from('pages') | ||
->where( | ||
$queryBuilder->expr()->eq( | ||
'pid', | ||
$queryBuilder->createNamedParameter($id, Connection::PARAM_INT) | ||
) | ||
) | ||
->executeQuery(); | ||
|
||
while ($row = $results->fetchAssociative()) { | ||
array_push($resultsArray, $row); | ||
} | ||
return $resultsArray; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 41 additions & 1 deletion
42
local_packages/psi/Resources/Private/Templates/Content/MenuSubpages.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,41 @@ | ||
{data.header} | ||
{namespace uzi=Jacuzzi\Psi\ViewHelpers} | ||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true"> | ||
<f:variable name="subpages"><uzi:subpages uid="{data.pages}"/></f:variable> | ||
<f:if condition="{subpages}"> | ||
<f:then> | ||
<div class="latestnews-container"> | ||
<div class="latestnews-inner"> | ||
<ul class="latestnews-wrap"> | ||
<f:for as="page" each="{subpages}"> | ||
<li class="latestnews-single profile__card"> | ||
<div class="latestnews-single-header"> | ||
<f:if condition="{page.eventdatetime}"> | ||
<f:then> | ||
<p><f:format.date format="d.m.Y" date="{page.eventdatetime}"></f:format.date></p> | ||
</f:then> | ||
</f:if> | ||
<f:if condition="{page.location}"> | ||
<f:then> | ||
<p>{page.location}</p> | ||
</f:then> | ||
</f:if> | ||
</div> | ||
<h4 class="latestnews-single-title"> | ||
{page.title} | ||
</h4> | ||
<f:link.page class="latestnews-single-link" pageUid="{page.uid}"> | ||
<f:translate key="news-readmore" extensionName="psi"/> | ||
<svg class="svg-icon" style="vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"> | ||
<path d="M640 768c-12.8 0-21.333333-4.266667-29.866667-12.8-17.066667-17.066667-17.066667-42.666667 0-59.733333l213.333333-213.333333c17.066667-17.066667 42.666667-17.066667 59.733333 0s17.066667 42.666667 0 59.733333l-213.333333 213.333333C661.333333 763.733333 652.8 768 640 768z" /> | ||
<path d="M853.333333 554.666667c-12.8 0-21.333333-4.266667-29.866667-12.8l-213.333333-213.333333c-17.066667-17.066667-17.066667-42.666667 0-59.733333s42.666667-17.066667 59.733333 0l213.333333 213.333333c17.066667 17.066667 17.066667 42.666667 0 59.733333C874.666667 550.4 866.133333 554.666667 853.333333 554.666667z" /> | ||
<path d="M853.333333 554.666667 170.666667 554.666667c-25.6 0-42.666667-17.066667-42.666667-42.666667s17.066667-42.666667 42.666667-42.666667l682.666667 0c25.6 0 42.666667 17.066667 42.666667 42.666667S878.933333 554.666667 853.333333 554.666667z" /> | ||
</svg> | ||
</f:link.page> | ||
</li> | ||
</f:for> | ||
</ul> | ||
</div> | ||
</div> | ||
</f:then> | ||
</f:if> | ||
</html> |
2 changes: 0 additions & 2 deletions
2
local_packages/psi/Resources/Private/Templates/Plugins/Felogin/Login/Logout.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.