/**
* @see PKPHandler::initialize()
*/
function initialize(&$request)
{
// Basic grid configuration
$this->setId('fairCopyFiles');
$this->setTitle('editor.monograph.fairCopy');
// Load grid data.
$this->loadMonographFiles();
// Test whether the tar binary is available for the export to work, if so, add grid action
$tarBinary = Config::getVar('cli', 'tar');
if ($this->hasData() && !empty($tarBinary) && file_exists($tarBinary)) {
$monograph =& $this->getMonograph();
$router =& $request->getRouter();
$this->addAction(new LinkAction('downloadAll', new RedirectAction($router->url($request, null, null, 'downloadAllFiles', null, array('monographId' => $monograph->getId()))), 'submission.files.downloadAll', 'getPackage'));
}
// Load additional translation components.
Locale::requireComponents(array(LOCALE_COMPONENT_OMP_EDITOR));
// Columns
import('controllers.grid.files.fairCopyFiles.FairCopyFilesGridCellProvider');
$cellProvider =& new FairCopyFilesGridCellProvider();
parent::initialize($request, $cellProvider);
// Add a column for the uploader.
// FIXME: We're just adding some placeholder text here until this
// is correctly implemented, see #6233.
$this->addColumn(new GridColumn('select', null, 'FIXME', 'controllers/grid/common/cell/roleCell.tpl', $cellProvider));
// Add another column for the uploader's role
// FIXME: We're just adding some placeholder text here until this
// is correctly implemented, see #6233.
$this->addColumn(new GridColumn('uploader-name', null, 'FIXME', 'controllers/grid/common/cell/roleCell.tpl', $cellProvider));
}