You are here

function lingotek_node_settings_row_oneoffs in Lingotek Translation 7.6

1 call to lingotek_node_settings_row_oneoffs()
lingotek_admin_entity_bundle_profiles_form in ./lingotek.admin.inc
Content translation form

File

./lingotek.admin.inc, line 326

Code

function lingotek_node_settings_row_oneoffs($bundle_name) {
  $exception_num = lingotek_oneoff_count($bundle_name);
  $options = array(
    'attributes' => array(
      'class' => array(
        'ctools-use-modal ctools-modal-lingotek-small lingotek-center',
      ),
      'title' => 'Remove all profile exceptions for this content type',
    ),
  );
  drupal_add_js(array(
    'lingotek-small' => array(
      'modalSize' => array(
        'type' => 'fixed',
        'width' => 450,
        'height' => 400,
      ),
      'closeImage' => theme('image', array(
        'path' => drupal_get_path('module', 'lingotek') . '/images/close.png',
        'alt' => t('Close window'),
        'title' => t('Close window'),
      )),
      'closeText' => '',
      'animation' => 'fadeIn',
    ),
  ), 'setting');
  $title = $exception_num > 0 ? l($exception_num, LINGOTEK_MENU_MAIN_BASE_URL . '/clearexceptions/' . $bundle_name, $options) : $exception_num;
  $oneoffs = array(
    '#type' => 'item',
    '#markup' => $title,
  );
  return $oneoffs;
}