You are here

function theme_views_bulk_operations_confirmation in Views Bulk Operations (VBO) 5

Same name and namespace in other branches
  1. 6.3 views_bulk_operations.module \theme_views_bulk_operations_confirmation()
  2. 6 views_bulk_operations.module \theme_views_bulk_operations_confirmation()
  3. 7.3 views_bulk_operations.module \theme_views_bulk_operations_confirmation()
1 theme call to theme_views_bulk_operations_confirmation()
views_bulk_operations_form in ./views_bulk_operations.module

File

./views_bulk_operations.module, line 812
Allow bulk node operations directly within views.

Code

function theme_views_bulk_operations_confirmation($nodes) {
  $count = 0;
  $output = t('You selected the following !count nodes:', array(
    '!count' => count($nodes),
  )) . '<br /><ul>';
  foreach ($nodes as $nid) {

    // Number of titles to display before we say "...and more"
    if (VIEWS_BULK_OPS_MAX_CONFIRM_NODES > 0 && $count >= VIEWS_BULK_OPS_MAX_CONFIRM_NODES) {
      $output .= '<li>' . t('...and !remaining more.', array(
        '!remaining' => count($nodes) - $count,
      )) . '</li>';
      break;
    }
    if (is_numeric($nid) && $nid > 0) {
      $node = node_load($nid);
      $output .= '<li>' . check_plain($node->title) . '</li>';
      $count++;
    }
  }
  $output .= '</ul>';
  return $output;
}