pods-framework / pods

The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.
https://pods.io/
GNU General Public License v2.0
1.07k stars 264 forks source link

ui filter persistence #1458

Open mpatek opened 11 years ago

mpatek commented 11 years ago

Hi,

I'm trying to persist filtering selections in the manage ui view, but the options don't seem to persist. Here's a sample of how I'm trying to set up the ui:

    $manage_fields = array(
        'slug', 'description', 'urgency', 'assignees', 'due_date', 'status',
    );
    $filter_fields = array(
        'status', 'due_date', 'publish_date', 'assignees',
    );
    $ui_params = array(
        'fields' => array(
            'manage' => $manage_fields,
        ),
        'filters' => $filter_fields,
        'session' => array(
            'search',
            'filters',
            'show_per_page',
            'orderby',
        ),
    );
    $pod = pods(VocativAssignmentDesk::ASSIGNMENT_POD);
    $pod->ui = $ui_params;
    pods_ui($pod);

I'd appreciate any help. Thanks!

sc0ttkclark commented 11 years ago

This is indeed not working right now. A bit of reworking will be needed to get it up and going again.

mpatek commented 11 years ago

Do you know what needs to be done to fix this? I might be able to help out with this.

sc0ttkclark commented 11 years ago

The feature was brought over from Pods 1.x and the Pods UI code, but this one was never fully finished, it only sets the variables and doesn't do the getting of them to override the current options if the corresponding $_GET isn't set.

So if you wanted, you could do that.

sc0ttkclark commented 11 years ago

It also needs to 'reset' when the Reset filters link is clicked, effectively deleting the saved options for the user/session.

JoryHogeveen commented 4 years ago

@sc0ttkclark Isn't PodsUI going to get a makeover in the near future? Close this?