data['idplist'] AS $tab => $slist) { if (!empty($this->data['preferredidp']) && array_key_exists($this->data['preferredidp'], $slist)) $faventry = $slist[$this->data['preferredidp']]; } if(!array_key_exists('header', $this->data)) { $this->data['header'] = 'selectidp'; } $this->data['header'] = $this->t($this->data['header']); $this->data['jquery'] = array('core' => TRUE, 'ui' => TRUE, 'css' => TRUE); $this->data['head'] = ''; $this->data['head'] .= ''; if (!empty($faventry)) $this->data['autofocus'] = 'favouritesubmit'; $this->includeAtTemplateBase('includes/header.php'); echo '

' . $this->t('{themeopenaire:discopower:header}') . '

'; $languages_html = ''; $includeLanguageBar = TRUE; if (!empty($_POST)) $includeLanguageBar = FALSE; if (isset($this->data['hideLanguageBar']) && $this->data['hideLanguageBar'] === TRUE) $includeLanguageBar = FALSE; if ($includeLanguageBar) { $languages = $this->getLanguageList(); if ( count($languages) > 1 ) { $languages_html .= '
'; $langnames = array( 'no' => 'Bokmål', // Norwegian Bokmål 'nn' => 'Nynorsk', // Norwegian Nynorsk 'se' => 'Sámegiella', // Northern Sami 'sam' => 'Åarjelh-saemien giele', // Southern Sami 'da' => 'Dansk', // Danish 'en' => 'English', 'de' => 'Deutsch', // German 'sv' => 'Svenska', // Swedish 'fi' => 'Suomeksi', // Finnish 'es' => 'Español', // Spanish 'fr' => 'Français', // French 'it' => 'Italiano', // Italian 'nl' => 'Nederlands', // Dutch 'lb' => 'Lëtzebuergesch', // Luxembourgish 'cs' => 'Čeština', // Czech 'sl' => 'Slovenščina', // Slovensk 'lt' => 'Lietuvių kalba', // Lithuanian 'hr' => 'Hrvatski', // Croatian 'hu' => 'Magyar', // Hungarian 'pl' => 'Język polski', // Polish 'pt' => 'Português', // Portuguese 'pt-br' => 'Português brasileiro', // Portuguese 'ru' => 'русский язык', // Russian 'et' => 'eesti keel', // Estonian 'tr' => 'Türkçe', // Turkish 'el' => 'ελληνικά', // Greek 'ja' => '日本語', // Japanese 'zh' => '简体中文', // Chinese (simplified) 'zh-tw' => '繁體中文', // Chinese (traditional) 'ar' => 'العربية', // Arabic 'fa' => 'پارسی', // Persian 'ur' => 'اردو', // Urdu 'he' => 'עִבְרִית', // Hebrew 'id' => 'Bahasa Indonesia', // Indonesian 'sr' => 'Srpski', // Serbian 'lv' => 'Latviešu', // Latvian 'ro' => 'Românește', // Romanian 'eu' => 'Euskara', // Basque ); $textarray = array(); foreach ($languages AS $lang => $current) { $lang = strtolower($lang); if ($current) { $lang_current = $langnames[$lang]; } else { $textarray[] = '
  • ' . $langnames[$lang] . '
  • '; } } $languages_html .= '
    '; // /dropup /ssp-lang-container } } function showEntry($t, $metadata, $favourite = FALSE) { $basequerystring = '?' . 'entityID=' . urlencode($t->data['entityID']) . '&' . 'return=' . urlencode($t->data['return']) . '&' . 'returnIDParam=' . urlencode($t->data['returnIDParam']) . '&idpentityid='; $providersOnlyIcon = array("google", "linkedin", "facebook", "orcid", "igtf_certificate_proxy"); $providerLocal = "openaire"; $namelower_dasherize = str_replace(' ', '_', strtolower(getTranslatedName($t, $metadata))); if(in_array($namelower_dasherize, $providersOnlyIcon)) { $html = ''; $html .= 'Identity Provider'; $html .= ''; } else if($namelower_dasherize == $providerLocal) { $html = ''; $html .= 'Identity Provider'; $html .= 'OpenAIRE account'; $html .= ''; } else { $html = ''; $html .= htmlspecialchars(getTranslatedName($t, $metadata)) . ''; if(array_key_exists('icon', $metadata) && $metadata['icon'] !== NULL) { $iconUrl = \SimpleSAML\Utils\HTTP::resolveURL($metadata['icon']); $html .= 'Identity Provider'; } $html .= ''; } return $html; } ?> translation if (!empty($displayName)) { return $t->getTranslation($displayName); } } if (array_key_exists('name', $metadata)) { if (is_array($metadata['name'])) { return $t->getTranslation($metadata['name']); } else { return $metadata['name']; } } return $metadata['entityid']; } echo('
    '); $or_html = '
    or
    '; $edugain_html = ''; $local_html =''; $idps_with_logo_html = ''; if (!empty($faventry)) { echo(' '); } foreach( $this->data['idplist'] AS $tab => $slist) { if ($tab !== 'all') { if (!empty($slist)) { if($tab == 'edugain') { $edugainList = '
    '; if (!empty($this->data['preferredidp']) && array_key_exists($this->data['preferredidp'], $slist)) { $idpentry = $slist[$this->data['preferredidp']]; $edugainList .= (showEntry($this, $idpentry, TRUE)); } foreach ($slist AS $idpentry) { if ($idpentry['entityid'] != $this->data['preferredidp']) { $edugainList .= (showEntry($this, $idpentry)); } } $edugainList .= '
    '; // /metalist $buttonOpenEdugain = '

    Log in with

    '; $edugain_html .= ' '; $edugain_html .= $buttonOpenEdugain; } else if($tab == "idps_with_logos") { $providers = ''; if (!empty($this->data['preferredidp']) && array_key_exists($this->data['preferredidp'], $slist)) { $idpentry = $slist[$this->data['preferredidp']]; $providers .= (showEntry($this, $idpentry, TRUE)); } foreach ($slist AS $idpentry) { if ($idpentry['entityid'] != $this->data['preferredidp']) { $providers .= (showEntry($this, $idpentry)); } } $idps_with_logo_html .= '
    ' . $providers . '
    '; } else if($tab == "local") { $providers = ''; // Should be 1 provider in the list foreach ($slist AS $idpentry) { $providers .= (showEntry($this, $idpentry)); } $local_html .= '
    ' . $providers . '
    '; } } } } echo $edugain_html . $idps_with_logo_html . $or_html . $local_html; ?>

    Need an account? t('{themeopenaire:discopower:sign_up_url}'); ?> > Sign up

    includeAtTemplateBase('includes/footer.php');