Hi,
You can't do that, it's just possible to limit users to specifics calendars.
Two things to solve that problem :
1 : You create one calendar for each user (it's the good one if you don't have two hundreds users ^^)
2 : You can decide to not display lines created by the others users with a label callback
(See : https://contao.org/en/manual/3.0/dat...isting-records )
You can do a function like this (it's a bit dirty, but it works...)
PHP Code:
public function listEventsUser($arrRow) {
if($arrRow['author'] != $this->User->id) {
return '<div id="row_'.$arrRow['id'].'"></div><script type="text/javascript">document.getElementById("row_'.$arrRow['id'].'").parentNode.parentNode.remove();</script>';
} else {
return $this->listEvents($arrRow);
}
If I use this, it's to delete all the line of the table in the HTML, because if you return nothing, you'll have the buttons of the line.
You just need to create a module who extends tl_calendar_events to do that, and change the child_record_callback function in the DCa of the extended module.
But if someone knows a better way to do this, i'll be happy to know how :-)
Bookmarks