better-formats-defaults-admin-form.tpl.php 2.25 KB
Newer Older
dragonwize's avatar
dragonwize committed
1
2
<?php
// $Id$
3

dragonwize's avatar
dragonwize committed
4
/**
dragonwize's avatar
dragonwize committed
5
 * @file
6
 * Default theme implementation to configure format manager filter admin page.
dragonwize's avatar
dragonwize committed
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 *
 * Available variables:
 * - $form_submit: Form submit button.
 *
 * Each $node_default_rows contains a row
 *
 * Each $data in $node_default_rows contains:
 * - $data->role: Role name.
 * - $data->format_select: Drop-down menu for setting format.
 * - $data->weight_select: Drop-down menu for setting weights.
 */
?>
<?php
  // Add table javascript
  drupal_add_tabledrag('node-format-defaults', 'order', 'sibling', 'better-formats-role-node-weight');
  drupal_add_tabledrag('comment-format-defaults', 'order', 'sibling', 'better-formats-role-comment-weight');
?>
dragonwize's avatar
dragonwize committed
24
<div class="description"><?php print t('Only formats that a role has permission to use are shown.'); ?></div>
dragonwize's avatar
dragonwize committed
25
<fieldset>
dragonwize's avatar
dragonwize committed
26
  <legend><strong><?php print t('Node Defaults'); ?></strong></legend>
dragonwize's avatar
dragonwize committed
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
  <table id="node-format-defaults">
    <thead>
      <tr>
        <th><?php print t('Role'); ?></th>
        <th><?php print t('Default Format'); ?></th>
        <th><?php print t('Weight'); ?></th>
      </tr>
    </thead>
    <tbody>
      <?php $row = 0; ?>
      <?php foreach ($node_default_rows as $rid => $data): ?>
      <tr class="draggable <?php print $row % 2 ? 'odd' : 'even'; ?>">
        <td class=""><?php print $data->role; ?></td>
        <td><?php print $data->format_select; ?></td>
        <td><?php print $data->weight_select; ?></td>
      </tr>
      <?php $row++; ?>
      <?php endforeach; ?>
    </tbody>
  </table>
</fieldset>

<fieldset>
dragonwize's avatar
dragonwize committed
50
  <legend><strong><?php print t('Comment Defaults'); ?></strong></legend>
dragonwize's avatar
dragonwize committed
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
  <table id="comment-format-defaults">
    <thead>
      <tr>
        <th><?php print t('Role'); ?></th>
        <th><?php print t('Default Format'); ?></th>
        <th><?php print t('Weight'); ?></th>
      </tr>
    </thead>
    <tbody>
      <?php $row = 0; ?>
      <?php foreach ($comment_default_rows as $rid => $data): ?>
      <tr class="draggable <?php print $row % 2 ? 'odd' : 'even'; ?>">
        <td class=""><?php print $data->role; ?></td>
        <td><?php print $data->format_select; ?></td>
        <td><?php print $data->weight_select; ?></td>
      </tr>
      <?php $row++; ?>
      <?php endforeach; ?>
    </tbody>
  </table>
</fieldset>

<?php print $form_submit; ?>