Talk
suitable for
Audience
Details
```
Similar to the field `room`, the problem now appears that speakers submitting their talks should not be able to set a time and day for their talks.
Sadly it is not easy to modify permissions of fields provided by behaviors (unless you write the behavior yourself).
At least in this case we can take the easy way out since the field does not contain secret information: we will simply hide the fields from contributors using css and show them for reviewers. We will do so in chapter {ref}`plone5-resources-label` when we add some CSS files.
Modify {file}`browser/static/ploneconf.css` and add:
```css
body.userrole-contributor #formfield-form-widgets-IEventBasic-start,
body.userrole-contributor #formfield-form-widgets-IEventBasic-end > *,
body.userrole-contributor #formfield-form-widgets-IEventBasic-whole_day,
body.userrole-contributor #formfield-form-widgets-IEventBasic-open_end {
display: none;
}
body.userrole-reviewer #formfield-form-widgets-IEventBasic-start,
body.userrole-reviewer #formfield-form-widgets-IEventBasic-end > *,
body.userrole-reviewer #formfield-form-widgets-IEventBasic-whole_day,
body.userrole-reviewer #formfield-form-widgets-IEventBasic-open_end {
display: block;
}
```
You can now display the start date of a talk in the talklist.
Modify the class {py:class}`TalkListView` and the template {file}`browser/templates/talklistview.pt` to show the new info:
```{code-block} python
:emphasize-lines: 17
:linenos:
class TalkListView(BrowserView):
""" A list of talks
"""
def talks(self):
results = []
brains = api.content.find(context=self.context, portal_type='talk')
for brain in brains:
results.append({
'title': brain.Title,
'description': brain.Description,
'url': brain.getURL(),
'audience': ', '.join(brain.audience or []),
'type_of_talk': brain.type_of_talk,
'speaker': brain.speaker,
'room': brain.room,
'start': brain.start,
})
return results
```
```{code-block} html
:emphasize-lines: 5-9
:linenos:
[...]