function 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 90

Code

function theme_page_manager_lock($vars) {
    $page = $vars['page'];
    $account = user_load($page->locked->uid);
    $name = theme('username', array(
        'account' => $account,
    ));
    $lock_age = format_interval(REQUEST_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;
}