function theme_panels_edit_display in Panels 5.2
Theme the form for editing display content.
Parameters
array $form: A structured FAPI $form array.
Return value
string $output HTML ready to be rendered. Note that the html produced here should be printed, not returned, as it bypasses block rendering. Block rendering must be bypassed because sidebars created using negative margins break ajax drag-and-drop.
File
- includes/
display_edit.inc, line 189
Code
function theme_panels_edit_display($form) {
_panels_js_files();
$display = $form['panels_display']['#value'];
$layout = panels_get_layout($display->layout);
$layout_panels = panels_get_panels($layout, $display);
$save_buttons = drupal_render($form['submit']) . drupal_render($form['cancel']);
foreach ($layout_panels as $panel_id => $title) {
foreach ((array) $display->panels[$panel_id] as $pid) {
$pane = $display->content[$pid];
$left_buttons = NULL;
$buttons = drupal_render($form['button'][$pid]['configure']);
if (!empty($form['button'][$pid]['cache'])) {
$buttons .= drupal_render($form['button'][$pid]['cache']);
}
$buttons .= drupal_render($form['button'][$pid]['show_hide']);
$buttons .= drupal_render($form['button'][$pid]['delete']);
$content[$pane->panel] .= panels_show_pane($display, $pane, $left_buttons, $buttons);
}
$content[$panel_id] = theme('panels_panel_dnd', $content[$panel_id], $panel_id, $title, drupal_render($form['panels'][$panel_id]['add']));
}
$output .= drupal_render($form);
$output .= theme('panels_dnd', panels_render_layout($layout, $content, '', $display->layout_settings));
$output .= $save_buttons;
return $output;
}