From 93cb26e79dfcbe667fff79301b7261e2ea434186 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 8 Dec 2014 14:49:26 +0100 Subject: [PATCH] do not used hard coded class names of SeedDMS_Core_xxx anymore --- views/bootstrap/class.Bootstrap.php | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 1fa7819c0..e0f9eb9d7 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -22,7 +22,14 @@ class SeedDMS_Bootstrap_Style extends SeedDMS_View_Common { var $imgpath; - var $extraheader; + + /** + * @var string $extraheader extra html code inserted in the html header + * of the page + * + * @access protected + */ + protected $extraheader; function __construct($params, $theme='bootstrap') { $this->theme = $theme; @@ -233,6 +240,7 @@ $(document).ready(function () { } /* }}} */ function globalNavigation($folder=null) { /* {{{ */ + $dms = $this->params['dms']; echo "
\n"; echo "
\n"; echo "
\n"; @@ -299,7 +307,7 @@ $(document).ready(function () { echo "
  • ".getMLText("help")."
  • \n"; echo " \n"; echo "
    "; - if ($folder!=null && is_object($folder) && !strcasecmp(get_class($folder), "SeedDMS_Core_Folder")) { + if ($folder!=null && is_object($folder) && !strcasecmp(get_class($folder), $dms->getClassname('folder'))) { echo " getID()."\" />"; } echo " "; @@ -386,7 +394,8 @@ $(document).ready(function () { } /* }}} */ private function folderNavigationBar($folder) { /* {{{ */ - if (!is_object($folder) || strcasecmp(get_class($folder), "SeedDMS_Core_Folder")) { + $dms = $this->params['dms']; + if (!is_object($folder) || strcasecmp(get_class($folder), $dms->getClassname('folder'))) { echo "
      \n"; echo "
    \n"; return; @@ -1077,6 +1086,16 @@ function clearFilename() { return "../out/images/$img"; } /* }}} */ + function getCountryFlag($lang) { /* {{{ */ + switch($lang) { + case "en_GB": + return 'flags/gb.png'; + break; + default: + return 'flags/'.substr($lang, 0, 2).'.png'; + } + } /* }}} */ + function printImgPath($img) { /* {{{ */ print $this->getImgPath($img); } /* }}} */