[ Index ]

PHP Cross Reference of Drupal 6 (yi-drupal)

title

Body

[close]

/sites/all/modules/data/data_node/ -> data_node.theme.inc (source)

   1  <?php
   2  /**
   3   * @file
   4   * Theme functions for Data Node module.
   5   */
   6  
   7  /**
   8   * Theme a label for an existing item-node relationship.
   9   */
  10  function theme_data_node_label($table, $id, $nid, $title) {
  11    drupal_add_css(drupal_get_path('module', 'data_node') . '/data_node.css');
  12    drupal_add_js(drupal_get_path('module', 'data_node') . '/data_node.js');
  13  
  14    $output = '';
  15    $output .= "<span class='data-node-label'>";
  16    $output .= l($title, "node/{$nid}", array('attributes' => array('class' => 'node-link'), 'query' => drupal_get_destination()));
  17    $output .= l('X', data_node_remove_path($table, $id, $nid), array('attributes' => array('class' => 'remove-link'), 'query' => drupal_get_destination()));
  18    $output .= "</span>";
  19    return $output;
  20  }
  21  
  22  /**
  23   * Theme for data_node_active_form.
  24   */
  25  function theme_data_node_active_form($form) {
  26    drupal_add_css(drupal_get_path('module', 'data_node') . '/data_node.css');
  27    drupal_add_js(drupal_get_path('module', 'data_node') . '/data_node.js');
  28  
  29    $output = '';
  30    $output .= drupal_render($form['nid']);
  31    $output .= "<div class='new-node clear-block'>". drupal_render($form['new']) ."</div>";
  32    $output .= drupal_render($form);
  33    return $output;
  34  }


Generated: Mon Jul 9 18:01:44 2012 Cross-referenced by PHPXref 0.7