You are here

function theme_data_node_label in Data 6

Theme a label for an existing item-node relationship.

1 theme call to theme_data_node_label()
data_node_render_labels in data_node/data_node.module
Render node-data labels for a given item.

File

data_node/data_node.theme.inc, line 10
Theme functions for Data Node module.

Code

function theme_data_node_label($table, $id, $nid, $title) {
  drupal_add_css(drupal_get_path('module', 'data_node') . '/data_node.css');
  drupal_add_js(drupal_get_path('module', 'data_node') . '/data_node.js');
  $output = '';
  $output .= "<span class='data-node-label'>";
  $output .= l($title, "node/{$nid}", array(
    'attributes' => array(
      'class' => 'node-link',
    ),
    'query' => drupal_get_destination(),
  ));
  $output .= l('X', data_node_remove_path($table, $id, $nid), array(
    'attributes' => array(
      'class' => 'remove-link',
    ),
    'query' => drupal_get_destination(),
  ));
  $output .= "</span>";
  return $output;
}