ploneintranet.userprofile.browser package

Submodules

ploneintranet.userprofile.browser.userprofile module

class ploneintranet.userprofile.browser.userprofile.AuthorView(context, request)

Bases: Products.CMFPlone.browser.author.AuthorView

Overrides default author view to link to PI profiles

class ploneintranet.userprofile.browser.userprofile.AvatarsView(context, request)

Bases: Products.Five.browser.BrowserView

Helper view to render a user’s avatar image

This view is designed to mimic Plone’s default portrait setup. Where portraits are accessed via: /plone/portal_memberdata/portraits/userid this can be replaced with: /plone/@@avatars/userid

This allows you to easily link to an avatar without first looking up the user profile object.

publishTraverse(request, name)
class ploneintranet.userprofile.browser.userprofile.MyAvatar(context, request)

Bases: Products.Five.browser.BrowserView

Helper view to render a user’s avatar image

This view is designed to be used on the end of a user profile URL, e.g. in search results or listings

/path/to/profile/avatar.jpg

avatar_profile()
class ploneintranet.userprofile.browser.userprofile.MyProfileView(context, request)

Bases: Products.Five.browser.BrowserView

Helper view to redirect to current user’s profile page

class ploneintranet.userprofile.browser.userprofile.UserProfileTabView(context, request)

Bases: ploneintranet.userprofile.browser.userprofile.UserProfileView

Personalize the userprofile tab view class to not be transformed by diazo if we have an ajax call

class ploneintranet.userprofile.browser.userprofile.UserProfileView(context, request)

Bases: ploneintranet.userprofile.browser.forms.UserProfileViewForm

View for user profile.

_default_tabs = (u'userprofile-view', u'userprofile-info', u'userprofile-followers', u'userprofile-following', u'userprofile-documents', u'userprofile-workspaces')
_get_my_groups_and_workspaces()

Find all the groups and all the workspaces the user is a member of. Since workspaces can also act as groups, only count those items as groups which are not also a workspace.

_update_recent_contacts()

Update, if needed, the list of the last twenty profiles that we have visited

_user_details(userids)

Basic user details for the given userids

allowed_tabs

Filter out some tabs according to the registry configuration

ancestorspasuids

Return the PAS graph uids of the ancestors this user has

can_edit()

Check current user permissions to edit this object

default_tab

Check if the navigation should be displayed

disable_diazo()

Disable diazo if this is an ajax call

display_change_personal_image

if portrait is not listed in read_only_fields we do not display the form to change it

display_followers

Check if we should display the followers informations

display_following

Check if we should display the following informations

The more information link does not make sense if the only tab available is the userprofile-info or if userprofile-info is not between the allowed tabs

display_tabs

Check if the navigation should be displayed

fields_for_display()
followers()

Users who are following this profile

following()

Users this profile is following

group_container
group_ids
grouppasuids

Return the PAS graph uids of the groups this user is member of

is_ajax(*args, **kwargs)

Check if we have an ajax call

is_me()

Does this user profile belong to the current user

my_groups

Return the attribute _my_groups, if needed invoke the function _get_my_groups_and_workspaces to set it

my_workspaces

Return the attribute _my_groups, if needed invoke the function _get_my_groups_and_workspaces to set it

num_groups

Return the number of groups this user is member of

num_workspaces

Return the number of workspaces this user is member of

pas_view
portal
update()
user_search_placeholder(*args, **kwargs)
workspace_container
workspace_container_view
workspacepasuids

Return the PAS graph uids of the workspaces this user is member of

ploneintranet.userprofile.browser.userprofile.default_avatar(response)

Return the contents of a default profile image

ploneintranet.userprofile.browser.userprofile.stream_avatar_data(profile, size, request)

Generate avatar at the specified size and stream it

This is a utility method used by the browser views below.

Module contents