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

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


    }
 

  private void addAdministratorOnlyButton(Cell cell, String buttonName, Message buttonLabel) throws WingException, SQLException
  {
      Button button = cell.addButton(buttonName);
      button.setValue(buttonLabel);
      if (!AuthorizeManager.isAdmin(context))
      {
        // Only admins can create or delete
        button.setDisabled();
        cell.addHighlight("fade").addContent(T_sysadmins_only);
      }
  }
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

          // 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();
           
View Full Code Here

            if (name.length() > 50)
              name = name.substring(0, 47) + "...";
          select.addOption(collection.getHandle(),name);
        }
       
        Button submit = list.addItem().addButton("submit");
        submit.setValue(T_submit_next);
    }
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);
      }
       
        // 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);
          }
         
          upload = div.addList("submit-upload-new-part2", List.TYPE_FORM);
    }
       
View Full Code Here

            }
        }

        // 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);
        Button cancel = buttItem.addButton("cancel", "choices-lookup");
        cancel.setValue(T_cancel);
    }
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 = "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();
      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

                    cell.addContent(" (" + md + ")");
                    mdrow.addCellContent(dcv.value);
                }
            }
            Para actions = div.addPara();
            Button applychanges = actions.addButton("submit_confirm");
            applychanges.setValue(T_submit_confirm);
            Button cancel = actions.addButton("submit_return");
            cancel.setValue(T_submit_return);
        }
        else
        {
            Para nochanges = div.addPara();
            nochanges.addContent(T_no_changes);
            Para actions = div.addPara();
            Button cancel = actions.addButton("submit_return");
            cancel.setValue(T_submit_return);
        }



        div.addHidden("administrative-continue").setValue(knot.getId());
View Full Code Here

                {
                    Para nochanges = div.addPara();
                    nochanges.addContent(T_no_changes);
                }
                Para actions = div.addPara();
                Button cancel = actions.addButton("submit_return");
                cancel.setValue(T_submit_return);

   
    div.addHidden("administrative-continue").setValue(knot.getId());
  }
View Full Code Here

                Para file = div.addPara();
                file.addFile("file");

                Para actions = div.addPara();
                Button button = actions.addButton("submit_upload");
                button.setValue(T_submit_upload);

    div.addHidden("administrative-continue").setValue(knot.getId());
  }
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.