list.inc
Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 function panels_list_panels_styles() {
00018 return array(
00019 'list' => array(
00020 'title' => t('List'),
00021 'description' => t('Presents the panes in the form of an HTML list.'),
00022 'render panel' => 'panels_list_style_render_panel',
00023 'settings form' => 'panels_list_style_settings_form',
00024 'settings validate' => 'panels_list_style_settings_validate',
00025 ),
00026 );
00027 }
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 function theme_panels_list_style_render_panel($display, $panel_id, $panes, $settings) {
00039 $items = array();
00040
00041 foreach ($panes as $pane_id => $content) {
00042 $item = panels_render_pane($content, $display->content[$pane_id], $display);
00043 if ($item) {
00044 $items[] = $item;
00045 }
00046 }
00047 return theme('item_list', $items, NULL, $settings['list_type']);
00048 }
00049
00050
00051
00052
00053 function panels_list_style_settings_form($style_settings) {
00054 $form['list_type'] = array(
00055 '#type' => 'select',
00056 '#title' => t('List type'),
00057 '#options' => array(
00058 'ul' => t('Unordered'),
00059 'ol' => t('Ordered'),
00060 ),
00061 '#default_value' => (isset($style_settings['list_type'])) ? $style_settings['list_type'] : 'ul',
00062 );
00063
00064 return $form;
00065 }
00066