function lingotek_workbench_phase_link in Lingotek Translation 6
2 calls to lingotek_workbench_phase_link()
File
- ./
lingotek.api.inc, line 375
Code
function lingotek_workbench_phase_link($document_id, $phase_id, $label) {
global $user;
$arr = array(
'community' => variable_get('lingotek_community', ''),
'id' => $user->name,
'time' => time(),
'document' => $document_id,
'phase' => $phase_id,
);
$mode = 'cmsWorkbench.action';
$json_str = json_encode($arr);
$path = variable_get('lingotek_url', '') . "/lingopoint/portal/" . $mode . "?auth_json=" . urlencode($json_str) . "&hmac=" . urlencode(LingotekSession::create_mac($json_str));
if (module_exists('lightbox2') && variable_get('lingotek_use_lightbox', FALSE)) {
return l(t($label), $path, array(
'attributes' => array(
'rel' => 'lightframe',
),
));
}
else {
return l(t($label), '#', array(
'attributes' => array(
'onclick' => 'window.open(\'' . $path . '\'); return false;',
),
));
}
}