This repository has been archived by the owner on Feb 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
nodeformcols-configuration.tpl.php
54 lines (52 loc) · 1.74 KB
/
nodeformcols-configuration.tpl.php
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
<?php
// $Id$
/**
* @file
* Template for the configuration table
*/
$regions = nodeformcols_form_regions();
?>
<table id="fields" class="sticky-enabled">
<thead>
<tr>
<th><?php print t('Field'); ?></th>
<th><?php print t('Options'); ?></th>
<th><?php print t('Region'); ?></th>
<th><?php print t('Weight'); ?></th>
</tr>
</thead>
<tbody>
<?php $row = 0; ?>
<?php foreach ($regions as $region => $title): ?>
<tr class="region region-<?php print $region?>">
<td colspan="4" class="region"><?php print $title; ?></td>
</tr>
<tr class="region-message region-<?php print $region?>-message <?php print empty($element[$region]) ? 'region-empty' : 'region-populated'; ?>">
<td colspan="4"><em><?php print t('No fields in this region'); ?></em></td>
</tr>
<?php if (!empty($element[$region])): ?>
<?php foreach ($element[$region] as $field => $data): ?>
<?php
if (substr($field, 0, 1) == '#') {
continue;
}
?>
<tr class="draggable <?php print $row % 2 == 0 ? 'odd' : 'even'; ?>">
<td><?php print drupal_render($data[$field . '_name']) ?></td>
<td><?php
if ($data[$field . '_collapsed']) {
print drupal_render($data[$field . '_collapsed']);
}
if ($data[$field . '_hidden']) {
print drupal_render($data[$field . '_hidden']);
}
?></td>
<td><?php print drupal_render($data[$field . '_region']) ?></td>
<td><?php print drupal_render($data[$field . '_weight']) ?></td>
</tr>
<?php $row++; ?>
<?php endforeach; ?>
<?php endif; ?>
<?php endforeach; ?>
</tbody>
</table>