function showPendingItems($res, $groupId, $nbItems, $offset, $limit)
 {
     $hp = Codendi_HTMLPurifier::instance();
     require_once 'Docman_ItemFactory.class.php';
     $itemFactory = new Docman_ItemFactory($groupId);
     $uh = UserHelper::instance();
     $html = '';
     $title = array();
     $title[] = $GLOBALS['Language']->getText('plugin_docman', 'item_id');
     $title[] = $GLOBALS['Language']->getText('plugin_docman', 'filters_item_type');
     $title[] = $GLOBALS['Language']->getText('plugin_docman', 'doc_title');
     $title[] = $GLOBALS['Language']->getText('plugin_docman', 'location');
     $title[] = $GLOBALS['Language']->getText('plugin_docman', 'owner');
     $title[] = $GLOBALS['Language']->getText('plugin_docman', 'delete_date');
     $title[] = $GLOBALS['Language']->getText('plugin_docman', 'purge_date');
     $title[] = $GLOBALS['Language']->getText('plugin_docman', 'restore_item');
     if ($nbItems > 0) {
         $html .= '<H3>' . $GLOBALS['Language']->getText('plugin_docman', 'deleted_item') . '</H3><P>';
         $html .= html_build_list_table_top($title);
         $i = 1;
         foreach ($res as $row) {
             $purgeDate = strtotime('+' . $GLOBALS['sys_file_deletion_delay'] . ' day', $row['date']);
             $html .= '<tr class="' . html_get_alt_row_color($i++) . '">' . '<td>' . $row['id'] . '</td>' . '<td>' . $itemFactory->getItemTypeAsText($row['item_type']) . '</td>' . '<td>' . $hp->purify($row['title'], CODENDI_PURIFIER_BASIC, $groupId) . '</td>' . '<td>' . $hp->purify($row['location']) . '</td>' . '<td>' . $hp->purify($uh->getDisplayNameFromUserId($row['user'])) . '</td>' . '<td>' . html_time_ago($row['date']) . '</td>' . '<td>' . format_date($GLOBALS['Language']->getText('system', 'datefmt'), $purgeDate) . '</td>' . '<td align="center"><a href="/plugins/docman/restore_documents.php?group_id=' . $groupId . '&func=confirm_restore_item&id=' . $row['id'] . '" ><IMG SRC="' . util_get_image_theme("ic/convert.png") . '" onClick="return confirm(\'Confirm restore of this item\')" BORDER=0 HEIGHT=16 WIDTH=16></a></td></tr>';
         }
         $html .= '</TABLE>';
         $html .= '<div style="text-align:center" class="' . util_get_alt_row_color($i++) . '">';
         if ($offset > 0) {
             $html .= '<a href="?group_id=' . $groupId . '&focus=item&offsetItem=' . ($offset - $limit) . '">[ ' . $GLOBALS['Language']->getText('plugin_docman', 'previous') . '  ]</a>';
             $html .= '&nbsp;';
         }
         if ($offset + $limit < $nbItems) {
             $html .= '&nbsp;';
             $html .= '<a href="?group_id=' . $groupId . '&focus=item&offsetItem=' . ($offset + $limit) . '">[ ' . $GLOBALS['Language']->getText('plugin_docman', 'next') . ' ]</a>';
         }
         $html .= '<br>' . ($offset + $i - 2) . '/' . $nbItems . '</br>';
         $html .= '</div>';
     } else {
         $html .= $GLOBALS['Response']->addFeedback('info', $GLOBALS['Language']->getText('plugin_docman', 'no_pending_items'));
     }
     return $html;
 }