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

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


    if (availableExports != null && availableExports.size() > 0) {
      Division avail = main.addDivision("available-exports",
          "available-exports");
      avail.setHead(T_avail_head);

      List fileList = avail.addList("available-files", List.TYPE_ORDERED);
      for (String fileName : availableExports) {
        fileList.addItem().addXref(
            this.contextPath + "/exportdownload/" + fileName,
            fileName);
      }
    }
  }
View Full Code Here


    Division div = body.addInteractiveDivision("submit-save-or-cancel",actionURL, Division.METHOD_POST,"primary submission");
    div.setHead(T_submission_head);
    addSubmissionProgressList(div);
   
    List saveOrCancel = div.addList("submit-review", List.TYPE_FORM);
 
    saveOrCancel.setHead(T_head);
    saveOrCancel.addItem(T_info1);
   
        org.dspace.app.xmlui.wing.element.Item actions = saveOrCancel.addItem();
        actions.addButton("submit_back").setValue(T_submit_back);
        actions.addButton("submit_save").setValue(T_submit_save);
    actions.addButton("submit_remove").setValue(T_submit_remove);
  }
View Full Code Here

   
    // DIVISION: main
      Division main = body.addInteractiveDivision("collection-confirm-delete",contextPath+"/admin/collection",Division.METHOD_POST,"primary administrative collection");
      main.setHead(T_main_head.parameterize(collectionID));
      main.addPara(T_main_para.parameterize(thisCollection.getMetadata("name")));     
      List deleteConfirmHelp = main.addList("consequences",List.TYPE_BULLETED);
      deleteConfirmHelp.addItem(T_confirm_item1);
      deleteConfirmHelp.addItem(T_confirm_item2);
      deleteConfirmHelp.addItem(T_confirm_item3);
     
      Para buttonList = main.addPara();
      buttonList.addButton("submit_confirm").setValue(T_submit_confirm);
      buttonList.addButton("submit_cancel").setValue(T_submit_cancel);
     
View Full Code Here

   
    // DIVISION: add new schema
    Division newSchema = main.addDivision("add-schema");
    newSchema.setHead(T_head2);
   
    List form = newSchema.addList("new-schema",List.TYPE_FORM);
   
    Text namespace = form.addItem().addText("namespace");
    namespace.setLabel(T_namespace);
    namespace.setRequired();
    namespace.setHelp(T_namespace_help);
    if (namespaceValue != null)
      namespace.setValue(namespaceValue);
    if (errors.contains("namespace"))
      namespace.addError(T_namespace_error);
   
    Text name = form.addItem().addText("name");
    name.setLabel(T_name);
    name.setRequired();
    name.setHelp(T_name_help);
    if (nameValue != null)
      name.setValue(nameValue);
    if (errors.contains("name"))
      name.addError(T_name_error);
   
    form.addItem().addButton("submit_add").setValue(T_submit_add);
  
   
    main.addHidden("administrative-continue").setValue(knot.getId());
   }
