Achievo/Howto/Menu/Tabs/hide a tab: Difference between revisions
Appearance
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…' |
Klaaspeter (talk | contribs) No edit summary |
||
| Line 21: | Line 21: | ||
'''Important''': If you give all the users rights to edit they can all see the tab! | '''Important''': If you give all the users rights to edit they can all see the tab! | ||
[http://forum.achievo.org/viewtopic.php?f=4&t=20207 See forum] | |||
Revision as of 00:24, 21 January 2011
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!
