You are here

function theme_finder_admin_links in Finder 7

Same name and namespace in other branches
  1. 6 includes/finder.inc \theme_finder_admin_links()
  2. 6 includes/finder.theme.inc \theme_finder_admin_links()

Theme the finder admin links.

Parameters

$variables['finder']: The finder object.

2 theme calls to theme_finder_admin_links()
finder_admin_edit in includes/finder.admin.inc
Admin finder edit page.
finder_view in ./finder.module
Generate display of a given finder.

File

includes/finder.theme.inc, line 56
Theme functions for the finder module.

Code

function theme_finder_admin_links($variables) {
  $finder = $variables['finder'];
  $output = '';
  $links = array();
  if (is_array($finder->admin_links)) {
    foreach ($finder->admin_links as $path => $title) {

      // don't show this link if the current path starts with $path
      if (strpos($_GET['q'], $path) !== 0) {
        $links[] = l($title, $path);
      }
    }
  }
  if (!empty($links)) {
    $output .= '<div id="finder-admin-links-' . $finder->finder_id . '"
              class="finder-admin-links">';
    $output .= theme('item_list', array(
      'items' => $links,
      'attributes' => array(
        'class' => 'links',
      ),
    ));
    $output .= '</div>';
  }
  return $output;
}