View Full Code Here

        Para problem = edit.addPara();
        problem.addHighlight("bold").addContent(T_email_taken);
      }
       
     
        List identity = edit.addList("form",List.TYPE_FORM);
        identity.setHead(T_head2.parameterize(eperson.getFullName()));      
       
        if (admin)
        {
          Text email = identity.addItem().addText("email_address");
          email.setRequired();
          email.setLabel(T_email_address);
          email.setValue(emailValue);
          if (errors.contains("eperson_email_key"))
            email.addError(T_error_email_unique);
          else if (errors.contains("email_address"))
            email.addError(T_error_email);
        }
        else
        {
          identity.addLabel(T_email_address);
          identity.addItem(emailValue);
        }
       
        if (admin)
        {
          Text firstName = identity.addItem().addText("first_name");
          firstName.setRequired();
          firstName.setLabel(T_first_name);
          firstName.setValue(firstValue);
          if (errors.contains("first_name"))
            firstName.addError(T_error_fname);
        }
        else
        {
          identity.addLabel(T_first_name);
          identity.addItem(firstValue);
        }
       
        if (admin)
        {
          Text lastName = identity.addItem().addText("last_name");
          lastName.setRequired();
          lastName.setLabel(T_last_name);
          lastName.setValue(lastValue);
          if (errors.contains("last_name"))
            lastName.addError(T_error_lname);
        }
        else
        {
          identity.addLabel(T_last_name);
          identity.addItem(lastValue);
        }
       
        if (admin)
        {
          Text phone = identity.addItem().addText("phone");
          phone.setLabel(T_telephone);
          phone.setValue(phoneValue);
        }
        else
        {
          identity.addLabel(T_telephone);
          identity.addItem(phoneValue);
        }
       
        if (admin)
        { 
          // Administrative options:
          CheckBox canLogInField = identity.addItem().addCheckBox("can_log_in");
          canLogInField.setLabel(T_can_log_in);
          canLogInField.addOption(canLogInValue, "true");
         
          CheckBox certificateField = identity.addItem().addCheckBox("certificate");
          certificateField.setLabel(T_req_certs);
          certificateField.addOption(certificatValue,"true");
         
         
          // Buttons to reset, delete or login as
          identity.addItem().addHighlight("italic").addContent(T_special_help);
          Item special = identity.addItem();
          special.addButton("submit_reset_password").setValue(T_submit_reset_password);
         
          Button submitDelete = special.addButton("submit_delete");
          submitDelete.setValue(T_submit_delete);
        
          Button submitLoginAs = special.addButton("submit_login_as");
          submitLoginAs.setValue(T_submit_login_as);
          if (!ConfigurationManager.getBooleanProperty("xmlui.user.assumelogin", false))
            submitLoginAs.setDisabled();
        
          if (deleteConstraints != null && deleteConstraints.size() > 0)
          {
            submitDelete.setDisabled();
           
            Highlight hi = identity.addItem("eperson-delete-constraint","eperson-delete-constraint").addHighlight("error");
            hi.addContent(T_delete_constraint);
            hi.addContent(" ");
           
            for (String constraint : deleteConstraints)
            {
              int idx = deleteConstraints.indexOf(constraint);
              if (idx > 0 && idx == deleteConstraints.size() -1 )
              {
                hi.addContent(", ");
                hi.addContent(T_constraint_last_conjunction);
                hi.addContent(" ");
              }
              else if (idx > 0)
                hi.addContent(", ");
             
              if ("item".equals(constraint))
                hi.addContent(T_constraint_item);
              else if ("workflowitem".equals(constraint))
                hi.addContent(T_constraint_workflowitem);
              else if ("tasklistitem".equals(constraint))
                hi.addContent(T_constraint_tasklistitem);
              else
                hi.addContent(T_constraint_unknown);
             
            }
            hi.addContent(".");
          }
        }
       
       
        Item buttons = identity.addItem();
        if (admin)
          buttons.addButton("submit_save").setValue(T_submit_save);
        buttons.addButton("submit_cancel").setValue(T_submit_cancel);
       
       
       
        if (admin)
        {
          List member = edit.addList("eperson-member-of");
          member.setHead(T_member_head);

          Group[] groups = Group.allMemberGroups(context, eperson);
          for (Group group : groups)
          {
            String url = contextPath + "/admin/groups?administrative-continue="+knot.getId()+"&submit_edit_group&groupID="+group.getID();
           
            Item item = member.addItem();
            item.addXref(url,group.getName());
           
            // Check if this membership is via another group or not, if so then add a note.
            Group via = findViaGroup(eperson, group);
            if (via != null)
              item.addHighlight("fade").addContent(T_indirect_member.parameterize(via.getName()));
           
          }
         
          if (groups.length <= 0)
            member.addItem().addHighlight("italic").addContent(T_member_none);
         
        }
       
      edit.addHidden("administrative-continue").setValue(knot.getId());
  }
