summaryrefslogtreecommitdiff
path: root/views/mods/mod_test/settings_edit.phtml
blob: ae0e8b1c66e886e99ef458985db651ee2db10002 (plain)
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
65
66
67
68
69
70
71
72
73
74
75
76
77
<?php

	/**
	 * Template für die Modulkonfiguration des Testmoduls
	 */

?>

<br />

<?php foreach ((array)$this->view['test'] as $test_index => $test) { ?>
<div class="wpsg_admin_box" id="wpsg_mod_test_<?php echo $test_index; ?>" style="width:1000px;">
	<div id="test_1" class="head" style="border-bottom: 0px none;">
		<div class="title">
			<div class="fulltab">
				<?php echo ($test_index + 1); ?>. Test - <?php echo $test['label']; ?>
				<?php if ($this->callMod('wpsg_mod_test', 'checkTest', array($test)) === true) { ?>
				<img src="<?php echo WPSG_URL_CONTENT; ?>plugins/wpshopgermany/views/css/../gfx/tick.png" alt="" style="float:right;" />
				<?php } ?>
			</div>
		</div>
		<div class="content wpsg_mod_test_table wpsg_admin_box_content" style="display: block;">
			
			<?php echo $test['config']; ?>
			
			<table>
				<thead>
					<tr>
						<th>Name</th>
						<th>Erwarteter Wert</th>
						<th>Getesteter Wert</th>
						<th></th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($test['tests'] as $key => $t) { ?>
					<tr>
						<td>
							<?php if ($t[0] === false) { ?>
							<?php echo $this->view['arKeyLabel'][$key]; ?>
							<?php } else { ?>
							<?php echo $t[0]; ?>
							<?php } ?>
						</td>
						<td><?php echo $t[1]; ?></td>
						<td><?php echo $this->callMod('wpsg_mod_test', 'getValue', array($key, $test['array'])); ?></td>
						<td>
							<?php if ($this->callMod('wpsg_mod_test', 'checkValue', array($key, $t[1], $test['array'])) === true) { ?>
							<img src="<?php echo WPSG_URL_CONTENT; ?>plugins/wpshopgermany/views/css/../gfx/tick.png" alt="" />
							<?php } ?>						
						</td>
					</tr>
					<?php } ?>
				</tbody>
			</table>
			
			<?php if (wpsg_isSizedArray($test['array'])) { ?>
			<br /><a href="" onclick="jQuery(this).next().toggle(); return false;">Array anzeigen/verbergen</a>
			<div style="display:none; border:1px solid #CCCCCC; background-color:#FFFFFF; margin-top:15px;">
				<pre><?php print_r($test['array']); ?></pre>
			</div>
			<?php } ?>
			
		</div>
	</div>
</div><br />
<?php } ?>

<script type="text/javascript">/* <![CDATA[ */

	jQuery(document).ready(function() {

		jQuery('.wpsg_admin_box').wpsg_adminbox();
		
	} );

/* ]]> */</script>