shortTopbarTitle
parent
e08b7f89fc
commit
fa4722cdd8
|
@ -49,6 +49,8 @@ public class ConfigurationPropertiesBean {
|
|||
private String issuer;
|
||||
|
||||
private String topbarTitle;
|
||||
|
||||
private String shortTopbarTitle;
|
||||
|
||||
private String logoImageUrl;
|
||||
|
||||
|
@ -118,6 +120,17 @@ public class ConfigurationPropertiesBean {
|
|||
public void setTopbarTitle(String topbarTitle) {
|
||||
this.topbarTitle = topbarTitle;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return If shortTopbarTitle is undefined, returns topbarTitle.
|
||||
*/
|
||||
public String getShortTopbarTitle() {
|
||||
return shortTopbarTitle == null ? topbarTitle : shortTopbarTitle;
|
||||
}
|
||||
|
||||
public void setShortTopbarTitle(String shortTopbarTitle) {
|
||||
this.shortTopbarTitle = shortTopbarTitle;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the logoImageUrl
|
||||
|
|
|
@ -134,5 +134,14 @@ public class ConfigurationPropertiesBeanTest {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testShortTopbarTitle() {
|
||||
ConfigurationPropertiesBean bean = new ConfigurationPropertiesBean();
|
||||
bean.setTopbarTitle("LONG");
|
||||
assertEquals("LONG", bean.getShortTopbarTitle());
|
||||
bean.setShortTopbarTitle("SHORT");
|
||||
assertEquals("SHORT", bean.getShortTopbarTitle());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -34,7 +34,13 @@
|
|||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="brand" href=""><img src="${ config.logoImageUrl }" /> ${config.topbarTitle}</a>
|
||||
<a class="brand" href="">
|
||||
<img src="${ config.logoImageUrl }" />
|
||||
<span>
|
||||
<span class="visible-phone">${config.shortTopbarTitle}</span>
|
||||
<span class="hidden-phone">${config.topbarTitle}</span>
|
||||
</span>
|
||||
</a>
|
||||
<c:if test="${ not empty pageName }">
|
||||
<div class="nav-collapse collapse">
|
||||
<ul class="nav">
|
||||
|
|
Loading…
Reference in New Issue