When the view format is set to "unformatted list", there doesn't appear to be any way to hide the "Select all items on this page" checkbox.

Unfortunately, there's no CSS work around as the view generates the markup as below which prevents one from easily hiding the div containing this checkbox:

<div class="vbo-select-all-markup" style="display: block; ">

(No, this issue is _NOT_ a duplicate of #1180432: No option to hide "Select All Items" Checkboxes, as that one is about the "Select all items on all pages" checkbox, but this issue is about the "Select all items on this page" checkbox.)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Boobaa’s picture

The culprit is theme_views_bulk_operations_select_all() which builds the form with this checkbox and renders it immediately, without the possibility to properly form_alter or pre_render it.

Boobaa’s picture

Here's a patch introduces a checkbox on the Views UI for this, enabled by default.

Boobaa’s picture

Status: Active » Needs review

Doh, needs review.

sabsbrain’s picture

Patch in #2 works fine for me.

Many thanks!

Garrett Albright’s picture

Version: 7.x-3.1 » 7.x-3.x-dev
Status: Needs review » Reviewed & tested by the community

#2 works for me too. Let's get it in the module, please - that stupid check box was driving me nuts.

skadu’s picture

This worked great, thanks guys!

bojanz’s picture

Status: Reviewed & tested by the community » Needs review

Why not add a display:none to fieldset.vbo-fieldset-select-all? That's the element right below .vbo-select-all-markup.
There's also the option of overriding the theme function (theme_views_bulk_operations_select_all, but I don't yet see why a CSS fix isn't possible.

Removing the "Select all items on this page" checkbox feels very edge case-y, not sure it
is worth yet another checkbox in the settings, and the now very ugly logic in theme_views_bulk_operations_select_all().

bojanz’s picture

Status: Needs review » Postponed (maintainer needs more info)
bojanz’s picture

Category: Bug report » Support request
Status: Postponed (maintainer needs more info) » Fixed

No reply given.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

Paul B’s picture

Status: Closed (fixed) » Active

I like the ability to control both the checkboxes in one place. I don't think adding a display:none is a good alternative.

Paul B’s picture

Re-roll.

lukedekker’s picture

Status: Active » Needs work

Patch from #12 is not working for me.

The checkbox appears, but when it is unchecked, the select all box is still there. (Both the select all check boxes are unchecked.)

cassio’s picture

if we look at the verbose output of the patch command on #2 as run by Patch Manager: (it almost is successful) (this was for #2)
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/views/views_bulk_operations_handler_field_operations.inc b/views/views_bulk_operations_handler_field_operations.inc
|index 8ca20e0..c3b19db 100644
|--- a/views/views_bulk_operations_handler_field_operations.inc
|+++ b/views/views_bulk_operations_handler_field_operations.inc
--------------------------
patching file views/views_bulk_operations_handler_field_operations.inc
Using Plan A...
Hunk #1 FAILED at 55.
Hunk #2 succeeded at 135 with fuzz 2 (offset 26 lines).
1 out of 2 hunks FAILED -- saving rejects to file views/views_bulk_operations_handler_field_operations.inc.rej
Hmm... The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/views_bulk_operations.module b/views_bulk_operations.module
|index d19db5c..a8c1d8a 100644
|--- a/views_bulk_operations.module
|+++ b/views_bulk_operations.module
--------------------------
patching file views_bulk_operations.module
Using Plan A...
Hunk #1 succeeded at 109.
Hunk #2 succeeded at 380 (offset 5 lines).
Hunk #3 FAILED at 396.
Hunk #4 succeeded at 527 (offset 12 lines).
1 out of 4 hunks FAILED -- saving rejects to file views_bulk_operations.module.rej
done
Performed Apply patch on 1 item.

Is this as expected? if not what is hunk # 3?

cassio’s picture

also is this a regression over a past version of vbo?

cassio’s picture

I am now wondering if I have to be on dev branch... so will look at that.

joelpittet’s picture

Category: Support request » Feature request

All patches should be against the dev branch.

This patch still applies, not sure if it's a that useful as a feature so I'll just leave this open until we get some +1's

jplana’s picture

I rerolled the patch #2 for the latest dev branch.

joelpittet’s picture

Status: Needs work » Reviewed & tested by the community

Seems people are still interested in this, I'll commit it.

  • joelpittet committed f67e849 on 7.x-3.x authored by Boobaa
    Issue #2172551 by Boobaa, Paul B, jplana: No option to hide "Select all...
joelpittet’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for your work on this, I've committed it to the dev branch.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.