| 1 |
<?php
|
| 2 |
// $Id: nodeorder-admin-display-form.tpl.php,v 1.1.2.3 2009/01/17 15:43:33 pvanderspek Exp $
|
| 3 |
|
| 4 |
/**
|
| 5 |
* @file nodeorder-admin-display-form.tpl.php
|
| 6 |
* Default theme implementation to order nodes.
|
| 7 |
*
|
| 8 |
* Available variables:
|
| 9 |
* - $node_listing: An array of nodes.
|
| 10 |
* - $form_submit: Form submit button.
|
| 11 |
*
|
| 12 |
*
|
| 13 |
* Each $data in $node_listing[$i] contains:
|
| 14 |
* - $data->node_title: Node title.
|
| 15 |
* - $data->weight: Drop-down menu for setting weights.
|
| 16 |
* - $data->tid
|
| 17 |
* - $data->nid
|
| 18 |
*
|
| 19 |
* @see template_preprocess_nodeorder_admin_display_form()
|
| 20 |
* @see theme_nodeorder_admin_display()
|
| 21 |
*/
|
| 22 |
?>
|
| 23 |
<?php
|
| 24 |
// Add table javascript.
|
| 25 |
drupal_add_js('misc/tableheader.js');
|
| 26 |
drupal_add_js(drupal_get_path('module', 'nodeorder') .'/nodeorder.js');
|
| 27 |
drupal_add_tabledrag('ordernodes', 'order', 'sibling', 'nodeorder-weight');
|
| 28 |
?>
|
| 29 |
<table id="ordernodes" class="sticky-enabled">
|
| 30 |
<thead>
|
| 31 |
<tr>
|
| 32 |
<th colspan=2><?php print t('Node title'); ?></th>
|
| 33 |
</tr>
|
| 34 |
</thead>
|
| 35 |
<tbody>
|
| 36 |
<?php $row = 0; ?>
|
| 37 |
<?php if (isset($node_listing) && sizeof($node_listing) > 0): ?>
|
| 38 |
<?php foreach ($node_listing as $key => $data): ?>
|
| 39 |
<tr class="draggable <?php print $row % 2 == 0 ? 'odd' : 'even'; ?><?php print $data->row_class ? ' '. $data->row_class : ''; ?>">
|
| 40 |
<td class="node"><?php print $data->node_title; ?></td>
|
| 41 |
<td><?php print $data->weight; ?></td>
|
| 42 |
</tr>
|
| 43 |
<?php $row++; ?>
|
| 44 |
<?php endforeach; ?>
|
| 45 |
<?php else: ?>
|
| 46 |
<tr>
|
| 47 |
<td><em><?php print t('No nodes available.'); ?></em></td>
|
| 48 |
</tr>
|
| 49 |
<?php endif; ?>
|
| 50 |
</tbody>
|
| 51 |
</table>
|
| 52 |
|
| 53 |
<?php print $form_submit; ?>
|