File: modlist.php

package info (click to toggle)
simplesamlphp 1.13.1-2%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 11,304 kB
  • sloc: php: 65,124; xml: 629; python: 376; sh: 193; perl: 185; makefile: 43
file content (64 lines) | stat: -rw-r--r-- 2,487 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
$this->data['header'] = $this->t('{modinfo:modinfo:modlist_header}');
$this->includeAtTemplateBase('includes/header.php');

#$icon_enabled  = '<img src="/' . $this->data['baseurlpath'] . 'resources/icons/silk/accept.png" alt="' .
#htmlspecialchars($this->t(...)" />';
#$icon_disabled = '<img src="/' . $this->data['baseurlpath'] . 'resources/icons/silk/delete.png" alt="disabled" />';

?>

<h2><?php echo($this->data['header']); ?></h2>

<table class="modules" style="width: 100%">
<tr>
<th colspan="2"><?php echo($this->t('{modinfo:modinfo:modlist_name}')); ?></th>
<th ><?php echo($this->t('{modinfo:modinfo:modlist_status}')); ?></th>
<th colspan="2"><?php echo($this->t('{modinfo:modinfo:version}')); ?></th>
</tr>
<?php
ksort($this->data['modules']);

$i = 0;
foreach($this->data['modules'] as $id => $info) {
	echo('<tr class="' . ($i++ % 2 == 0 ? 'odd' : 'even') . '">');
	
	
	if (isset($info['def'])) {
		echo('<td><a href="http://simplesamlphp.org/modules/' . htmlspecialchars($id) . '">' . htmlspecialchars($info['def']->def['name']) . '</a></td>');		
	} else {
		echo('<td> </td>');
	}
	
	
	echo('<td><tt>' . htmlspecialchars($id) . '</tt></td>');
	
	
	if($info['enabled']) {
		echo('<td><img src="/' . $this->data['baseurlpath'] . 'resources/icons/silk/accept.png" alt="' .
			htmlspecialchars($this->t('{modinfo:modinfo:modlist_enabled}')) . '" /></td>');
	} else {
		echo('<td><img src="/' . $this->data['baseurlpath'] . 'resources/icons/silk/delete.png" alt="' .
			htmlspecialchars($this->t('{modinfo:modinfo:modlist_disabled}')) . '" /></td>');
	}
	
	if (isset($info['def'])) {
		echo('<td>' . htmlspecialchars($info['def']->getVersion()) . ' (' .htmlspecialchars($info['def']->getBranch()) . ')</td>');	
		if ($info['def']->updateExists()) {
			echo('<td><img style="display: inline" src="/' . $this->data['baseurlpath'] . 'resources/icons/silk/delete.png" alt="' .
				htmlspecialchars($this->t('{modinfo:modinfo:update_exists}')) . '" /> ' . 
				htmlspecialchars($this->t('{modinfo:modinfo:update_exists}')) . '</td>');		
		} else {
			echo('<td><img style="display: inline" src="/' . $this->data['baseurlpath'] . 'resources/icons/silk/accept.png" alt="' .
				htmlspecialchars($this->t('{modinfo:modinfo:latest_version}')) . '" /> ' . 
				htmlspecialchars($this->t('{modinfo:modinfo:latest_version}')) . '</td>');
		}
	} else {
		echo('<td colspan="2"> </td>');
	}
	
	echo('</tr>');
}
?>
</table>
<?php $this->includeAtTemplateBase('includes/footer.php'); ?>