Package org.eurekastreams.web.client.ui.common

Examples of org.eurekastreams.web.client.ui.common.PersonPanel


    public void showSelectedPerson(final PersonModelView personModelView)
    {
        personContainer.clear();
        if (personModelView != null)
        {
            personContainer.add(new PersonPanel(personModelView, false, false, false, true));
        }
    }
View Full Code Here


    /**
     * {@inheritDoc}
     */
    public Panel render(final PersonModelView item)
    {
        PersonPanel panel = new PersonPanel(item, false, false, false);

        boolean currentUserIsAdmin = Session.getInstance().getCurrentPersonRoles().contains(Role.SYSTEM_ADMIN);

        boolean currentUserIsGroupCoordinator = isGroupCoordinator(Session.getInstance().getCurrentPerson());

        // conditions by which a person should show up as 'Remove'-able:
        // cannot delete himself AND private group AND (current user is ADMIN or GROUP COORD)
        if ((Session.getInstance().getCurrentPerson().getId() != item.getEntityId())
                && (currentUserIsAdmin || currentUserIsGroupCoordinator) && (!group.isPublic()))
        {
            boolean toBeRemovedFollowerIsGroupCoordinator = isGroupCoordinator(item);

            int numberOfGroupCoordinators = group.getCoordinators().size();

            // Cannot remove Group Coordinator if he/she is the last Group Coordinator.
            if (toBeRemovedFollowerIsGroupCoordinator && (numberOfGroupCoordinators == 1))
            {
                // short-circuit as this Person is non-removable
                return panel;
            }

            panel.addStyleName(StaticResourceBundle.INSTANCE.coreCss().removablePerson());

            Label deleteLink = new Label("Remove");
            deleteLink.addStyleName(StaticResourceBundle.INSTANCE.coreCss().linkedLabel());
            deleteLink.addStyleName(StaticResourceBundle.INSTANCE.coreCss().delete());
            panel.add(deleteLink);

            deleteLink.addClickHandler(new ClickHandler()
            {
                public void onClick(final ClickEvent inArg0)
                {
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public Panel render(final PersonModelView item)
    {
        return new PersonPanel(item, false, showDescription, false);
    }
View Full Code Here

        final Label denyButton = new Label("Deny");
        denyButton.addStyleName(StaticResourceBundle.INSTANCE.coreCss().denyButton());
        buttonsPanel.add(denyButton);

        // person panel (right side)
        panel.add(new PersonPanel(item, false, true));
        panel.add(buttonsPanel);

        // -- wire events --

        approveButton.addClickHandler(new ClickHandler()
View Full Code Here

            personContainer.addStyleName(StaticResourceBundle.INSTANCE.coreCss().personContainer());

            EditPanel editPanel = new EditPanel(personContainer, Mode.DELETE);
            personContainer.add(editPanel);

            final PersonPanel personPanel = new PersonPanel(inPerson, false, false, false, true);

            personContainer.add(personPanel);
            persons.add(inPerson);
            resultPanel.add(personContainer);
View Full Code Here

            personContainer.addStyleName(StaticResourceBundle.INSTANCE.coreCss().personContainer());

            EditPanel editPanel = new EditPanel(personContainer, Mode.DELETE);
            personContainer.add(editPanel);

            final PersonPanel personPanel = new PersonPanel(inPerson, false, false, false, true);

            personContainer.add(personPanel);
            persons.add(inPerson);
            resultPanel.add(personContainer);
View Full Code Here

TOP

Related Classes of org.eurekastreams.web.client.ui.common.PersonPanel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.