function theme_page_manager_page_form_argument_table

Theme the table for this form.

1 theme call to theme_page_manager_page_form_argument_table()
page_manager_page_form_argument in page_manager/plugins/tasks/page.admin.inc
Form to handle assigning argument handlers to named arguments.

File

page_manager/plugins/tasks/page.admin.inc, line 937

Code

function theme_page_manager_page_form_argument_table($vars) {
    $form = $vars['form'];
    $header = array(
        array(
            'data' => t('Argument'),
            'class' => array(
                'page-manager-argument',
            ),
        ),
        array(
            'data' => t('Position in path'),
            'class' => array(
                'page-manager-position',
            ),
        ),
        array(
            'data' => t('Context assigned'),
            'class' => array(
                'page-manager-context',
            ),
        ),
        array(
            'data' => t('Operations'),
            'class' => array(
                'page-manager-operations',
            ),
        ),
    );
    $rows = array();
    ctools_include('modal');
    ctools_modal_add_js();
    foreach (element_children($form['argument']) as $key) {
        $row = array();
        $row[] = '%' . check_plain($form['argument'][$key]['#keyword']);
        $row[] = check_plain($form['argument'][$key]['#position']);
        $row[] = $form['argument'][$key]['#context'] . '   ' . drupal_render($form['argument'][$key]['change']);
        $row[] = drupal_render($form['argument'][$key]['settings']) . drupal_render($form['argument'][$key]);
        $rows[] = array(
            'data' => $row,
        );
    }
    if (!$rows) {
        $rows[] = array(
            array(
                'data' => t('The path %path has no arguments to configure.', array(
                    '%path' => $form['#page-manager-path'],
                )),
                'colspan' => 4,
            ),
        );
    }
    $attributes = array(
        'id' => 'page-manager-argument-table',
    );
    $output = theme('table', array(
        'header' => $header,
        'rows' => $rows,
        'attributes' => $attributes,
    ));
    return $output;
}