Package org.dspace.app.xmlui.wing.element

Examples of org.dspace.app.xmlui.wing.element.List


         */
        options.addList("browse");
        options.addList("account");
        options.addList("context");
        options.addList("administrative");
        List statistics = options.addList("statistics");

        DSpaceObject dso = HandleUtil.obtainHandle(objectModel);
        boolean displayUsageStats = displayStatsType(context, dso);

        if (dso != null && dso.getHandle() != null) {
            if (dso.getType() == Constants.ITEM) {
                if (displayUsageStats) {
                    statistics.setHead(T_statistics_head);
                    statistics.addItemXref(contextPath + "/handle/" + dso.getHandle() + "/google-stats", T_statistics_view);
                }
            }
        }

    }
View Full Code Here


    Division login = body.addInteractiveDivision("login", contextPath
        + "/ldap-login", Division.METHOD_POST, "primary");
    login.setHead(T_head1);

    List list = login.addList("ldap-login", List.TYPE_FORM);

    Text email = list.addItem().addText("username");
    email.setRequired();
        email.setAutofocus("autofocus");
    email.setLabel(T_userName);
    if (previousUserName != null) {
      email.setValue(previousUserName);
      email.addError(T_error_bad_login);
    }

    Item item = list.addItem();
    Password password = item.addPassword("ldap_password");
    password.setRequired();
    password.setLabel(T_password);

    list.addLabel();
    Item submit = list.addItem("login-in", null);
    submit.addButton("submit").setValue(T_submit);

  }
View Full Code Here

           
            div.addHidden("showfull").setValue("true");
        }
       

        List form = div.addList("reject-workflow",List.TYPE_FORM);
       
        form.addItem(T_info1);
       
        TextArea reason = form.addItem().addTextArea("reason");
        reason.setLabel(T_reason);
        reason.setRequired();
        reason.setSize(15, 50);
        if (this.errorFields.contains("reason"))
        {
            reason.addError(T_reason_required);
        }
     
        org.dspace.app.xmlui.wing.element.Item actions = form.addItem();
        actions.addButton("submit_reject").setValue(T_submit_reject);
        actions.addButton("submit_cancel").setValue(T_submit_cancel);
       
        div.addHidden("submission-continue").setValue(knot.getId());
View Full Code Here

    {
      /* Create skeleton menu structure to ensure consistent order between aspects,
       * even if they are never used
       */
        options.addList("browse");
        List account = options.addList("account");
        options.addList("context");
        options.addList("administrative");
       
        account.setHead(T_my_account);
        EPerson eperson = this.context.getCurrentUser();
        if (eperson != null)
        {
            String fullName = eperson.getFullName();
            account.addItemXref(contextPath+"/logout",T_logout);
            account.addItemXref(contextPath+"/profile",T_profile.parameterize(fullName));
        }
        else
        {
            account.addItemXref(contextPath+"/login",T_login);
            if (ConfigurationManager.getBooleanProperty("xmlui.user.registration", true))
            {
                account.addItemXref(contextPath + "/register", T_register);
            }
        }
    }
View Full Code Here

   
  
    public void addOptions(Options options) throws SAXException, WingException,
            UIException, SQLException, IOException, AuthorizeException
    {
        List test = options.addList("XMLTest");
        test.setHead("XML Test");
       
        test.addItemXref(contextPath + "/xmltest/structural","Structural");
        test.addItemXref(contextPath + "/xmltest/HTML","HTML");
        List form = test.addList("FormTest");
        form.setHead("Forms");
        form.addItemXref(contextPath + "/xmltest/form/basic","Basic");
        form.addItemXref(contextPath + "/xmltest/form/inline","In line");
        form.addItemXref(contextPath + "/xmltest/form/advanced","Advanced");
    }
