[TASK] Streamline output of flashMessages in BE 79/44479/2
authorFrank Nägler <frank.naegler@typo3.org>
Mon, 2 Nov 2015 15:49:37 +0000 (16:49 +0100)
committerMathias Schreiber <mathias.schreiber@wmdb.de>
Mon, 2 Nov 2015 20:18:00 +0000 (21:18 +0100)
Resolves: #71249
Relaeses: master
Change-Id: I5be260c96e6ae689a6716efe6a059e697f184872
Reviewed-on: https://review.typo3.org/44479
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
12 files changed:
typo3/sysext/beuser/Resources/Private/Layouts/Default.html
typo3/sysext/core/Classes/Messaging/FlashMessage.php
typo3/sysext/documentation/Resources/Private/Layouts/Default.html
typo3/sysext/extensionmanager/Resources/Private/Layouts/Main.html
typo3/sysext/extensionmanager/Resources/Private/Templates/List/UnresolvedDependencies.html
typo3/sysext/filelist/Resources/Private/Layouts/Default.html
typo3/sysext/indexed_search/Resources/Private/Templates/Administration/StatisticDetails.html
typo3/sysext/lang/Resources/Private/Templates/Language/ListLanguages.html
typo3/sysext/lang/Resources/Private/Templates/Language/ListTranslations.html
typo3/sysext/recycler/Resources/Private/Layouts/Default.html
typo3/sysext/workspaces/Resources/Private/Layouts/Module.html
typo3/sysext/workspaces/Resources/Private/Layouts/Nodoc.html

index 4389549..f9e814a 100644 (file)
@@ -2,6 +2,10 @@
 
 <f:render section="headline" />
 
-<f:flashMessages />
+<f:flashMessages as="flashMessages">
+       <f:for each="{flashMessages}" as="flashMessage">
+               {flashMessage}
+       </f:for>
+</f:flashMessages>
 
 <f:render section="content" />
index 186f254..719b49a 100644 (file)
@@ -134,4 +134,13 @@ class FlashMessage extends AbstractMessage
                        </div>';
         return $message;
     }
+
+    /**
+     * Renders the flash message, makes it possible to render a flashMessage in a fluid view.
+     *
+     * @return string
+     */
+    public function __toString() {
+        return $this->render();
+    }
 }
index 7fdff46..f3c0e8f 100644 (file)
@@ -1,5 +1,9 @@
 <div class="typo3-documentation">
        <f:render section="module-headline" />
-       <f:flashMessages />
+       <f:flashMessages as="flashMessages">
+               <f:for each="{flashMessages}" as="flashMessage">
+                       {flashMessage}
+               </f:for>
+       </f:flashMessages>
        <f:render section="Content" />
 </div>
index f60c3d8..2dca273 100644 (file)
        }"
        />
 <f:render section="headline" />
-<f:flashMessages />
+<f:flashMessages as="flashMessages">
+       <f:for each="{flashMessages}" as="flashMessage">
+               {flashMessage}
+       </f:for>
+</f:flashMessages>
 
 <f:render section="content" />
index 42aa024..3ed2957 100644 (file)
@@ -7,7 +7,12 @@
 </f:section>
 
 <f:section name="content">
-       <f:flashMessages />
+       <f:flashMessages as="flashMessages">
+               <f:for each="{flashMessages}" as="flashMessage">
+                       {flashMessage}
+               </f:for>
+       </f:flashMessages>
+
        <f:render partial="List/UnresolvedDependencies" arguments="{_all}" />
        <f:be.infobox title="{f:translate(key: 'dependencyCheck.unresolvedDependencies.title')}" state="1">
                <f:render partial="List/UnresolvedDependenciesMessage" />
@@ -18,4 +23,4 @@
        <f:link.action action="installExtensionWithoutSystemDependencyCheck" controller="Action" arguments="{extensionKey: extension.extensionKey}" class="btn btn-default t3js-dependencies disabled onClickMaskExtensionManager">
                <span class="t3-icon t3-icon-actions t3-icon-dialog-error">&nbsp;</span> <f:translate key="dependencyCheck.unresolvedDependencies.proceed" />
        </f:link.action>
-</f:section>
\ No newline at end of file
+</f:section>
index 162d368..3cf7a5f 100644 (file)
@@ -1,8 +1,12 @@
 <f:render section="headline" />