View Full Code Here

        Division idiv = body.addInteractiveDivision("lookup", "", "get", "popup");
        if (isFieldMessage(field, "title"))
            idiv.setHead(getFieldMessage(field, "title"));
        else
            idiv.setHead(getFieldLabel(field, "title"));
        List fl = idiv.addList("choicesList", "form", "choices-lookup");
        fl.setHead(T_results);

        // the <select> tag, and param values
        Item selectItem = fl.addItem("select", "choices-lookup");
        Select s = selectItem.addSelect("chooser", "choices-lookup");
        s.setSize(ConfigurationManager.getIntProperty("xmlui.lookup.select.size", 12));

        // parameters for javascript
        Hidden h = selectItem.addHidden("paramField");
        h.setValue(field);
        h = selectItem.addHidden("paramValue");
        h.setValue(value);
        h = selectItem.addHidden("paramIsName");
        h.setValue(String.valueOf(isName));
        h = selectItem.addHidden("paramIsRepeating");
        h.setValue(String.valueOf(isRepeating));
        h = selectItem.addHidden("paramValueInput");
        h.setValue(valueInput);
        h = selectItem.addHidden("paramAuthorityInput");
        h.setValue(authorityInput);
        h = selectItem.addHidden("paramStart");
        h.setValue(String.valueOf(start));
        h = selectItem.addHidden("paramLimit");
        h.setValue(String.valueOf(limit));
        h = selectItem.addHidden("paramFormID");
        h.setValue(formID);
        h = selectItem.addHidden("paramConfIndicatorID");
        h.setValue(confIndicatorID);
        h = selectItem.addHidden("paramFail");
        h.setValue(T_fail);
        boolean isClosed = ChoiceAuthorityManager.getManager().isClosed(field);
        h = selectItem.addHidden("paramIsClosed");
        h.setValue(String.valueOf(isClosed));
        h = selectItem.addHidden("paramCollection");
        h.setValue(String.valueOf(collection));
        if (!isClosed)
        {
            h = selectItem.addHidden("paramNonAuthority");
            if (isFieldMessage(field, "nonauthority"))
                h.setValue(getFieldMessage(field, "nonauthority"));
            else
                h.setValue(getFieldLabel(field, "nonauthority"));
        }
        h = selectItem.addHidden("contextPath");
        h.setValue(contextPath);

        // NOTE: the "spinner" indicator image gets added in the XSLT.

        // the text input(s)
        Item ti = fl.addItem("textFields", "choices-lookup");
        Composite textItem = ti.addComposite("textFieldsComp", "choices-lookup");
        Text t1 = textItem.addText("text1", "choices-lookup");
        if (isName)
        {
            Text t2 = textItem.addText("text2", "choices-lookup");
            DCPersonName dp = new DCPersonName(value);
            t1.setValue(dp.getLastName());
            t2.setValue(dp.getFirstNames());
            if (isFieldMessage(field, "help.last"))
            {
                Message m = getFieldMessage(field, "help.last");
                t1.setLabel(m);
                t1.setHelp(m);
            }
            else
            {
                String m = getFieldLabel(field, "help.last");
                t1.setLabel(m);
                t1.setHelp(m);
            }
            if (isFieldMessage(field, "help.first"))
            {
                Message m = getFieldMessage(field, "help.first");
                t2.setLabel(m);
                t2.setHelp(m);
            }
            else
            {
                String m = getFieldLabel(field, "help.first");
                t2.setLabel(m);
                t2.setHelp(m);
            }
        }
        else
        {
            t1.setValue(value);
            if (isFieldMessage(field, "help"))
            {
                Message m = getFieldMessage(field, "help");
                t1.setLabel(m);
                t1.setHelp(m);
            }
            else
            {
                String m = getFieldLabel(field, "help");
                t1.setLabel(m);
                t1.setHelp(m);
            }
        }

        // confirmation buttons
        Item buttItem = fl.addItem("confirmation", "choices-lookup");
        Button accept = buttItem.addButton("accept", "choices-lookup");
        accept.setValue(isRepeating ? T_add : T_accept);
        Button more = buttItem.addButton("more", "choices-lookup");
        more.setDisabled();
        more.setValue(T_more);
