Would it be possible to add a remember filters checkbox or something similar to admin/build/views?

We're starting to get a lot of views for different purposes, using tags to organized them, but any time you start a admin/build/views navigation, the filters are lost, you have to choose them again and again. :(

Comments

merlinofchaos’s picture

I agree, I've really wanted to do some more ajaxy smart stuff with this one, but it hasn't been a high priority.

markus_petrux’s picture

Sweet. :) I could try to roll a patch, in a similar fashion than the one used to remind filters in views. Do you have any suggestion on how it should be done?

markus_petrux’s picture

hmm... but it would also be nice to have a "Reset" button. Here and in the filter section of normal views. Agree?

merlinofchaos’s picture

Yes, with remembering a reset button would be necessary.

markus_petrux’s picture

Great. I just checked out from HEAD and I'll try to work this out. Probably first a "Reset" button for the filter section of normal views, and then the whole thing for the views administration section. :)

markus_petrux’s picture

Status: Active » Needs review
StatusFileSize
new1.47 KB

Well, here's a quick and simple patch that adds a "Reset" button to the views administration list. It is displayed only when there are filters already saved in user session data. Filters are stored in $_SESSION['views_admin'], and that is used to rebuild the $_GET structure when the form is being processed.

Please, Earl let me know it it covers what you expected.

The patch is against HEAD.

markus_petrux’s picture

StatusFileSize
new1.44 KB

An alternative version of the same thing. It uses += operator to merge session data with $_GET and session data is stored in $_SESSION['views']['#admin'] rather than $_SESSION['views_admin'] (reduces potential namespace conflicts).

markus_petrux’s picture

Just wanted to mention that I've been trying to add a "Reset" button to the filter section of normal views and... no success, it's much more complex than what I expected because there's a dependency on just one submit button on several places. So I decided to not work on that, at least for the moment. That was not on my initial request anyway.

So the patch above just adds the ability to remind filters in views administration, and so it provides a "Reset" button there. Nothing more, nothing less, for the moment.

merlinofchaos’s picture

Status: Needs review » Fixed

I love this, Markus! Thanks! Committed!

Status: Fixed » Closed (fixed)

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