-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #692 from scireum/tbi/se9177-messagelevel
Creates a message level enum
- Loading branch information
Showing
3 changed files
with
54 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package sirius.web.controller; | ||
|
||
/** | ||
* Declares the severity of a message and provides a convenient way to determine a proper Bootstrap CSS class to render | ||
* the message. | ||
*/ | ||
public enum MessageLevel { | ||
|
||
/** | ||
* Declares a message as success. | ||
*/ | ||
SUCCESS("alert-success"), | ||
|
||
/** | ||
* Declares a message as information. | ||
*/ | ||
INFO("alert-info"), | ||
|
||
/** | ||
* Declares a message as warning. | ||
*/ | ||
WARNING("alert-warning"), | ||
|
||
/** | ||
* Declares a message as error. | ||
*/ | ||
PROBLEM("alert-danger"); | ||
|
||
private String cssClass; | ||
|
||
MessageLevel(String cssClass) { | ||
this.cssClass = cssClass; | ||
} | ||
|
||
/** | ||
* Returns the Bootstrap CSS class used to render the message. | ||
* | ||
* @return the name of the css class used to render the message | ||
*/ | ||
public String getCssClass() { | ||
return cssClass; | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
src/main/resources/default/templates/wondergem/page-messages.html.pasta
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