Skip to content

Commit

Permalink
Merge pull request #858 from scireum/feature/aha/misc-fixes
Browse files Browse the repository at this point in the history
Provides a bunch of misc fixes.
  • Loading branch information
sabieber authored Jun 21, 2021
2 parents f0948d0 + 6568c3a commit c51025c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
26 changes: 15 additions & 11 deletions src/main/java/sirius/web/controller/Message.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,17 @@ public Message withHTMLMessage(String htmlMessage) {
*/
public Message withTextAndLink(String textMessage, String label, String link, @Nullable String icon) {
if (Strings.isFilled(icon)) {
return withTextAndLink(TEXT_AND_LINK_WITH_ICON_PATTERN, textMessage, label, link, icon);
return generateWithTextAndLink(TEXT_AND_LINK_WITH_ICON_PATTERN, textMessage, label, link, icon);
} else {
return withTextAndLink(TEXT_AND_LINK_PATTERN, textMessage, label, link, icon);
return generateWithTextAndLink(TEXT_AND_LINK_PATTERN, textMessage, label, link, icon);
}
}

private Message withTextAndLink(String pattern,
String textMessage,
String label,
String link,
@Nullable String icon) {
private Message generateWithTextAndLink(String pattern,
String textMessage,
String label,
String link,
@Nullable String icon) {
return new Message(type,
Strings.apply(pattern,
ContentHelper.escapeXML(textMessage),
Expand All @@ -116,7 +116,7 @@ private Message withTextAndLink(String pattern,
* @return the generated message
*/
public Message withTextAndLink(String textMessage, String label, String link) {
return withTextAndLink(TEXT_AND_LINK_PATTERN, textMessage, label, link);
return generateWithTextAndLink(TEXT_AND_LINK_PATTERN, textMessage, label, link, null);
}

/**
Expand All @@ -133,9 +133,13 @@ public Message withTextAndLink(String textMessage, String label, String link) {
*/
public Message withTextAndExternalLink(String textMessage, String label, String link, @Nullable String icon) {
if (Strings.isFilled(icon)) {
return withTextAndLink(EXTERNAL_TEXT_AND_LINK_WITH_ICON_PATTERN, textMessage, label, link, icon);
return generateWithTextAndLink(EXTERNAL_TEXT_AND_LINK_WITH_ICON_PATTERN,
textMessage,
label,
link,
icon);
} else {
return withTextAndLink(EXTERNAL_TEXT_AND_LINK_PATTERN, textMessage, label, link, icon);
return generateWithTextAndLink(EXTERNAL_TEXT_AND_LINK_PATTERN, textMessage, label, link, icon);
}
}

Expand All @@ -151,7 +155,7 @@ public Message withTextAndExternalLink(String textMessage, String label, String
* @return the generated message
*/
public Message withTextAndExternalLink(String textMessage, String label, String link) {
return withTextAndLink(EXTERNAL_TEXT_AND_LINK_PATTERN, textMessage, label, link);
return generateWithTextAndLink(EXTERNAL_TEXT_AND_LINK_PATTERN, textMessage, label, link, null);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,9 @@ li.right-menu-icon {
}

li.right-large-menu-icon {

a {
padding-top: 0.25rem;
padding-top: 0.25rem !important;
padding-bottom: 0 !important;

img {
Expand Down

0 comments on commit c51025c

Please sign in to comment.