Jump to content

Achievo/Howto/Menu/Tabs/hide a tab

From NusaATK
Revision as of 00:21, 21 January 2011 by Klaaspeter (talk | contribs) (Created page with '{{Achievo_Howto|Easy|Klaaspeter }} Sometimes you have tabs that only some members may see and edit. Some other members may not edit and also not see that tab. For example in pro…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Achievo Howto: Achievo/Howto/Menu/Tabs/hide a tab

Complexity: Easy
Author: Klaaspeter

List of other Howto's


Sometimes you have tabs that only some members may see and edit. Some other members may not edit and also not see that tab. For example in projects the planning tab. In this howto I will explain how you will do this.

First open the file: class.project.inc

Go to line 87. This is the code you need to see.

$this->add(new atkOneToManyRelation("members","project.project_personemployee",
 "projectid", AF_HIDE_LIST|AF_CASCADE_DELETE), "planning");


Now you have find the code, replace that with:

$this->add(new atkOneToManyRelation("members","project.project_personemployee", 
"projectid", AF_HIDE_LIST|AF_HIDE_VIEW|AF_CASCADE_DELETE), "planning");

It is the part |AF_HIDE_VIEW| that hides it from the members and shows it only to the security profiles that have Edit rights.

Notes

Important: If you give all the users rights to edit they can all see the tab!