Posted: October 31, 2016 at 11:07 am
|
1- When adding a new Event I wish to show only the people added by the user adding the event in the right hand box labeled “Assign staff”. Now it shows up the full list containing all people added by different users. 2- I also need to translate word “staff” in “Assign staff”, no single word like this appears in the .po file and adding a line ‘%s staff’ => ‘Experto/s %s’ to my customization plugin does not work either. |
|
Please, any update on this? |
Hi there, Currently it doesn’t look like there’s a way to filter that list. However, you can remove the following capabilities from a user role and they will not be able to edit or delete people posts that were made by other user accounts: ee_delete_others_peoples RE: 2-, the actual string is |
|
|
I have a similar need and created a temporary solution to #1, but the template for that section isn’t in the /public/templates folder in the People Add-on. That means I can’t drop the file into a child theme’s root folder and have it take effect. Or I’m missing something obvious? Perhaps staff could help out with how to make that work? Having to edit instead of override a file means this change will be reversed when the People Add-on is updated (and, well, always keep things updated). |
|
Also: This fixes the quirk where all people are listed for every type. I don’t have a repo to pull request to for this. |
@AMTA Admin May I ask do you have a github account and if so what’s the username? We can give you access to the People add-on repository. |
|
|
It’s here: https://github.com/KinnaT |
Just to note it IS possible to load this template from within your themes directory. Most templates use the function This is one of those template, but we include a filter that allows you to filter these. Something like this: https://gist.github.com/Pebblo/4703f274437ac01b00ef093caa8646f5 Will allow you to load that template from your theme, you can use it for others just add additional checks for the template name and replace |
|
|
Aha! Thank you! I knew I was missing something. If I’m adding additional checks, couldn’t it still read as:
|
Sure that will work. You can also create an array of templates and use I should also mention those filters are aimed at developers (which is why I mentioned them here), the reason we use display_template() is usually because editing the templates using it could cause problems if you don’t know what your doing. We don’t provide support for broken templates caused by using them, although we will try to point you in the right direction if we can. |
|
|
@Tony None of these capabilities if disabled: ee_delete_others_peoples will have effect on showing ONLY the people added by a user when creating a new event. @AMTA Admin Your code seemed to work as it removed those people not added by user. However, if user adds new people, these won’t appear on the “Assign %s” box. |
|
@AMTA Admin Plus user with Admin permission won’t see all people in the website, but just the people added by him/her. |
|
Are the new people assigned at least one type? The only way I can replicate this is if I don’t select any type for a person. Because the metaboxes are separated out by type, at least one type must be assigned for a person to appear in the event editor. Bypassing the filtering for user on an admin account wasn’t a consideration I made, as I currently have 33 people across 6 types and I really hate scrolling. However, since you seem to have a use case for it, here’s a version that checks for admin capabilities |
|
Yes, now it works like a charm. Users can only assign to an event people they have added themselves, while admin can assign any people added in the site. Nice work! |
The support post ‘Show Only People Added by User when Adding New Event’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.