From 7b9457b31d97134ffcf1ea47c8964ed765fc8850 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=85kre=20Solberg?= <andreas.solberg@uninett.no> Date: Fri, 31 Oct 2008 22:30:38 +0000 Subject: [PATCH] Removed <div id=content from the main template... and removed transparency and background git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@959 44740490-163a-0410-bde0-09ae8108e29a --- templates/default/admin-config.php | 1 - templates/default/admin-metadatalist.php | 3 +- templates/default/consent.php | 1 - templates/default/error.php | 1 - templates/default/errorreport.php | 3 +- templates/default/frontpage.php | 4 +- templates/default/httpredirect-debug.php | 24 +++---- templates/default/includes/header.php | 79 ++++++++++++------------ templates/default/login-feide.php | 6 +- templates/default/login-ldapmulti.php | 4 +- templates/default/login.php | 1 - templates/default/logout-iframe.php | 2 - templates/default/logout.php | 2 +- templates/default/metadata-converter.php | 2 +- templates/default/metadata.php | 1 - templates/default/metashare-add.php | 2 +- templates/default/metashare-list.php | 2 +- templates/default/no_access.php | 2 +- templates/default/noconsent.php | 1 - templates/default/openid-about.php | 2 - templates/default/openid-sites.php | 3 +- templates/default/openid-trust.php | 3 +- templates/default/post-debug.php | 4 -- templates/default/selectidp-dropdown.php | 1 - templates/default/selectidp-links.php | 2 +- templates/default/status-table.php | 1 - templates/default/status.php | 21 +++++-- 27 files changed, 82 insertions(+), 96 deletions(-) diff --git a/templates/default/admin-config.php b/templates/default/admin-config.php index e3bac4bde..08c13bac5 100644 --- a/templates/default/admin-config.php +++ b/templates/default/admin-config.php @@ -10,7 +10,6 @@ $this->includeAtTemplateBase('includes/header.php'); ?> -<div id="content"> <h2><?php echo $this->data['header']; ?></h2> <?php diff --git a/templates/default/admin-metadatalist.php b/templates/default/admin-metadatalist.php index 0707d54c2..a4e64c074 100644 --- a/templates/default/admin-metadatalist.php +++ b/templates/default/admin-metadatalist.php @@ -5,8 +5,7 @@ $this->data['icon'] = 'bino.png'; $this->includeAtTemplateBase('includes/header.php'); ?> - - <div id="content"> + <p><?php echo $this->t('metaover_intro'); ?></p> diff --git a/templates/default/consent.php b/templates/default/consent.php index 7840852db..d54d8439f 100644 --- a/templates/default/consent.php +++ b/templates/default/consent.php @@ -7,7 +7,6 @@ $this->includeInlineTranslation('SPDESC', $this->data['sp_description']); ?> - <div id="content"> <p> <?php echo $this->t('consent_accept', array('SPNAME' => '', 'IDPNAME' => '', 'SPDESC' => '')) ?> diff --git a/templates/default/error.php b/templates/default/error.php index 8ca64bfbf..1c9a8a8c7 100644 --- a/templates/default/error.php +++ b/templates/default/error.php @@ -4,7 +4,6 @@ $this->includeAtTemplateBase('includes/header.php'); ?> -<div id="content"> <h2><?php echo $this->t('title_' . $this->data['errorcode']); diff --git a/templates/default/errorreport.php b/templates/default/errorreport.php index 22d00ff1c..417ba92f8 100644 --- a/templates/default/errorreport.php +++ b/templates/default/errorreport.php @@ -3,7 +3,8 @@ $this->data['icon'] = 'bomb_l.png'; $this->includeAtTemplateBase('includes/header.php'); ?> -<div id="content"> + + <h2><?php echo $this->t('errorreport_header'); ?></h2> <p><?php echo $this->t('errorreport_text'); ?></p> <?php $this->includeAtTemplateBase('includes/footer.php'); ?> \ No newline at end of file diff --git a/templates/default/frontpage.php b/templates/default/frontpage.php index babad7c51..1824ef428 100644 --- a/templates/default/frontpage.php +++ b/templates/default/frontpage.php @@ -1,9 +1,9 @@ <?php - $this->data['icon'] = 'compass_l.png'; +# $this->data['icon'] = 'compass_l.png'; $this->includeAtTemplateBase('includes/header.php'); ?> - <div id="content"> + <div class="enablebox mini"> <table> diff --git a/templates/default/httpredirect-debug.php b/templates/default/httpredirect-debug.php index c459342cd..b65338b24 100644 --- a/templates/default/httpredirect-debug.php +++ b/templates/default/httpredirect-debug.php @@ -4,22 +4,18 @@ $this->includeAtTemplateBase('includes/header.php'); ?> - <div id="content"> - - + <h2><?php echo($this->t('{admin:debug_sending_message_title}')); ?></h2> - <h2><?php echo($this->t('{admin:debug_sending_message_title}')); ?></h2> + <p><?php echo($this->t('{admin:debug_sending_message_text_link}')); ?></p> + + <p>[ <a id="sendlink" href="<?php echo htmlentities($this->data['url']); ?>"><?php echo($this->t('{admin:debug_sending_message_send}')); ?></a> ]</p> + + <h2><?php echo($this->t('{admin:debug_sending_message_msg_title}')); ?></h2> + + <p><?php echo($this->t('{admin:debug_sending_message_msg_text}')); ?></p> - <p><?php echo($this->t('{admin:debug_sending_message_text_link}')); ?></p> - - <p>[ <a id="sendlink" href="<?php echo htmlentities($this->data['url']); ?>"><?php echo($this->t('{admin:debug_sending_message_send}')); ?></a> ]</p> - - <h2><?php echo($this->t('{admin:debug_sending_message_msg_title}')); ?></h2> - - <p><?php echo($this->t('{admin:debug_sending_message_msg_text}')); ?></p> - - <pre style="overflow: scroll; border: 1px solid #eee"><?php echo $this->data['message']; ?></pre> + <pre style="overflow: scroll; border: 1px solid #eee"><?php echo $this->data['message']; ?></pre> - <p><?php echo($this->t('{admin:debug_disable_debug_mode}')); ?></p> + <p><?php echo($this->t('{admin:debug_disable_debug_mode}')); ?></p> <?php $this->includeAtTemplateBase('includes/footer.php'); ?> \ No newline at end of file diff --git a/templates/default/includes/header.php b/templates/default/includes/header.php index dfba0c271..e610bb967 100644 --- a/templates/default/includes/header.php +++ b/templates/default/includes/header.php @@ -42,48 +42,45 @@ if($onLoad !== '') { <h1><a style="text-decoration: none; color: white" href="/<?php echo $this->data['baseurlpath']; ?>"><?php echo (isset($this->data['header']) ? $this->data['header'] : 'simpleSAMLphp'); ?></a></h1> - <div id="poweredby"> - <a href="/<?php echo $this->data['baseurlpath']; ?>"> - <img src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/<?php - echo (isset($this->data['icon']) ? $this->data['icon'] : 'compass_l.png'); - ?>" alt="Header icon" /></a></div> </div> -<div style="padding-right: 40px"> -<?php - -$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 -); - -if (empty($_POST) ) { - $textarray = array(); - foreach ($languages AS $lang => $current) { - if ($current) { - $textarray[] = $langnames[$lang]; - } else { - $textarray[] = '<a href="' . htmlspecialchars(SimpleSAML_Utilities::addURLparameter(SimpleSAML_Utilities::selfURL(), array('language' => $lang))) . '">' . - $langnames[$lang] . '</a>'; + <div id="languagebar"> + <?php + + $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 + ); + + if (empty($_POST) ) { + $textarray = array(); + foreach ($languages AS $lang => $current) { + if ($current) { + $textarray[] = $langnames[$lang]; + } else { + $textarray[] = '<a href="' . htmlspecialchars(SimpleSAML_Utilities::addURLparameter(SimpleSAML_Utilities::selfURL(), array('language' => $lang))) . '">' . + $langnames[$lang] . '</a>'; + } } + echo join(' | ', $textarray); } - echo join(' | ', $textarray); -} - -?> -</div> + + ?> + </div> + <div id="content"> diff --git a/templates/default/login-feide.php b/templates/default/login-feide.php index 6a082faca..b313af2a3 100644 --- a/templates/default/login-feide.php +++ b/templates/default/login-feide.php @@ -7,9 +7,9 @@ $this->includeAtTemplateBase('includes/header.php'); ?> - <?php if (isset($this->data['error'])) { ?> - <div id="errorframe"> - <h2><?php echo $this->t('{login:error_header}'); ?></h2> +<?php if (isset($this->data['error'])) { ?> +<div id="errorframe"> + <h2><?php echo $this->t('{login:error_header}'); ?></h2> <?php diff --git a/templates/default/login-ldapmulti.php b/templates/default/login-ldapmulti.php index 3f3d6a9d1..1273a4ed1 100644 --- a/templates/default/login-ldapmulti.php +++ b/templates/default/login-ldapmulti.php @@ -3,9 +3,7 @@ $this->includeAtTemplateBase('includes/header.php'); ?> - - <div id="content"> - + <?php if (isset($this->data['error'])) { ?> <div style="border-left: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8; background: #f5f5f5" <img src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/bomb.png" style="float: left; margin: 15px " /> diff --git a/templates/default/login.php b/templates/default/login.php index 4b6aade06..0d1608587 100644 --- a/templates/default/login.php +++ b/templates/default/login.php @@ -3,7 +3,6 @@ $this->data['autofocus'] = 'username'; $this->includeAtTemplateBase('includes/header.php'); ?> -<div id="content"> <?php if (isset($this->data['error'])) { ?> <div style="border-left: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8; background: #f5f5f5"> diff --git a/templates/default/logout-iframe.php b/templates/default/logout-iframe.php index 5cf9e9892..794b20d25 100644 --- a/templates/default/logout-iframe.php +++ b/templates/default/logout-iframe.php @@ -25,8 +25,6 @@ function showdiv(id) { ?> - <div id="content"> - <noscript> diff --git a/templates/default/logout.php b/templates/default/logout.php index ff57112af..8ce3f71b5 100644 --- a/templates/default/logout.php +++ b/templates/default/logout.php @@ -4,7 +4,7 @@ $this->data['header'] = $this->t('{logout:title}'); $this->includeAtTemplateBase('includes/header.php'); -echo('<div id="content">'); + echo('<h2>' . $this->data['header'] . '</h2>'); echo('<p>' . $this->t('{logout:logged_out_text}') . '</p>'); diff --git a/templates/default/metadata-converter.php b/templates/default/metadata-converter.php index fdea6673c..0bbb7a6d6 100644 --- a/templates/default/metadata-converter.php +++ b/templates/default/metadata-converter.php @@ -3,7 +3,7 @@ $this->data['header'] = $this->t('metaconv_title'); $this->includeAtTemplateBase('includes/header.php'); ?> -<div id="content"> + <h2><?php echo $this->t('metaconv_title'); ?></h2> diff --git a/templates/default/metadata.php b/templates/default/metadata.php index 6c0df97ed..82c74a75b 100644 --- a/templates/default/metadata.php +++ b/templates/default/metadata.php @@ -3,7 +3,6 @@ $this->data['header'] = $this->t('metadata_' . $this->data['header']); $this->includeAtTemplateBase('includes/header.php'); ?> - <div id="content"> <h2><?php echo $this->data['header']; ?></h2> diff --git a/templates/default/metashare-add.php b/templates/default/metashare-add.php index b0da34ee1..9575dd0d1 100644 --- a/templates/default/metashare-add.php +++ b/templates/default/metashare-add.php @@ -2,7 +2,7 @@ $this->data['header'] = $this->t('addpage_header'); $this->includeAtTemplateBase('includes/header.php'); -echo('<div id="content">'); + echo('<h2>' . $this->t('addpage_header') . '</h2>'); $url = $this->data['url']; diff --git a/templates/default/metashare-list.php b/templates/default/metashare-list.php index fb26ef987..ffce4e62b 100644 --- a/templates/default/metashare-list.php +++ b/templates/default/metashare-list.php @@ -2,7 +2,7 @@ $this->data['header'] = $this->t('front_header'); $this->includeAtTemplateBase('includes/header.php'); -echo('<div id="content">'); + echo('<h2>' . $this->t('front_header') . '</h2>'); echo('<p>' . $this->t('front_desc') . '</p>'); diff --git a/templates/default/no_access.php b/templates/default/no_access.php index 44468a0a0..217e9de0e 100644 --- a/templates/default/no_access.php +++ b/templates/default/no_access.php @@ -3,7 +3,7 @@ $this->data['header'] = $this->t('access_denied'); $this->includeAtTemplateBase('includes/header.php'); $this->includeInlineTranslation('spname', $this->data['sp_name']); ?> -<div id="content"> + <h2><?php echo $this->t('access_denied');?></h2> <p><?php echo $this->t('no_access_to');?></p> <p><b><?php echo $this->t('spname');?></b></p> diff --git a/templates/default/noconsent.php b/templates/default/noconsent.php index 0442ab7b5..88d1d9a59 100644 --- a/templates/default/noconsent.php +++ b/templates/default/noconsent.php @@ -5,7 +5,6 @@ ?> -<div id="content"> <h2><?php echo($this->data['header']); ?></h2> <p><?php echo($this->t('{consent:noconsent_text}')); ?></p> diff --git a/templates/default/openid-about.php b/templates/default/openid-about.php index 4393e2fd6..bcc5a35f2 100644 --- a/templates/default/openid-about.php +++ b/templates/default/openid-about.php @@ -6,8 +6,6 @@ if (isset($this->data['header']) && $this->getTag($this->data['header']) !== NUL $this->includeAtTemplateBase('includes/header.php'); ?> - - <div id="content"> <?php if (isset($this->data['header'])) { echo '<h2>' . $this->data['header'] . '</h2>'; } ?> diff --git a/templates/default/openid-sites.php b/templates/default/openid-sites.php index e1b6e88fb..5d27abb8a 100644 --- a/templates/default/openid-sites.php +++ b/templates/default/openid-sites.php @@ -6,8 +6,7 @@ if (isset($this->data['header']) && $this->getTag($this->data['header']) !== NUL $this->includeAtTemplateBase('includes/header.php'); ?> - - <div id="content"> + <?php if (isset($this->data['header'])) { echo '<h2>' . $this->data['header'] . '</h2>'; } ?> diff --git a/templates/default/openid-trust.php b/templates/default/openid-trust.php index 8ac1205e9..b6ebcdda1 100644 --- a/templates/default/openid-trust.php +++ b/templates/default/openid-trust.php @@ -6,8 +6,7 @@ if (isset($this->data['header']) && $this->getTag($this->data['header']) !== NUL $this->includeAtTemplateBase('includes/header.php'); ?> - - <div id="content"> + <?php if (isset($this->data['header'])) { echo '<h2>' . $this->data['header'] . '</h2>'; } ?> diff --git a/templates/default/post-debug.php b/templates/default/post-debug.php index be50b9691..2402f1afb 100644 --- a/templates/default/post-debug.php +++ b/templates/default/post-debug.php @@ -5,10 +5,6 @@ ?> - - <div id="content"> - - <h2><?php echo($this->t('{admin:debug_sending_message_title}')); ?></h2> diff --git a/templates/default/selectidp-dropdown.php b/templates/default/selectidp-dropdown.php index d2e324985..937d2ec83 100644 --- a/templates/default/selectidp-dropdown.php +++ b/templates/default/selectidp-dropdown.php @@ -18,7 +18,6 @@ foreach ($this->data['idplist'] AS $idpentry) { ?> - <div id="content"> <h2><?php echo $this->data['header']; ?></h2> diff --git a/templates/default/selectidp-links.php b/templates/default/selectidp-links.php index 8d4d28817..256146a79 100644 --- a/templates/default/selectidp-links.php +++ b/templates/default/selectidp-links.php @@ -18,7 +18,7 @@ foreach ($this->data['idplist'] AS $idpentry) { ?> - <div id="content"> + <h2><?php echo $this->data['header']; ?></h2> diff --git a/templates/default/status-table.php b/templates/default/status-table.php index 85d8f5d22..842eaf982 100644 --- a/templates/default/status-table.php +++ b/templates/default/status-table.php @@ -16,7 +16,6 @@ foreach($table as $row_title => $row_data) { ?> -<div id="content"> <h2><?php echo htmlspecialchars($title); ?></h2> <table> diff --git a/templates/default/status.php b/templates/default/status.php index 92f83a03b..2ca1ddaa8 100644 --- a/templates/default/status.php +++ b/templates/default/status.php @@ -8,7 +8,7 @@ if(array_key_exists('header', $this->data)) { $this->includeAtTemplateBase('includes/header.php'); ?> -<div id="content"> + <h2><?php if (isset($this->data['header'])) { echo($this->data['header']); } else { echo($this->t('{status:some_error_occured}')); } ?></h2> @@ -36,13 +36,26 @@ $this->includeAtTemplateBase('includes/header.php'); } if (sizeof($value) > 1) { - echo '<tr><td>' . $txtname . '</td><td><ul>'; + echo '<tr><td>' . $txtname . '</td><td><ul>' . "\n"; foreach ($value AS $v) { - echo '<li>' . htmlspecialchars($v) . '</li>'; + + if (in_array($name, array('jpegPhoto'))) { + echo '<li><img src="data:image/jpeg;base64,' . htmlspecialchars($v) . '" /></li>' . "\n"; + } else { + echo '<li>' . htmlspecialchars($v) . '</li>' . "\n"; + } + + } echo '</ul></td></tr>'; } else { - echo '<tr><td>' . $txtname . '</td><td>' . htmlspecialchars($value[0]) . '</td></tr>'; + + if (in_array($name, array('jpegPhoto'))) { + echo '<tr><td>' . $txtname . '</td><td><img src="data:image/jpeg;base64,' . htmlspecialchars($value[0]) . '" /></td></tr>' . "\n"; + } else { + echo '<tr><td>' . $txtname . '</td><td>' . htmlspecialchars($value[0]) . '</td></tr>' . "\n"; + } + } } -- GitLab