book_admin_overview

Versions
4.7 – 7
book_admin_overview()

Returns an administrative overview of all books.

Code

modules/book/book.admin.inc, line 11

<?php
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']));
  }

  // If no books were found, let the user know.
  if (empty($rows)) {
    $rows[] = array(array('data' => t('No books available.'), 'colspan' => 2));
  }

  return theme('table', array('header' => $headers, 'rows' => $rows));
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.