You are here

function taxonomy_manager_taxonomy_manager_tree_operations in Taxonomy Manager 6.2

Same name and namespace in other branches
  1. 7 taxonomy_manager.module \taxonomy_manager_taxonomy_manager_tree_operations()

function gets called by the taxonomy_manager_tree form type ('taxonomy_manager_'. form_id .'_operations') return an form array with values to show next to every term value

1 call to taxonomy_manager_taxonomy_manager_tree_operations()
taxonomy_manager_taxonomy2_manager_tree_operations in ./taxonomy_manager.module

File

./taxonomy_manager.module, line 180
Taxonomy Manager

Code

function taxonomy_manager_taxonomy_manager_tree_operations($term) {
  $form = array();
  if (!variable_get('taxonomy_manager_disable_mouseover', 0)) {
    $module_path = drupal_get_path('module', 'taxonomy_manager') . '/';
    if (_taxonomy_manager_tree_term_children_count($term->tid) > 0) {
      $form['select_all'] = array(
        '#weight' => -1,
        '#value' => '<span class="select-all-children" title="' . t("Select all children") . '">&nbsp;&nbsp;&nbsp;&nbsp;</span>',
      );
    }
    $form['up'] = array(
      '#value' => theme("image", $module_path . "images/go-up-small.png", "go up", t("Move up"), array(
        'class' => 'term-up',
      )),
    );
    $form['down'] = array(
      '#value' => theme("image", $module_path . "images/go-down-small.png", "go down", t("Move down"), array(
        'class' => 'term-down',
      )),
    );
    $link_img = theme("image", $module_path . "images/link-small.png", "link to term page");
    $link = l('&nbsp;' . $link_img, taxonomy_term_path($term), array(
      'attributes' => array(
        'rel' => 'tag',
        'title' => t("Go to term page"),
        'target' => '_blank',
      ),
      'html' => TRUE,
    ));
    $form['link'] = array(
      '#value' => $link,
      '#weight' => 10,
    );
  }
  return $form;
}