function theme_page_manager_lock in Chaos Tool Suite (ctools) 6
Same name and namespace in other branches
- 7 page_manager/theme/page_manager.theme.inc \theme_page_manager_lock()
Draw the "this task is locked from editing" box.
1 theme call to theme_page_manager_lock()
- template_preprocess_page_manager_edit_page in page_manager/
theme/ page_manager.theme.inc - Preprocess the page manager edit page.
File
- page_manager/
theme/ page_manager.theme.inc, line 116 - Preprocess functions for page manager editing templates.
Code
function theme_page_manager_lock($page) {
$account = user_load($page->locked->uid);
$name = theme('username', $account);
$lock_age = format_interval(time() - $page->locked->updated);
$break = url(page_manager_edit_url($page->task_name, array(
'actions',
'break-lock',
)));
ctools_add_css('ctools');
$output = '<div class="ctools-locked">';
$output .= t('This page is being edited by user !user, and is therefore locked from editing by others. This lock is !age old. Click here to <a href="!break">break this lock</a>.', array(
'!user' => $name,
'!age' => $lock_age,
'!break' => $break,
));
$output .= '</div>';
return $output;
}