View Full Code Here

    Division loginChooser = body.addDivision("login-chooser");
    loginChooser.setHead(T_head1);
    loginChooser.addPara().addContent(T_para1);

    List list = loginChooser.addList("login-options", List.TYPE_SIMPLE);

    while (authMethods.hasNext()) {
      final AuthenticationMethod authMethod = (AuthenticationMethod) authMethods
          .next();

            HttpServletRequest hreq = (HttpServletRequest) this.objectModel
                    .get(HttpEnvironment.HTTP_REQUEST_OBJECT);

            HttpServletResponse hresp = (HttpServletResponse) this.objectModel
                    .get(HttpEnvironment.HTTP_RESPONSE_OBJECT);
           
            String loginURL = authMethod.loginPageURL(context, hreq, hresp);

            String authTitle = authMethod.loginPageTitle(context);

            if (loginURL != null && authTitle != null)
            {

                if (ConfigurationManager.getBooleanProperty("xmlui.force.ssl")
                        && !request.isSecure())
                {
                    StringBuffer location = new StringBuffer("https://");
                    location
                            .append(
                                    ConfigurationManager
                                            .getProperty("dspace.hostname"))
                            .append(loginURL).append(
                                    request.getQueryString() == null ? ""
                                            : ("?" + request.getQueryString()));
                    loginURL = location.toString();
                }

                final Item item = list.addItem();
                item.addXref(loginURL, message(authTitle));
            }

    }
  }
View Full Code Here

        /////////////////////////////////////
        // List test
        Division listT = test.addDivision("list");
        listT.setHead("2) List Tests");
       
        List list = listT.addList("simple");
        list.setHead("Simple list");
        list.addItem("one");
        list.addItem("two");
        list.addItem("three");
   
        list = listT.addList("labeled");
        list.setHead("Simple list ( with labels )");
        list.addLabel("uno");
        list.addItem("one");
        list.addLabel("dos");
        list.addItem("two");
        list.addLabel("threes");
        list.addItem("three");
       
        list = listT.addList("bulleted",List.TYPE_BULLETED);
        list.setHead("Bulleted list");
        list.addItem("one");
        list.addItem("two");
        list.addItem("three");
       
        list = listT.addList("ordered",List.TYPE_ORDERED);
        list.setHead("Ordered list");
        list.addItem("one");
        list.addItem("two");
        list.addItem("three");
       
        list = listT.addList("glossary",List.TYPE_GLOSS);
        list.setHead("Glossary list");
        list.addLabel("uno");
        list.addItem("one");
        list.addLabel("dos");
        list.addItem("two");
        list.addLabel("tres");
        list.addItem("three");
       
        // Nests
       
        list = listT.addList("simple-nest");
        list.setHead("Simple list ( nested )");
        list.addItem("one");
        list.addItem("two");
        List nest = list.addList("nest1");
        nest.setHead("Sub list point three");
        nest.addItem("three point one");
        nest.addItem("three point two");
        nest.addItem("three point three");
        list.addItem("four");
       
        list = listT.addList("labeled-nest");
        list.setHead("Simple list ( with labels and nested )");
        list.addLabel("uno");
        list.addItem("one");
        list.addLabel("dos");
        list.addItem("two");
        nest = list.addList("nest2");
        nest.addLabel("dos punto uno");
        nest.addItem("two point one");
        nest.addLabel("dos punto dos");
        nest.addItem("two point two");
        nest.addLabel("dos punto tres");
        nest.addItem("two point three");
        list.addLabel("threes");
        list.addItem("three");
       
        list = listT.addList("bulleted-nest",List.TYPE_BULLETED);
        list.setHead("Bulleted list ( nested )");
        list.addItem("one");
        list.addItem("two");
        nest = list.addList("nest3");
        nest.addItem("three point one");
        nest.addItem("three point two");
        nest.addItem("three point three");
        list.addItem("four");
       
        list = listT.addList("ordered-nest",List.TYPE_ORDERED);
        list.setHead("Ordered list ( nested )");
        list.addItem("one");
        list.addItem("two");
        nest = list.addList("nest4");
        nest.setHead("Sub list point three");
        nest.addItem("three point one");
        nest.addItem("three point two");
        nest.addItem("three point three");
        list.addItem("four");
       
        list = listT.addList("glossary-nest",List.TYPE_GLOSS);
        list.setHead("Glossary list ( nested )");
        list.addLabel("uno");
        list.addItem("one");
        list.addLabel("dos");
        list.addItem("two");
        nest = list.addList("nest5");
        nest.addLabel("dos punto uno");
        nest.addItem("two point one");
        nest.addLabel("dos punto dos");
        nest.addItem("two point two");
        nest.addLabel("dos punto tres");
        nest.addItem("two point three");
        list.addLabel("tres");
        list.addItem("three");
       
        ///////////////////////////////////////////////////
        // Table test
