? 651306.panels-node.edit-any-perm.patch
? 683162-convert-plugins.patch
? 834084-reusable-flexible-layout.patch
? css-cache-clear.patch
? node_content_fix_render.patch
? panels-612116.patch
? panels-618624-3.patch
? panels.module_4.patch
? panels_pane_esi_cache.patch
? reusable-flexible.patch
? plugins/export_ui/panels_layouts_ui.class.php
? plugins/layouts/flexible960
Index: panels.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/panels/panels.install,v
retrieving revision 1.4.2.30
diff -r1.4.2.30 panels.install
78c78,146
<   return panels_schema_2();
---
>   return panels_schema_3();
> }
> 
> /**
>  * Schema that adds the panels_layouts table.
>  */
> function panels_schema_3() {
>   // Schema 3 is now locked. If you need to make changes, please create
>   // schema 4 and add them.
>   $schema = panels_schema_2();
> 
>   $schema['panels_layouts'] = array(
>     'description' => 'Contains exportable customized layouts for this site.',
>     'export' => array(
>       'identifier' => 'layout',
>       'bulk export' => TRUE,
>       'primary key' => 'lid',
>       'api' => array(
>         'owner' => 'panels',
>         'api' => 'panels_layouts',
>         'minimum_version' => 1,
>         'current_version' => 1,
>       ),
>     ),
>     'fields' => array(
>       'lid' => array(
>         'type' => 'serial',
>         'description' => 'A database primary key to ensure uniqueness',
>         'not null' => TRUE,
>         'no export' => TRUE,
>       ),
>       'name' => array(
>         'type' => 'varchar',
>         'length' => '255',
>         'description' => 'Unique ID for this content. Used to identify it programmatically.',
>       ),
>       'admin_title' => array(
>         'type' => 'varchar',
>         'length' => '255',
>         'description' => 'Administrative title for this layout.',
>       ),
>       'admin_description' => array(
>         'type' => 'text',
>         'size' => 'big',
>         'description' => 'Administrative description for this layout.',
>         'object default' => '',
>       ),
>       'category' => array(
>         'type' => 'varchar',
>         'length' => '255',
>         'description' => 'Administrative category for this layout.',
>       ),
>       'plugin' => array(
>         'type' => 'varchar',
>         'length' => '255',
>         'description' => 'The layout plugin that owns this layout.',
>       ),
>       'settings' => array(
>         'type' => 'text',
>         'size' => 'big',
>         'description' => 'Serialized settings for the actual layout. The contents of this field are up to the plugin that uses it.',
>         'serialize' => TRUE,
>         'object default' => array(),
>       ),
>     ),
>     'primary key' => array('lid'),
>   );
> 
>   return $schema;
1334c1402,1415
< }
\ No newline at end of file
---
> }
> 
> /**
>  * Add the panels_layouts table
>  */
> function panels_update_6308() {
>   $ret = array();
> 
>   // Schema 3 is locked and should not be changed.
>   $schema = panels_schema_3();
> 
>   db_create_table($ret, 'panels_layouts', $schema['panels_layouts']);
>   return $ret;
> }
Index: panels.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/panels/panels.module,v
retrieving revision 1.28.2.82
diff -r1.28.2.82 panels.module
79c79
<           'arguments' => array('css_id' => NULL, 'content' => NULL, 'settings' => NULL, 'display' => NULL),
---
>           'arguments' => array('css_id' => NULL, 'content' => NULL, 'settings' => NULL, 'display' => NULL, 'layout' => NULL),
319a320
>     'administer panels layouts',
1010c1011
<   if ($module == 'page_manager' || $module == 'panels') {
---
>   if ($module == 'page_manager' || $module == 'panels' || $module == 'ctools') {
1021a1023
>     'process' => 'panels_layout_process',
Index: css/panels_admin.css
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/panels/css/panels_admin.css,v
retrieving revision 1.3.4.5
diff -r1.3.4.5 panels_admin.css
4c4
<   float: left; 
---
>   float: left;
80c80
<   height: 15em;
---
>   height: 11em;
87c87
<   text-align: center; 
---
>   text-align: center;
103a104,109
> .panels-layouts-checkboxes .panels-layouts-category {
>   font-weight: bold;
>   width: 100%;
>   float: left;
> }
> 
Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/panels/includes/common.inc,v
retrieving revision 1.10.2.9
diff -r1.10.2.9 common.inc
459,462c459,462
<   $layouts = array();
<   foreach ($available_layouts as $layout_key => $layout_settings) {
<     if (!empty($allowed[$layout_key])) {
<       $layouts[$layout_key] = $layout_settings;
---
>   $order = array();
>   foreach ($available_layouts as $name => $plugin) {
>     if (!empty($allowed[$name])) {
>       $order[$name] = $plugin['category'] . ':' . $plugin['title'];
465a466,473
>   // Sort
>   $layouts = array();
> 
>   asort($order);
>   foreach ($order as $name => $junk) {
>     $layouts[$name] = $available_layouts[$name];
>   }
> 
492a501,554
> 
> function panels_common_print_layout_links($layouts, $base_path, $link_options = array()) {
>   $output = '';
> 
>   $categories = array();
>   ctools_include('cleanstring');
>   foreach ($layouts as $id => $layout) {
>     $category = ctools_cleanstring($layout['category']);
> 
>     $categories[$category] = $layout['category'];
>     $options[$category][$id] = panels_print_layout_link($id, $layout, $base_path . '/' . $id, $link_options);
>   }
> 
>   $form = array();
>   $form['categories'] = array(
>     '#title' => t('Category'),
>     '#type' => 'select',
>     '#options' => $categories,
>     '#name' => 'categories',
>     '#id' => 'edit-categories',
>     '#value' => '',
>     '#parents' => array('categories'),
>   );
> 
>   $output .= drupal_render($form);
> 
>   $output .= '<div class="panels-choose-layout panels-layouts-checkboxes clear-block">';
> 
>   $dependencies = array();
>   foreach ($options as $category => $links) {
>     $dependencies['panels-layout-category-' . $category] = array(
>       'values' => array('edit-categories' => array($category)),
>       'num' => 1,
>       'type' => 'hide',
>     );
> 
>     $output .= '<div id="panels-layout-category-' . $category . '-wrapper">';
>     $output .= '<div id="panels-layout-category-' . $category . '" class="form-checkboxes clear-block">';
>     $output .= '<div class="panels-layouts-category">' . $categories[$category] . '</div>';
> 
>     foreach ($links as $key => $link) {
>       $output .= $link;
>     }
>     $output .= '</div></div>';
>   }
> 
>   $output .= '</div>';
> 
>   ctools_add_js('dependent');
>   $js['CTools']['dependent'] = $dependencies;
>   drupal_add_js($js, 'setting');
> 
>   return $output;
> }
\ No newline at end of file
Index: includes/display-edit.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/panels/includes/display-edit.inc,v
retrieving revision 1.7.2.36
diff -r1.7.2.36 display-edit.inc
154c154,159
<   $links = panels_edit_display_get_links($display);
---
>   if (empty($form_state['no display settings'])) {
>     $links = panels_edit_display_get_links($display);
>   }
>   else {
>     $links = '';
>   }
Index: includes/display-layout.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/panels/includes/display-layout.inc,v
retrieving revision 1.4.2.5
diff -r1.4.2.5 display-layout.inc
77a78
>   ctools_include('cleanstring');
80c81,82
< 
---
>   $categories = array();
>   $current = '';
82c84,96
<     $options[$id] = panels_print_layout_icon($id, $layout, check_plain($layout['title']));
---
>     $category = ctools_cleanstring($layout['category']);
>     // Default category to first in case layout doesn't exist or there isn't one.
>     if (empty($current)) {
>       $current = $category;
>     }
> 
>     $categories[$category] = $layout['category'];
>     $options[$category][$id] = panels_print_layout_icon($id, $layout, check_plain($layout['title']));
> 
>     // Set current category to what is chosen.
>     if ($id == $display->layout) {
>       $current = $category;
>     }
86,90c100,105
<   $form['layout'] = array(
<     '#type' => 'radios',
<     '#title' => t('Choose layout'),
<     '#options' => $options,
<     '#default_value' => in_array($display->layout, array_keys($layouts)) ? $display->layout : NULL,
---
> 
>   $form['categories'] = array(
>     '#title' => t('Category'),
>     '#type' => 'select',
>     '#options' => $categories,
>     '#default_value' => $current,
93,95c108,110
<   $form['clearer'] = array(
<     // TODO: Fix this to use clear-block instead
<     '#value' => '<div style="clear: both;"></div>',
---
>   $form['layout'] = array(
>     '#prefix' => '<div class="panels-choose-layout panels-layouts-checkboxes clear-block">',
>     '#suffix' => '</div>',
97a113,144
>   $dependencies = array();
>   foreach ($options as $category => $radios) {
>     $dependencies['panels-layout-category-' . $category] = array(
>       'values' => array('edit-categories' => array($category)),
>       'num' => 1,
>       'type' => 'hide',
>     );
> 
>     $form['layout'][$category] = array(
>       '#prefix' => '<div id="panels-layout-category-' . $category . '-wrapper"><div id="panels-layout-category-' . $category . '" class="form-checkboxes clear-block"><div class="panels-layouts-category">' . $categories[$category] . '</div>',
>       '#suffix' => '</div></div>',
>     );
> 
>     foreach ($radios as $key => $choice) {
>       // Generate the parents as the autogenerator does, so we will have a
>       // unique id for each radio button.
>       $form['layout'][$category][$key] = array(
>         '#type' => 'radio',
>         '#title' => $choice,
>         '#parents' => array('layout'),
>         '#id' => form_clean_id('edit-layout-' . $key),
>         '#return_value' => check_plain($key),
>         '#default_value' => in_array($display->layout, array_keys($layouts)) ? $display->layout : NULL,
>       );
>     }
>   }
> 
>   ctools_add_js('dependent');
>   $js['CTools']['dependent'] = $dependencies;
>   drupal_add_js($js, 'setting');
> 
> 
Index: includes/display-render.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/panels/includes/display-render.inc,v
retrieving revision 1.5.2.26
diff -r1.5.2.26 display-render.inc
32c32
<   return theme($theme, isset($display->css_id) ? $display->css_id : '', $content, $display->layout_settings, $display);
---
>   return theme($theme, isset($display->css_id) ? $display->css_id : '', $content, $display->layout_settings, $display, $layout);
Index: includes/plugins.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/panels/includes/plugins.inc,v
retrieving revision 1.13.2.19
diff -r1.13.2.19 plugins.inc
37c37
<     return $layout['panels function']($display, $display->layout_settings);
---
>     return $layout['panels function']($display, $display->layout_settings, $layout);
281a282,290
>  * Ensure a layout has a minimal set of data.
>  */
> function panels_layout_process(&$plugin) {
>   if (empty($plugin['category'])) {
>     $plugin['category'] = t('Miscellaneous');
>   }
> }
> 
> /**
285c294,296
<  *   Name of a panel layout.
---
>  *   Name of a panel layout. If the layout name contains a ':' this
>  *   indicates that we need to separate the sublayout out and
>  *   load it individually.
290a302,307
>   // Check the cache to see if all layouts were loaded.
>   $layouts = &ctools_static('panels_get_layouts');
>   if ($layouts && !empty($layouts[$layout])) {
>     return $layouts[$layout];
>   }
> 
292c309,321
<   return ctools_get_plugins('panels', 'layouts', $layout);
---
>   if (strpos($layout, ':') !== FALSE) {
>     list($layout_name, $sublayout) = explode(':', $layout, 2);
>   }
>   else {
>     $layout_name = $layout;
>   }
> 
>   $plugin = ctools_get_plugins('panels', 'layouts', $layout_name);
>   if (!empty($sublayout) && function_exists($plugin['sublayout callback'])) {
>     $plugin = $plugin['sublayout callback']($plugin, $layout_name, $sublayout);
>   }
> 
>   return $plugin;
301a331,361
>   $layouts = &ctools_static(__FUNCTION__);
>   if (!isset($layouts)) {
>     $layouts = array();
>     ctools_include('plugins');
>     $plugins = ctools_get_plugins('panels', 'layouts');
> 
>     // Go through each and see if there are 'sub' layouts we need to get.
>     foreach ($plugins as $name => $plugin) {
>       if (!empty($plugin['sublayouts callback']) && function_exists($plugin['sublayouts callback'])) {
>         $layouts = array_merge($plugin['sublayouts callback']($plugin, $name));
>       }
>       else {
>         $layouts[$name] = $plugin;
>       }
>     }
>   }
> 
>   return $layouts;
> }
> 
> /**
>  * Fetch metadata for all layout plugins that provide builders.
>  *
>  * The layout builders allow reusable layouts be stored in the database and
>  * exported. Since there are different methods, we are not limiting this
>  * to just one plugin.
>  *
>  * @return
>  *   An array of arrays with information about panel layouts with builders.
>  */
> function panels_get_layout_builders() {
303c363,371
<   return ctools_get_plugins('panels', 'layouts');
---
>   $plugins = ctools_get_plugins('panels', 'layouts');
>   $builders = array();
>   foreach ($plugins as $name => $plugin) {
>     if (!empty($plugin['builder'])) {
>       $builders[$name] = $plugin;
>     }
>   }
> 
>   return $builders;
Index: panels_mini/panels_mini.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/panels/panels_mini/panels_mini.admin.inc,v
retrieving revision 1.6.2.12
diff -r1.6.2.12 panels_mini.admin.inc
346,349c346
<     foreach ($layouts as $id => $layout) {
<       $output .= panels_print_layout_link($id, $layout, $_GET['q'] .'/'. $id);
<     }
<     return $output;
---
>     return panels_common_print_layout_links($layouts, $_GET['q']);
Index: panels_node/panels_node.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/panels/panels_node/panels_node.module,v
retrieving revision 1.5.2.18
diff -r1.5.2.18 panels_node.module
124,129c124
< 
<   // If no layout selected, present a list of choices.
<   foreach ($layouts as $id => $layout) {
<     $output .= panels_print_layout_link($id, $layout, 'node/add/panel/' . $id, array('query' => $_GET));
<   }
<   return $output;
---
>   return panels_common_print_layout_links($layouts, 'node/add/panel', array('query' => $_GET));
Index: plugins/display_renderers/panels_renderer_standard.class.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/panels/plugins/display_renderers/Attic/panels_renderer_standard.class.php,v
retrieving revision 1.1.2.14
diff -r1.1.2.14 panels_renderer_standard.class.php
280c280
<     $this->rendered['layout'] = theme($this->plugins['layout']['theme'], check_plain($this->display->css_id), $this->rendered['regions'], $this->display->layout_settings, $this->display);
---
>     $this->rendered['layout'] = theme($this->plugins['layout']['theme'], check_plain($this->display->css_id), $this->rendered['regions'], $this->display->layout_settings, $this->display, $this->plugins['layout']);
Index: plugins/layouts/flexible/flexible.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/panels/plugins/layouts/flexible/flexible.inc,v
retrieving revision 1.1.2.20
diff -r1.1.2.20 flexible.inc
9a10
>   'category' => t('Builders'),
19a21,27
> 
>   // Reuisable layout Builder specific directives
>   'builder' => TRUE,
>   'builder tab title' => 'Add flexible layout', // menu so translated elsewhere
> 
>   'sublayout callback' => 'panels_flexible_get_sublayout',
>   'sublayouts callback' => 'panels_flexible_get_sublayouts',
21a30,57
> function panels_flexible_merge_plugin($plugin, $layout) {
>   $plugin['name'] = 'flexible:' . $layout->name;
>   $plugin['category'] = check_plain($layout->category);
>   $plugin['title'] = check_plain($layout->admin_title);
>   $plugin['layout'] = $layout;
>   return $plugin;
> }
> 
> function panels_flexible_get_sublayout($plugin, $layout_name, $sublayout_name) {
>   // Do not worry about caching; Panels is handling that for us.
>   ctools_include('export');
>   $item = ctools_export_crud_load('panels_layouts', $sublayout_name);
>   if ($item) {
>     return panels_flexible_merge_plugin($plugin, $item);
>   }
> }
> 
> function panels_flexible_get_sublayouts($plugin, $layout_name) {
>   $layouts[$layout_name] = $plugin;
>   ctools_include('export');
>   $items = ctools_export_load_object('panels_layouts', 'conditions', array('plugin' => 'flexible'));
>   foreach ($items as $name => $item) {
>     $layouts['flexible:' . $name] = panels_flexible_merge_plugin($plugin, $item);
>   }
> 
>   return $layouts;
> }
> 
53c89,94
< function panels_flexible_convert_settings(&$settings) {
---
> function panels_flexible_convert_settings(&$settings, $layout) {
>   if (!empty($layout['layout'])) {
>     $settings = $layout['layout']->settings;
>     return $settings;
>   }
> 
207c248
< function panels_flexible_panels($display, $settings) {
---
> function panels_flexible_panels($display, $settings, $layout) {
209c250
<   panels_flexible_convert_settings($settings);
---
>   panels_flexible_convert_settings($settings, $layout);
222,223c263,264
< function theme_panels_flexible($id, $content, $settings, $display) {
<   panels_flexible_convert_settings($settings);
---
> function theme_panels_flexible($id, $content, $settings, $display, $layout) {
>   panels_flexible_convert_settings($settings, $layout);
268,269c309,314
< function theme_panels_flexible_admin($id, $content, $settings, $display) {
<   panels_flexible_convert_settings($settings);
---
> function theme_panels_flexible_admin($id, $content, $settings, $display, $layout) {
>   if (!empty($layout['items'])) {
>     return theme_panels_flexible($id, $content, $settings, $display, $layout);
>   }
> 
>   panels_flexible_convert_settings($settings, $layout);
293,295c338,347
<   $output = '<input type="submit" id="panels-flexible-toggle-layout" value ="' .
<     t('Show layout designer') . '">';
<   $output .= "<div class=\"panel-flexible panel-flexible-$renderer->did clear-block panel-flexible-admin panel-flexible-no-edit-layout\" $renderer->id_str>\n";
---
>   if (empty($display->editing_layout)) {
>     $output = '<input type="submit" id="panels-flexible-toggle-layout" value ="' .
>       t('Show layout designer') . '">';
>     $output .= "<div class=\"panel-flexible panel-flexible-$renderer->did clear-block panel-flexible-admin panel-flexible-no-edit-layout\" $renderer->id_str>\n";
>   }
>   else {
> //    $output = '<input type="submit" id="panels-flexible-toggle-layout" value ="' .
>       t('Hide layout designer') . '">';
>     $output = "<div class=\"panel-flexible panel-flexible-$renderer->did clear-block panel-flexible-admin panel-flexible-edit-layout\" $renderer->id_str>\n";
>   }
699c751,752
<   panels_flexible_convert_settings($settings);
---
>   $layout = panels_get_layout($cache->display->layout);
>   panels_flexible_convert_settings($settings, $layout);
859c912,913
<   panels_flexible_convert_settings($settings);
---
>   $layout = panels_get_layout($cache->display->layout);
>   panels_flexible_convert_settings($settings, $layout);
1189c1243,1244
<   panels_flexible_convert_settings($settings);
---
>   $layout = panels_get_layout($cache->display->layout);
>   panels_flexible_convert_settings($settings, $layout);
1300c1355,1356
<   panels_flexible_convert_settings($settings);
---
>   $layout = panels_get_layout($cache->display->layout);
>   panels_flexible_convert_settings($settings, $layout);
Index: plugins/layouts/onecol/onecol.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/panels/plugins/layouts/onecol/onecol.inc,v
retrieving revision 1.1.2.2
diff -r1.1.2.2 onecol.inc
9a10
>   'category' => t('Columns: 1'),
Index: plugins/layouts/threecol_25_50_25/threecol_25_50_25.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/panels/plugins/layouts/threecol_25_50_25/threecol_25_50_25.inc,v
retrieving revision 1.1.2.3
diff -r1.1.2.3 threecol_25_50_25.inc
9a10
>   'category' => t('Columns: 3'),
Index: plugins/layouts/threecol_25_50_25_stacked/threecol_25_50_25_stacked.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/panels/plugins/layouts/threecol_25_50_25_stacked/threecol_25_50_25_stacked.inc,v
retrieving revision 1.1.2.2
diff -r1.1.2.2 threecol_25_50_25_stacked.inc
6a7
>   'category' => t('Columns: 3'),
Index: plugins/layouts/threecol_33_34_33/threecol_33_34_33.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/panels/plugins/layouts/threecol_33_34_33/threecol_33_34_33.inc,v
retrieving revision 1.1.2.2
diff -r1.1.2.2 threecol_33_34_33.inc
6a7
>   'category' => t('Columns: 3'),
Index: plugins/layouts/threecol_33_34_33_stacked/threecol_33_34_33_stacked.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/panels/plugins/layouts/threecol_33_34_33_stacked/threecol_33_34_33_stacked.inc,v
retrieving revision 1.1.2.1
diff -r1.1.2.1 threecol_33_34_33_stacked.inc
4,24c4,18
< 
< /**
<  * Implementation of hook_panels_layouts().
<  */
< function panels_threecol_33_34_33_stacked_panels_layouts() {
<   $items['threecol_33_34_33_stacked'] = array(
<     'title' => t('Three column 33/34/33 stacked'),
<     'icon' => 'threecol_33_34_33_stacked.png',
<     'theme' => 'panels_threecol_33_34_33_stacked',
<     'css' => 'threecol_33_34_33_stacked.css',
<     'panels' => array(
<       'top' => t('Top'),
<       'left' => t('Left side'),
<       'middle' => t('Middle column'),
<       'right' => t('Right side'),
<       'bottom' => t('Bottom')
<     ),
<   );
< 
<   return $items;
< }
---
> // Plugin definition
> $plugin = array(
>   'title' => t('Three column 33/34/33 stacked'),
>   'category' => t('Columns: 3'),
>   'icon' => 'threecol_33_34_33_stacked.png',
>   'theme' => 'panels_threecol_33_34_33_stacked',
>   'css' => 'threecol_33_34_33_stacked.css',
>   'panels' => array(
>     'top' => t('Top'),
>     'left' => t('Left side'),
>     'middle' => t('Middle column'),
>     'right' => t('Right side'),
>     'bottom' => t('Bottom')
>   ),
> );
Index: plugins/layouts/twocol/twocol.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/panels/plugins/layouts/twocol/twocol.inc,v
retrieving revision 1.1.2.2
diff -r1.1.2.2 twocol.inc
6a7
>   'category' => t('Columns: 2'),
Index: plugins/layouts/twocol_bricks/twocol_bricks.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/panels/plugins/layouts/twocol_bricks/twocol_bricks.inc,v
retrieving revision 1.1.2.2
diff -r1.1.2.2 twocol_bricks.inc
11a12
>   'category' => t('Columns: 2'),
Index: plugins/layouts/twocol_stacked/twocol_stacked.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/panels/plugins/layouts/twocol_stacked/twocol_stacked.inc,v
retrieving revision 1.1.2.2
diff -r1.1.2.2 twocol_stacked.inc
6a7
>   'category' => t('Columns: 2'),
