Changeset 7395
- Timestamp:
- Jun 12, 2017, 10:44:36 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/config/dist/base.config
r6600 r7395 206 206 # General section 207 207 # =============== 208 209 # Title that is displayed in the browser tab. Use $VERSION to include 210 # the current BASE version and $SERVER to include the server name. 211 app.title = BASE $VERSION @ $SERVER 208 212 209 213 # The path to the directory where uploaded files are stored -
trunk/doc/src/docbook/appendix/base.config.xml
r6468 r7395 700 700 <simplesect id="appendix.base.config.other"> 701 701 <title>Other settings</title> 702 702 703 703 <variablelist> 704 <varlistentry> 705 <term><property>app.title</property></term> 706 <listitem> 707 <para> 708 The title that is displayed in the browser tab. Use <code>$VERSION</code> 709 to include the current BASE version and <code>$SERVER</code> to include the 710 server name. 711 </para> 712 </listitem> 713 </varlistentry> 714 704 715 <varlistentry> 705 716 <term><property>userfiles</property></term> -
trunk/src/clients/web/net/sf/basedb/clients/web/taglib/Head.java
r7217 r7395 338 338 appendStyles(sb, fontStyles, !"display".equals(longTexts), skinContext); 339 339 appendScripts(sb, skinContext); 340 341 String title = page.getTitle(); 342 if (title == null) 343 { 344 title = page.getBaseVersion() + " @ " + page.getServerName(); 345 } 346 sb.append("\t<title>").append(title).append("</title>\n"); 340 341 sb.append("\t<title>").append(page.getTitle()).append("</title>\n"); 347 342 } 348 343 -
trunk/src/clients/web/net/sf/basedb/clients/web/taglib/Page.java
r7217 r7395 27 27 28 28 import net.sf.basedb.core.Application; 29 import net.sf.basedb.core.Config; 29 30 import net.sf.basedb.core.SessionControl; 30 31 import net.sf.basedb.core.Version; … … 212 213 private static String BASE_VERSION = null; 213 214 215 /** 216 The default page title. 217 @since 3.12 218 */ 219 private static String DEFAULT_PAGE_TITLE = null; 220 214 221 private static String MAX_URL_LENGTH = null; 215 222 … … 245 252 MAX_URL_LENGTH = maxUrlLength > 0 ? String.valueOf(maxUrlLength) : null; 246 253 ROOT = ((HttpServletRequest)pageContext.getRequest()).getContextPath()+"/"; 247 BASE_VERSION = "BASE " + Version.getMajor() + "." + 248 Version.getMinor() + "." + Version.getMaintenance() + Version.getSuffix(); 254 BASE_VERSION = Version.getMajor() + "." + Version.getMinor() + "." + Version.getMaintenance() + Version.getSuffix(); 249 255 SERVER_NAME = Application.getHostName(); 256 DEFAULT_PAGE_TITLE = Config.getString("app.title", "BASE $VERSION @ $SERVER") 257 .replace("$VERSION", BASE_VERSION) 258 .replace("$SERVER", SERVER_NAME); 250 259 initialized = true; 251 260 } … … 269 278 public String getTitle() 270 279 { 271 return title ;280 return title == null ? DEFAULT_PAGE_TITLE : title; 272 281 } 273 282
Note: See TracChangeset
for help on using the changeset viewer.