You are here

function lingotek_workbench_icon in Lingotek Translation 7.5

Same name and namespace in other branches
  1. 7.7 lingotek.util.inc \lingotek_workbench_icon()
  2. 7.4 lingotek.util.inc \lingotek_workbench_icon()
  3. 7.6 lingotek.util.inc \lingotek_workbench_icon()
2 calls to lingotek_workbench_icon()
lingotek_comment_view in ./lingotek.module
Implements hook_comment_view().
lingotek_node_view in ./lingotek.module
Implements hook_node_view().

File

./lingotek.util.inc, line 1265
Utility functions.

Code

function lingotek_workbench_icon($entity_type, $id, $lingotek_locale, $tooltip = 'Edit this translation') {
  drupal_add_css(drupal_get_path('module', 'lingotek') . '/style/workbench-link.css', array(
    'group' => CSS_DEFAULT,
  ));
  $text = '<img src="' . base_path() . drupal_get_path('module', 'lingotek') . '/images/ico_chevs_dd.png" >';
  $url = 'lingotek/workbench/' . $entity_type . '/' . $id . '/' . $lingotek_locale;
  return l($text, $url, array(
    'attributes' => array(
      'class' => array(
        'lingotek-translation-link',
      ),
      'target' => '_blank',
      'title' => $tooltip,
    ),
    'html' => TRUE,
  ));
}