Skip to content
Snippets Groups Projects
Commit caffcc65 authored by Jaime Perez Crespo's avatar Jaime Perez Crespo
Browse files

Reformat the status template plus several enhancements.

parent 768373ff
No related branches found
No related tags found
No related merge requests found
<?php <?php
if(array_key_exists('header', $this->data)) { if (array_key_exists('header', $this->data)) {
if($this->getTag($this->data['header']) !== NULL) { if ($this->getTag($this->data['header']) !== null) {
$this->data['header'] = $this->t($this->data['header']); $this->data['header'] = $this->t($this->data['header']);
} }
} }
$this->includeAtTemplateBase('includes/header.php'); $this->includeAtTemplateBase('includes/header.php');
$this->includeAtTemplateBase('includes/attributes.php'); $this->includeAtTemplateBase('includes/attributes.php');
?> ?>
<h2><?php if (isset($this->data['header'])) { echo($this->data['header']); } else { echo($this->t('{status:some_error_occurred}')); } ?></h2> <h2><?php if (isset($this->data['header'])) {
echo($this->data['header']);
} else {
echo($this->t('{status:some_error_occurred}'));
} ?></h2>
<p><?php echo($this->t('{status:intro}')); ?></p> <p><?php echo($this->t('{status:intro}')); ?></p>
<?php <?php
if (isset($this->data['remaining'])) { if (isset($this->data['remaining'])) {
echo('<p>' . $this->t('{status:validfor}', array('%SECONDS%' => $this->data['remaining'])) . '</p>'); echo('<p>'.$this->t('{status:validfor}', array('%SECONDS%' => $this->data['remaining'])).'</p>');
} }
if(isset($this->data['sessionsize'])) { if (isset($this->data['sessionsize'])) {
echo('<p>' . $this->t('{status:sessionsize}', array('%SIZE%' => $this->data['sessionsize'])) . '</p>'); echo('<p>'.$this->t('{status:sessionsize}', array('%SIZE%' => $this->data['sessionsize'])).'</p>');
} }
?> ?>
<h2><?php echo($this->t('{status:attributes_header}')); ?></h2>
<h2><?php echo($this->t('{status:attributes_header}')); ?></h2>
<?php <?php
...@@ -31,31 +34,27 @@ $attributes = $this->data['attributes']; ...@@ -31,31 +34,27 @@ $attributes = $this->data['attributes'];
echo(present_attributes($this, $attributes, '')); echo(present_attributes($this, $attributes, ''));
$nameid = $this->data['nameid']; $nameid = $this->data['nameid'];
if ( $nameid !== FALSE ) { if ($nameid !== false) {
echo "<h2>" .$this->t('{status:subject_header}') . "</h2>"; echo "<h2>".$this->t('{status:subject_header}')."</h2>";
if ( !isset($nameid['Value']) ) { if (!isset($nameid['Value'])) {
$list = array("NameID" => array($this->t('{status:subject_notset}'))); $list = array("NameID" => array($this->t('{status:subject_notset}')));
echo "<p>NameID: <span class=\"notset\">" . $this->t('{status:subject_notset}') . "</span></p>"; echo "<p>NameID: <span class=\"notset\">".$this->t('{status:subject_notset}')."</span></p>";
} else { } else {
$list = array( $list = array(
"NameId" => array($nameid['Value']), "NameId" => array($nameid['Value']),
$this->t('{status:subject_format}') => array($nameid['Format']) ); $this->t('{status:subject_format}') => array($nameid['Format'])
);
} }
echo(present_attributes($this, $list, '')); echo(present_attributes($this, $list, ''));
} }
if (isset($this->data['logout'])) { if (isset($this->data['logout'])) {
echo('<h2>' . $this->t('{status:logout}') . '</h2>'); echo('<h2>'.$this->t('{status:logout}').'</h2>');
echo('<p>' . $this->data['logout'] . '</p>'); echo('<p>'.$this->data['logout'].'</p>');
} }
if (isset($this->data['logouturl'])) { if (isset($this->data['logouturl'])) {
echo('<h2>' . $this->t('{status:logout}') . '</h2>'); echo('<a href="'.htmlspecialchars($this->data['logouturl']).'">'.$this->t('{status:logout}').'</a>');
echo('<p>[ <a href="' . htmlspecialchars($this->data['logouturl']) . '">' . $this->t('{status:logout}') . '</a> ]</p>');
} }
?>
<h2><?php echo $this->t('{core:frontpage:about_header}'); ?></h2> $this->includeAtTemplateBase('includes/footer.php');
<p><?php echo $this->t('{core:frontpage:about_text}'); ?></p>
<?php $this->includeAtTemplateBase('includes/footer.php');
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