Skip to content
Snippets Groups Projects
Commit 256686bb authored by Olav Morken's avatar Olav Morken
Browse files

Status-template: update translations.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@756 44740490-163a-0410-bde0-09ae8108e29a
parent 7a2475cf
No related branches found
No related tags found
No related merge requests found
<?php
$lang = array(
'header_saml20_sp' => array (
'en' => 'SAML 2.0 SP Demo Example',
),
'header_shib' => array (
'en' => 'Shibboleth demo',
),
'header_wsfed' => array (
'en' => 'WS-Fed SP Demo Example',
),
'header_diagnostics' => array (
'en' => 'SimpleSAMLphp Diagnostics',
),
'some_error_occured' => array (
'en' => 'Some error occured',
),
'intro' => array (
'en' => 'Hi, this is the status page of simpleSAMLphp. Here you can see if your session is timed out, how long it lasts until it times out and all the attributes that is attached to your session.',
),
'validfor' => array (
'en' => 'Your session is valid for %SECONDS% seconds from now.',
),
'sessionsize' => array (
'en' => 'Session size: %SIZE%',
),
'attributes_header' => array (
'en' => 'Your attributes',
),
'logout' => array (
'en' => 'Logout',
),
);
?>
\ No newline at end of file
<?php $this->includeAtTemplateBase('includes/header.php'); ?>
<?php
if(array_key_exists('header', $this->data)) {
if($this->getTag($this->data['header']) !== NULL) {
$this->data['header'] = $this->t($this->data['header']);
}
}
$this->includeAtTemplateBase('includes/header.php');
?>
<div id="content">
<h2><?php if (isset($this->data['header'])) { echo $this->data['header']; } else { echo "Some error occured"; } ?></h2>
<h2><?php if (isset($this->data['header'])) { echo($this->data['header']); } else { echo($this->t('{status:some_error_occured}')); } ?></h2>
<p>Hi, this is the status page of simpleSAMLphp. Here you can see if your session is timed out, how long it lasts until it times out and all the attributes that is attached to your session.</p>
<p><?php echo($this->t('{status:intro}')); ?></p>
<p>Your session is valid for <?php echo $this->data['remaining']; ?> seconds from now.</p>
<p><?php echo($this->t('{status:validfor}', array('%SECONDS%' => $this->data['remaining']))); ?></p>
<p>Session size: <?php echo isset($this->data['sessionsize']) ? $this->data['sessionsize'] : 'na'; ?>
<?php
if(isset($this->data['sessionsize'])) {
echo('<p>' . $this->t('{status:sessionsize}', array('%SIZE%' => $this->data['sessionsize'])) . '</p>');
}
?>
<h2>Your attributes</h2>
<h2><?php echo($this->t('{status:attributes_header}')); ?></h2>
<table width="100%" class="attributes">
<?php
......@@ -37,15 +49,19 @@
?>
</table>
<?php if (isset($this->data['logout'])) { ?>
<h2>Logout</h2>
<?php
if (isset($this->data['logout'])) {
echo('<h2>' . $this->t('{status:logout}') . '</h2>');
echo('<p>' . $this->data['logout'] . '</p>');
}
<p><?php echo $this->data['logout']; ?></p>
if (isset($this->data['logouturl'])) {
echo('<h2>' . $this->t('{status:logout}') . '</h2>');
echo('<p>[ <a href="' . htmlspecialchars($this->data['logouturl']) . '">' . $this->t('{status:logout}') . '</a> ]</p>');
}
?>
<?php } ?>
<h2>About simpleSAMLphp</h2>
<p>Hey! This simpleSAMLphp thing is pretty cool, where can I read more about it?
You can find more information about simpleSAMLphp at <a href="http://rnd.feide.no">the Feide RnD blog</a> over at <a href="http://uninett.no">UNINETT</a>.</p>
<h2><?php echo $this->t('{frontpage:about_header}'); ?></h2>
<p><?php echo $this->t('{frontpage:about_text}'); ?></p>
<?php $this->includeAtTemplateBase('includes/footer.php'); ?>
\ No newline at end of file
......@@ -41,7 +41,7 @@ $attributes['Utilities_getRequestURI()'] = array(SimpleSAML_Utilities::getReques
$et = new SimpleSAML_XHTML_Template($config, 'status.php');
$et->data['header'] = 'SimpleSAMLphp Diagnostics';
$et->data['header'] = '{status:header_diagnostics}';
$et->data['remaining'] = 'na';
$et->data['attributes'] = $attributes;
$et->data['valid'] = 'na';
......
......@@ -50,13 +50,13 @@ $attributes = $session->getAttributes();
$t = new SimpleSAML_XHTML_Template($config, 'status.php', 'attributes');
$t->data['header'] = 'SAML 2.0 SP Demo Example';
$t->data['header'] = '{status:header_saml20_sp}';
$t->data['remaining'] = $session->remainingTime();
$t->data['sessionsize'] = $session->getSize();
$t->data['attributes'] = $attributes;
$t->data['icon'] = 'bino.png';
$t->data['logout'] = '[ <a href="/' . $config->getBaseURL() . 'saml2/sp/initSLO.php?RelayState=/' .
$config->getBaseURL() . 'logout.html">Logout</a> ]';
$t->data['logouturl'] = '/' . $config->getBaseURL() . 'saml2/sp/initSLO.php?RelayState=/' .
$config->getBaseURL() . 'logout.html';
$t->show();
......
......@@ -38,7 +38,7 @@ if (!isset($session) || !$session->isValid('shib13') ) {
$t = new SimpleSAML_XHTML_Template($config, 'status.php');
$t->data['header'] = 'Shibboleth demo';
$t->data['header'] = '{status:header_shib}';
$t->data['remaining'] = $session->remainingTime();
$t->data['attributes'] = $session->getAttributes();
$t->data['logout'] = null;
......
......@@ -16,7 +16,7 @@ $attributes = $session->getAttributes();
$t = new SimpleSAML_XHTML_Template($config, 'status.php', 'attributes');
$t->data['header'] = 'WS-Fed SP Demo Example';
$t->data['header'] = '{status:header_wsfed}';
$t->data['remaining'] = $session->remainingTime();
$t->data['sessionsize'] = $session->getSize();
$t->data['attributes'] = $attributes;
......
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