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

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


        for (CollectionDropDown.CollectionPathEntry entry : collectionPaths)
        {
            select.addOption(entry.collection.getHandle(), entry.path);
        }
       
        Button submit = list.addItem().addButton("submit");
        submit.setValue(T_submit_next);
    }
View Full Code Here


      actions.addButton("submit_return").setValue(T_submit_return);
    }
    else
    {
      Para actions = div.addPara();
      Button button = actions.addButton("submit_unmap");
      button.setValue(T_submit_unmap);
      button.setDisabled();
      actions.addButton("submit_return").setValue(T_submit_return);
     
      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 = "unknown";
      Metadatum[] dcAuthors = item.getDC("contributor",Item.ANY,Item.ANY);
      if (dcAuthors != null && dcAuthors.length >= 1)
            {
                author = dcAuthors[0].value;
            }
     
      String title = "untitled";
      Metadatum[] 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();
      actions.addButton("submit_unmap").setValue(T_submit_unmap);
      actions.addButton("submit_return").setValue(T_submit_return);
    }
    else
    {
      Para actions = div.addPara();
      Button button = actions.addButton("submit_unmap");
      button.setValue(T_submit_unmap);
      button.setDisabled();
      actions.addButton("submit_return").setValue(T_submit_return);
     
      div.addPara().addHighlight("fade").addContent(T_no_remove);
    }
   
View Full Code Here

          // 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("webui.user.assumelogin", false))
            {
                submitLoginAs.setDisabled();
            }
        
          if (deleteConstraints != null && deleteConstraints.size() > 0)
          {
            submitDelete.setDisabled();
View Full Code Here

            Text description = upload.addItem().addText("description");
            description.setLabel(T_description);
            description.setHelp(T_description_help);

            Button uploadSubmit = upload.addItem().addButton("submit_upload");
            uploadSubmit.setValue(T_submit_upload);
        }

        make_sherpaRomeo_submission(item, div);

        // Part B:
        //  If the user has already uploaded files provide a list for the user.
        if (bitstreams.length > 0 || disableFileEditing)
        {
            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();


                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 (!disableFileEditing)
                {
                    // 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);
                }

                BitstreamFormat format = bitstream.getFormat();
                if (format == null)
                {
                    row.addCellContent(T_unknown_format);
                }
                else
                {
                    int support = format.getSupportLevel();
                    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 (!disableFileEditing)
            {
                // Workflow users 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

    form.addItem(T_stat_info.parameterize(count_import,count_native+count_import));
   
    form.addLabel(T_search_label);
    org.dspace.app.xmlui.wing.element.Item queryItem = form.addItem();
    Text query = queryItem.addText("query");
    Button button = queryItem.addButton("submit_author");
    button.setValue(T_submit_search);
    if (!AuthorizeManager.authorizeActionBoolean(context, collection, Constants.ADD))
    {
      query.setDisabled();
      button.setDisabled();
      queryItem.addHighlight("fade").addContent(T_no_add);
    }
   
    // PARA: actions
    Para actions = div.addPara();
View Full Code Here

TOP

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

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.