ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
frontpage_federation.tpl.php
Go to the documentation of this file.
1<?php
2
3$this->data['header'] = $this->t('{core:frontpage:page_title}');
4$this->includeAtTemplateBase('includes/header.php');
5
6if ($this->data['isadmin']) {
7 echo '<p class="float-r youareadmin">'.$this->t('{core:frontpage:loggedin_as_admin}').'</p>';
8} else {
9 echo '<p class="float-r youareadmin"><a href="'.$this->data['loginurl'].'">'.
10 $this->t('{core:frontpage:login_as_admin}').'</a></p>';
11}
12
13if (is_array($this->data['metaentries']['hosted']) && count($this->data['metaentries']['hosted']) > 0) {
14 echo '<dl>';
15 foreach ($this->data['metaentries']['hosted'] as $hm) {
16 echo '<dt>'.$this->t($this->data['mtype'][$hm['metadata-set']]).'</dt>';
17 echo '<dd>';
18 echo '<p>Entity ID: '.$hm['entityid'];
19 if (isset($hm['deprecated']) && $hm['deprecated']) {
20 echo '<br /><b>Deprecated</b>';
21 }
22 if ($hm['entityid'] !== $hm['metadata-index']) {
23 echo '<br />Index: '.$hm['metadata-index'];
24 }
25 if (!empty($hm['name'])) {
26 echo '<br /><strong>'.
27 $this->getTranslator()->getPreferredTranslation(SimpleSAML\Utils\Arrays::arrayize($hm['name'], 'en')).
28 '</strong>';
29 }
30 if (!empty($hm['descr'])) {
31 echo '<br /><strong>'.
32 $this->getTranslator()->getPreferredTranslation(SimpleSAML\Utils\Arrays::arrayize($hm['descr'], 'en')).
33 '</strong>';
34 }
35
36 echo '<br />[ <a href="'.$hm['metadata-url'].'">'.$this->t('{core:frontpage:show_metadata}').'</a> ]';
37
38 echo '</p></dd>';
39 }
40 echo '</dl>';
41}
42
43if (is_array($this->data['metaentries']['remote']) && count($this->data['metaentries']['remote']) > 0) {
44 $now = time();
45 foreach ($this->data['metaentries']['remote'] as $setkey => $set) {
46
47 echo '<fieldset class="fancyfieldset"><legend>'.$this->t($this->data['mtype'][$setkey]).' (Trusted)</legend>';
48 echo '<ul>';
49 foreach ($set as $entry) {
50 echo '<li>';
51 echo('<a href="'.
52 htmlspecialchars(
53 SimpleSAML\Module::getModuleURL(
54 'core/show_metadata.php',
55 array('entityid' => $entry['entityid'], 'set' => $setkey)
56 )
57 ).'">');
58 if (!empty($entry['name'])) {
59 echo htmlspecialchars($this->getTranslator()->getPreferredTranslation(
60 SimpleSAML\Utils\Arrays::arrayize($entry['name'], 'en')
61 ));
62 } elseif (!empty($entry['OrganizationDisplayName'])) {
63 echo htmlspecialchars($this->getTranslator()->getPreferredTranslation(
64 SimpleSAML\Utils\Arrays::arrayize($entry['OrganizationDisplayName'], 'en')
65 ));
66 } else {
67 echo htmlspecialchars($entry['entityid']);
68 }
69 echo '</a>';
70 if (array_key_exists('expire', $entry)) {
71 if ($entry['expire'] < $now) {
72 echo '<span style="color: #500; font-weight: bold"> (expired '.
73 number_format(($now - $entry['expire']) / 3600, 1).' hours ago)</span>';
74 } else {
75 echo ' (expires in '.number_format(($entry['expire'] - $now) / 3600, 1).' hours)';
76 }
77 }
78 echo '</li>';
79 }
80 echo '</ul>';
81 echo '</fieldset>';
82 }
83}
84?>
85 <h2><?php echo $this->t('{core:frontpage:tools}'); ?></h2>
86 <ul><?php
87 foreach ($this->data['links_federation'] as $link) {
88 echo '<li><a href="'.htmlspecialchars($link['href']).'">'.$this->t($link['text']).'</a></li>';
89 }
90?>
91 </ul>
92<?php
93 if ($this->data['isadmin']) { ?>
94 <fieldset class="fancyfieldset">
95 <legend>Lookup metadata</legend>
96 <form action="<?php echo SimpleSAML\Module::getModuleURL('core/show_metadata.php'); ?>" method="get">
97 <p style="margin: 1em 2em ">Look up metadata for entity:
98 <select name="set"><?php
99 if (is_array($this->data['metaentries']['remote']) && count($this->data['metaentries']['remote']) > 0) {
100 foreach ($this->data['metaentries']['remote'] as $setkey => $set) {
101 echo '<option value="'.htmlspecialchars($setkey).'">'.$this->t($this->data['mtype'][$setkey]).'</option>';
102 }
103 }
104?>
105 </select>
106 <input type="text" name="entityid" />
107 <button class="btn" type="submit">Lookup </button>
108 </p>
109 </form>
110 </fieldset>
111<?php
112 }
113$this->includeAtTemplateBase('includes/footer.php');
An exception for terminatinating execution or to throw for unit testing.
$this data['header']
input
Definition: langcheck.php:166
select
Definition: langcheck.php:166
Attribute-related utility methods.
up()
Definition: up.php:2