View Full Code Here

      if (errors.contains("eperson_email_key")) {
        Para problem = add.addPara();
        problem.addHighlight("bold").addContent(T_email_taken);
      }
               
        List identity = add.addList("identity",List.TYPE_FORM);
        identity.setHead(T_head2);      
       
        Text email = identity.addItem().addText("email_address");
        email.setRequired();
        email.setLabel(T_email_address);
        email.setValue(emailValue);
        if (errors.contains("eperson_email_key")) {
          email.addError(T_error_email_unique);
        }
        else if (errors.contains("email_address")) {
          email.addError(T_error_email);
        }
       
        Text firstName = identity.addItem().addText("first_name");
        firstName.setRequired();
        firstName.setLabel(T_first_name);
        firstName.setValue(firstValue);
        if (errors.contains("first_name")) {
          firstName.addError(T_error_fname);
        }
       
        Text lastName = identity.addItem().addText("last_name");
        lastName.setRequired();
        lastName.setLabel(T_last_name);
        lastName.setValue(lastValue);
        if (errors.contains("last_name")) {
          lastName.addError(T_error_lname);
        }
       
        Text phone = identity.addItem().addText("phone");
        phone.setLabel(T_telephone);
        phone.setValue(phoneValue);
       
        CheckBox canLogIn = identity.addItem().addCheckBox("can_log_in");
        canLogIn.setLabel(T_can_log_in);
        canLogIn.addOption(canLogInValue, "yes");
       
        CheckBox certificate = identity.addItem().addCheckBox("certificate");
        certificate.setLabel(T_req_certs);
        certificate.addOption(certificateValue,"yes");
       
        Item buttons = identity.addItem();
        buttons.addButton("submit_save").setValue(T_submit_create);
        buttons.addButton("submit_cancel").setValue(T_submit_cancel);
       
        add.addHidden("administrative-continue").setValue(knot.getId());
  }
View Full Code Here

    Division displayLicense = inner.addDivision("submit-license-standard-text","license-text");
    displayLicense.addSimpleHTMLFragment(true, licenseText);
   
    inner.addPara(T_info3);
   
    List controls = inner.addList("submit-review", List.TYPE_FORM);
   
    CheckBox decision = controls.addItem().addCheckBox("decision");
    decision.setLabel(T_decision_label);
    decision.addOption("accept",T_decision_checkbox);

    // If user did not check "I accept" checkbox
    if(this.errorFlag==org.dspace.submit.step.LicenseStep.STATUS_LICENSE_REJECTED)