View Full Code Here

    
        div.setHead("HTML Test");
       
        div.addPara("This page tests Manakin's ability to handle HTML fragments, this ability is normally used to handle user-inputed text. There are two reasons for using this ability of including user supplied HTML fragments 1) it doesn't break the abstraction between themes and aspects, 2) it provides a safety mechanism preventing security vulnerabilities such as cross site scripting.");
       
        List form = div.addList("html-test",List.TYPE_FORM);
        TextArea fragmentField = form.addItem().addTextArea("fragment");
        fragmentField.setLabel("Fragment");
        fragmentField.setHelp("Enter free formed text, you may use <p>,<a>,<b>,<i>, or <img> tags.");
        fragmentField.setSize(15, 50);
        fragmentField.setValue(fragment);
       
        CheckBox optionsField = form.addItem().addCheckBox("options");
        optionsField.setLabel("Options");
        optionsField.addOption("blankLines", "Treat blank lines as paragraph breaks.");
        if (blankLines)
        {
            optionsField.setOptionSelected("blankLines");
        }
       
       
        Button submit = form.addItem().addButton("submit");
        submit.setValue("Test HTML Rendering");
       
        Division test = div.addDivision("html-test-sample");
        test.setHead("Rendered Sample");
       
View Full Code Here

    {
      /* Create skeleton menu structure to ensure consistent order between aspects,
       * even if they are never used
       */
        options.addList("browse");
        List account = options.addList("account");
        List context = options.addList("context");
        List admin = options.addList("administrative");
        account.setHead(T_my_account);         
       
        // My Account options
        if(availableExports!=null && availableExports.size()>0){
            account.addItem().addXref(contextPath+"/admin/export", T_account_export);
        }

        //Check if a system administrator
        boolean isSystemAdmin = AuthorizeManager.isAdmin(this.context);

        // Context Administrative options
        DSpaceObject dso = HandleUtil.obtainHandle(objectModel);
      if (dso instanceof Item)
      {
        Item item = (Item) dso;
        if (item.canEdit())
        {
                    context.setHead(T_context_head);
                    context.addItem().addXref(contextPath+"/admin/item?itemID="+item.getID(), T_context_edit_item);
                    if (AuthorizeManager.isAdmin(this.context, dso))
                    {
                        context.addItem().addXref(contextPath+"/admin/export?itemID="+item.getID(), T_context_export_item );
                        context.addItem().addXref(contextPath+ "/csv/handle/"+dso.getHandle(),T_context_export_metadata );
                    }
                }
      }
      else if (dso instanceof Collection)
      {
        Collection collection = (Collection) dso;
       
        // can they admin this collection?
            if (collection.canEditBoolean(true))
            {
              context.setHead(T_context_head);
              context.addItemXref(contextPath+"/admin/collection?collectionID=" + collection.getID(), T_context_edit_collection);             
              context.addItemXref(contextPath+"/admin/mapper?collectionID="+collection.getID(), T_context_item_mapper);
              if (AuthorizeManager.isAdmin(this.context, dso))
                {
                    context.addItem().addXref(contextPath+"/admin/export?collectionID="+collection.getID(), T_context_export_collection );
                    context.addItem().addXref(contextPath+ "/csv/handle/"+dso.getHandle(),T_context_export_metadata );
                }
            }
      }
      else if (dso instanceof Community)
      {
        Community community = (Community) dso;
       
        // can they admin this collection?
            if (community.canEditBoolean())
            {
              context.setHead(T_context_head);
              context.addItemXref(contextPath+"/admin/community?communityID=" + community.getID(), T_context_edit_community);
              if (AuthorizeManager.isAdmin(this.context, dso))
                {
                    context.addItem().addXref(contextPath + "/admin/export?communityID=" + community.getID(), T_context_export_community);
                }
                context.addItem().addXref(contextPath+ "/csv/handle/"+dso.getHandle(),T_context_export_metadata );
            }
           
            // can they add to this community?
            if (AuthorizeManager.authorizeActionBoolean(this.context, community,Constants.ADD))
            {
              context.setHead(T_context_head);
              context.addItemXref(contextPath+"/admin/collection?createNew&communityID=" + community.getID(), T_context_create_collection);
                context.addItemXref(contextPath+"/admin/community?createNew&communityID=" + community.getID(), T_context_create_subcommunity);     
            }
      }
     
      if (isSystemAdmin && ("community-list".equals(this.sitemapURI) || "".equals(this.sitemapURI)))
      {
            // Only System administrators can create top-level communities
            context.setHead(T_context_head);
            context.addItemXref(contextPath+"/admin/community?createNew", T_context_create_community);
      }
       
       
        // System Administrator options!
        if (isSystemAdmin)
        {
            admin.setHead(T_administrative_head);

            // Control panel
            admin.addItemXref(contextPath+"/admin/panel", T_administrative_control_panel);

            // Access Controls
            List epeople = admin.addList("epeople");
            epeople.setHead(T_administrative_access_control);
            epeople.addItemXref(contextPath+"/admin/epeople", T_administrative_people);
            epeople.addItemXref(contextPath+"/admin/groups", T_administrative_groups);
            epeople.addItemXref(contextPath+"/admin/authorize", T_administrative_authorizations);

            // Content Admin
            List content = admin.addList("content");
            content.setHead(T_administrative_content);
            content.addItemXref(contextPath+"/admin/item", T_administrative_items);
            content.addItemXref(contextPath+"/admin/withdrawn", T_administrative_withdrawn);
            content.addItemXref(contextPath+"/admin/private", T_administrative_private);
            content.addItemXref(contextPath+"/admin/metadataimport", T_administrative_import_metadata);
            content.addItemXref(contextPath+"/admin/batchimport", T_administrative_batch_import);

            // Registries
            List registries = admin.addList("registries");
            registries.setHead(T_administrative_registries);
            registries.addItemXref(contextPath+"/admin/metadata-registry",T_administrative_metadata);
            registries.addItemXref(contextPath+"/admin/format-registry",T_administrative_format);

            admin.addItemXref(contextPath+"/statistics", T_statistics);
            admin.addItemXref(contextPath+ "/admin/curate", T_administrative_curation);
        }
    }
View Full Code Here

   
    // DIVISION: find-item
    Division findItem = body.addInteractiveDivision("find-item",contextPath + "/admin/item", Division.METHOD_GET,"primary administrative item");
    findItem.setHead(T_head1);
   
    List form = findItem.addList("find-item-form", List.TYPE_FORM);
   
    Text id = form.addItem().addText("identifier");
        id.setAutofocus("autofocus");
    id.setLabel(T_identifier_label);
    if (identifier != null)
        {
            id.setValue(identifier);
        }
    if (errors.contains("identifier"))
        {
            id.addError(T_identifier_error);
        }
   
    form.addItem().addButton("submit_find").setValue(T_find);
   
    findItem.addHidden("administrative-continue").setValue(knot.getId());
  }
View Full Code Here

TOP

Related Classes of org.dspace.app.xmlui.wing.element.List

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.