You are here

function theme_views_bulk_operations_select_all in Views Bulk Operations (VBO) 6

Same name and namespace in other branches
  1. 7.3 views_bulk_operations.module \theme_views_bulk_operations_select_all()

Theme function for 'views_bulk_operations_select_all'.

1 theme call to theme_views_bulk_operations_select_all()
theme_views_node_selector in ./views_bulk_operations.module
Theme function for 'views_node_selector'.

File

./views_bulk_operations.module, line 428
Allows operations to be performed on items selected in a view.

Code

function theme_views_bulk_operations_select_all($colspan, $selection, $view) {
  $clear_selection = t('Clear selection');
  $select_label = t('Select all items:');
  $this_page = t('on this page only');
  $all_pages = t('across all pages');
  $this_page_checked = $selection['selectall'] ? '' : ' checked="checked"';
  $all_pages_checked = $selection['selectall'] ? ' checked="checked"' : '';
  $selection_count = t('<span class="selected">@selected</span> items selected.', array(
    '@selected' => $selection['selected'],
  ));
  $output = <<<EOF
{<span class="php-variable">$selection_count</span>}
<span class="select">
{<span class="php-variable">$select_label</span>}
<input type="radio" name="select-all" id="select-this-page" value="0"{<span class="php-variable">$this_page_checked</span>} /><label for="select-this-page">{<span class="php-variable">$this_page</span>}</label>
<input type="radio" name="select-all" id="select-all-pages" value="1"{<span class="php-variable">$all_pages_checked</span>} /><label for="select-all-pages">{<span class="php-variable">$all_pages</span>}</label>
</span>
<input type="button" id="clear-selection" value="{<span class="php-variable">$clear_selection</span>}" />
EOF;
  return array(
    array(
      'data' => $output,
      'class' => 'views-field views-field-select-all',
      'colspan' => $colspan,
    ),
  );
}