bug6196: social footer and footer are updated with new github links both for desktop and mobile

This commit is contained in:
masha.kashirina
2025-12-11 23:23:22 +01:00
parent 1497e55291
commit 8f5b39b542
25 changed files with 161 additions and 33 deletions
@@ -43,6 +43,7 @@ public class Footer extends Composite {
@UiField AnchorElement privacyAnchorLink;
@UiField AnchorElement mobileUi;
@UiField AnchorElement jobsAnchor;
@UiField AnchorElement sourceCodeAnchor;
@UiField(provided = true)
final PlaceNavigation<WhatsNewPlace> releaseNotesNavigation;
@@ -67,10 +68,12 @@ public class Footer extends Composite {
supportAnchor.getStyle().setDisplay(Display.NONE);
privacyAnchorLink.getStyle().setDisplay(Display.NONE);
jobsAnchor.getStyle().setDisplay(Display.NONE);
sourceCodeAnchor.setHref("https://github.com/SAP/sailing-analytics");
} else {
hideIfBlank(copyrightDiv, cfg.getFooterCopyright());
setHrefOrHide(privacyAnchorLink, cfg.getFooterPrivacyLink());
setHrefOrHide(jobsAnchor, cfg.getFooterJobsLink());
setHrefOrHide(sourceCodeAnchor, cfg.getGitHubLink());
setHrefOrHide(supportAnchor, cfg.getFooterSupportLink());
languageSelector.setLabelText(cfg.getBrandTitle(Optional.empty()) + " " + StringMessages.INSTANCE.whitelabelFooterLanguage());
if (!hideIfBlank(copyrightDiv, cfg.getFooterCopyright())) {
@@ -79,6 +82,8 @@ public class Footer extends Composite {
}
copyrightDiv.setAttribute(DebugConstants.DEBUG_ID_ATTRIBUTE, "copyrightDiv");
supportAnchor.setAttribute(DEBUG_ID_ATTRIBUTE, "supportAnchor");
jobsAnchor.setAttribute(DEBUG_ID_ATTRIBUTE, "jobsAnchor");
sourceCodeAnchor.setAttribute(DEBUG_ID_ATTRIBUTE, "sourceCodeAnchor");
whatsNewAnchor.setAttribute(DEBUG_ID_ATTRIBUTE, "whatsNewAnchor");
imprintAnchorLink.setAttribute(DEBUG_ID_ATTRIBUTE, "imprintAnchorLink");
privacyAnchorLink.setAttribute(DEBUG_ID_ATTRIBUTE, "privacyAnchorLink");
@@ -18,6 +18,9 @@
<a ui:field="privacyAnchorLink" target="_blank" class="{local_res.css.dfooter_item} {local_res.css.dfooter_link}">
<ui:text from='{i18n.footerPrivacy}' />
</a>
<a ui:field="sourceCodeAnchor" target="_blank" class="{local_res.css.dfooter_item} {local_res.css.dfooter_link}">
<ui:text from='{i18n.sourceCode}'/>
</a>
<a ui:field="jobsAnchor" target="_blank" class="{local_res.css.dfooter_item} {local_res.css.dfooter_link}">
<ui:text from='{i18n.footerJobs}'/>
</a>
@@ -12,27 +12,41 @@
font-size: 2.4em;
margin-bottom: 0.833333333333333em;
}
.socialfooter_item {
.socialfooter_items {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.socialfooter_items > .socialfooter_item {
float: none;
white-space: nowrap;
box-sizing: border-box;
display: block;
flex: 0 0 17rem;
margin: 0 0.75rem 1.5rem;
}
.socialfooter_item a {
color: #f6f9fc;
text-decoration: none;
}
.socialfooter_item_contentwrapper {
padding: 1.133333333333333em 6.666666666666667em 1.4em 0.666666666666667em;
display: flex;
align-items: center;
width: 100%;
box-sizing: border-box;
padding: 1em 2em 1.4em 1.3333em;
}
.socialfooter_item_contentwrappertwitter {
background: #58aeee;
padding-left: 1.133333333333333em;
}
.socialfooter_item_contentwrapperfacebook {
background: #3b5998;
padding-left: 1.333333333333333em;
}
.socialfooter_item_contentwrapperinstagram {
background: #ffffff;
padding-left: 1.333333333333333em;
}
.socialfooter_item_contentwrappergithub {
background: #333333;
}
.socialfooter_itemleft {
text-align: right;
@@ -44,9 +58,11 @@
text-align: center;
}
img.socialfooter_item_icon {
display: inline-block;
vertical-align: middle;
height: 1.666666666666667em;
display: block;
height: 1.6667em;
width: 1.6667em;
object-fit: contain;
flex: 0 0 1.6667em;
}
.socialfooter_item_text {
line-height: 1;
@@ -61,6 +77,10 @@ img.socialfooter_item_icon {
border-left: 1px solid rgba(51, 51, 51,0.2);
color: #333;
}
.socialfooter_item_text_github {
border-left: 1px solid rgba(255,255,255,0.2);
color: #ffffff;
}
.socialfooter_item_text_top {
font-size: 1em;
}
@@ -27,12 +27,15 @@ public class SocialFooter extends Composite {
@UiField HTMLPanel htmlPanel;
@UiField HeadingElement socialHeading;
@UiField DivElement xItem;
@UiField DivElement gitHubItem;
@UiField DivElement facebookItem;
@UiField DivElement instagramItem;
@UiField AnchorElement xLink;
@UiField AnchorElement gitHubLink;
@UiField AnchorElement facebookLink;
@UiField AnchorElement instagramLink;
@UiField DivElement xTopText;
@UiField DivElement gitHubTopText;
@UiField DivElement facebookTopText;
@UiField DivElement instagramTopText;
@@ -45,6 +48,7 @@ public class SocialFooter extends Composite {
} else {
socialHeading.setInnerText(cfg.getFollowSports(Optional.empty()));
setHrefOrHide(xItem, xLink, xTopText, cfg.getxLink(), cfg.getSportsOn(Optional.empty()));
setHrefOrHide(gitHubItem, gitHubLink, gitHubTopText, cfg.getGitHubLink(), cfg.getFollowGitHub(Optional.empty()));
setHrefOrHide(facebookItem, facebookLink, facebookTopText, cfg.getFacebookLink(), cfg.getSportsOn(Optional.empty()));
setHrefOrHide(instagramItem, instagramLink, instagramTopText, cfg.getInstagramLink(), cfg.getSportsOn(Optional.empty()));
}
@@ -9,9 +9,10 @@
<!-- The search/social media page footer-->
<div class="{local_res.css.socialfooter}">
<div class="{res.mediaCss.grid}">
<h3 ui:field="socialHeading" class="{local_res.css.socialfooter_heading} {res.mediaCss.small12} {res.mediaCss.columns}">
<h3 ui:field="socialHeading" class="{local_res.css.socialfooter_heading}">
</h3>
<div ui:field="xItem" class="{local_res.css.socialfooter_item} {local_res.css.socialfooter_itemleft} {res.mediaCss.small4} {res.mediaCss.columns}">
<div class="{local_res.css.socialfooter_items}">
<div ui:field="xItem" class="{local_res.css.socialfooter_item} {local_res.css.socialfooter_itemleft} ">
<a ui:field="xLink" target="_blank" class="{local_res.css.socialfooter_item_contentwrapper} {local_res.css.socialfooter_item_contentwrappertwitter}">
<img src="{shr.twitter.getSafeUri}" class="{local_res.css.socialfooter_item_icon}"></img>
<div class="{local_res.css.socialfooter_item_text}">
@@ -21,7 +22,7 @@
</div>
</a>
</div>
<div ui:field="facebookItem" class="{local_res.css.socialfooter_item} {local_res.css.socialfooter_itemcenter} {res.mediaCss.small4} {res.mediaCss.columns}">
<div ui:field="facebookItem" class="{local_res.css.socialfooter_item} {local_res.css.socialfooter_itemcenter}">
<a ui:field="facebookLink" target="_blank" class="{local_res.css.socialfooter_item_contentwrapper} {local_res.css.socialfooter_item_contentwrapperfacebook}">
<img src="{shr.facebook.getSafeUri}" class="{local_res.css.socialfooter_item_icon}"></img>
<div class="{local_res.css.socialfooter_item_text}">
@@ -31,7 +32,7 @@
</div>
</a>
</div>
<div ui:field="instagramItem" class="{local_res.css.socialfooter_item} {local_res.css.socialfooter_itemright} {res.mediaCss.small4} {res.mediaCss.columns}">
<div ui:field="instagramItem" class="{local_res.css.socialfooter_item} {local_res.css.socialfooter_itemcenter}">
<a ui:field="instagramLink" target="_blank" class="{local_res.css.socialfooter_item_contentwrapper} {local_res.css.socialfooter_item_contentwrapperinstagram}">
<img src="{shr.instagram.getSafeUri}" class="{local_res.css.socialfooter_item_icon}"></img>
<div class="{local_res.css.socialfooter_item_text} {local_res.css.socialfooter_item_text_inverse}">
@@ -41,6 +42,17 @@
</div>
</a>
</div>
<div ui:field="gitHubItem" class="{local_res.css.socialfooter_item} {local_res.css.socialfooter_itemright}">
<a ui:field="gitHubLink" target="_blank" class="{local_res.css.socialfooter_item_contentwrapper} {local_res.css.socialfooter_item_contentwrappergithub}">
<img src="{shr.githubWhite.getSafeUri}" class="{local_res.css.socialfooter_item_icon}"></img>
<div class="{local_res.css.socialfooter_item_text} {local_res.css.socialfooter_item_text_github}">
<div ui:field="gitHubTopText" class="{local_res.css.socialfooter_item_text_top}">
</div>
<div class="{local_res.css.socialfooter_item_text_bottom}">GitHub</div>
</div>
</a>
</div>
</div>
</div>
</div>
</g:HTMLPanel>
@@ -26,5 +26,8 @@ public interface SocialFooterResources extends ClientBundle {
String socialfooter_item_text_inverse();
String socialfooter_item_text_top();
String socialfooter_item_text_bottom();
String socialfooter_items();
String socialfooter_item_contentwrappergithub();
String socialfooter_item_text_github();
}
}
@@ -45,6 +45,7 @@ public class Footer extends Composite {
@UiField AnchorElement imprintAnchorLink;
@UiField AnchorElement desktopUi;
@UiField AnchorElement jobsAnchor;
@UiField AnchorElement sourceCodeAnchor;
@UiField AnchorElement privacyAnchor;
@UiField SpanElement pipe;
@@ -71,6 +72,7 @@ public class Footer extends Composite {
supportAnchor.getStyle().setDisplay(Display.NONE);
jobsAnchor.getStyle().setDisplay(Display.NONE);
privacyAnchor.getStyle().setDisplay(Display.NONE);
sourceCodeAnchor.setHref("https://github.com/SAP/sailing-analytics");
} else {
pipe.setInnerText("|");
if (!hideIfBlank(copyrightDiv, cfg.getFooterCopyright())) {
@@ -79,6 +81,7 @@ public class Footer extends Composite {
languageSelector.setLabelText(cfg.getBrandTitle(Optional.empty()) + " " + StringMessages.INSTANCE.whitelabelFooterLanguage());
setHrefOrHide(privacyAnchor, cfg.getFooterPrivacyLink());
setHrefOrHide(jobsAnchor, cfg.getFooterJobsLink());
setHrefOrHide(sourceCodeAnchor, cfg.getGitHubLink());
setHrefOrHide(supportAnchor, cfg.getFooterSupportLink());
if (!hideIfBlank(copyrightDiv, cfg.getFooterCopyright())) {
copyrightDiv.setInnerText(cfg.getFooterCopyright());
@@ -19,6 +19,9 @@
title="{i18n.footerPrivacy}">
<ui:text from='{i18n.footerPrivacy}' />
</a>
<a ui:field="sourceCodeAnchor" target="_blank">
<ui:text from='{i18n.sourceCode}'/>
</a>
<a ui:field="jobsAnchor" target="_blank">
<ui:text from='{i18n.footerJobs}'/>
</a>
@@ -1,11 +1,11 @@
/**
* Events on the main page
* Events on the main page (mobile)
*/
.socialfooter {
font-size: 1rem;
background: #008fcc;
color: #fff;
padding: 2em 0 0 0;
padding: 2.5em 0 4em 0;
margin-top: 3em;
}
.socialfooter_heading {
@@ -13,9 +13,22 @@
margin-bottom: 1.875em;
font-size: 1.066666666666667em;
}
.socialfooter_items {
display: flex;
flex-wrap: wrap;
justify-content: center;
width: 100%;
clear: both;
padding: 0;
}
.socialfooter_item {
white-space: nowrap;
padding-bottom: 2em;
box-sizing: border-box;
display: flex;
justify-content: center;
flex: 0 1 10rem;
min-width: 0;
margin: 0 0.75rem 2em;
}
.socialfooter_item a {
color: #f6f9fc;
@@ -24,15 +37,6 @@
.socialfooter_item_contentwrapper {
visibility: visible;
}
.socialfooter_itemleft {
text-align: right;
}
.socialfooter_itemcenter {
text-align: center;
}
.socialfooter_itemright {
text-align: left;
}
img.socialfooter_item_icon {
display: inline-block;
height: 1.333333333333333em;
@@ -27,12 +27,15 @@ public class SocialFooter extends Composite {
@UiField HTMLPanel htmlPanel;
@UiField HeadingElement socialHeading;
@UiField DivElement xItem;
@UiField DivElement gitHubItem;
@UiField DivElement facebookItem;
@UiField DivElement instagramItem;
@UiField AnchorElement xLink;
@UiField AnchorElement gitHubLink;
@UiField AnchorElement facebookLink;
@UiField AnchorElement instagramLink;
@UiField DivElement xTopText;
@UiField DivElement gitHubTopText;
@UiField DivElement facebookTopText;
@UiField DivElement instagramTopText;
@@ -47,6 +50,7 @@ public class SocialFooter extends Composite {
setHrefOrHide(xItem, xLink, xTopText, cfg.getxLink(), cfg.getSportsOn(Optional.empty()));
setHrefOrHide(facebookItem, facebookLink, facebookTopText, cfg.getFacebookLink(), cfg.getSportsOn(Optional.empty()));
setHrefOrHide(instagramItem, instagramLink, instagramTopText, cfg.getInstagramLink(), cfg.getSportsOn(Optional.empty()));
setHrefOrHide(gitHubItem, gitHubLink, gitHubTopText, cfg.getGitHubLink(), cfg.getFollowGitHub(Optional.empty()));
}
htmlPanel.getElement().setAttribute(DEBUG_ID_ATTRIBUTE, "socialFooter");
}
@@ -11,7 +11,8 @@
<div class="{res.mediaCss.grid}">
<h3 ui:field="socialHeading" class="{local_res.css.socialfooter_heading} {res.mediaCss.small12} {res.mediaCss.columns}">
</h3>
<div ui:field="xItem" class="{local_res.css.socialfooter_item} {local_res.css.socialfooter_itemleft} {res.mediaCss.small6} {res.mediaCss.columns}">
<div class="{local_res.css.socialfooter_items}">
<div ui:field="xItem" class="{local_res.css.socialfooter_item}">
<a ui:field="xLink" target="_blank" class="{local_res.css.socialfooter_item_contentwrapper}">
<img src="{shr.twitter.getSafeUri}" class="{local_res.css.socialfooter_item_icon}"></img>
<div class="{local_res.css.socialfooter_item_text}">
@@ -21,7 +22,7 @@
</div>
</a>
</div>
<div ui:field="facebookItem" class="{local_res.css.socialfooter_item} {local_res.css.socialfooter_itemright} {res.mediaCss.small6} {res.mediaCss.columns}">
<div ui:field="facebookItem" class="{local_res.css.socialfooter_item}">
<a ui:field="facebookLink" target="_blank" class="{local_res.css.socialfooter_item_contentwrapper}">
<img src="{shr.facebook.getSafeUri}" class="{local_res.css.socialfooter_item_icon}"></img>
<div class="{local_res.css.socialfooter_item_text}">
@@ -31,7 +32,17 @@
</div>
</a>
</div>
<div ui:field="instagramItem" class="{local_res.css.socialfooter_item} {local_res.css.socialfooter_itemcenter} {res.mediaCss.small12} {res.mediaCss.columns}">
<div ui:field="gitHubItem" class="{local_res.css.socialfooter_item}">
<a ui:field="gitHubLink" target="_blank" class="{local_res.css.socialfooter_item_contentwrapper}">
<img src="{shr.githubWhite.getSafeUri}" class="{local_res.css.socialfooter_item_icon}"></img>
<div class="{local_res.css.socialfooter_item_text}">
<div ui:field="gitHubTopText" class="{local_res.css.socialfooter_item_text_top}">
</div>
<div class="{local_res.css.socialfooter_item_text_bottom}">GitHub</div>
</div>
</a>
</div>
<div ui:field="instagramItem" class="{local_res.css.socialfooter_item}">
<a ui:field="instagramLink" target="_blank" class="{local_res.css.socialfooter_item_contentwrapper}">
<img src="{shr.instagramInverse.getSafeUri}" class="{local_res.css.socialfooter_item_icon}"></img>
<div class="{local_res.css.socialfooter_item_text}">
@@ -42,6 +53,7 @@
</a>
</div>
</div>
</div>
</div>
</g:HTMLPanel>
</ui:UiBinder>
@@ -15,12 +15,10 @@ public interface SocialFooterResources extends ClientBundle {
String socialfooter_heading();
String socialfooter_item();
String socialfooter_item_contentwrapper();
String socialfooter_itemleft();
String socialfooter_itemcenter();
String socialfooter_itemright();
String socialfooter_item_icon();
String socialfooter_item_text();
String socialfooter_item_text_top();
String socialfooter_item_text_bottom();
String socialfooter_items();
}
}
@@ -145,4 +145,8 @@ public interface SharedHomeResources extends CommonIcons {
@Source("plus.svg")
@MimeType("image/svg+xml")
DataResource plus();
@Source("github-white.png")
ImageResource githubWhite();
}
@@ -2554,4 +2554,5 @@ public interface StringMessages extends com.sap.sse.gwt.client.StringMessages,
String unlock();
String ipsLockedForUserCreationAbuse();
String unableToLoadIpsBlockedForUserCreationAbuse();
String sourceCode();
}
@@ -2590,3 +2590,4 @@ filterIpAddresses=Filter IP Addresses
unlock=Unlock
ipsLockedForUserCreationAbuse=IPs Locked for User Creation Abuse
unableToLoadIpsBlockedForUserCreationAbuse=Unable to load IPs Blocked for User Creation Abuse
sourceCode=Source Code
@@ -2584,3 +2584,4 @@ filterIpAddresses=IP-Adressen filtern
unlock=Entsperren
ipsLockedForUserCreationAbuse=Wegen Missbrauchs bei der Benutzererstellung gesperrte IPs
unableToLoadIpsBlockedForUserCreationAbuse=Wegen Missbrauchs der Benutzererstellung blockierte IPs können nicht geladen werden
sourceCode=Quellcode
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

@@ -1,9 +1,10 @@
sailingAnalyticsReadMore=Mehr Lesen
sailingAnalyticsSailing=SAP Sailing
sportsOn=SAP Sports bei
followSports=SAP Sports folgen
followSports=Folgen Sie Uns auf
welcomeToSailingAnalytics=Willkommen bei SAP Sailing Analytics
welcomeToSailingAnalyticsBody=SAP bringt Segelfans näher and das Geschen auf dem Wasser als je zuvor.\
\ Das Live Leaderbord mit Ranglisten in Echtzeit, Bootsgeschwindigkeit und Abstand zum Führenden ermöglicht ein besseres Fanerlebnis. Mit SAP alle Rennen live schauen und kein Überholmaneuver mehr verpassen.
\ Das ist die einfache Art Segeln jedrzeit live zu verfolgen.
inSailingContent=Der Segelsport bietet SAP eine perfekte Plattform, um seine Lösungen zu demonstrieren und dem Sport zu neuen Bestleistungen zu verhelfen. SAPs Unterstützung hat das Segelerlebnis vollkommen verwandelt. Tools von SAP:<ul><li>helfen Seglern, ihre Leistung zu analysieren und ihre Strategie zu optimieren</li><li>bringen Fans näher an das Geschehen heran</li><li>stellen Informationen und Einblicke für die Medien bereit, um eine besser informierte Berichterstattung zu ermöglichen</li></ul>SAP ist bereits seit vielen Jahren mit dem Segelsport verbunden und hat ein Portfolio zahlreicher Teams und Regatten aufgebaut, darunter:<ul><li>Technischer Partner der Europäischen Segelligen</li><li>Titelsponsor des SAP Extreme Sailing Teams</li><li>Offizieller technischer Partner der Extreme Sailing Series</li><li>Partner der weltweit größten Regatta; Kieler Woche</li><li>Technischer Partner der Sailing Champions League</li><li>Titelsponsor der SAP 5O5 World Championships</li><li>Offizieller Technologiepartner von WORLD SAILING</li></ul>
followGitHub=Sailing Analytics auf
@@ -1,9 +1,10 @@
sailingAnalyticsReadMore=Read More
sailingAnalyticsSailing=SAP Sailing
sportsOn=SAP Sports on
followSports=Follow SAP Sports
followSports=Follow Us on
welcomeToSailingAnalytics=Welcome to SAP Sailing Analytics
welcomeToSailingAnalyticsBody=SAP brings sailing fans closer to the on-water action than ever before.\
\ The live-leaderboard enhances the fan experience through real-time rankings, boat speeds and winning margins. Follow every race and never miss a passing maneuver with SAP.\
\ This is the simple way to watch live sail racing from wherever you are.
inSailingContent =Sailing provides the perfect platform for SAP to showcase solutions and help the sport run like never before. SAP\u2019s involvement in the sport has transformed the sailing experience by providing tools, which:<ul><li>Help sailors analyze performance and optimize strategy</li><li>Bring fans closer to the action</li><li>Provide the media with information and insights to deliver a greater informed commentary</li></ul>SAP has a longstanding involvement with sailing and has established a portfolio spanning across teams and regattas, including:<ul><li>Technical Partner of the European Sailing Leagues</li><li>Partner of the world\u2019s largest regatta, Kieler Woche (Kiel Week)</li><li>Technical Partner of the Sailing Champions League</li><li>Title sponsor of the SAP 5O5 World Championships</li><li>Official Technology Partner of WORLD SAILING</li></ul>
inSailingContent=Sailing provides the perfect platform for SAP to showcase solutions and help the sport run like never before. SAP\u2019s involvement in the sport has transformed the sailing experience by providing tools, which:<ul><li>Help sailors analyze performance and optimize strategy</li><li>Bring fans closer to the action</li><li>Provide the media with information and insights to deliver a greater informed commentary</li></ul>SAP has a longstanding involvement with sailing and has established a portfolio spanning across teams and regattas, including:<ul><li>Technical Partner of the European Sailing Leagues</li><li>Partner of the world\u2019s largest regatta, Kieler Woche (Kiel Week)</li><li>Technical Partner of the Sailing Champions League</li><li>Title sponsor of the SAP 5O5 World Championships</li><li>Official Technology Partner of WORLD SAILING</li></ul>
followGitHub=Sailing Analytics on
@@ -182,4 +182,12 @@ public class SAPBrandingConfiguration implements BrandingConfiguration {
public String getInSailingContent(Optional<String> locale) {
return sailingServerStringMessages.get(locale.map(l -> Locale.forLanguageTag(l)).orElse(Locale.ENGLISH), "inSailingContent");
}
@Override
public String getFollowGitHub(Optional<String> locale) {
return sailingServerStringMessages.get(locale.map(l -> Locale.forLanguageTag(l)).orElse(Locale.ENGLISH), "followGitHub");
}
@Override
public String getGitHubLink() {
return "https://github.com/SAP/sailing-analytics";
}
}
@@ -136,6 +136,10 @@ public interface BrandingConfigurationService {
MORE_LOGIN_INFORMATION_SETTINGS_URL("moreLoginInformationSettingsURL"),
MORE_LOGIN_INFORMATION_NOTIFICATIONS_URL("moreLoginInformationNotificationsURL"),
FOLLOW_GITHUB("followGitHub"),
GITHUB_LINK("gitHubLink"),
/**
@@ -143,6 +143,8 @@ public class BrandingConfigurationServiceImpl implements BrandingConfigurationSe
map.put(BrandingConfigurationProperty.SAILING_ANALYTICS_SAILING, brandingConfiguration == null ? "" : brandingConfiguration.getSailingAnalyticsSailing(locale));
map.put(BrandingConfigurationProperty.WELCOME_TO_SAILING_ANALYTICS, brandingConfiguration == null ? "" : brandingConfiguration.getWelcomeToSailingAnalytics(locale));
map.put(BrandingConfigurationProperty.WELCOME_TO_SAILING_ANALYTICS_BODY, brandingConfiguration == null ? "" : brandingConfiguration.getWelcomeToSailingAnalyticsBody(locale));
map.put(BrandingConfigurationProperty.FOLLOW_GITHUB, brandingConfiguration == null ? "" : brandingConfiguration.getFollowGitHub(locale));
map.put(BrandingConfigurationProperty.GITHUB_LINK, brandingConfiguration == null ? "" : brandingConfiguration.getGitHubLink());
map.put(BrandingConfigurationProperty.DEBRANDING_ACTIVE_JSP_PROPERTY_NAME, !isBrandingActive());
map.put(BrandingConfigurationProperty.BRANDING_ACTIVE_JSP_PROPERTY_NAME, isBrandingActive());
map.put(BrandingConfigurationProperty.DASH_WHITELABELED_JSP_PROPERTY_NAME, whitelabeled);
@@ -245,4 +245,19 @@ public interface BrandingConfiguration {
* @return HTML or plain text. Empty to hide.
*/
String getInSailingContent(Optional<String> locale);
/**
* Localized footer label inviting users to follow the brands GitHub Source Code.
*
* @param locale see Locale Parameter Conventions.
* @return localized text. Empty to hide.
*/
String getFollowGitHub(Optional<String> locale);
/**
* Brands GitHub URL.
*
* @return absolute URL. Empty to hide the icon/link.
*/
String getGitHubLink();
}
@@ -121,4 +121,10 @@ public class ClientConfigurationContextDataJSO extends JavaScriptObject {
public final native String getMoreLoginInformationSimulatorURL() /*-{
return this.moreLoginInformationSimulatorURL;
}-*/;
public final native String getFollowGitHub() /*-{
return this.followGitHub;
}-*/;
public final native String getGitHubLink() /*-{
return this.gitHubLink;
}-*/;
}
@@ -96,6 +96,8 @@ public class ClientConfiguration implements BrandingConfiguration {
private String moreLoginInformationSailorProfilesURL;
private String moreLoginInformationSimulatorURL;
private String inSailingContent;
private String followGitHub;
private String gitHubLink;
public ClientConfiguration() {
try {
@@ -132,6 +134,9 @@ public class ClientConfiguration implements BrandingConfiguration {
moreLoginInformationSettingsURL = dataJso.getMoreLoginInformationSettingsURL();
moreLoginInformationSailorProfilesURL = dataJso.getMoreLoginInformationSailorProfilesURL();
moreLoginInformationSimulatorURL = dataJso.getMoreLoginInformationSimulatorURL();
gitHubLink = dataJso.getGitHubLink();
followGitHub = dataJso.getFollowGitHub();
} catch (RuntimeException e) {
GWT.log("no branding information found.");
@@ -267,4 +272,12 @@ public class ClientConfiguration implements BrandingConfiguration {
public String getInSailingContent(Optional<String> locale) {
return inSailingContent;
}
public String getFollowGitHub(Optional<String> locale) {
return followGitHub;
}
public String getGitHubLink() {
return gitHubLink;
}
}