You are here

function node_gallery_config_list in Node Gallery 6

Same name and namespace in other branches
  1. 6.2 node_gallery.admin.inc \node_gallery_config_list()

@file Node gallery admin file.

1 string reference to 'node_gallery_config_list'
node_gallery_menu in ./node_gallery.module
Implementation of hook_menu()

File

./node_gallery.admin.inc, line 9
Node gallery admin file.

Code

function node_gallery_config_list() {
  $items = gallery_config_gateway::get_types('gallery');
  $node_types = node_get_types();
  if (!empty($items)) {
    $headers = array(
      t('Gallery Name'),
      t('Gallery type'),
      t('Image type'),
      t('Operations'),
    );
    foreach ($items as $item) {
      $rows[] = array(
        $item->name,
        $node_types[$item->gallery_type]->name,
        $node_types[$item->image_type]->name,
        theme('links', node_gallery_config_operations($item)),
      );
    }
    return theme('table', $headers, $rows, array(
      'class' => 'node-gallery-config-list',
    ));
  }
  else {
    return t("There's no gallery type now.");
  }
}