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

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


      Division deleted = body.addInteractiveDivision("group-confirm-delete",
          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);
      }
View Full Code Here


            scope.setLabel(T_search_scope);
            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());
        }
View Full Code Here

            }
        }
        else    // browsing a list of unique metadata entries
        {
            // Create a table for the results
            Table singleTable = results.addTable("browse-by-" + type + "-results",
                    browseInfo.getResultCount() + 1, 1);

            // Add the column heading
            singleTable.addRow(Row.ROLE_HEADER).addCell().addContent(
                    message("xmlui.ArtifactBrowser.ConfigurableBrowse." + type + ".column_heading"));

            // Iterate each result
            for (String[] singleEntry : browseInfo.getStringResults())
            {
                // Create a Map of the query parameters for the link
                Map<String, String> queryParams = new HashMap<String, String>();
                queryParams.put(BrowseParams.TYPE, URLEncode(type));
                if (singleEntry[1] != null)
                {
                    queryParams.put(BrowseParams.FILTER_VALUE[1], URLEncode(
                        singleEntry[1]));
                }
                else
                {
                    queryParams.put(BrowseParams.FILTER_VALUE[0], URLEncode(
                        singleEntry[0]));
                }
                // Create an entry in the table, and a linked entry
                Cell cell = singleTable.addRow().addCell();
                cell.addXref(super.generateURL(WITHDRAWN_URL_BASE, queryParams), singleEntry[0]);
            }
        }
    }
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()));
         
View Full Code Here

      deleted.addPara(T_para1);
      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();
View Full Code Here

       
        // Part B:
        //  If the user has allready uploaded files provide a list for the user.
        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);
          }
         
