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);
}
// PARA: actions
Para actions = main.addPara("editItemActionsP","editItemActionsP" );
if (showBitstreamUpdateOrderButton) {
//Add a button to submit the new order (this button is hidden & will be displayed by the javascript)
//Should javascript be disabled for some reason this button isn't used.
actions.addButton("submit_update_order", "hidden").setValue(T_submit_reorder);
}
// Only System Administrators can delete bitstreams
if (AuthorizeManager.authorizeActionBoolean(context, item, Constants.REMOVE))
{
actions.addButton("submit_delete").setValue(T_submit_delete);
}
else
{
Button button = actions.addButton("submit_delete");
button.setValue(T_submit_delete);
button.setDisabled();
main.addPara().addHighlight("fade").addContent(T_no_remove);
}
actions.addButton("submit_return").setValue(T_submit_return);