-<f:flashMessages queueIdentifier="core.template.flashMessages" />
+<f:flashMessages as="flashMessages" queueIdentifier="core.template.flashMessages">
+       <f:for each="{flashMessages}" as="flashMessage">
+               {flashMessage}
+       </f:for>
+</f:flashMessages>
 <f:render section="content" />
 
 <div class="t3js-drag-uploader" data-target-folder="{folderIdentifier}" data-progress-container="#typo3-filelist"
         data-dropzone-trigger=".t3js-drag-uploader-trigger" data-dropzone-target=".t3js-module-body h1:first"
         data-file-deny-pattern="{fileDenyPattern}" data-max-file-size="{maxFileSize}"
-       ></div>
\ No newline at end of file
+       ></div>
index add1c33..3b255f5 100644 (file)
@@ -5,7 +5,11 @@
 
 <f:section name="Content">
        <p class="lead"><f:translate key="administration.document.description"/></p>
-       <f:flashMessages />
+       <f:flashMessages as="flashMessages">
+               <f:for each="{flashMessages}" as="flashMessage">
+                       {flashMessage}
+               </f:for>
+       </f:flashMessages>
        <f:if condition="{phashRow}">
                <f:then>
                        <table class="table table-striped table-hover">
 
                </f:form>
        </f:if>
-</f:section>
\ No newline at end of file
+</f:section>
index d25cd9c..96e0a13 100644 (file)
@@ -9,7 +9,11 @@
        <h1>
                <f:translate key="header.languages"/>
        </h1>
-       <f:flashMessages/>
+       <f:flashMessages as="flashMessages">
+               <f:for each="{flashMessages}" as="flashMessage">
+                       {flashMessage}
+               </f:for>
+       </f:flashMessages>
        <form class="form-inline">
                <div class="form-group">
                        <f:form.textfield name="typo3-language-searchfield" placeholder="{f:translate(key:'table.search')}"
index 1f7eea7..a79c0f7 100644 (file)
@@ -2,7 +2,11 @@
 
 <f:section name="content">
        <h1><f:translate key="header.translations" /></h1>
-       <f:flashMessages />
+       <f:flashMessages as="flashMessages">
+               <f:for each="{flashMessages}" as="flashMessage">
+                       {flashMessage}
+               </f:for>
+       </f:flashMessages>
        <form class="form-inline">
                <div class="form-group">
                        <f:form.textfield name="typo3-language-searchfield" placeholder="{f:translate(key:'table.search')}" id="typo3-language-searchfield" value="{search}" class="form-control t3js-language-searchfield" />
index cb36197..2732da5 100644 (file)
@@ -1,4 +1,8 @@
 <f:be.pageRenderer includeRequireJsModules="{0:'TYPO3/CMS/Recycler/Recycler'}" />
 <h1><f:translate key="title" /></h1>
-<f:flashMessages />
+<f:flashMessages as="flashMessages">
+       <f:for each="{flashMessages}" as="flashMessage">
+               {flashMessage}
+       </f:for>
+</f:flashMessages>
 <f:render section="content" />
index 9fe98a1..b5a215a 100644 (file)
@@ -1,5 +1,9 @@
 <f:if condition="{pageTitle}"><h1>{pageTitle}</h1></f:if>
-<f:flashMessages />
+<f:flashMessages as="flashMessages">
+       <f:for each="{flashMessages}" as="flashMessage">
+               {flashMessage}
+       </f:for>
+</f:flashMessages>
 <div id="workspacetabs"></div>
 <div class="well well-sm"><f:render section="main" /></div>
-<f:if condition="{showLegend}"><f:render partial="legend" /></f:if>
\ No newline at end of file
+<f:if condition="{showLegend}"><f:render partial="legend" /></f:if>
index 7fcd5a3..3bc0693 100644 (file)
@@ -3,7 +3,11 @@
        <div id="typo3-docbody">
                <div id="typo3-inner-docbody">
 
-                       <f:flashMessages />
+                       <f:flashMessages as="flashMessages">
+                               <f:for each="{flashMessages}" as="flashMessage">
+                                       {flashMessage}
+                               </f:for>
+                       </f:flashMessages>
 
                        <f:render section="main"/>
                </div>