You are here

function lingotek_workbench_icon in Lingotek Translation 7.7

Same name and namespace in other branches
  1. 7.4 lingotek.util.inc \lingotek_workbench_icon()
  2. 7.5 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 1992
Utility functions.

Code

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