Results 1 to 2 of 2

Thread: Help with hiding subpanels

  1. #1
    stevec is offline Sugar Community Member
    Join Date
    Oct 2005
    Location
    London
    Posts
    1,101

    Default Help with hiding subpanels

    Hi,

    I created a new subpanel under Accounts by editing modules/Accounts/layout_defs.php. Basically, I copied the history cubpanel - renaming it archived emails. Then I removed emails from the original history subpanel - and placed emails only in the new subpanel.

    Did some associated changes to labels and it all works fine.

    However, if a user hides the emails tab, then an error is generated when it tried to draw the new subpanel:

    "Error running count query for Account List: Query Failed:::MySQL error 1065: Query was empty"

    I'm guessing that this is falling over because there's no data coming back. To prove it, if I add meetings into the new subpanel, it will display OK - even with email still restricted to that user.

    I'm guessing again that 'fixing' the way the queries are generated will be too involved and is more of a mod to accomplish what I'm doing anyway, but what I was wondering is if there is a way to hide this new subpanel if emails are disabled. I mean, if you disable cases, or leads etc, then the cases and leads subpanels are hidden automatically. Is there a way to links this new subpanel to the emails module in a way so that when emails are disabled for a user, then the subpanel is excluded too?

    Thanks

  2. #2
    stevec is offline Sugar Community Member
    Join Date
    Oct 2005
    Location
    London
    Posts
    1,101

    Default Re: Help with hiding subpanels

    It's OK - solved it myself - as I had copied the new subpanel definition in the layout_defs.php file from the original history subpanel definition, it was still referred to 'History' in the module element. Just changing that to 'Emails' fixed it - making it dependent upon that module's 'visibility'.
    Last edited by stevec; 2006-07-14 at 12:10 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •