| 1 |
<?php |
<?php |
| 2 |
function phptemplate_menu_tree($pid = 1) { |
function phptemplate_menu_tree($tree) { |
| 3 |
if ($tree = menu_tree($pid)) { |
return '<ul class="menu-tree">'. $tree .'</ul>'; |
|
$output .= "<ul class=\"menu-tree\">"; |
|
|
$output .= $tree; |
|
|
$output .= "</ul>"; |
|
|
return $output; |
|
|
} |
|
|
} |
|
|
function phptemplate_menu_item($mid, $children = '', $leaf = TRUE) { |
|
|
//return '<li class="'. ($leaf ? 'leaf' : ($children ? 'expanded' : 'collapsed')) .'">'. menu_item_link($mid) . $children ."</li>\n"; |
|
|
return '<li>'. menu_item_link($mid) . $children ."</li>"; |
|
| 4 |
} |
} |
| 5 |
function phptemplate_links($links = array(), $delimiter = ' | ') { |
function phptemplate_menu_item($link, $has_children, $menu = '', $in_active_trail = FALSE, $extra_class = NULL) { |
| 6 |
/** |
$class = ($menu ? 'expanded' : ($has_children ? 'collapsed' : 'leaf')); |
| 7 |
* catches the theme_links function and calls back a link.tpl.php file to determine the layout |
if (!empty($extra_class)) { |
| 8 |
*/ |
$class .= ' '. $extra_class; |
|
return _phptemplate_callback('links', array('links' => $links, 'delimiter' => $delimiter)); |
|
|
} |
|
|
function phptemplate_system_themes($form) { |
|
|
foreach (element_children($form) as $key) { |
|
|
$row = array(); |
|
|
if (is_array($form[$key]['description'])) { |
|
|
$row[] = drupal_render($form[$key]['description']) . drupal_render($form[$key]['screenshot']) ; |
|
|
$row[] = array('data' => drupal_render($form['status'][$key]), 'align' => 'center'); |
|
|
if ($form['theme_default']) { |
|
|
$row[] = array('data' => drupal_render($form['theme_default'][$key]) . drupal_render($form[$key]['operations']), 'align' => 'center'); |
|
|
} |
|
|
} |
|
|
$rows[] = $row; |
|
| 9 |
} |
} |
| 10 |
$header = array(t('Name/Screenshot'), t('Enabled'), t('Default')); |
if ($in_active_trail) { |
| 11 |
$output = theme('table', $header, $rows); |
$class .= ' active-trail'; |
|
$output .= drupal_render($form); |
|
|
return $output; |
|
|
} |
|
|
function phptemplate_system_user($form) { |
|
|
foreach (element_children($form) as $key) { |
|
|
$row = array(); |
|
|
if (is_array($form[$key]['description'])) { |
|
|
$row[] = drupal_render($form[$key]['description']) . drupal_render($form[$key]['screenshot']); |
|
|
$row[] = array('data' => drupal_render($form['theme'][$key]), 'align' => 'center'); |
|
|
} |
|
|
$rows[] = $row; |
|
| 12 |
} |
} |
| 13 |
|
//return '<li class="'. $class .'">'. $link . $menu .'</li>'."\n"; |
| 14 |
|
return '<li>'. $link . $menu .'</li>'."\n"; |
| 15 |
|
|
|
$header = array(t('Name/Screenshot'), t('Selected')); |
|
|
$output = theme('table', $header, $rows); |
|
|
return $output; |
|
| 16 |
} |
} |
| 17 |
?> |
?> |