From 78eea45df109948be111c25fe459c996e2e3d979 Mon Sep 17 00:00:00 2001 From: steinm Date: Thu, 24 Jan 2013 09:35:56 +0000 Subject: [PATCH] added language selection menu use typeahead for search query form --- views/bootstrap/class.Bootstrap.php | 41 +++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index c52876765..bca6911b5 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -22,11 +22,13 @@ class LetoDMS_Bootstrap_Style extends LetoDMS_View_Common { var $imgpath; + var $extraheader; function __construct($params, $theme='bootstrap') { $this->theme = $theme; $this->params = $params; $this->imgpath = '../views/'.$theme.'/images/'; + $this->extraheader = ''; } function htmlStartPage($title="", $bodyClass="") { /* {{{ */ @@ -39,9 +41,10 @@ class LetoDMS_Bootstrap_Style extends LetoDMS_View_Common { echo ''."\n"; echo ''."\n"; echo ''."\n"; - echo ''."\n"; + if($this->extraheader) + echo $this->extraheader; + echo ''."\n"; echo ''."\n"; - echo ''."\n"; echo ''."\n"; echo "".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "LetoDMS").(strlen($title)>0 ? ": " : "").htmlspecialchars($title)."\n"; @@ -49,6 +52,10 @@ class LetoDMS_Bootstrap_Style extends LetoDMS_View_Common { echo "0 ? " class=\"".$bodyClass."\"" : "").">\n"; } /* }}} */ + function htmlAddHeader($head) { /* {{{ */ + $this->extraheader .= $head; + } /* }}} */ + function htmlEndPage() { /* {{{ */ $this->footNote(); echo ''."\n"; @@ -110,7 +117,7 @@ class LetoDMS_Bootstrap_Style extends LetoDMS_View_Common { } /* }}} */ function globalNavigation($folder=null) { /* {{{ */ - global $settings, $user; + global $settings, $user, $session; echo "
\n"; echo "
\n"; @@ -128,6 +135,21 @@ class LetoDMS_Bootstrap_Style extends LetoDMS_View_Common { echo "
  • ".getMLText("my_account")."
  • \n"; echo "
  • \n"; } + echo "
  • \n"; + echo " ".getMLText("language")."\n"; + echo "
      \n"; + $languages = getLanguages(); + foreach ($languages as $currLang) { + if($session->getLanguage() == $currLang) + echo "
    • "; + else + echo "
    • "; + echo ""; + echo $currLang."
    • \n"; + } + echo "
    \n"; + echo "
  • \n"; + echo "
  • \n"; echo "
  • ".getMLText("sign_out")."
  • \n"; echo " \n"; echo " \n"; @@ -140,7 +162,7 @@ class LetoDMS_Bootstrap_Style extends LetoDMS_View_Common { if ($user->isAdmin()) echo "
  • ".getMLText("admin_tools")."
  • \n"; echo "
  • ".getMLText("help")."
  • \n"; echo " \n"; - echo "
    "; + echo " "; if ($folder!=null && is_object($folder) && !strcasecmp(get_class($folder), "LetoDMS_Core_Folder")) { echo " getID()."\" />"; } @@ -148,7 +170,7 @@ class LetoDMS_Bootstrap_Style extends LetoDMS_View_Common { echo " "; echo " "; echo " "; - echo " "; + echo " "; if($settings->_enableFullSearch) { echo " "; } @@ -351,6 +373,9 @@ class LetoDMS_Bootstrap_Style extends LetoDMS_View_Common { echo "
  • ".getMLText("global_default_keywords")."
  • \n"; echo "
  • ".getMLText("global_document_categories")."
  • \n"; echo "
  • ".getMLText("global_attributedefinitions")."
  • \n"; + echo "
  • ".getMLText("global_workflows")."
  • \n"; + echo "
  • ".getMLText("global_workflow_states")."
  • \n"; + echo "
  • ".getMLText("global_workflow_actions")."
  • \n"; echo " \n"; echo " \n"; echo " \n"; @@ -836,6 +861,12 @@ class LetoDMS_Bootstrap_Style extends LetoDMS_View_Common { print $this->getImgPath($img); } /* }}} */ + function infoMsg($msg) { /* {{{ */ + echo "
    \n"; + echo $msg; + echo "
    \n"; + } /* }}} */ + function warningMsg($msg) { /* {{{ */ echo "
    \n"; echo $msg;