openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 12853298c7adac54a04ff1b215abd9f1cbf4b252
parent 5fce32b38ea89009be2806697078c822fda3fc0f
Author: Jan Dankert <devnull@localhost>
Date:   Wed, 20 Mar 2013 23:05:15 +0100

Datenbank-Namen im Titel anzeigen.

Diffstat:
action/TitleAction.class.php | 5+++--
themes/default/templates/title/show.tpl.src.xml | 20++++++++++++--------
2 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/action/TitleAction.class.php b/action/TitleAction.class.php @@ -30,17 +30,18 @@ class TitleAction extends Action /** * Fuellen der Variablen und Anzeigen der Titelleiste */ - function showView() + public function showView() { $this->setTemplateVar('buildinfo',OR_TITLE.' '.OR_VERSION.' - build '.config('build','build') ); $user = Session::getUser(); if ( !is_object($user) ) - return; // Keine aktive Sitzung vorhanden. + return; // Kein Benutzer angemeldet. $db = Session::getDatabase(); $this->setTemplateVar('dbname',$db->conf['comment'].(readonly()?' ('.lang('readonly').')':'')); + $this->setTemplateVar('dbid' ,$db->id); $databases = array(); diff --git a/themes/default/templates/title/show.tpl.src.xml b/themes/default/templates/title/show.tpl.src.xml @@ -1,18 +1,22 @@ <output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> - <if true="false"> - <part class="title"> + <!-- Info-Meldung anzeigen (sofern vorhanden --> + <if present="dbname"> + <part class="toolbar-icon" title="message:database"> <image icon="database" align="left"></image> - <if present="dbname"> - <text class="titletext" title="message:database" var="dbname" - maxlength="25"></text> - <!-- <text class="titletext" raw=" - "></text> --> - </if> - <!-- <text class="titletext" var="cms_title" title="var:buildinfo"></text> --> + <text raw="_" /> + <part class="arrow-down" /> + <part class="dropdown"> + <part class="entry"> + <text title="var:dbid" var="dbname" + maxlength="50"></text> + </part> + </part> </part> </if> + <!-- MenĂ¼: Datei --> <if true="method:userIsLoggedIn"> <part class="toolbar-icon menu">