diff options
Diffstat (limited to 'h-source/Application/Controllers/BaseController.php')
-rw-r--r-- | h-source/Application/Controllers/BaseController.php | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/h-source/Application/Controllers/BaseController.php b/h-source/Application/Controllers/BaseController.php index 69b47ac..7bd8027 100644 --- a/h-source/Application/Controllers/BaseController.php +++ b/h-source/Application/Controllers/BaseController.php @@ -100,13 +100,14 @@ class BaseController extends Controller Lang::$current = $data['lang']; } + $data['langIcon'] = Lang::getIcon(Lang::$current); + $data['langLabel'] = Lang::getLabel(Lang::$current); + //set desktop or mobile version Version::set(); //subfolder of the Views folder where to look for view files Params::$viewSubfolder = Version::getViewSubfolder(); - - $data['tm'] = $this->_topMenuClasses; $this->_queryString = $this->sanitizeQueryString($this->_queryString); @@ -240,15 +241,20 @@ class BaseController extends Controller { $status = $this->_queryString; $cPage = $this->querySanitized ? $this->currPage : $this->baseUrl."/home/index"; - $link = "<ul class='languages_link_box'>\n"; + + $mobileDataRole = Version::get() === "mobile" ? "data-role='listview'" : null; + + $link = "<ul $mobileDataRole class='languages_link_box'>\n"; foreach (Lang::$complete as $abbr => $fullName) { $linkClass = (strcmp($abbr,$lang) === 0) ? "class='current_lang'" : null; $status[0] = $abbr; $href = Url::createUrl($status); $fullNameArray = explode(',',$fullName); - $text = "<img src='".$this->baseUrl."/Public/Img/Famfamfam/".$fullNameArray[0]."'><span>".$fullNameArray[1]."</span>"; - $link .= "\t<li><a $linkClass href='".$cPage.$href."'>$text</a></li>\n"; + $text = "<img class='ui-li-icon' src='".$this->baseUrl."/Public/Img/Famfamfam/".$fullNameArray[0]."'><span>".$fullNameArray[1]."</span>"; + + $mobileRel = Version::get() === "mobile" ? "rel='external'" : null; + $link .= "\t<li><a $mobileRel $linkClass href='".$cPage.$href."'>$text</a></li>\n"; } $link .= "</ul>\n"; return $link; |