forked from cs2ag/powermail
-
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.
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/powermail/trunk@60483 735d13b6-9817-0410-8766-e36946ffe9aa
- Loading branch information
wunschtacho
committed
Apr 7, 2012
1 parent
82e3665
commit f184122
Showing
8 changed files
with
171 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
/** | ||
* View helper to implode objects to a list | ||
* | ||
* @package TYPO3 | ||
* @subpackage Fluid | ||
*/ | ||
class Tx_Powermail_ViewHelpers_String_ImplodeUidViewHelper extends Tx_Fluid_ViewHelpers_Form_AbstractFormFieldViewHelper { | ||
|
||
/** | ||
* View helper to explode a list | ||
* | ||
* @param objects Any objects with submethod getUid() | ||
* @param string Separator sign (e.g. ",") | ||
* @return string | ||
*/ | ||
public function render($objects, $separator = ',') { | ||
$string = ''; | ||
foreach ($objects as $object) { | ||
if (method_exists($object, 'getUid')) { | ||
$string .= $object->getUid(); | ||
$string .= $separator; | ||
} | ||
} | ||
return substr($string, 0, (-1 * strlen($separator))); | ||
} | ||
} | ||
|
||
?> |
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,79 @@ | ||
{namespace vh=Tx_Powermail_ViewHelpers} | ||
<f:layout name="Export" /> | ||
|
||
Render Powermail XLS Export | ||
{mails} All Mails for exporting | ||
{fields} Fields to export (drag'n drop settings in module) | ||
|
||
<f:section name="main"> | ||
|
||
<vh:String.Utf8Decode> | ||
<table> | ||
<f:for each="{mails}" as="mail" iteration="index"> | ||
<f:if condition="{index.isFirst}"> | ||
<tr> | ||
<f:for each="{fields}" as="field"> | ||
<th> | ||
<f:if condition="{vh:Condition.IsNumber(val: '{field}')}"> | ||
<f:then> | ||
<vh:Getter.GetFieldLabelFromUid uid="{field}" /> | ||
</f:then> | ||
<f:else> | ||
<f:translate key="Tx_Powermail_Domain_Model_Mails.{vh:String.UnderscoredToLowerCamelCase(val: '{field}')}" /> | ||
</f:else> | ||
</f:if> | ||
</th> | ||
</f:for> | ||
</tr> | ||
</f:if> | ||
|
||
|
||
<tr> | ||
<f:for each="{fields}" as="field"> | ||
<td> | ||
<f:if condition="{vh:Condition.IsNumber(val: '{field}')}"> | ||
<f:then> | ||
<f:for each="{mail.answers}" as="answer"> | ||
<f:if condition="{field} == {answer.field}"> | ||
{answer.value} | ||
</f:if> | ||
</f:for> | ||
</f:then> | ||
<f:else> | ||
<f:if condition="{vh:Condition.IsDateTimeVariableInVariable(obj: '{mail}', prop: '{field}')}"> | ||
<f:then> | ||
<f:if condition="{0 : field} == {0 : 'crdate'}"> | ||
<f:then> | ||
<f:format.date format="d.m.Y H:i:s"><vh:Misc.VariableInVariable obj="{mail}" prop="{field}" /></f:format.date> | ||
<f:translate key="Clock" /> | ||
</f:then> | ||
<f:else> | ||
<f:format.date format="H:i:s"><vh:Misc.VariableInVariable obj="{mail}" prop="{field}" /></f:format.date> | ||
</f:else> | ||
</f:if> | ||
</f:then> | ||
<f:else> | ||
<f:if condition="{0 : field} == {0 : 'marketing_funnel'}"> | ||
<f:then> | ||
<f:if condition="{vh:Condition.IsArray(val: '{vh:Misc.VariableInVariable(obj: \'{mail}\', prop: \'{field}\')}')}"> | ||
<f:for each="{vh:Misc.VariableInVariable(obj: '{mail}', prop: '{field}')}" as="pid" iteration="pageIndex"> | ||
<vh:Getter.GetPageNameFromUid uid="{pid}" /><f:if condition="{pageIndex.isLast}"><f:else> > </f:else></f:if> | ||
</f:for> | ||
</f:if> | ||
</f:then> | ||
<f:else> | ||
<vh:Misc.VariableInVariable obj="{mail}" prop="{field}" /> | ||
</f:else> | ||
</f:if> | ||
</f:else> | ||
</f:if> | ||
</f:else> | ||
</f:if> | ||
</td> | ||
</f:for> | ||
</tr> | ||
</f:for> | ||
</table> | ||
</vh:String.Utf8Decode> | ||
|
||
</f:section> |
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