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

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


        if(num_changes > 0)
        {

            div.addPara(T_para);

            Table mdchanges = div.addTable("metadata-changes", num_changes, 2);

            // Display the changes
            for (BulkEditChange change : changes)
            {
                // Get the changes
                List<Metadatum> adds = change.getAdds();
                List<Metadatum> removes = change.getRemoves();
                List<Collection> newCollections = change.getNewMappedCollections();
                List<Collection> oldCollections = change.getOldMappedCollections();

                if ((adds.size() > 0) || (removes.size() > 0) ||
                    (newCollections.size() > 0) || (oldCollections.size() > 0) ||
                    (change.getNewOwningCollection() != null) || (change.getOldOwningCollection() != null) ||
                    (change.isDeleted()) || (change.isWithdrawn()) || (change.isReinstated()))
                {
                    Row headerrow = mdchanges.addRow(Row.ROLE_HEADER);
                    // Show the item
                    if (!change.isNewItem())
                    {
                        Item i = change.getItem();
                        Cell cell = headerrow.addCell(1, 2); // colspan="2"
                        cell.addContent(T_changes_pending);
                        cell.addContent(" " + i.getID() + " (" + i.getHandle() + ")");

                    }
                    else
                    {
                      headerrow.addCellContent(T_new_item);
                    }
                }

                // Show actions
                if (change.isDeleted())
                {
                    Row mdrow = mdchanges.addRow("addition",Row.ROLE_DATA,"item-delete");

                    Cell cell = mdrow.addCell();
                    cell.addContent(T_item_delete);
                    mdrow.addCellContent("");
                }
                if (change.isWithdrawn())
                {
                    Row mdrow = mdchanges.addRow("addition",Row.ROLE_DATA,"item-withdraw");

                    Cell cell = mdrow.addCell();
                    cell.addContent(T_item_withdraw);
                    mdrow.addCellContent("");
                }
                if (change.isReinstated())
                {
                    Row mdrow = mdchanges.addRow("addition",Row.ROLE_DATA,"item-reinstate");

                    Cell cell = mdrow.addCell();
                    cell.addContent(T_item_reinstate);
                    mdrow.addCellContent("");
                }

                // Show new owning collection
                if (change.getNewOwningCollection() != null)
                {
                    Collection c = change.getNewOwningCollection();
                    if (c != null)
                    {
                        String cHandle = c.getHandle();
                        String cName = c.getName();
                        Row colrow = mdchanges.addRow("addition",Row.ROLE_DATA,"metadata-addition");
                        colrow.addCellContent(T_collection_newowner);
                        colrow.addCellContent(cHandle + " (" + cName + ")");
                    }
                }

                // Show old owning collection
                if (change.getOldOwningCollection() != null)
                {
                    Collection c = change.getOldOwningCollection();
                    if (c != null)
                    {
                        String cHandle = c.getHandle();
                        String cName = c.getName();
                        Row colrow = mdchanges.addRow("deletion",Row.ROLE_DATA,"metadata-deletion");
                        colrow.addCellContent(T_collection_oldowner);
                        colrow.addCellContent(cHandle + " (" + cName + ")");
                    }
                }

                // Show new mapped collections
                for (Collection c : newCollections)
                {
                    String cHandle = c.getHandle();
                    String cName = c.getName();
                    Row colrow = mdchanges.addRow("addition",Row.ROLE_DATA,"metadata-addition");
                    colrow.addCellContent(T_collection_mapped);
                    colrow.addCellContent(cHandle + " (" + cName + ")");
                }

                // Show old mapped collections
                for (Collection c : oldCollections)
                {
                    String cHandle = c.getHandle();
                    String cName = c.getName();
                    Row colrow = mdchanges.addRow("deletion",Row.ROLE_DATA,"metadata-deletion");
                    colrow.addCellContent(T_collection_unmapped);
                    colrow.addCellContent(cHandle + " (" + cName + ")");
                }

                // Show additions
                for (Metadatum dcv : adds)
                {
                    Row mdrow = mdchanges.addRow("addition",Row.ROLE_DATA,"metadata-addition");
                    String md = dcv.schema + "." + dcv.element;
                    if (dcv.qualifier != null)
                    {
                        md += "." + dcv.qualifier;
                    }
                    if (dcv.language != null)
                    {
                        md += "[" + dcv.language + "]";
                    }

                    Cell cell = mdrow.addCell();
                    cell.addContent(T_item_addition);
                    cell.addContent(" (" + md + ")");
                    mdrow.addCellContent(dcv.value);
                }

                // Show removals
                for (Metadatum dcv : removes)
                {
                    Row mdrow = mdchanges.addRow("deletion",Row.ROLE_DATA,"metadata-deletion");
                    String md = dcv.schema + "." + dcv.element;
                    if (dcv.qualifier != null)
                    {
                        md += "." + dcv.qualifier;
                    }
View Full Code Here


        }
        
       
        // 4) Display the results Table
        // TABLE: activeUsers
        Table activeUsers = div.addTable("users",1,1);
        activeUsers.setHead(T_activity_head.parameterize(CurrentActivityAction.MAX_EVENTS));
        Row row = activeUsers.addRow(Row.ROLE_HEADER);
        if (sortBy == EventSort.TIME)
        {
            row.addCell().addHighlight("bold").addXref("?activity&sortBy=" + EventSort.TIME).addContent(T_activity_sort_time);
        }
        else
        {
            row.addCell().addXref("?activity&sortBy=" + EventSort.TIME).addContent(T_activity_sort_time);
        }
       
        if (sortBy == EventSort.SESSION)
        {
            row.addCell().addHighlight("bold").addXref("?activity&sortBy=" + EventSort.SESSION).addContent(T_activity_sort_user);
        }
        else
        {
            row.addCell().addXref("?activity&sortBy=" + EventSort.SESSION).addContent(T_activity_sort_user);
        }
       
        if (sortBy == EventSort.IP)
        {
            row.addCell().addHighlight("bold").addXref("?activity&sortBy=" + EventSort.IP).addContent(T_activity_sort_ip);
        }
        else
        {
            row.addCell().addXref("?activity&sortBy=" + EventSort.IP).addContent(T_activity_sort_ip);
        }
       
        if (sortBy == EventSort.URL)
        {
            row.addCell().addHighlight("bold").addXref("?activity&sortBy=" + EventSort.URL).addContent(T_activity_sort_url);
        }
        else
        {
            row.addCell().addXref("?activity&sortBy=" + EventSort.URL).addContent(T_activity_sort_url);
        }
       
        if (sortBy == EventSort.AGENT)
        {
            row.addCell().addHighlight("bold").addXref("?activity&sortBy=" + EventSort.AGENT).addContent(T_activity_sort_agent);
        }
        else
        {
            row.addCell().addXref("?activity&sortBy=" + EventSort.AGENT).addContent(T_activity_sort_agent);
        }
  
        // Keep track of how many individual anonymous users there are, each unique anonymous
        // user is assigned an index based upon the servlet session id.
        HashMap<String,Integer> anonymousHash = new HashMap<String,Integer>();
        int anonymousCount = 1;
   
        int shown = 0;
        for (CurrentActivityAction.Event event : events)
        { 
            if (event == null)
            {
                continue;
            }
     
            shown++;
     
            Message timeStampMessage = null;
            long ago = System.currentTimeMillis() - event.getTimeStamp();

            if (ago > 2*60*60*1000)
            {
                timeStampMessage = T_hours.parameterize((ago / (60 * 60 * 1000)));
            }
            else if (ago > 60*1000)
            {
                timeStampMessage = T_minutes.parameterize((ago / (60 * 1000)));
            }
            else
            {
                timeStampMessage = T_seconds.parameterize((ago / (1000)));
            }
         
         
            Row eventRow = activeUsers.addRow();

            eventRow.addCellContent(timeStampMessage);
            int eid = event.getEPersonID();
            EPerson eperson = EPerson.find(context, eid);
            if (eperson != null)
            {
                String name = eperson.getFullName();
                eventRow.addCellContent(name);
            }
            else
            {
                // Is this a new anonymous user?
                if (!anonymousHash.containsKey(event.getSessionID()))
                {
                    anonymousHash.put(event.getSessionID(), anonymousCount++);
                }
       
                eventRow.addCellContent(T_activity_anonymous.parameterize(anonymousHash.get(event.getSessionID())));
            }
            eventRow.addCellContent(event.getIP());
            eventRow.addCell().addXref(contextPath+"/"+event.getURL()).addContent("/"+event.getURL());
            eventRow.addCellContent(event.getDectectedBrowser());
        }
   
        if (shown == 0)
        {
            activeUsers.addRow().addCell(1, 5).addContent(T_activity_none);
        }
    }
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

      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_curate",T_options_curate);

      // 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 community 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, thisCommunity);
              tableRow.addCell().addXref(baseURL + "&submit_edit_admin", admins.getName());
          }
          catch (AuthorizeException authex) {
              // add a notice, the user is not authorized to create/edit community's admin group
              tableRow.addCell().addContent(T_sysadmins_only);
          }
          try
          {
              AuthorizeUtil.authorizeRemoveAdminGroup(context, thisCommunity);
              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);
        Cell commAdminCell = tableRow.addCell();
        try
            {
                AuthorizeUtil.authorizeManageAdminGroup(context, thisCommunity);
                commAdminCell.addButton("submit_create_admin").setValue(T_create);
            }
            catch (AuthorizeException authex)
            {
                // add a notice, the user is not authorized to create/edit community's admin group
                addAdministratorOnlyButton(commAdminCell, "submit_create_admin", T_create);
            }  
      }
      // help and directions row
      tableRow = rolesTable.addRow(Row.ROLE_DATA);
      tableRow.addCell();
      tableRow.addCell(1,2).addHighlight("fade offset").addContent(T_help_admins);
     
      try
      {
          AuthorizeUtil.authorizeManageCommunityPolicy(context, thisCommunity);
        // add one last link to edit the raw authorizations
        Cell authCell =rolesTable.addRow().addCell(1,3);
        authCell.addXref(baseURL + "&submit_authorizations", T_edit_authorizations);
      }
      catch (AuthorizeException authex) {
          // nothing to add, the user is not authorized to manage community's policies
      }
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

    // DIVISION: metadata-field-move
      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();
     
      StringBuilder fieldName = new StringBuilder()
                                            .append(schemaName)
                                            .append(".")
                                            .append(fieldEelement);

      if (fieldQualifier != null && fieldQualifier.length() > 0)
            {
        fieldName.append(".").append(fieldQualifier);
            }
       
      String fieldScopeNote = field.getScopeNote();
       
        Row row = table.addRow();
        row.addCell().addContent(fieldID);
          row.addCell().addContent(fieldName.toString());
          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)
      {
View Full Code Here

                para.addContent(T_success);
                para.addContent(" " + changes.size() + " ");
                para.addContent(T_changes);

                if(changes.size() > 0) {
                    Table mdchanges = div.addTable("metadata-changes", changes.size(), 2);

                    // Display the changes
                    for (BulkEditChange change : changes)
                    {
                        // Get the changes
                        List<Metadatum> adds = change.getAdds();
                        List<Metadatum> removes = change.getRemoves();
                        List<Collection> newCollections = change.getNewMappedCollections();
                        List<Collection> oldCollections = change.getOldMappedCollections();

                        if ((adds.size() > 0) || (removes.size() > 0) ||
                            (newCollections.size() > 0) || (oldCollections.size() > 0) ||
                            (change.getNewOwningCollection() != null) || (change.getOldOwningCollection() != null) ||
                            (change.isDeleted()) || (change.isWithdrawn()) || (change.isReinstated()))
                        {
                            Row headerrow = mdchanges.addRow(Row.ROLE_HEADER);
                            // Show the item
                            if (!change.isNewItem())
                            {
                                Item i = change.getItem();
                                Cell cell = headerrow.addCell();
                                cell.addContent(T_changes_committed);
                                cell.addContent(" " + i.getID() + " (" + i.getHandle() + ")");
                            }
                            else
                            {
                              headerrow.addCellContent(T_new_item);
                            }
                            headerrow.addCell();
                        }

                        // Show actions
                        if (change.isDeleted())
                        {
                            Row mdrow = mdchanges.addRow("addition",Row.ROLE_DATA,"item-delete");

                            Cell cell = mdrow.addCell();
                            cell.addContent(T_item_deleted);
                            mdrow.addCellContent("");
                        }
                        if (change.isWithdrawn())
                        {
                            Row mdrow = mdchanges.addRow("addition",Row.ROLE_DATA,"item-withdraw");

                            Cell cell = mdrow.addCell();
                            cell.addContent(T_item_withdrawn);
                            mdrow.addCellContent("");
                        }
                        if (change.isReinstated())
                        {
                            Row mdrow = mdchanges.addRow("addition",Row.ROLE_DATA,"item-reinstate");

                            Cell cell = mdrow.addCell();
                            cell.addContent(T_item_reinstated);
                            mdrow.addCellContent("");
                        }

                        // Show new owning collection
                        if (change.getNewOwningCollection() != null)
                        {
                            Collection c = change.getNewOwningCollection();
                            if (c != null)
                            {
                                String cHandle = c.getHandle();
                                String cName = c.getName();
                                Row colrow = mdchanges.addRow("addition",Row.ROLE_DATA,"metadata-addition");
                                colrow.addCellContent(T_collection_newowner);
                                colrow.addCellContent(cHandle + " (" + cName + ")");
                            }
                        }

                        // Show old owning collection
                        if (change.getOldOwningCollection() != null)
                        {
                            Collection c = change.getOldOwningCollection();
                            if (c != null)
                            {
                                String cHandle = c.getHandle();
                                String cName = c.getName();
                                Row colrow = mdchanges.addRow("deletion",Row.ROLE_DATA,"metadata-deletion");
                                colrow.addCellContent(T_collection_oldowner);
                                colrow.addCellContent(cHandle + " (" + cName + ")");
                            }
                        }

                        // Show new mapped collections
                        for (Collection c : newCollections)
                        {
                            String cHandle = c.getHandle();
                            String cName = c.getName();
                            Row colrow = mdchanges.addRow("addition",Row.ROLE_DATA,"metadata-addition");
                            colrow.addCellContent(T_collection_mapped);
                            colrow.addCellContent(cHandle + " (" + cName + ")");
                        }

                        // Show old mapped collections
                        for (Collection c : oldCollections)
                        {
                            String cHandle = c.getHandle();
                            String cName = c.getName();
                            Row colrow = mdchanges.addRow("deletion",Row.ROLE_DATA,"metadata-deletion");
                            colrow.addCellContent(T_collection_unmapped);
                            colrow.addCellContent(cHandle + " (" + cName + ")");
                        }

                        // Show additions
                        for (Metadatum dcv : adds)
                        {
                            Row mdrow = mdchanges.addRow("addition",Row.ROLE_DATA,"metadata-addition");
                            String md = dcv.schema + "." + dcv.element;
                            if (dcv.qualifier != null)
                            {
                                md += "." + dcv.qualifier;
                            }
                            if (dcv.language != null)
                            {
                                md += "[" + dcv.language + "]";
                            }

                            Cell cell = mdrow.addCell();
                            cell.addContent(T_item_addition);
                            cell.addContent(" (" + md + ")");
                            mdrow.addCellContent(dcv.value);
                        }

                        // Show removals
                        for (Metadatum dcv : removes)
                        {
                            Row mdrow = mdchanges.addRow("deletion",Row.ROLE_DATA,"metadata-deletion");
                            String md = dcv.schema + "." + dcv.element;
                            if (dcv.qualifier != null)
                            {
                                md += "." + dcv.qualifier;
                            }
View Full Code Here

                options.addItem().addXref(baseURL + "&submit_curate", T_option_curate);

   
   
    // TABLE: Bitstream summary
    Table files = main.addTable("editItemBitstreams", 1, 1);

    files.setHead(T_head1);

    Row header = files.addRow(Row.ROLE_HEADER);
    header.addCellContent(T_column1);
    header.addCellContent(T_column2);
    header.addCellContent(T_column3);
    header.addCellContent(T_column4);
    header.addCellContent(T_column5);
    header.addCellContent(T_column6);
    header.addCellContent(T_column7);

    Bundle[] bundles = item.getBundles();

        boolean showBitstreamUpdateOrderButton = false;
    for (Bundle bundle : bundles)
    {

      Cell bundleCell = files.addRow("bundle_head_" + bundle.getID(), Row.ROLE_DATA, "").addCell(1, 5);
      bundleCell.addContent(T_bundle_label.parameterize(bundle.getName()));

      Bitstream[] bitstreams = bundle.getBitstreams();
            ArrayList<Integer> bitstreamIdOrder = new ArrayList<Integer>();
            for (Bitstream bitstream : bitstreams) {
                bitstreamIdOrder.add(bitstream.getID());
            }

            for (int bitstreamIndex = 0; bitstreamIndex < bitstreams.length; bitstreamIndex++) {
                Bitstream bitstream = bitstreams[bitstreamIndex];
                boolean primary = (bundle.getPrimaryBitstreamID() == bitstream.getID());
                String name = bitstream.getName();

                if (name != null && name.length() > 50) {
                    // If the fiel name is too long the shorten it so that it will display nicely.
                    String shortName = name.substring(0, 15);
                    shortName += " ... ";
                    shortName += name.substring(name.length() - 25, name.length());
                    name = shortName;
                }

                String description = bitstream.getDescription();
                String format = null;
                BitstreamFormat bitstreamFormat = bitstream.getFormat();
                if (bitstreamFormat != null) {
                    format = bitstreamFormat.getShortDescription();
                }
                String editURL = contextPath + "/admin/item?administrative-continue=" + knot.getId() + "&bitstreamID=" + bitstream.getID() + "&submit_edit";
                String viewURL = contextPath + "/bitstream/id/" + bitstream.getID() + "/" + bitstream.getName();


                Row row = files.addRow("bitstream_row_" + bitstream.getID(), Row.ROLE_DATA, "");
                CheckBox remove = row.addCell().addCheckBox("remove");
                remove.setLabel("remove");
                remove.addOption(bundle.getID() + "/" + bitstream.getID());
                if (!AuthorizeManager.authorizeActionBoolean(context, item, Constants.REMOVE)) {
                    remove.setDisabled();
                }

                if (AuthorizeManager.authorizeActionBoolean(context, bitstream, Constants.WRITE)) {
                    // The user can edit the bitstream give them a link.
                    Cell cell = row.addCell();
                    cell.addXref(editURL, name);
                    if (primary) {
                        cell.addXref(editURL, T_primary_label);
                    }

                    row.addCell().addXref(editURL, description);
                    row.addCell().addXref(editURL, format);
                } else {
                    // The user can't edit the bitstream just show them it.
                    Cell cell = row.addCell();
                    cell.addContent(name);
                    if (primary) {
                        cell.addContent(T_primary_label);
                    }

                    row.addCell().addContent(description);
                    row.addCell().addContent(format);
                }

                Highlight highlight = row.addCell().addHighlight("fade");
                highlight.addContent("[");
                highlight.addXref(viewURL, T_view_link);
                highlight.addContent("]");

                if (AuthorizeManager.authorizeActionBoolean(context, bundle, Constants.WRITE)) {
                    Cell cell = row.addCell("bitstream_order_" + bitstream.getID(), Cell.ROLE_DATA, "");
                    //Add the +1 to make it more human readable
                    cell.addHidden("order_" + bitstream.getID()).setValue(String.valueOf(bitstreamIndex + 1));
                    showBitstreamUpdateOrderButton = true;
                    Button upButton = cell.addButton("submit_order_" + bundle.getID() + "_" + bitstream.getID() + "_up", ((bitstreamIndex == 0) ? "disabled" : "") + " icon-button arrowUp ");
                    if((bitstreamIndex == 0)){
                        upButton.setDisabled();
                    }
                    upButton.setValue(T_order_up);
                    upButton.setHelp(T_order_up);
                    Button downButton = cell.addButton("submit_order_" + bundle.getID() + "_" + bitstream.getID() + "_down", (bitstreamIndex == (bitstreams.length - 1) ? "disabled" : "") + " icon-button arrowDown ");
                    if(bitstreamIndex == (bitstreams.length - 1)){
                        downButton.setDisabled();
                    }
                    downButton.setValue(T_order_down);
                    downButton.setHelp(T_order_down);

                    //These values will only be used IF javascript is disabled or isn't working
                    cell.addHidden(bundle.getID() + "_" + bitstream.getID() + "_up_value").setValue(retrieveOrderUpButtonValue((java.util.List<Integer>) bitstreamIdOrder.clone(), bitstreamIndex));
                    cell.addHidden(bundle.getID() + "_" + bitstream.getID() + "_down_value").setValue(retrieveOrderDownButtonValue((java.util.List<Integer>) bitstreamIdOrder.clone(), bitstreamIndex));
                }else{
                    row.addCell().addContent(String.valueOf(bitstreamIndex));
                }
            }
    }

    if (AuthorizeManager.authorizeActionBoolean(context, item, Constants.ADD))
    {
      Cell cell = files.addRow().addCell(1, 5);
      cell.addXref(contextPath+"/admin/item?administrative-continue="+knot.getId()+"&submit_add",T_submit_add);
    }
    else
    {
      Cell cell = files.addRow().addCell(1, 5);
      cell.addHighlight("fade").addContent(T_no_upload);
    }

   
   
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, encodeForURL(type));
                if (singleEntry[1] != null)
                {
                    queryParams.put(BrowseParams.FILTER_VALUE[1], encodeForURL(
                        singleEntry[1]));
                }
                else
                {
                    queryParams.put(BrowseParams.FILTER_VALUE[0], encodeForURL(
                        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

      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

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.