Skip to content
Snippets Groups Projects
Commit c78e9dd9 authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

Add template parameter to header to optionally hide language bar..

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1065 44740490-163a-0410-bde0-09ae8108e29a
parent 8954a20f
No related branches found
No related tags found
No related merge requests found
...@@ -44,31 +44,40 @@ if($onLoad !== '') { ...@@ -44,31 +44,40 @@ if($onLoad !== '') {
?></a></h1> ?></a></h1>
</div> </div>
<div id="languagebar">
<?php <?php
$languages = $this->getLanguageList(); $includeLanguageBar = TRUE;
$langnames = array( if (!empty($_POST))
'no' => 'Bokmål', $includeLanguageBar = FALSE;
'nn' => 'Nynorsk', if (isset($this->data['hideLanguageBar']) && $this->data['hideLanguageBar'] === TRUE)
'se' => 'Sámi', $includeLanguageBar = FALSE;
'da' => 'Dansk',
'en' => 'English',
'de' => 'Deutsch',
'sv' => 'Svenska',
'fi' => 'Suomeksi',
'es' => 'Español',
'fr' => 'Français',
'nl' => 'Nederlands',
'lb' => 'Luxembourgish',
'sl' => 'Slovenščina', // Slovensk
'hr' => 'Hrvatski', // Croatian
'hu' => 'Magyar', // Hungarian
'pt' => 'Português', // Portuguese
'pt-BR' => 'Português brasileiro', // Portuguese
);
if (empty($_POST) ) { if ($includeLanguageBar) {
echo '<div id="languagebar">';
$languages = $this->getLanguageList();
$langnames = array(
'no' => 'Bokmål',
'nn' => 'Nynorsk',
'se' => 'Sámi',
'da' => 'Dansk',
'en' => 'English',
'de' => 'Deutsch',
'sv' => 'Svenska',
'fi' => 'Suomeksi',
'es' => 'Español',
'fr' => 'Français',
'nl' => 'Nederlands',
'lb' => 'Luxembourgish',
'sl' => 'Slovenščina', // Slovensk
'hr' => 'Hrvatski', // Croatian
'hu' => 'Magyar', // Hungarian
'pt' => 'Português', // Portuguese
'pt-BR' => 'Português brasileiro', // Portuguese
);
$textarray = array(); $textarray = array();
foreach ($languages AS $lang => $current) { foreach ($languages AS $lang => $current) {
if ($current) { if ($current) {
...@@ -79,8 +88,9 @@ if($onLoad !== '') { ...@@ -79,8 +88,9 @@ if($onLoad !== '') {
} }
} }
echo join(' | ', $textarray); echo join(' | ', $textarray);
echo '</div>';
} }
?> ?>
</div>
<div id="content"> <div id="content">
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment