00001 <?php
00002
00015
00016 import('lib.pkp.classes.controllers.grid.GridHandler');
00017
00018
00019 import('controllers.grid.submissions.SubmissionsListGridCellProvider');
00020
00021
00022 import('classes.workflow.EditorDecisionActionsManager');
00023
00024 class SubmissionsListGridHandler extends GridHandler {
00025
00029 function SubmissionsListGridHandler() {
00030 parent::GridHandler();
00031 }
00032
00033
00034
00035
00036
00043 function authorize(&$request, $args, $roleAssignments) {
00044 import('lib.pkp.classes.security.authorization.PKPSiteAccessPolicy');
00045 $this->addPolicy(new PKPSiteAccessPolicy($request, null, $roleAssignments));
00046 return parent::authorize($request, $args, $roleAssignments);
00047 }
00048
00052 function initialize(&$request) {
00053 parent::initialize($request);
00054
00055
00056 AppLocale::requireComponents(
00057 LOCALE_COMPONENT_APPLICATION_COMMON,
00058 LOCALE_COMPONENT_OMP_SUBMISSION,
00059 LOCALE_COMPONENT_PKP_SUBMISSION
00060 );
00061
00062
00063 $user =& $request->getUser();
00064 $this->setGridDataElements($this->getSubmissions($request, $user->getId()));
00065
00066
00067 $pressDao =& DAORegistry::getDAO('PressDAO');
00068 $presses =& $pressDao->getPresses();
00069 $authorizedRoles = $this->getAuthorizedContextObject(ASSOC_TYPE_USER_ROLES);
00070 $cellProvider = new SubmissionsListGridCellProvider($authorizedRoles);
00071 if($presses->getCount() > 1) {
00072 $this->addColumn(
00073 new GridColumn(
00074 'press',
00075 'press.press',
00076 null,
00077 'controllers/grid/gridCell.tpl',
00078 $cellProvider
00079 )
00080 );
00081 }
00082
00083 $this->addColumn(
00084 new GridColumn(
00085 'author',
00086 'monograph.authors',
00087 null,
00088 'controllers/grid/gridCell.tpl',
00089 $cellProvider
00090 )
00091 );
00092 $this->addColumn(
00093 new GridColumn(
00094 'title',
00095 'monograph.title',
00096 null,
00097 'controllers/grid/gridCell.tpl',
00098 $cellProvider,
00099 array('html' => true,
00100 'alignment' => COLUMN_ALIGNMENT_LEFT)
00101 )
00102 );
00103
00104 $this->addColumn(
00105 new GridColumn(
00106 'status',
00107 'common.status',
00108 null,
00109 'controllers/grid/gridCell.tpl',
00110 $cellProvider
00111 )
00112 );
00113 }
00114
00115
00116
00117
00118
00126 function getSubmissions(&$request, $userId) {
00127
00128 assert(false);
00129 }
00130 }
00131
00132 ?>