Project

General

Profile

Actions

Feature #7098

closed

$flashMessages should have a condition ...

Added by Jan Roth over 14 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
Start date:
2010-04-01
Due date:
% Done:

100%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

... like red, yellow, green or something else to indicate error, warning or success.


Files

extbase_flashmessages.diff (4.65 KB) extbase_flashmessages.diff Dennis Ahrens, 2010-06-18 17:05
fluid_flashmessages.diff (640 Bytes) fluid_flashmessages.diff Dennis Ahrens, 2010-06-18 17:05
extbase_flashmessages.diff (4.7 KB) extbase_flashmessages.diff Dennis Ahrens, 2010-06-18 17:29
extbase_flashMessages.diff (4.76 KB) extbase_flashMessages.diff Dennis Ahrens, 2010-06-29 14:42
flashmessages_v2.patch (6.45 KB) flashmessages_v2.patch Axel Böswetter, 2010-08-11 10:33
flashmessages_v3.patch (7.87 KB) flashmessages_v3.patch Axel Böswetter, 2010-08-20 13:24

Related issues 1 (0 open1 closed)

Blocked by TYPO3 Core - Bug #27367: t3lib_FlashMessage: separate mapping of severity to message-classes from HTML-renderingClosed2011-06-10

Actions

Updated by Dennis Ahrens over 14 years ago

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.

Actions #2

Updated by Dennis Ahrens over 14 years ago

first patch for extbase had a bug. I've attached a new patch for extbase... sorry

Actions #3

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.

Actions #4

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.

Actions #5

Updated by Axel Böswetter over 14 years ago

I made a new patch with my given suggestions above. I also added some extra code.

  1. I added the FlashMessage class to the ext_autoload.php to prevent __PHP_Incomplete_Class errors
  2. 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...

Actions #6

Updated by Axel Böswetter over 14 years ago

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).

Actions #7

Updated by Henjo Hoeksma about 14 years ago

+1 for this one!

Actions #8

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.

Actions #9

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

Actions #10

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

Actions #11

Updated by Michael McManus about 13 years ago

  • Category set to Extbase: MVC
Actions #12

Updated by Stefan Neufeind almost 13 years ago

  • Status changed from New to Under Review
Actions #13

Updated by Markus Günther over 12 years ago

  • Status changed from Under Review to Closed

Has been merged and later reverted.

Actions #14

Updated by Stefan Neufeind over 11 years ago

  • Status changed from Closed to New

Still needs a port from Flow-fluid to Extbase-fluid.

Actions #15

Updated by Anja Leichsenring over 11 years ago

  • Target version set to Extbase 6.3
Actions #16

Updated by Alexander Schnitzler over 11 years ago

@Stefan, can you explain it to me one on one?

Actions #17

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

Actions #18

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

Actions #19

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
Actions #20

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

Actions #21

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

Actions #22

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

Actions #23

Updated by Mathias Schreiber almost 10 years ago

  • Target version changed from 7.0 to 7.1 (Cleanup)
Actions #24

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

Actions #25

Updated by Benni Mack over 9 years ago

  • Target version changed from 7.1 (Cleanup) to 7.4 (Backend)
Actions #26

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

Actions #27

Updated by Susanne Moog over 9 years ago

  • Target version changed from 7.4 (Backend) to 7.5
Actions #28

Updated by Stefan Neufeind over 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #29

Updated by Riccardo De Contardi about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF