Feature #7098
closed$flashMessages should have a condition ...
100%
Description
... like red, yellow, green or something else to indicate error, warning or success.
Files
Updated by Dennis Ahrens over 14 years ago
- File extbase_flashmessages.diff extbase_flashmessages.diff added
- File fluid_flashmessages.diff fluid_flashmessages.diff added
I also need something like a message type assigned to the flashmessage.
I've written a patch introducing a simple class for flashmessages includig message, type and datetime.
The files are attached.
Updated by Dennis Ahrens over 14 years ago
first patch for extbase had a bug. I've attached a new patch for extbase... sorry
Updated by Dennis Ahrens over 14 years ago
I've made little changes related to this patch.
The new solution no longer need changes in the FlashMessageViewHelper contained in fluid.
(added toString() method)
Only the newly added extbase_flashMessages.diff has to be applied.
Updated by Axel Böswetter over 14 years ago
I suggest to change the type constants to NOTICE, INFO, OK, WARNING and ERROR, to ensure code similarity.
See http://buzz.typo3.org/teams/core/article/43-treasure-trove-flash-messages/ for the backend flash messages and their types.
Hopefully this will be merged into trunk in the future.
Updated by Axel Böswetter over 14 years ago
- File flashmessages_v2.patch flashmessages_v2.patch added
I made a new patch with my given suggestions above. I also added some extra code.
- I added the FlashMessage class to the ext_autoload.php to prevent __PHP_Incomplete_Class errors
- I added the type as class attribute to the flash message li-node in the view helper
FYI: My patch combines the changes in extbase and fluid...
Updated by Axel Böswetter over 14 years ago
- File flashmessages_v3.patch flashmessages_v3.patch added
I updated the patch again to gain more code similarity with t3lib_flashmessage. The v2 patch also has an issue, because some debug code was left back - sorry about that.
This patch also removes the htmlspecialchars() call in the FlashMessageViewHelper, so that flash messages could contain html code (e.g. links).
Updated by Stefan Neufeind over 13 years ago
This is partly resolved. Meanwhile t3lib_flashmessage is used to store the property with setSeverity(). And if that message in t3lib is rendered to HTML via render() it contains a severity-class:
$message = '<div class="typo3-message message-' . $classes[$this->severity] . '">'
render() from t3lib_flashmessage is used in the ViewHelper for RENDER_MODE_DIV.
For RENDER_MODE_UL we'll need to add this ourselves.
Note: There are no classes for severity displayed in FLOW3. FLOW3-flashmessages don't seem to have a severity that could be used the same way. The container just holds an array of strings:
FLOW3/Classes/MVC/Controller/FlashMessageContainer.php
So to "forward-port" adding this to FLOW3 as well, we'd need to add some functionality first.
Updated by Mr. Hudson over 13 years ago
Patch set 1 of change Id74e59761e7c530797ffc65705cedc260d1fdd47 has been pushed to the review server.
It is available at http://review.typo3.org/2647
Updated by Bastian Waidelich over 13 years ago
Stefan Neufeind wrote:
Hi,
render() from t3lib_flashmessage is used in the ViewHelper for RENDER_MODE_DIV.
For RENDER_MODE_UL we'll need to add this ourselves.
I did not implement that intentionally for the default render mode to stay 100% backwards compatible.
Why don't you use the RENDER_MODE_DIV instead?
Note: There are no classes for severity displayed in FLOW3. FLOW3-flashmessages don't seem to have a severity that could be used the same way.
It's already under review:
https://review.typo3.org/#change,2455
Updated by Stefan Neufeind almost 13 years ago
- Status changed from New to Under Review
Updated by Markus Günther over 12 years ago
- Status changed from Under Review to Closed
Has been merged and later reverted.
Updated by Stefan Neufeind over 11 years ago
- Status changed from Closed to New
Still needs a port from Flow-fluid to Extbase-fluid.
Updated by Anja Leichsenring over 11 years ago
- Target version set to Extbase 6.3
Updated by Alexander Schnitzler over 11 years ago
@Stefan, can you explain it to me one on one?
Updated by Gerrit Code Review about 10 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32941
Updated by Gerrit Code Review about 10 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32941
Updated by Alexander Opitz about 10 years ago
- Project changed from 534 to TYPO3 Core
- Category changed from Extbase: MVC to Extbase
- Target version changed from Extbase 6.3 to 7.0
Updated by Gerrit Code Review about 10 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32941
Updated by Gerrit Code Review about 10 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32941
Updated by Gerrit Code Review about 10 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32941
Updated by Mathias Schreiber almost 10 years ago
- Target version changed from 7.0 to 7.1 (Cleanup)
Updated by Gerrit Code Review almost 10 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32941
Updated by Benni Mack over 9 years ago
- Target version changed from 7.1 (Cleanup) to 7.4 (Backend)
Updated by Gerrit Code Review over 9 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32941
Updated by Susanne Moog over 9 years ago
- Target version changed from 7.4 (Backend) to 7.5
Updated by Stefan Neufeind over 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset dda6bcea5048f16ef63a3b15c10bb86a6725a4fb.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed