diff --git a/modules/book/book.admin.inc b/modules/book/book.admin.inc index f46e7c870b6f99eff774b6dd0e9859dc48be85e8..34967323f1e611c8a3d12d9a5b02b849d936adb7 100644 --- a/modules/book/book.admin.inc +++ b/modules/book/book.admin.inc @@ -11,10 +11,18 @@ */ function book_admin_overview() { $rows = array(); + + $headers = array(t('Book'), t('Operations')); + + // Add any recognized books to the table list. foreach (book_get_books() as $book) { - $rows[] = array(l($book['title'], $book['href'], $book['options']), l(t('edit order and titles'), "admin/content/book/" . $book['nid'])); + $rows[] = array(l($book['title'], $book['href'], $book['options']), l(t('edit order and titles'), 'admin/content/book/' . $book['nid'])); + } + + // If no books were found, let the user know. + if (empty($rows)) { + $rows[] = array(array('data' => t('No books available.'), 'colspan' => 2)); } - $headers = array(t('Book'), t('Operations')); return theme('table', $headers, $rows); }