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

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


          contextPath+"/admin/epeople",Division.METHOD_POST,"primary administrative groups");
      deleted.setHead(T_head);
      deleted.addPara(T_para);
     
      Table table = deleted.addTable("groups-list",groups.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);
        header.addCell().addContent(T_column4);
       
      for (Group group : groups)
      { 
        Row row = table.addRow();
        row.addCell().addContent(group.getID());
          row.addCell().addContent(group.getName());
          row.addCell().addContent(group.getMembers().length);
          row.addCell().addContent(group.getMemberGroups().length);
      }
     
      Para buttons = deleted.addPara();
      buttons.addButton("submit_confirm").setValue(T_submit_confirm);
      buttons.addButton("submit_cancel").setValue(T_submit_cancel);
View Full Code Here


            scope.setHelp(T_search_scope_help);
            buildScopeList(scope);
        }
       
        Table queryTable = query.addTable("search-query", 4, 3);
        Row header = queryTable.addRow(Row.ROLE_HEADER);
        header.addCellContent(T_conjunction);
        header.addCellContent(T_search_type);
        header.addCellContent(T_search_for);
       
        for (int i = 1; i <= FIELD_DISPLAY_COUNT; i++)
        {
            Row row = queryTable.addRow(Row.ROLE_DATA);
            buildConjunctionField(i, row.addCell());
            buildTypeField(i, row.addCell());
            buildQueryField(i, row.addCell());
        }

        for (SearchField field : fields)
        {
          // Skip over all the fields we've displayed.
View Full Code Here

   
    /* Adding a new policy link */
    main.addPara().addXref(baseURL + "&submit_add", T_add_link);
   
      Table table = main.addTable("container-policy-list",policies.size() + 1, 4);
        Row header = table.addRow(Row.ROLE_HEADER);
        header.addCell();
        header.addCell().addContent(T_head_id);
        header.addCell().addContent(T_head_action);
        header.addCell().addContent(T_head_group);
     
      for (ResourcePolicy policy : policies)
      {
        Row row;
      if (policy.getID() == highlightID)
        row = table.addRow(null, null, "highlight");
      else
        row = table.addRow();
       
        CheckBox select = row.addCell().addCheckBox("select_policy");
          select.setLabel(String.valueOf(policy.getID()));
          select.addOption(String.valueOf(policy.getID()));
         
          // Accounting for the funky case of an empty policy
          Group policyGroup = policy.getGroup();
         
          row.addCell().addXref(baseURL + "&submit_edit&policy_id=" + policy.getID(), String.valueOf(policy.getID()));
          row.addCell().addXref(baseURL + "&submit_edit&policy_id=" + policy.getID(), policy.getActionText());
          if (policyGroup != null) {
            Cell groupCell = row.addCell();
            groupCell.addContent(policyGroup.getName());
            Highlight groupHigh = groupCell.addHighlight("fade");
            groupHigh.addContent(" [");
            groupHigh.addXref(baseURL + "&submit_edit_group&group_id=" + policyGroup.getID(), T_group_edit);
            groupHigh.addContent("]");
          }
          else {
              row.addCell().addContent("...");
          }
      }
      Para buttons = main.addPara();
      buttons.addButton("submit_delete").setValue(T_submit_delete);
      buttons.addButton("submit_return").setValue(T_submit_return);
View Full Code Here

        if (bitstreams.length > 0 || workflow)
    {
          Table summary = div.addTable("submit-upload-summary",(bitstreams.length * 2) + 2,7);
          summary.setHead(T_head2);
         
          Row header = summary.addRow(Row.ROLE_HEADER);
          header.addCellContent(T_column0); // primary bitstream
          header.addCellContent(T_column1); // select checkbox
          header.addCellContent(T_column2); // file name
          header.addCellContent(T_column3); // size
          header.addCellContent(T_column4); // description
          header.addCellContent(T_column5); // format
          header.addCellContent(T_column6); // edit button
         
          for (Bitstream bitstream : bitstreams)
          {
            int id = bitstream.getID();
            String name = bitstream.getName();
            String url = makeBitstreamLink(item, bitstream);
            long bytes = bitstream.getSize();
            String desc = bitstream.getDescription();
            String algorithm = bitstream.getChecksumAlgorithm();
            String checksum = bitstream.getChecksum();
            BitstreamFormat format = bitstream.getFormat();
            int support = format.getSupportLevel();
           
           
            Row row = summary.addRow();

              // Add radio-button to select this as the primary bitstream
                Radio primary = row.addCell().addRadio("primary_bitstream_id");
                primary.addOption(String.valueOf(id));
               
                // If this bitstream is already marked as the primary bitstream
                // mark it as such.
                if(bundles[0].getPrimaryBitstreamID() == id) {
                    primary.setOptionSelected(String.valueOf(id));
                }
           
            if (!workflow)
            {
              // Workflow users can not remove files.
                CheckBox remove = row.addCell().addCheckBox("remove");
                remove.setLabel("remove");
                remove.addOption(id);
            }
            else
            {
              row.addCell();
            }
           
              row.addCell().addXref(url,name);
              row.addCellContent(bytes + " bytes");
              if (desc == null || desc.length() == 0)
                row.addCellContent(T_unknown_name);
              else
                row.addCellContent(desc);
             
              if (format == null)
              {
                row.addCellContent(T_unknown_format);
              }
              else
              {
                Cell cell = row.addCell();
                cell.addContent(format.getMIMEType());
                cell.addContent(" ");
                switch (support)
                {
                case 1:
                  cell.addContent(T_supported);
                  break;
                case 2:
                  cell.addContent(T_known);
                  break;
                case 3:
                  cell.addContent(T_unsupported);
                  break;
                }
              }
             
              Button edit = row.addCell().addButton("submit_edit_"+id);
              edit.setValue(T_submit_edit)
             
              Row checksumRow = summary.addRow();
              checksumRow.addCell();
              Cell checksumCell = checksumRow.addCell(null, null, 0, 6, null);
              checksumCell.addHighlight("bold").addContent(T_checksum);
              checksumCell.addContent(" ");
              checksumCell.addContent(algorithm + ":" + checksum);
          }
         
          if (!workflow)
          {
            // Workflow user's can not remove files.
            Row actionRow = summary.addRow();
            actionRow.addCell();
            Button removeSeleceted = actionRow.addCell(null, null, 0, 6, null).addButton("submit_remove_selected");
            removeSeleceted.setValue(T_submit_remove);
          }
         
          upload = div.addList("submit-upload-new-part2", List.TYPE_FORM);
    }
View Full Code Here

      Para warning = deleted.addPara();
      warning.addHighlight("bold").addContent(T_warning);
      warning.addContent(T_para2);
     
      Table table = deleted.addTable("schema-confirm-delete",schemas.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 (MetadataSchema schema : schemas)
      {
        Row row = table.addRow();
        row.addCell().addContent(schema.getSchemaID());
          row.addCell().addContent(schema.getNamespace());
          row.addCell().addContent(schema.getName());
      }
      Para buttons = deleted.addPara();
      buttons.addButton("submit_confirm").setValue(T_submit_delete);
      buttons.addButton("submit_cancel").setValue(T_submit_cancel);
     
View Full Code Here

      options.addItem().addHighlight("bold").addXref(baseURL+"&submit_roles",T_options_roles);
      options.addItem().addXref(baseURL+"&submit_harvesting",T_options_harvest);
           
      // The table of admin roles
      Table rolesTable = main.addTable("roles-table", 6, 5);
      Row tableRow;
     
      // The header row
      Row tableHeader = rolesTable.addRow(Row.ROLE_HEADER);
      tableHeader.addCell().addContent(T_role_name);
      tableHeader.addCell().addContent(T_role_group);
      tableHeader.addCell().addContent(T_role_buttons);
      rolesTable.addRow();
           
     
      /*
       * The collection admins
View Full Code Here

      Division deleted = body.addInteractiveDivision("bitstream-format-confirm-delete",contextPath+"/admin/format-registry",Division.METHOD_POST,"primary administrative format-registry");
      deleted.setHead(T_head);
      deleted.addPara(T_para1);
     
      Table table = deleted.addTable("format-confirm-delete",formats.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 (BitstreamFormat format : formats)
      {
        if (format == null)
          continue;
       
        String formatID = String.valueOf(format.getID());
        String mimetype = format.getMIMEType();
        String name = format.getShortDescription();

       
        Row row = table.addRow();
        row.addCell().addContent(formatID);
          row.addCell().addContent(mimetype);
          row.addCell().addContent(name);
      }
      Para buttons = deleted.addPara();
      buttons.addButton("submit_confirm").setValue(T_submit_delete);
      buttons.addButton("submit_cancel").setValue(T_submit_cancel);
     
View Full Code Here

    main.addPara().addXref(addURL,T_new_link);
   
   
    Table table = main.addTable("bitstream-format-registry", formats.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);
    header.addCellContent(T_column5);
   
    for (BitstreamFormat format : formats)
    {
      String id = String.valueOf(format.getID());
      String mimeType = format.getMIMEType();
      String name = format.getShortDescription();
      int supportLevel = format.getSupportLevel();
      boolean internal = format.isInternal();
     
      boolean highlight = false;
      if (format.getID() == highlightID)
        highlight = true;

      String url = contextPath + "/admin/format-registry?administrative-continue="+knot.getId()+"&submit_edit&formatID="+id;

     
      Row row;
      if (highlight)
        row = table.addRow(null,null,"highlight");
      else
        row = table.addRow();
     
      // Select checkbox
      Cell cell = row.addCell();
      if (format.getID() > 1)
      {
        // Do not allow unknown to be removed.
        CheckBox select = cell.addCheckBox("select_format");
        select.setLabel(id);
        select.addOption(id);
      }
     
      // ID
      row.addCell().addContent(id);

      // Name
      row.addCell().addXref(url,name);
     
      // Mime type
      cell = row.addCell();
      cell.addXref(url,mimeType);
      if (internal)
      {
        cell.addContent(" ");
        cell.addContent(T_internal);
      }
     
      // support level
      switch (supportLevel)
      {
      case 0:
        row.addCell().addXref(url,T_support_0); break;
      case 1:
        row.addCell().addXref(url,T_support_1); break;
      case 2:
        row.addCell().addXref(url,T_support_2); break;
      }
    }
   
    main.addPara().addButton("submit_delete").setValue(T_submit_delete);
   
View Full Code Here

    main.setHead(T_main_head.parameterize(item.getHandle(),item.getID()));
    main.addPara().addHighlight("italic").addContent(T_main_para1);
    main.addPara().addHighlight("italic").addContent(T_main_para2);
   
      Table table = main.addTable("policies-confirm-delete",itemPolicies.size() + 3, 5);
        Row header = table.addRow(Row.ROLE_HEADER);
        header.addCell();
        header.addCell().addContent(T_head_id);
        header.addCell().addContent(T_head_action);
        header.addCell().addContent(T_head_group);
        header.addCell();

       
        // First, the item's policies are listed
        Row subheader = table.addRow(null,Row.ROLE_HEADER,"subheader");
        subheader.addCell(1, 4).addHighlight("bold").addContent(T_subhead_item);
        subheader.addCell().addHighlight("bold").addXref(baseURL + "&submit_add_item", T_add_itemPolicy_link);
       
        this.rowBuilder(baseURL, table, itemPolicies, item.getID(), Constants.ITEM, highlightID);
     
      // Next, one by one, we get the bundles
      for (Bundle bundle : bundles) {
        subheader = table.addRow(null,Row.ROLE_HEADER,"subheader");
        subheader.addCell(null, null, 1, 4, "indent").addHighlight("bold").addContent(T_subhead_bundle.parameterize(bundle.getName(),bundle.getID()));
        subheader.addCell().addHighlight("bold").addXref(baseURL + "&submit_add_bundle_" + bundle.getID(), T_add_bundlePolicy_link);

        bundlePolicies = (ArrayList<ResourcePolicy>)AuthorizeManager.getPolicies(context, bundle);
        this.rowBuilder(baseURL, table, bundlePolicies, bundle.getID(), Constants.BUNDLE, highlightID);
       
        // And eventually to the bundle's bitstreams
        bitstreams = bundle.getBitstreams();
        for (Bitstream bitstream : bitstreams) {
          subheader = table.addRow(null,Row.ROLE_HEADER,"subheader");
            subheader.addCell(null, null, 1, 4, "doubleIndent").addContent(T_subhead_bitstream.parameterize(bitstream.getName(),bitstream.getID()));
            subheader.addCell().addXref(baseURL + "&submit_add_bitstream_" + bitstream.getID(), T_add_bitstreamPolicy_link);

            bitstreamPolicies = (ArrayList<ResourcePolicy>)AuthorizeManager.getPolicies(context, bitstream);
            this.rowBuilder(baseURL, table, bitstreamPolicies, bitstream.getID(), Constants.BITSTREAM, highlightID);         
        }
      }
View Full Code Here

    }
    // Otherwise, iterate over the given policies, creating a new table row for each one
    else {
      for (ResourcePolicy policy : policies)
        {
        Row row;
        if (policy.getID() == highlightID)
          row = table.addRow(null, null, "highlight");
        else
          row = table.addRow();
       
        Cell cell;
        if (objectType == Constants.BUNDLE)
          cell = row.addCell(null, null, "indent");
        else if (objectType == Constants.BITSTREAM)
          cell = row.addCell(null, null, "doubleIndent");
        else
          cell = row.addCell();
         
       
          CheckBox select = cell.addCheckBox("select_policy");
         
            select.setLabel(String.valueOf(policy.getID()));
            select.addOption(String.valueOf(policy.getID()));
           
            // Accounting for the funky case of an empty policy
            Group policyGroup = policy.getGroup();
           
            row.addCell().addXref(baseURL + "&submit_edit&policy_id=" + policy.getID() +
                "&object_id=" + objectID + "&object_type=" + objectType, String.valueOf(policy.getID()));
            row.addCell().addXref(baseURL + "&submit_edit&policy_id=" + policy.getID() +
                "&object_id=" + objectID + "&object_type=" + objectType, policy.getActionText());
            if (policyGroup != null) {
              Cell groupCell = row.addCell(1,2);
              groupCell.addContent(policyGroup.getName());
              Highlight groupHigh = groupCell.addHighlight("fade");
              groupHigh.addContent(" [");
              groupHigh.addXref(baseURL + "&submit_edit_group&group_id=" + policyGroup.getID(), T_group_edit);
              groupHigh.addContent("]");
            }
            else {
                row.addCell(1,2).addContent("...");
            }
        }
    }
  }
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.