Add a fullTitle property to show the current database

This commit is contained in:
Sébastien Lucas 2014-05-31 15:03:46 +02:00
parent 6321426849
commit 63b929c1e3
2 changed files with 8 additions and 1 deletions

View file

@ -190,6 +190,13 @@ class JSONRenderer
} }
$out ["databaseId"] = GetUrlParam (DB, ""); $out ["databaseId"] = GetUrlParam (DB, "");
$out ["databaseName"] = Base::getDbName (); $out ["databaseName"] = Base::getDbName ();
if ($out ["databaseId"] == "") {
$out ["databaseName"] = "";
}
$out ["fullTitle"] = $out ["title"];
if ($out ["databaseId"] != "" && $out ["databaseName"] != $out ["fullTitle"]) {
$out ["fullTitle"] = $out ["databaseName"] . " > " . $out ["fullTitle"];
}
$out ["page"] = $page; $out ["page"] = $page;
$out ["multipleDatabase"] = Base::isMultipleDatabaseEnabled () ? 1 : 0; $out ["multipleDatabase"] = Base::isMultipleDatabaseEnabled () ? 1 : 0;
$out ["entries"] = $entries; $out ["entries"] = $entries;

View file

@ -10,7 +10,7 @@
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li><a href="{{=it.homeurl}}"><span class="glyphicon glyphicon-home"></span></a></li> <li><a href="{{=it.homeurl}}"><span class="glyphicon glyphicon-home"></span></a></li>
</ul> </ul>
<a class="navbar-brand" href="#">{{=it.title}}</a> <a class="navbar-brand" href="#">{{=it.fullTitle}}</a>
</div> </div>
<div class="collapse navbar-collapse"> <div class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">