shortTopbarTitle

pull/1046/merge
jimmytheneutrino 2016-07-05 03:00:31 +03:00 committed by Justin Richer
parent e08b7f89fc
commit fa4722cdd8
3 changed files with 29 additions and 1 deletions

View File

@ -50,6 +50,8 @@ public class ConfigurationPropertiesBean {
private String topbarTitle;
private String shortTopbarTitle;
private String logoImageUrl;
private Long regTokenLifeTime;
@ -119,6 +121,17 @@ public class ConfigurationPropertiesBean {
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
*/

View File

@ -135,4 +135,13 @@ 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());
}
}

View File

@ -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">