function finder_admin_list in Finder 7
Same name and namespace in other branches
- 6 includes/finder.admin.inc \finder_admin_list()
Admin finder list page.
1 string reference to 'finder_admin_list'
- finder_menu in ./
finder.module - Implements hook_menu().
File
- includes/
finder.admin.inc, line 12 - The finder admin screens.
Code
function finder_admin_list() {
$output = array();
$finders = finder_load_multiple();
if (empty($finders)) {
$output[]['#markup'] = t('There are currently no finders configured.');
}
else {
foreach ((array) $finders as $finder) {
// allow modules to change the finder here
finder_invoke_finderapi($finder, 'finder_admin_list');
if (!isset($finder->settings['programmatic']) || !$finder->settings['programmatic']) {
$rows = array();
$rows[] = array(
array(
'data' => '<strong>' . check_plain($finder->title) . '</strong>',
'class' => 'finder-title',
),
array(
'data' => l(t('Edit'), 'admin/structure/finder/' . $finder->finder_id . '/edit') . ' | ' . l(t('Delete'), 'admin/structure/finder/' . $finder->finder_id . '/delete'),
'class' => 'finder-ops',
'align' => 'right',
),
);
$rows[] = array(
array(
'data' => '
<div class="type">' . t('Type') . '<span class="finder-colon">:</span> <span>' . t($finder->base_handler['#title']) . '</span></div>
<div class="path">' . t('Path') . '<span class="finder-colon">:</span> <span>' . l($finder->path, $finder->path) . '</span></div>
',
'class' => 'finder-summary',
),
array(
'data' => '<div class="description">' . check_markup($finder->description) . '</div>',
'class' => 'finder-desc description',
),
);
$output[] = array(
'#theme' => 'table',
'#rows' => $rows,
'#attributes' => array(
'class' => 'finder-table finder-' . $finder->finder_id,
),
);
}
}
}
$output[] = drupal_get_form('finder_admin_add_form');
return $output;
}