String collectionName = owned.getCollection().getMetadata("name");
EPerson submitter = owned.getSubmitter();
String submitterName = submitter.getFullName();
String submitterEmail = submitter.getEmail();
Message state = getWorkflowStateMessage(owned);
Row row = table.addRow();
CheckBox remove = row.addCell().addCheckBox("workflowID");
remove.setLabel("selected");
remove.addOption(workflowItemID);
// The task description
row.addCell().addXref(ownedWorkflowItemUrl, state);
// The item description
if (titles != null && titles.length > 0)
{
String displayTitle = titles[0].value;
if (displayTitle.length() > 50)
{
displayTitle = displayTitle.substring(0, 50) + " ...";
}
row.addCell().addXref(ownedWorkflowItemUrl, displayTitle);
}
else
{
row.addCell().addXref(ownedWorkflowItemUrl, T_untitled);
}
// Submitted too
row.addCell().addXref(collectionUrl, collectionName);
// Submitted by
Cell cell = row.addCell();
cell.addContent(T_email);
cell.addXref("mailto:"+submitterEmail,submitterName);
}
Row row = table.addRow();
row.addCell(0,5).addButton("submit_return_tasks").setValue(T_w_submit_return);
}
else
{
Row row = table.addRow();
row.addCell(0,5).addHighlight("italic").addContent(T_w_info2);
}
// Tasks in the pool
table = workflow.addTable("workflow-tasks",pooledItems.size()+2,5);
table.setHead(T_w_head3);
header = table.addRow(Row.ROLE_HEADER);
header.addCellContent(T_w_column1);
header.addCellContent(T_w_column2);
header.addCellContent(T_w_column3);
header.addCellContent(T_w_column4);
header.addCellContent(T_w_column5);
if (pooledItems.size() > 0)
{
for (WorkflowItem pooled : pooledItems)
{
int workflowItemID = pooled.getID();
String collectionUrl = contextPath + "/handle/" + pooled.getCollection().getHandle();
String pooledItemUrl = contextPath + "/handle/" + pooled.getCollection().getHandle() + "/workflow?workflowID=" + workflowItemID;
Metadatum[] titles = pooled.getItem().getDC("title", null, Item.ANY);
String collectionName = pooled.getCollection().getMetadata("name");
EPerson submitter = pooled.getSubmitter();
String submitterName = submitter.getFullName();
String submitterEmail = submitter.getEmail();
Message state = getWorkflowStateMessage(pooled);
Row row = table.addRow();
CheckBox remove = row.addCell().addCheckBox("workflowID");