You are here

function lingotek_render_actions in Lingotek Translation 7.7

Same name and namespace in other branches
  1. 7.6 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 2706

Code

function lingotek_render_actions($entity_properties, $entity_id, $disabled_class) {
  $entity_type = $entity_properties['type'];
  $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_properties, $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;',
    ),
  ));

  // Coder review error: we only want to translate "Set Lingotek Settings"
  return $actions;
}