You are here

function image_gallery_admin in Image 5

Same name and namespace in other branches
  1. 5.2 contrib/image_gallery/image_gallery.module \image_gallery_admin()
  2. 6 contrib/image_gallery/image_gallery.admin.inc \image_gallery_admin()
  3. 7 contrib/image_gallery/image_gallery.admin.inc \image_gallery_admin()
2 string references to 'image_gallery_admin'
image_gallery_admin_form in contrib/image_gallery/image_gallery.module
image_gallery_menu in contrib/image_gallery/image_gallery.module

File

contrib/image_gallery/image_gallery.module, line 177

Code

function image_gallery_admin() {
  _image_check_settings();
  $header = array(
    t('Name'),
    t('Operations'),
  );
  $tree = taxonomy_get_tree(_image_gallery_get_vid());
  if ($tree) {
    foreach ($tree as $term) {
      $rows[] = array(
        str_repeat(' -- ', $term->depth) . ' ' . l($term->name, "image/tid/{$term->tid}"),
        l(t('edit gallery'), "admin/content/image/edit/{$term->tid}"),
      );
    }
    return theme('table', $header, $rows);
  }
  else {
    return t('No galleries available');
  }
}