| View previous topic :: View next topic |
| Author |
Message |
flubadub
Joined: 14 Mar 2008 Posts: 13
|
Posted: Thu Jun 19, 2008 9:24 pm Post subject: Display fields based on user |
|
|
| I need to add 2 fields to my events, one describes room setup and is instructions to the custodian and another is for internal information about an event such as billing. We don't want either of these fields visible to the general public and the internal information to anybody other then a designated administrator. Is there any way I can have the event with 2 additional fields with limited visibility. |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5160
|
Posted: Fri Jun 20, 2008 2:36 am Post subject: |
|
|
Hi,
You can do this by adding if() statements in the event view template. Not sure if you've already read this.
For instance if you only wanted to display a custom field called "price" to admins, you would do this:
| Code: |
if($_cal_user->admin)
$_cal_tmpl->section_row("Price", $_cal_event->price); |
Let me know if you have any questions / trouble. |
|
| Back to top |
|
 |
flubadub
Joined: 14 Mar 2008 Posts: 13
|
Posted: Sun Jun 29, 2008 1:59 pm Post subject: |
|
|
| I am almost there, I have created a group which I want to give access to either update or view a field. The example you gave only works for specific users. |
|
| Back to top |
|
 |
flubadub
Joined: 14 Mar 2008 Posts: 13
|
Posted: Thu Jul 03, 2008 10:20 pm Post subject: Access by Group |
|
|
| flubadub wrote: |
| I am almost there, I have created a group which I want to give access to either update or view a field. The example you gave only works for specific users. |
I want to display a field based on group, How do I specify the group. |
|
| Back to top |
|
 |
flubadub
Joined: 14 Mar 2008 Posts: 13
|
Posted: Mon Jul 14, 2008 1:48 pm Post subject: Re: Access by Group |
|
|
| flubadub wrote: |
| flubadub wrote: |
| I am almost there, I have created a group which I want to give access to either update or view a field. The example you gave only works for specific users. |
I want to display a field based on group, How do I specify the group. |
I still need some help. I have created a group called Manager which has 4 users. is there anything in the object model I can use to say let members of the group manager have access to these fields.
In your example you list $_cal_users->admin. I need to specify a user part of a group.
Help please |
|
| Back to top |
|
 |
|