View Full Code Here

      options.addItem().addXref(baseURL+"&submit_metadata",T_options_metadata);
      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
       */
      // data row
      tableRow = rolesTable.addRow(Row.ROLE_DATA);
      tableRow.addCell(Cell.ROLE_HEADER).addContent(T_label_admins);
      if (admins != null)
      {
          try
            {
                AuthorizeUtil.authorizeManageAdminGroup(context, thisCollection);
                tableRow.addCell().addXref(baseURL + "&submit_edit_admin", admins.getName());
            }
          catch (AuthorizeException authex) {
                // add a notice, the user is not authorized to create/edit collection's admin group
                tableRow.addCell().addContent(T_not_allowed);
            }
            try
            {
                AuthorizeUtil.authorizeRemoveAdminGroup(context, thisCollection);
                tableRow.addCell().addButton("submit_delete_admin").setValue(T_delete);
            }
            catch (AuthorizeException authex)
            {
                // nothing to add, the user is not allowed to delete the group
            }
      }
      else
      {
        tableRow.addCell().addContent(T_no_role);
        try
            {
                AuthorizeUtil.authorizeManageAdminGroup(context, thisCollection);
                tableRow.addCell().addButton("submit_create_admin").setValue(T_create);
            }
            catch (AuthorizeException authex) {
                // add a notice, the user is not authorized to create/edit collection's admin group
                tableRow.addCell().addContent(T_not_allowed);
            }
      }
      // help and directions row
      tableRow = rolesTable.addRow(Row.ROLE_DATA);
      tableRow.addCell();
      tableRow.addCell(1,2).addHighlight("fade offset").addContent(T_help_admins);
     
     
      /*
       * Workflow steps 1-3
       */
      // data row
      try
        {
            AuthorizeUtil.authorizeManageWorkflowsGroup(context, thisCollection);
          tableRow = rolesTable.addRow(Row.ROLE_DATA);
          tableRow.addCell(Cell.ROLE_HEADER).addContent(T_label_wf_step1);
          if (wfStep1 != null)
          {
            tableRow.addCell().addXref(baseURL + "&submit_edit_wf_step1", wfStep1.getName());
                tableRow.addCell().addButton("submit_delete_wf_step1").setValue(T_delete);
          }
          else
          {
            tableRow.addCell().addContent(T_no_role);
                tableRow.addCell().addButton("submit_create_wf_step1").setValue(T_create);
          }
          // help and directions row
          tableRow = rolesTable.addRow(Row.ROLE_DATA);
          tableRow.addCell();
          tableRow.addCell(1,2).addHighlight("fade offset").addContent(T_help_wf_step1);
         
         
          // data row
          tableRow = rolesTable.addRow(Row.ROLE_DATA);
          tableRow.addCell(Cell.ROLE_HEADER).addContent(T_label_wf_step2);
          if (wfStep2 != null)
          {
            tableRow.addCell().addXref(baseURL + "&submit_edit_wf_step2", wfStep2.getName());
                tableRow.addCell().addButton("submit_delete_wf_step2").setValue(T_delete);
          }
          else
          {
            tableRow.addCell().addContent(T_no_role);
                tableRow.addCell().addButton("submit_create_wf_step2").setValue(T_create);
          }
          // help and directions row
          tableRow = rolesTable.addRow(Row.ROLE_DATA);
          tableRow.addCell();
          tableRow.addCell(1,2).addHighlight("fade offset").addContent(T_help_wf_step2);
         
         
          // data row
          tableRow = rolesTable.addRow(Row.ROLE_DATA);
          tableRow.addCell(Cell.ROLE_HEADER).addContent(T_label_wf_step3);
          if (wfStep3 != null)
          {
            tableRow.addCell().addXref(baseURL + "&submit_edit_wf_step3", wfStep3.getName());
                tableRow.addCell().addButton("submit_delete_wf_step3").setValue(T_delete);
          }
          else
          {
            tableRow.addCell().addContent(T_no_role);
                tableRow.addCell().addButton("submit_create_wf_step3").setValue(T_create);
          }
          // help and directions row
          tableRow = rolesTable.addRow(Row.ROLE_DATA);
          tableRow.addCell();
          tableRow.addCell(1,2).addHighlight("fade offset").addContent(T_help_wf_step3);
        }
      catch (AuthorizeException authex) {
            // add a notice, the user is not allowed to manage workflow group
          tableRow = rolesTable.addRow(Row.ROLE_DATA);
            tableRow.addCell(Cell.ROLE_HEADER).addContent(T_label_wf);
            tableRow.addCell().addContent(T_not_allowed);
        }
       
      /*
       * The collection submitters
       */
      tableRow = rolesTable.addRow(Row.ROLE_DATA);
      tableRow.addCell(Cell.ROLE_HEADER).addContent(T_label_submitters);
      try
      {
          AuthorizeUtil.authorizeManageSubmittersGroup(context, thisCollection);
          if (submitters != null)
          {
            tableRow.addCell().addXref(baseURL + "&submit_edit_submit", submitters.getName());
                tableRow.addCell().addButton("submit_delete_submit").setValue(T_delete);
          }
          else
          {
            tableRow.addCell().addContent(T_no_role);
                tableRow.addCell().addButton("submit_create_submit").setValue(T_create);
          }
      }
      catch (AuthorizeException authex)
      {
          tableRow.addCell().addContent(T_not_allowed);
      }
      // help and directions row
      tableRow = rolesTable.addRow(Row.ROLE_DATA);
      tableRow.addCell();
      tableRow.addCell(1,2).addHighlight("fade offset").addContent(T_help_submitters);
     
     
      /*
       * The collection's default read authorizations
       */
      tableRow = rolesTable.addRow(Row.ROLE_DATA);
      tableRow.addCell(Cell.ROLE_HEADER).addContent(T_label_default_read);
      if (defaultRead == null)
      {
        // Custome reading permissions, we can't handle it, just provide a link to the
        // authorizations manager.
        tableRow.addCell(1,2).addContent(T_default_read_custom);
      }
      else if (defaultRead.getID() == 0) {
        // Anonymous reading
        tableRow.addCell().addContent(T_default_read_anonymous);
        addAdministratorOnlyButton(tableRow.addCell(),"submit_create_default_read",T_restrict);
      }
      else
      {
        // A specific group is dedicated to reading.
        tableRow.addCell().addXref(baseURL + "&submit_edit_default_read", defaultRead.getName());
        addAdministratorOnlyButton(tableRow.addCell(),"submit_delete_default_read",T_delete);
      }
  
      // help and directions row
      tableRow = rolesTable.addRow(Row.ROLE_DATA);
      tableRow.addCell();
      tableRow.addCell(1,2).addHighlight("fade offset").addContent(T_help_default_read);
     
      try
      {
          AuthorizeUtil.authorizeManageCollectionPolicy(context, thisCollection);
        // add one last link to edit the raw authorizations
        Cell authCell =rolesTable.addRow().addCell(1,3);
        authCell.addXref(baseURL + "&submit_authorizations", T_edit_authorization);
      }
      catch (AuthorizeException authex) {
            // nothing to add, the user is not authorized to edit collection's policies
        }
View Full Code Here

    // DIVISION: bitstream-format-confirm-delete
      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();
View Full Code Here

    main.setHead(T_head);
    main.addPara(T_para1);
    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)
      {
View Full Code Here

      search.setSimplePagination(resultCount,firstIndex,lastIndex,prevURL, nextURL);
    }
       
   
         
        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);
          cell.addHighlight("italic").addContent(T_no_results);
        }
        else
        {
          search.addPara().addButton("submit_delete").setValue(T_submit_delete);
View Full Code Here

TOP

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

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.