You are here

function library_display_items in Library 6

Same name and namespace in other branches
  1. 5.2 library.pages.inc \library_display_items()
  2. 6.2 library.pages.inc \library_display_items()
  3. 7 library.pages.inc \library_display_items()
1 string reference to 'library_display_items'
library_menu in ./library.module
Implementation of hook_menu().

File

./library.pages.inc, line 367
Functions for generating page displays related to the library module

Code

function library_display_items() {
  $var = library_get_table_header();
  $header = $var['header'];
  $nodes = library_get_items_group_by_node();
  $rows = array();
  foreach ($nodes as $node) {
    $node_rows = library_get_table_row($node, $var);
    foreach ($node_rows as $row) {
      $rows[] = $row;
    }
  }
  $output = theme('table', $header, $rows, array(
    'class' => 'library-list',
  ));
  $output .= theme('pager', NULL, LIBRARY_RESULTS_PER_PAGE);
  return $output;
}