Hi Jeremy,

Is it possible to hide the support menu bar (all, all open, my open, etc) and the table heading (Id, Ticket, Updated, etc) if there are no records for that user?

My use-case is that I'd like users to be able to view the support page for a specific client, even if they are anonymous users. Ofcourse, they cannot actually "Post new support ticket" until they have logged in or created an account - I have a block for anonymous users on this page that tells them this. But, if they are anonymous, or indeed if they are authorised but dont have any tickets at all, then there is no point in seeing the menu bar or table headings.

I had originally thought that this should be permission based (i.e. only certain roles can view the menu bar), but I think that my suggestion above is probably easier to implement.

Comments

jeremy’s picture

These menu items are generated with Drupal's menu system. Permissions for these menu items is defined in the function support_access_clients() in the support.module. Currently the function simply checks if a user access to the client's tickets, and if so then all the menu items are displayed. I suppose this function could be enhanced to only show menu items when there are actually tickets under them.

I don't need this myself so it's not a high priority for me, but I will look into implementing this if I get a chance. I provided the above info in case anyone else is interested in providing a patch before I get to it...

JonoB’s picture

Hi Jeremey,

Thanks for the response.

I'd like to know if anyone else has a more elegant solution than mine - i.e. how to let anonymous users know that they can post a support ticket, but they have to be logged in in order to do it.

purencool’s picture

Issue summary: View changes
Status: Active » Closed (outdated)