View Full Code Here

             
    // DIVISION: main
      Division main = body.addInteractiveDivision("collection-harvesting-edit",contextPath+"/admin/collection",Division.METHOD_MULTIPART,"primary administrative collection");
      main.setHead(T_main_head.parameterize(thisCollection.getMetadata("name")));  
     
      List options = main.addList("options",List.TYPE_SIMPLE,"horizontal");
      options.addItem().addXref(baseURL+"&submit_metadata",T_options_metadata);
      options.addItem().addXref(baseURL+"&submit_roles",T_options_roles);
      options.addItem().addHighlight("bold").addXref(baseURL+"&submit_harvesting",T_options_harvest);
     
     
      // The top-level, all-setting, countent source radio button
      List harvestSource = main.addList("harvestSource", "form");
     
      harvestSource.addLabel(T_label_source);
      Radio source = harvestSource.addItem().addRadio("source");
      source.addOption(hc == null, "source_normal", T_source_normal);
      source.addOption(hc != null, "source_harvested", T_source_harvested);
     
      List settings = main.addList("harvestSettings", "form");
      settings.setHead(T_main_settings_head);
     
      settings.addLabel(T_label_oai_provider);
      settings.addItem(oaiProviderValue);
     
      settings.addLabel(T_label_setid);
      settings.addItem(oaiSetIdValue);

      // The big complex way of getting to our metadata
      settings.addLabel(T_label_metadata_format);
   
      String key = "harvester.oai.metadataformats." + metadataFormatValue;
      String metadataString = ConfigurationManager.getProperty(key);

      String displayName;
      if (metadataString.indexOf(',') != -1)
        displayName = metadataString.substring(metadataString.indexOf(',') + 1);
      else
        displayName = metadataFormatValue + "(" + metadataString + ")";
           
      settings.addItem(displayName);
     
      settings.addLabel(T_label_harvest_level);
      Item harvestLevel = settings.addItem();
      switch (harvestLevelValue) {
        case 1: harvestLevel.addContent(T_option_md_only); break;
        case 2: harvestLevel.addContent(T_option_md_and_ref); break;
        default: harvestLevel.addContent(T_option_md_and_bs); break;
      }
                 
        /* Results of the last harvesting cycle */
        if (harvestLevelValue > 0) {
          settings.addLabel(T_label_harvest_result);
          Item harvestResult = settings.addItem();
          if (hc.getHarvestMessage() != null) {
            harvestResult.addContent(hc.getHarvestMessage() + " on " + hc.getHarvestStartTime());
          }
          else {
            harvestResult.addContent(T_harvest_result_new);
          }
        }
       
        /* Current status */
        settings.addLabel(T_label_harvest_status);
      Item harvestStatus = settings.addItem();
        switch(harvestStatusValue) {
          case HarvestedCollection.STATUS_READY: harvestStatus.addContent(T_harvest_status_ready); break;
          case HarvestedCollection.STATUS_BUSY: harvestStatus.addContent(T_harvest_status_busy); break;
          case HarvestedCollection.STATUS_QUEUED: harvestStatus.addContent(T_harvest_status_queued); break;
          case HarvestedCollection.STATUS_OAI_ERROR: harvestStatus.addContent(T_harvest_status_oai_error); break;
          case HarvestedCollection.STATUS_UNKNOWN_ERROR: harvestStatus.addContent(T_harvest_status_unknown_error); break;
        }
           
        settings.addLabel();
      Item harvestButtons = settings.addItem();
      harvestButtons.addButton("submit_change").setValue(T_submit_change_settings);
      harvestButtons.addButton("submit_import_now").setValue(T_submit_import_now);
      harvestButtons.addButton("submit_reimport").setValue(T_submit_reimport_collection);
       
    Para buttonList = main.addPara();
View Full Code Here

    Division main = body.addInteractiveDivision("advanced-authorization",contextPath+"/admin/authorize",Division.METHOD_POST,"primary administrative authorization");
    main.setHead(T_main_head);
    main.addPara(T_main_para);   
   
   
    List actionsList = main.addList("actions","form");
       
    // For all of the selected groups...
    actionsList.addItem().addContent(T_actions_groupSentence);
        actionsList.addLabel(T_actions_policyGroup);
        Select groupSelect = actionsList.addItem().addSelect("group_id");
        groupSelect.setMultiple(true);
        groupSelect.setSize(15);
        for (Group group : Group.findAll(context, Group.NAME))
           groupSelect.addOption(false, group.getID(), group.getName());
       
        // Grant the ability to perform the following action...
        actionsList.addItem().addContent(T_actions_actionSentence);
        actionsList.addLabel(T_actions_policyAction);
        Select actionSelect = actionsList.addItem().addSelect("action_id");
        for( int i = 0; i < Constants.actionText.length; i++ )
            actionSelect.addOption(i, Constants.actionText[i]);
       
        // For all following object types...
        actionsList.addItem().addContent(T_actions_resourceSentence);
        actionsList.addLabel(T_actions_policyResource);
        Select resourceSelect = actionsList.addItem().addSelect("resource_id");
        resourceSelect.addOption(true, Constants.ITEM, "item");
        resourceSelect.addOption(false, Constants.BITSTREAM, "bitstream");
       
        // Across the following collections...
        actionsList.addItem().addContent(T_actions_collectionSentence);
        actionsList.addLabel(T_actions_policyCollections);
        Select collectionsSelect = actionsList.addItem().addSelect("collection_id");
        collectionsSelect.setMultiple(true);
        collectionsSelect.setSize(15);
        for (Collection collection : Collection.findAll(context))
          collectionsSelect.addOption(false, collection.getID(), collection.getMetadata("name"));
       
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.