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

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


                        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(BROWSE_URL_BASE, queryParams),
                          singleEntry[0]);
               
            }
        }
        else
View Full Code Here


                    row.addCell().addXref(url,displayTitle);
                }
                else
                    row.addCell().addXref(url,T_untitled);
                row.addCell().addXref(url,collectionName);
                Cell cell = row.addCell();
                cell.addContent(T_email);
                cell.addXref("mailto:"+submitterEmail,submitterName);
            }
        }
        else
        {
            header = table.addRow();
            header.addCell(0,5).addHighlight("italic").addContent(T_s_info3);
        }

        if (supervisedItems.length > 0)
        {
            header = table.addRow();
            header.addCell(null,Cell.ROLE_HEADER,0,5,null).addContent(T_s_head4);
        }

        for (WorkspaceItem workspaceItem : supervisedItems)
        {

            Metadatum[] titles = workspaceItem.getItem().getDC("title", null, Item.ANY);
            EPerson submitterEPerson = workspaceItem.getItem().getSubmitter();

            int workspaceItemID = workspaceItem.getID();
            String url = contextPath+"/submit?workspaceID="+workspaceItemID;
            String submitterName = submitterEPerson.getFullName();
            String submitterEmail = submitterEPerson.getEmail();
            String collectionName = workspaceItem.getCollection().getMetadata("name");

            Row row = table.addRow(Row.ROLE_DATA);
            CheckBox selected = row.addCell().addCheckBox("workspaceID");
            selected.setLabel("select");
            selected.addOption(workspaceItemID);

            if (titles.length > 0)
            {
                String displayTitle = titles[0].value;
                if (displayTitle.length() > 50)
                {
                    displayTitle = displayTitle.substring(0, 50) + " ...";
                }
                row.addCell().addXref(url,displayTitle);
            }
            else
            {
                row.addCell().addXref(url, T_untitled);
            }
            row.addCell().addXref(url,collectionName);
            Cell cell = row.addCell();
            cell.addContent(T_email);
            cell.addXref("mailto:"+submitterEmail,submitterName);
        }

        header = table.addRow();
        Cell lastCell = header.addCell(0,5);
        if (unfinishedItems.length > 0 || supervisedItems.length > 0)
        {
            lastCell.addButton("submit_submissions_remove").setValue(T_s_submit_remove);
        }
    }
View Full Code Here

            // Item accession date
            if (ingestDate != null && ingestDate.length > 0 &&
                ingestDate[0].value != null)
            {
                String displayDate = ingestDate[0].value.substring(0,10);
                Cell cellDate = row.addCell();
                cellDate.addContent(displayDate);
            }
            else //if no accession date add an empty cell (shouldn't happen, but just in case)
                row.addCell().addContent("");

            // The item description
View Full Code Here

         
         
         
          row.addCell().addContent(memberCount == 0 ? "-" : String.valueOf(memberCount));
         
          Cell cell = row.addCell();
          if (FlowGroupUtils.getCollectionId(group.getName()) > -1)
          {
            Collection collection = Collection.find(context, FlowGroupUtils.getCollectionId(group.getName()) );
            if (collection != null)
            {
              String collectionName = collection.getMetadata("name");
             
              if (collectionName == null)
                    {
                        collectionName = "";
                    }
              else if (collectionName.length() > MAX_COLLECTION_NAME)
                    {
                        collectionName = collectionName.substring(0, MAX_COLLECTION_NAME - 3) + "...";
                    }
             
              cell.addContent(collectionName+" ");
             
              Highlight highlight = cell.addHighlight("fade");
              highlight.addContent("[");
              highlight.addXref(contextPath+"/handle/"+collection.getHandle(), T_groups_collection_link);
              highlight.addContent("]");
            }
          }
View Full Code Here

      Row groupData = table.addRow(null,null,highlight ? "highlight" : null);
     
      groupData.addCell().addHighlight("bold").addContent(group.getID());
     
      // Mark if this member is pending or not.
      Cell nameCell = groupData.addCell();
      if (AuthorizeManager.isAdmin(context))
        {
            nameCell.addHighlight("bold").addXref(url, T_members_group_name.parameterize(name));
        }
      else
        {
            nameCell.addHighlight("bold").addContent(T_members_group_name.parameterize(name));
        }
     
      if (pendingAddition)
      {
        nameCell.addContent(" ");
        nameCell.addHighlight("warn").addContent(T_members_pending);
      }
     
      groupData.addCell().addContent("-");
     
      if (pendingRemoval)
View Full Code Here

     
      Row personData = table.addRow(null,null,highlight ? "highlight" : null);
     
      personData.addCell().addContent(eperson.getID());
     
    Cell nameCell = personData.addCell();
    nameCell.addXref(url, fullName);
    if (pendingAddition)
    {
      nameCell.addContent(" ");
        nameCell.addHighlight("warn").addContent(T_members_pending);
    }
   
    personData.addCell().addXref(url, email);
   
    if (pendingRemoval)
View Full Code Here

                {
                    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(PRIVATE_URL_BASE, queryParams), singleEntry[0]);
            }
        }
    }
View Full Code Here

    {
        Table controlsTable = div.addTable("search-controls", 1, 3);
        Row controlsRow = controlsTable.addRow(Row.ROLE_DATA);

        // Create a control for the number of records to display
        Cell rppCell = controlsRow.addCell();
        rppCell.addContent(T_rpp);
        Select rppSelect = rppCell.addSelect("rpp");
        for (int i : RESULTS_PER_PAGE_PROGRESSION)
        {
            rppSelect.addOption((i == getParameterRpp()), i, Integer.toString(i));
        }

        Cell sortCell = controlsRow.addCell();
        try
        {
            // Create a drop down of the different sort columns available
            sortCell.addContent(T_sort_by);
            Select sortSelect = sortCell.addSelect("sort_by");
            sortSelect.addOption(false, 0, T_sort_by_relevance);
            for (SortOption so : SortOption.getSortOptions())
            {
                if (so.isVisible())
                {
                    sortSelect.addOption((so.getNumber() == getParameterSortBy()), so.getNumber(),
                            message("xmlui.ArtifactBrowser.AbstractSearch.sort_by." + so.getName()));
                }
            }
        }
        catch (SortException se)
        {
            throw new WingException("Unable to get sort options", se);
        }

        // Create a control to changing ascending / descending order
        Cell orderCell = controlsRow.addCell();
        orderCell.addContent(T_order);
        Select orderSelect = orderCell.addSelect("order");
        orderSelect.addOption(SortOption.ASCENDING.equals(getParameterOrder()), SortOption.ASCENDING, T_order_asc);
        orderSelect.addOption(SortOption.DESCENDING.equals(getParameterOrder()), SortOption.DESCENDING, T_order_desc);

        // Create a control for the number of authors per item to display
        // FIXME This is currently disabled, as the supporting functionality
View Full Code Here

                        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(BROWSE_URL_BASE, queryParams),
                          singleEntry[0]);
                    if (StringUtils.isNotEmpty(singleEntry[2]))
                    {
                        cell.addContent(" ["+singleEntry[2]+"]");
                    }
                } 
            }
        }
        else
View Full Code Here

                    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;
                    }
                    if (dcv.language != null)
                    {
                        md += "[" + dcv.language + "]";
                    }

                    Cell cell = mdrow.addCell();
                    cell.addContent(T_item_deletion);
                    cell.addContent(" (" + md + ")");
                    mdrow.addCellContent(dcv.value);
                }
            }
            Para actions = div.addPara();
            Button applychanges = actions.addButton("submit_confirm");
View Full Code Here

TOP

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

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.