-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from NamelessCoder/4.7
4.7.12
- Loading branch information
Showing
8 changed files
with
241 additions
and
11 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
<?php | ||
/*************************************************************** | ||
* Copyright notice | ||
* | ||
* (c) 2012 Claus Due <claus@wildside.dk>, Wildside A/S | ||
* | ||
* All rights reserved | ||
* | ||
* This script is part of the TYPO3 project. The TYPO3 project is | ||
* free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* The GNU General Public License can be found at | ||
* http://www.gnu.org/copyleft/gpl.html. | ||
* | ||
* This script is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* This copyright notice MUST APPEAR in all copies of the script! | ||
***************************************************************/ | ||
|
||
/** | ||
* Configuration Service | ||
* | ||
* Service to interact with site configuration | ||
* | ||
* @package Flux | ||
* @subpackage Service | ||
*/ | ||
class Tx_Flux_Service_Configuration implements t3lib_Singleton { | ||
|
||
/** | ||
* @var Tx_Extbase_Configuration_ConfigurationManagerInterface | ||
*/ | ||
protected $configurationManager; | ||
|
||
/** | ||
* @param Tx_Extbase_Configuration_ConfigurationManagerInterface $configurationManager | ||
* @return void | ||
*/ | ||
public function injectConfigurationManager(Tx_Extbase_Configuration_ConfigurationManagerInterface $configurationManager) { | ||
$this->configurationManager = $configurationManager; | ||
} | ||
|
||
/** | ||
* Gets an array of TypoScript configuration from below plugin.tx_fed - | ||
* if $extensionName is set in parameters it is used to indicate which sub- | ||
* section of the result to return. | ||
* | ||
* @param string $extensionName | ||
* @param string $memberName | ||
* @param array $dontTranslateMembers Array of members not to be translated by path | ||
* @return array | ||
*/ | ||
public function getTypoScriptSubConfiguration($extensionName, $memberName, $dontTranslateMembers = array()) { | ||
$config = $this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT); | ||
$config = $config['plugin.']['tx_fed.'][$memberName . '.']; | ||
if (is_array($config) === FALSE) { | ||
return array(); | ||
} | ||
if ($this->checkDependenciesForConfiguration($config) === FALSE) { | ||
return array(); | ||
} | ||
$config = Tx_Flux_Utility_Array::convertTypoScriptArrayToPlainArray($config); | ||
if ($extensionName) { | ||
$config = $config[$extensionName]; | ||
} | ||
if (is_array($config) === FALSE) { | ||
return array(); | ||
} | ||
foreach ($config as $k => $v) { | ||
if ($extensionName) { | ||
if (in_array($k, $dontTranslateMembers) === FALSE) { | ||
$config[$k] = Tx_Flux_Utility_Path::translatePath($v); | ||
} | ||
} else { | ||
foreach ($v as $subkey=>$paths) { | ||
if (in_array($subkey, $dontTranslateMembers) === FALSE) { | ||
$config[$k][$subkey] = Tx_Flux_Utility_Path::translatePath($paths); | ||
} | ||
} | ||
} | ||
} | ||
return $config; | ||
} | ||
|
||
/** | ||
* @param array $configuration | ||
* @return boolean | ||
*/ | ||
public function checkDependenciesForConfiguration($configuration) { | ||
if (isset($configuration['dependencies']) === TRUE) { | ||
$dependencies = t3lib_div::trimExplode(',', $configuration['dependencies']); | ||
foreach ($dependencies as $dependency) { | ||
if (!t3lib_extMgm::isLoaded($dependency)) { | ||
$messageText = 'The Fluid configuration set named ' . | ||
$configuration['label'] . ' depends on extension ' . $dependency . ' (all dependencies: ' . | ||
implode(',', $dependencies) . ') but ' . $dependency . ' was not loaded'; | ||
$flashMessage = new \TYPO3\CMS\Core\Messaging\FlashMessage($messageText, 'Fluid configuration missing', t3lib_FlashMessage::WARNING); | ||
t3lib_FlashMessageQueue::addMessage($flashMessage); | ||
return FALSE; | ||
} | ||
} | ||
} | ||
return TRUE; | ||
} | ||
|
||
} |
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
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
72 changes: 72 additions & 0 deletions
72
Resources/Private/Templates/ViewHelpers/Widget/Grid/Legacy.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 |
---|---|---|
@@ -0,0 +1,72 @@ | ||
{namespace fed=Tx_Fed_ViewHelpers} | ||
{namespace flux=Tx_Flux_ViewHelpers} | ||
|
||
<style type="text/css"> | ||
.fce-header { background-color: #5B5B5B; background-image: -moz-linear-gradient(center top , #7F7F7F 10%, #5B5B5B 100%); padding: 4px; margin-top: 8px; color: white; font-weight: bold; } | ||
.fce-header span { position: absolute; } | ||
.fce-header div { text-align: center; } | ||
|
||
.fce-container .t3-page-ce-body { margin-bottom: 8px; } | ||
td.spacer { width: 8px; height: 8px; } | ||
</style> | ||
|
||
<table style="width: 100%; margin-top: 8px;" cellspacing="0" cellpadding="0"> | ||
<tbody> | ||
<f:for each="{grid}" as="gridrow" iteration="rowIteration"> | ||
<fed:data.var name="totalColumnCount" type="integer" value="0" /> | ||
<tr> | ||
<f:for each="{gridrow}" as="gridcolumn" iteration="columnIteration"> | ||
<td colspan="{gridcolumn.colspan}" rowspan="{gridcolumn.rowspan}" style="{gridcolumn.style}"> | ||
<f:for each="{gridcolumn.areas}" as="area"> | ||
<flux:be.contentArea area="{area.name}" row="{row}"> | ||
<div class="fce-header t3-page-colHeader"> | ||
<flux:be.link.content.new row="{row}" area="{area.name}" /> | ||
<div><f:translate key="{area.label}" default="{area.label}" /></div> | ||
</div> | ||
<div class="fce-container"> | ||
<f:for each="{records}" as="record"> | ||
<div class="t3-page-ce"> | ||
<flux:be.contentElement row="{record}" dblist="{dblist}" /> | ||
<fed:comment comment="This next DIV closing tag is NOT a mistake! It is a bug in tt_content list rendering internals of TYPO3" /> | ||
</div> | ||
</div> | ||
</f:for> | ||
</div> | ||
</flux:be.contentArea> | ||
</f:for> | ||
|
||
<fed:data.var name="totalColumnCount" type="integer"> | ||
<fed:math> | ||
<fed:data.var name="totalColumnCount"/> + 1 + ({gridcolumn.colspan} - 1) | ||
</fed:math> | ||
</fed:data.var> | ||
|
||
</td> | ||
<f:if condition="{columnIteration.isLast} < 1"> | ||
|
||
<fed:data.var name="totalColumnCount" type="integer"> | ||
<fed:math> | ||
<fed:data.var name="totalColumnCount"/> + 1 | ||
</fed:math> | ||
</fed:data.var> | ||
|
||
<td class="spacer"> </td> | ||
</f:if> | ||
</f:for> | ||
</tr> | ||
<!-- | ||
<f:if condition="{rowIteration.isLast} < 1"> | ||
<tr> | ||
<td><fed:data.var name="totalColumnCount"/></td> | ||
<td class="spacer"> </td> | ||
</tr> | ||
</f:if> | ||
--> | ||
<tr> | ||
<fed:loop count="{totalColumnCount}"> | ||
<td class='spacer'> </td> | ||
</fed:loop> | ||
</tr> | ||
</f:for> | ||
</tbody> | ||
</table> |