Skip to content
This repository has been archived by the owner on Jul 25, 2018. It is now read-only.

Session message on error should be red (instead of green) #49

Closed
maxhbr opened this issue Nov 26, 2015 · 6 comments · Fixed by #243
Closed

Session message on error should be red (instead of green) #49

maxhbr opened this issue Nov 26, 2015 · 6 comments · Fixed by #243
Assignees
Milestone

Comments

@maxhbr
Copy link
Member

maxhbr commented Nov 26, 2015

If one shows a banner using com.siemens.sw360.portal.portlets.Sw360Portlet.setSessionMessage,
one will see a green banner. I think that the color should depend on requestStatus, i.e.

  • green only for SUCCESS
  • red for FAILURE
  • yellow for everything else

screenshot

bildschirmfoto-vendors - sw360 - chromium
Banner is green but the message says "Vendor short could not be....".

@maxhbr maxhbr added this to the 1.2 milestone Nov 26, 2015
@heydenreich heydenreich modified the milestones: 1.3, 1.2 Jan 11, 2016
@heydenreich heydenreich modified the milestones: 1.4, 1.3 Feb 23, 2016
@heydenreich
Copy link
Contributor

Postpone to 1.4. Now users cannot see the admin portlet any more, so the above use case is not possible any more. Wait until another use case appears before working on this feature.

@mcjaeger
Copy link
Contributor

mcjaeger commented May 3, 2016

maybe could be covered if we update to 6.2...GA6 or 7

@mcjaeger mcjaeger modified the milestones: 1.5, 1.4 May 3, 2016
@mcjaeger
Copy link
Contributor

mcjaeger commented Aug 30, 2016

maybe in the BDP Import section - there are red banners, please test. Let's focus on the update of Liferay (in case there are no red banners already) if that is possible (instead of having a complicated work around.

@heydenreich
Copy link
Contributor

This would be possible with acceptable effort:
liferayuserfeedback

A third type of message is difficult and requires a Liferay plugin. Removing the green and the first red message is maybe possible, but not clear with how much effort.

@heydenreich
Copy link
Contributor

This is how to hide the standard messages;

SessionMessages.add(request, PortalUtil.getPortletId(request) +
SessionMessages.KEY_SUFFIX_HIDE_DEFAULT_ERROR_MESSAGE);
SessionMessages.add(request, PortalUtil.getPortletId(request) +
SessionMessages.KEY_SUFFIX_HIDE_DEFAULT_SUCCESS_MESSAGE);

These lines should be placed after
SessionMessages.add(request, "request_processed", successMsg); and
SessionErrors.add(request, "error-key");

@heydenreich
Copy link
Contributor

Result:
image

@maxhbr maxhbr added the ready label Sep 14, 2016
@heydenreich heydenreich self-assigned this Sep 19, 2016
heydenreich added a commit that referenced this issue Sep 26, 2016
* add error message and remove default success and error message
* closes #49
heydenreich added a commit that referenced this issue Sep 26, 2016
* add error message and remove default success and error message
* closes #49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants