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

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


      Division moved = body.addInteractiveDivision("metadata-field-move",contextPath+"/admin/metadata-registry",Division.METHOD_POST,"primary administrative metadata-registry");
      moved.setHead(T_head1);
      moved.addPara(T_para1);
     
      Table table = moved.addTable("metadata-field-move",fields.size() + 1, 3);
        Row header = table.addRow(Row.ROLE_HEADER);
        header.addCell().addContent(T_column1);
        header.addCell().addContent(T_column2);
        header.addCell().addContent(T_column3);
     
      for (MetadataField field : fields)
      {
        String fieldID = String.valueOf(field.getFieldID());
      String fieldEelement = field.getElement();
      String fieldQualifier = field.getQualifier();
     
      MetadataSchema schema = MetadataSchema.find(context, field.getSchemaID());
      String schemaName = schema.getName();
     
      String fieldName = schemaName +"."+ fieldEelement;
      if (fieldQualifier != null && fieldQualifier.length() > 0)
        fieldName += "."+fieldQualifier;
       
      String fieldScopeNote = field.getScopeNote();
       
        Row row = table.addRow();
        row.addCell().addContent(fieldID);
          row.addCell().addContent(fieldName);
          row.addCell().addContent(fieldScopeNote);
      }

      Row row = table.addRow();
      Cell cell = row.addCell(1,3);
      cell.addContent(T_para2);
      Select toSchema = cell.addSelect("to_schema");
      for (MetadataSchema schema : schemas)
      {
        toSchema.addOption(schema.getSchemaID(), schema.getNamespace());
View Full Code Here


    }
       
   
         
        Table table = search.addTable("eperson-search-table", epeople.length + 1, 1);
        Row header = table.addRow(Row.ROLE_HEADER);
        header.addCell().addContent(T_search_column1);
        header.addCell().addContent(T_search_column2);
        header.addCell().addContent(T_search_column3);
        header.addCell().addContent(T_search_column4);

        CheckBox selectEPerson;
        for (EPerson person : epeople)
        {
          String epersonID = String.valueOf(person.getID());
          String fullName = person.getFullName();
          String email = person.getEmail();
          String url = baseURL+"&submit_edit&epersonID="+epersonID;
          Vector<String> deleteConstraints = person.getDeleteConstraints();
         
         
          Row row;
          if (person.getID() == highlightID)
            // This is a highlighted eperson
            row = table.addRow(null, null, "highlight");
          else
            row = table.addRow();
         
          selectEPerson = row.addCell().addCheckBox("select_eperson");
          selectEPerson.setLabel(epersonID);
          selectEPerson.addOption(epersonID);
          if (deleteConstraints != null && deleteConstraints.size() > 0)
            selectEPerson.setDisabled();
         
         
          row.addCellContent(epersonID);
            row.addCell().addXref(url, fullName);
            row.addCell().addXref(url, email);
        }
       
        if (epeople.length <= 0)
    {
          Cell cell = table.addRow().addCell(1, 4);
View Full Code Here

    Division existingFields = main.addDivision("metadata-schema-edit-existing-fields");
    existingFields.setHead(T_head2);
   
    Table table = existingFields.addTable("metadata-schema-edit-existing-fields", fields.length+1, 5);
   
    Row header = table.addRow(Row.ROLE_HEADER);
    header.addCellContent(T_column1);
    header.addCellContent(T_column2);
    header.addCellContent(T_column3);
    header.addCellContent(T_column4);
   
    for (MetadataField field : fields)
    {
      String id = String.valueOf(field.getFieldID());
      String fieldElement = field.getElement();
      String fieldQualifier = field.getQualifier();
     
      String fieldName = schemaName +"."+ fieldElement;
      if (fieldQualifier != null && fieldQualifier.length() > 0)
        fieldName += "."+fieldQualifier;
       
      boolean highlight = false;
      if (field.getFieldID() == highlightID)
        highlight = true;
     
      String fieldScopeNote = field.getScopeNote();
     
      String url = contextPath + "/admin/metadata-registry?administrative-continue="+knot.getId()+"&submit_edit&fieldID="+id;
     
      Row row;
      if (highlight)
        row = table.addRow(null,null,"highlight");
      else
        row = table.addRow();
     
      CheckBox select = row.addCell().addCheckBox("select_field");
      select.setLabel(id);
      select.addOption(id);
     
      row.addCell().addContent(id);
      row.addCell().addXref(url,fieldName);
      row.addCell().addContent(fieldScopeNote);
    }
   
    if (fields.length == 0)
    {
      // No fields, let the user know.
View Full Code Here

        //FIXME: set the correct table size.
        Table table = div.addTable("workflow-actions", 1, 1);
        table.setHead(T_info1);
       
        // Header
        Row row;

        if (state == WFSTATE_STEP1POOL ||
          state == WFSTATE_STEP2POOL ||
          state == WFSTATE_STEP3POOL)
        {
          // Take task
          row = table.addRow();
          row.addCellContent(T_take_help);
          row.addCell().addButton("submit_take_task").setValue(T_take_submit);
      
          // Leave task
          row = table.addRow();
          row.addCellContent(T_leave_help);
          row.addCell().addButton("submit_leave").setValue(T_leave_submit);
        }
       
        if (state == WFSTATE_STEP1 ||
          state == WFSTATE_STEP2)
        {
          // Approve task
          row = table.addRow();
          row.addCellContent(T_approve_help);
          row.addCell().addButton("submit_approve").setValue(T_approve_submit);
        }
       
        if (state == WFSTATE_STEP3)
        {
          // Commit to archive
          row = table.addRow();
          row.addCellContent(T_commit_help);
          row.addCell().addButton("submit_approve").setValue(T_commit_submit);
        }
       
        if (state == WFSTATE_STEP1 ||
          state == WFSTATE_STEP2)
        {
          // Reject item
          row = table.addRow();
          row.addCellContent(T_reject_help);
          row.addCell().addButton("submit_reject").setValue(T_reject_submit);
        }
       
        if (state == WFSTATE_STEP2 ||
          state == WFSTATE_STEP3 )
        {
          // Edit metadata
          row = table.addRow();
          row.addCellContent(T_edit_help);
          row.addCell().addButton("submit_edit").setValue(T_edit_submit);
        }
       
        if (state == WFSTATE_STEP1 ||
            state == WFSTATE_STEP2 ||
            state == WFSTATE_STEP3 )
        {
          // Return to pool
          row = table.addRow();
          row.addCellContent(T_return_help);
          row.addCell().addButton("submit_return").setValue(T_return_submit);
        }
       
       
        // Everyone can just cancel
        row = table.addRow();
        row.addCell(0, 2).addButton("submit_leave").setValue(T_cancel_submit);
       
        div.addHidden("submission-continue").setValue(knot.getId());
    }
View Full Code Here

    }
   
   
    Table table = div.addTable("policy-edit-search-group",groups.length + 1, 1);
        
        Row header = table.addRow(Row.ROLE_HEADER);
       
        // Add the header row
      header = table.addRow(Row.ROLE_HEADER);
        header.addCell().addContent(T_groups_column1);
        header.addCell().addContent(T_groups_column2);
        header.addCell().addContent(T_groups_column3);
        header.addCell().addContent(T_groups_column4);
       
        // The rows of search results
        for (Group group : groups)
        {
          String groupID = String.valueOf(group.getID());
          String name = group.getName();
          url = contextPath+"/admin/groups?administrative-continue="+knot.getId()+"&submit_edit_group&group_id="+groupID;
         
        Row row = table.addRow();
          row.addCell().addContent(groupID);
          row.addCell().addXref(url,name);
         
          // Iterate other other polices of our parent resource to see if any match the currently selected group
          String otherAuthorizations = new String();
          int groupsMatched = 0;
          for (ResourcePolicy otherPolicy : otherPolicies) {
            if (otherPolicy.getGroup() == group) {
              otherAuthorizations += otherPolicy.getActionText() + ", ";
              groupsMatched++;
            }
          }
         
          if (groupsMatched > 0) {
            row.addCell().addContent(otherAuthorizations.substring(0,otherAuthorizations.lastIndexOf(", ")));
          }
          else
            row.addCell().addContent("-");
         
          if (group != sourceGroup)
          row.addCell().addButton("submit_group_id_"+groupID).setValue(T_set_group);
        else
          row.addCell().addContent(T_current_group);
         
        }
        if (groups.length <= 0) {
      table.addRow().addCell(1, 4).addContent(T_no_results);
    }
View Full Code Here

    main.setHead(T_head1);
    main.addPara(T_para1);
   
    Table table = main.addTable("metadata-registry-main-table", schemas.length+1, 5);
   
    Row header = table.addRow(Row.ROLE_HEADER);
    header.addCellContent(T_column1);
    header.addCellContent(T_column2);
    header.addCellContent(T_column3);
    header.addCellContent(T_column4);
   
    for (MetadataSchema schema : schemas)
    {
      int schemaID     = schema.getSchemaID();
      String namespace = schema.getNamespace();
      String name      = schema.getName();
      String url = contextPath + "/admin/metadata-registry?administrative-continue="+knot.getId()+"&submit_edit&schemaID="+schemaID;
     
      Row row = table.addRow();
      if (schemaID > 1)
      {
        // If the schema is not in the required DC schema allow the user to delete it. 
        CheckBox select = row.addCell().addCheckBox("select_schema");
        select.setLabel(String.valueOf(schemaID));
        select.addOption(String.valueOf(schemaID));
      }
      else
      {
        // The DC schema can not be removed.
        row.addCell();
      }
     
      row.addCell().addContent(schemaID);
      row.addCell().addXref(url,namespace);
      row.addCell().addXref(url,name);
    }
    if (schemas.length > 1)
    {
      // Only give the delete option if there are more schema's than the required dublin core.
      main.addPara().addButton("submit_delete").setValue(T_submit_delete);
View Full Code Here

      Division deleted = body.addInteractiveDivision("epeople-confirm-delete",contextPath+"/admin/epeople",Division.METHOD_POST,"primary administrative eperson");
      deleted.setHead(T_confirm_head);
      deleted.addPara(T_confirm_para);
     
      Table table = deleted.addTable("epeople-confirm-delete",epeople.size() + 1, 1);
        Row header = table.addRow(Row.ROLE_HEADER);
        header.addCell().addContent(T_head_id);
        header.addCell().addContent(T_head_name);
        header.addCell().addContent(T_head_email);
     
      for (EPerson eperson : epeople)
      {
        Row row = table.addRow();
        row.addCell().addContent(eperson.getID());
          row.addCell().addContent(eperson.getFullName());
          row.addCell().addContent(eperson.getEmail());
      }
      Para buttons = deleted.addPara();
      buttons.addButton("submit_confirm").setValue(T_submit_confirm);
      buttons.addButton("submit_cancel").setValue(T_submit_cancel);
     
View Full Code Here

      Para warning = deleted.addPara();
      warning.addHighlight("bold").addContent(T_warning);
      warning.addContent(T_para2);
     
      Table table = deleted.addTable("field-confirm-delete",fields.size() + 1, 3);
        Row header = table.addRow(Row.ROLE_HEADER);
        header.addCell().addContent(T_column1);
        header.addCell().addContent(T_column2);
        header.addCell().addContent(T_column3);
     
      for (MetadataField field : fields)
      {
        if (field == null)
          continue;
       
        String fieldID = String.valueOf(field.getFieldID());
      String fieldEelement = field.getElement();
      String fieldQualifier = field.getQualifier();
     
      MetadataSchema schema = MetadataSchema.find(context, field.getSchemaID());
      String schemaName = schema.getName();
     
      String fieldName = schemaName +"."+ fieldEelement;
      if (fieldQualifier != null && fieldQualifier.length() > 0)
        fieldName += "."+fieldQualifier;
       
      String fieldScopeNote = field.getScopeNote();
       
        Row row = table.addRow();
        row.addCell().addContent(fieldID);
          row.addCell().addContent(fieldName);
          row.addCell().addContent(fieldScopeNote);
      }
      Para buttons = deleted.addPara();
      buttons.addButton("submit_confirm").setValue(T_submit_delete);
      buttons.addButton("submit_cancel").setValue(T_submit_cancel);
     
View Full Code Here

      div.addPara().addHighlight("fade").addContent(T_no_remove);
    }
   
    Table table = div.addTable("browse-items-table",1,1);
   
    Row header = table.addRow(Row.ROLE_HEADER);
    header.addCellContent(T_column1);
    header.addCellContent(T_column2);
    header.addCellContent(T_column3);
    header.addCellContent(T_column4);
   
    for (Item item : items)
    {
      String itemID = String.valueOf(item.getID());
      Collection owningCollection = item.getOwningCollection();
      String owning = owningCollection.getMetadata("name");
      String author = "unkown";
      DCValue[] dcAuthors = item.getDC("contributor",Item.ANY,Item.ANY);
      if (dcAuthors != null && dcAuthors.length >= 1)
        author = dcAuthors[0].value;
     
      String title = "untitled";
      DCValue[] dcTitles = item.getDC("title",null,Item.ANY);
      if (dcTitles != null && dcTitles.length >= 1)
        title = dcTitles[0].value;

      String url = contextPath+"/handle/"+item.getHandle();
     
      Row row = table.addRow();
     
      CheckBox select = row.addCell().addCheckBox("itemID");
      select.setLabel("Select");
      select.addOption(itemID);
     
      row.addCellContent(owning);
      row.addCell().addXref(url,author);
      row.addCell().addXref(url,title);
    }
   
    if (AuthorizeManager.authorizeActionBoolean(context, collection, Constants.REMOVE))
    {
      Para actions = div.addPara();
View Full Code Here

      Division deleted = body.addInteractiveDivision("policies-confirm-delete",contextPath+"/admin/authorize",Division.METHOD_POST,"primary administrative authorization");
      deleted.setHead(T_confirm_head);
      deleted.addPara(T_confirm_para);
     
      Table table = deleted.addTable("policies-confirm-delete",policies.size() + 1, 4);
        Row header = table.addRow(Row.ROLE_HEADER);
        header.addCell().addContent(T_head_id);
        header.addCell().addContent(T_head_action);
        header.addCell().addContent(T_head_group);
     
      for (ResourcePolicy policy : policies)
      {
        Row row = table.addRow();
        row.addCell().addContent(policy.getID());
          row.addCell().addContent(policy.getActionText());
          if (policy.getGroup() != null) row.addCell().addContent(policy.getGroup().getName());
          else row.addCell().addContent("...");
      }
      Para buttons = deleted.addPara();
      buttons.addButton("submit_confirm").setValue(T_submit_confirm);
      buttons.addButton("submit_cancel").setValue(T_submit_cancel);
     
View Full Code Here

TOP

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

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.