function theme_views_edit_view in Views (for Drupal 7) 5
Display the form built by _views_view_form()
File
- ./
views_ui.module, line 1617
Code
function theme_views_edit_view($form) {
$output .= drupal_render($form['basic-info'], false);
$output .= drupal_render($form['page-info'], false);
$output .= drupal_render($form['block-info'], false);
$allbut = $form['allbut']['#value'];
// drupal_render wants a reference so use full array notation.
// fields
$collapsed = $allbut && $allbut != 'field';
$group = views_ui_render_section($form['field'], array(
'name',
'label',
'handler',
'options',
'sortable',
'defaultsort',
), array(
t('Name'),
t('Label'),
t('Handler'),
t('Option'),
t('Sortable'),
t('Default Sort'),
), 'fields', $collapsed);
$group .= views_ui_render_section_add($form['field']['add'], array(
'id',
'button',
), t('Add Field'));
$group .= '<p>' . t('Fields are only meaningful with List view and Table View; they allow you to choose which fields are presented and in what order.') . '</p>';
$output .= theme('fieldset', array(
'#title' => t('Fields'),
'#children' => $group,
'#collapsible' => true,
'#collapsed' => $collapsed,
));
// arguments
$collapsed = $allbut && $allbut != 'argument';
$group = views_ui_render_section($form['argument'], array(
'name',
'argdefault',
'title',
'options',
'wildcard',
'wildcard_substitution',
), array(
t('Argument Type'),
t('Default'),
t('Title'),
t('Option'),
t('Wildcard'),
t('Wildcard Sub'),
), 'arguments', $collapsed);
$group .= views_ui_render_section_add($form['argument']['add'], array(
'id',
'button',
), t('Add Argument'));
$group .= drupal_render($form['view_args_php_fieldset']);
$group .= '<p>' . t('Arguments are parsed directly from the URL. They are not necessary to any given view, but allow flexibility.') . '</p>';
$output .= theme('fieldset', array(
'#title' => t('Arguments'),
'#children' => $group,
'#collapsible' => true,
'#collapsed' => $collapsed,
));
// filter
$collapsed = $allbut && $allbut != 'filter';
$group = views_ui_render_section($form['filter'], array(
'name',
'operator',
'value',
'options',
'expose',
), array(
t('Field'),
t('Operator'),
t('Value'),
t('Option'),
'',
), 'filters', $collapsed);
$group .= views_ui_render_section_add($form['filter']['add'], array(
'id',
'button',
), t('Add Filter'));
$group .= '<p>' . t('Filters allow you to select a subset of all the nodes to display. All Filters are ANDed together.') . '</p>';
$output .= theme('fieldset', array(
'#title' => t('Filters'),
'#children' => $group,
'#collapsible' => true,
'#collapsed' => $collapsed,
));
$group = '';
// exposed exposed_filter
$collapsed = $allbut && $allbut != 'exposed_filter';
$group = views_ui_render_section($form['exposed_filter'], array(
'name',
'label',
'optional',
'is_default',
'single',
'operator',
), array(
t('Field'),
t('Label'),
t('Optional'),
t('Filter settings Default'),
t('Force Single'),
t('Lock Operator'),
), 'exposed_filters', $collapsed);
// $group .= views_ui_render_section_add($form['exposed_filter']['add'], array('id', 'button'), t('Expose Filter'));
$group .= '<p>' . t('Exposed filters will be presented to the viewer. If not set required, then filters will include a "<None>" Value if possible. If set default, filters will default as set here, otherwise filter settings will be ignored. If Lock Operator is set, no operator will be made available to the user.') . '</p>';
$output .= theme('fieldset', array(
'#title' => t('Exposed Filters'),
'#children' => $group,
'#collapsible' => true,
'#collapsed' => $collapsed,
));
$group = '';
// sort
$collapsed = $allbut && $allbut != 'sort';
$group = views_ui_render_section($form['sort'], array(
'name',
'sortorder',
'options',
), array(
t('Field'),
t('Order'),
t('Option'),
), 'sort criteria', $collapsed);
$group .= views_ui_render_section_add($form['sort']['add'], array(
'id',
'button',
), t('Add criteria'));
$output .= theme('fieldset', array(
'#title' => t('Sort Criteria'),
'#children' => $group,
'#collapsible' => true,
'#collapsed' => $collapsed,
));
$output .= drupal_render($form, false);
return $output;
}