You are here

function lingotek_render_actions in Lingotek Translation 7.6

Same name and namespace in other branches
  1. 7.7 lingotek.bulk_grid.inc \lingotek_render_actions()
1 call to lingotek_render_actions()
lingotek_bulk_grid_parse_table_data in ./lingotek.bulk_grid.inc

File

./lingotek.bulk_grid.inc, line 1794

Code

function lingotek_render_actions($entity_type, $entity_id, $disabled_class) {
  $pm_icon = $entity_type == 'node' ? ' <i class="fa fa-tasks' . $disabled_class . '"></i>' : '';
  $pm_link = ' ' . l($pm_icon, 'node/' . $entity_id . '/lingotek_pm', array(
    'html' => TRUE,
    'attributes' => array(
      'title' => t('View Translations'),
      'target' => '_blank',
    ),
  ));
  $actions = '';
  $actions .= lingotek_get_entity_edit_link($entity_type, $entity_id);
  $actions .= empty($disabled_class) ? $pm_link : $pm_icon;
  $actions .= ' ' . l('<i title="' . t('Set Lingotek Settings') . '" class="fa fa-gear"></i>', '', array(
    'html' => TRUE,
    'attributes' => array(
      'onclick' => 'lingotek_perform_action(' . $entity_id . ',"edit"); return false;',
    ),
  ));
  return $actions;
}