Show all records as default

Discussion in 'Troubleshooting' started by edward_shephard, Dec 28, 2016.

Thread Status:
Not open for further replies.
  1. edward_shephard

    edward_shephard aMember Pro Customer

    Joined:
    Aug 22, 2014
    Messages:
    41
    When viewing the Payments/Access screen for an individual user there is a option to 'switch show all records' as opposed to only active records. Is there any way to make 'all records' the default view please?
  2. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    2,295
    Hello Edward,

    It is possible to do but require small customization. You can put the following code to file site.php
    to accomplish desired changes:
    PHP:
    Am_Di::getInstance()->blocks->add(new Am_Block('admin/user-invoices/bottom'null'toggle-access-view'null,
        function(
    Am_View $v) {
            return <<<CUT
    <script type="text/javascript">
        jQuery(function($){
            jQuery(function($){
                $(".user-access-title a:visible").click();
            });
        });
    </script>
    CUT;
        }));
    This approach is upgrade proof.

    Reference:
    http://www.amember.com/docs/Site.php_file
    http://www.amember.com/docs/API/Di
    http://www.amember.com/docs/How_to_add/remove_html_blocks_in_member's_area
    edward_shephard likes this.
  3. edward_shephard

    edward_shephard aMember Pro Customer

    Joined:
    Aug 22, 2014
    Messages:
    41
    Super thanks I'll give it a try.
  4. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    2,295
    You are welcome! I hope it will work for you.
  5. edward_shephard

    edward_shephard aMember Pro Customer

    Joined:
    Aug 22, 2014
    Messages:
    41
    Works perfectly thank you.
    caesar likes this.
Thread Status:
Not open for further replies.

Share This Page