initialize() public méthode

See also: PKPHandler::initialize()
public initialize ( $request, $args = null )
$request PKPRequest
$args array optional
 function initialize(&$request)
 {
     parent::initialize($request);
     Locale::requireComponents(array(LOCALE_COMPONENT_OMP_EDITOR, LOCALE_COMPONENT_PKP_USER, LOCALE_COMPONENT_PKP_SUBMISSION));
     $monograph =& $this->getAuthorizedContextObject(ASSOC_TYPE_MONOGRAPH);
     // Retrieve the submissionContributors associated with this monograph to be displayed in the grid
     $doneMin = $request->getUserVar('doneMin');
     $doneMax = $request->getUserVar('doneMax');
     $avgMin = $request->getUserVar('avgMin');
     $avgMax = $request->getUserVar('avgMax');
     $lastMin = $request->getUserVar('lastMin');
     $lastMax = $request->getUserVar('lastMax');
     $activeMin = $request->getUserVar('activeMin');
     $activeMax = $request->getUserVar('activeMax');
     $interests = null;
     $seriesEditorSubmissionDao =& DAORegistry::getDAO('SeriesEditorSubmissionDAO');
     $data =& $seriesEditorSubmissionDao->getFilteredReviewers($monograph->getPressId(), $doneMin, $doneMax, $avgMin, $avgMax, $lastMin, $lastMax, $activeMin, $activeMax, $interests, $monograph->getId(), $monograph->getCurrentRound());
     $this->setData($data);
     // Columns
     $cellProvider = new ReviewerSelectGridCellProvider();
     $this->addColumn(new GridColumn('select', '', null, 'controllers/grid/users/reviewerSelect/reviewerSelectRadioButton.tpl', $cellProvider));
     $this->addColumn(new GridColumn('name', 'author.users.contributor.name', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     $this->addColumn(new GridColumn('done', 'common.done', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     $this->addColumn(new GridColumn('avg', 'editor.review.days', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     $this->addColumn(new GridColumn('last', 'editor.submissions.lastAssigned', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     $this->addColumn(new GridColumn('active', 'common.active', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     $this->addColumn(new GridColumn('interests', 'user.interests', null, 'controllers/grid/gridCell.tpl', $cellProvider));
 }
 /**
  * @copydoc PKPHandler::initialize()
  */
 function initialize($request)
 {
     parent::initialize($request);
     // Load user-related translations.
     AppLocale::requireComponents(LOCALE_COMPONENT_PKP_USER, LOCALE_COMPONENT_PKP_MANAGER, LOCALE_COMPONENT_APP_MANAGER);
     $this->_oldUserId = (int) $request->getUserVar('oldUserId');
     // Basic grid configuration.
     $this->setTitle('grid.user.currentUsers');
     // Grid actions.
     $router = $request->getRouter();
     import('lib.pkp.classes.linkAction.request.AjaxModal');
     $this->addAction(new LinkAction('addUser', new AjaxModal($router->url($request, null, null, 'addUser', null, null), __('grid.user.add'), 'modal_add_user', true), __('grid.user.add'), 'add_user'));
     //
     // Grid columns.
     //
     // First Name.
     $cellProvider = new DataObjectGridCellProvider();
     $this->addColumn(new GridColumn('firstName', 'user.firstName', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     // Last Name.
     $cellProvider = new DataObjectGridCellProvider();
     $this->addColumn(new GridColumn('lastName', 'user.lastName', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     // User name.
     $cellProvider = new DataObjectGridCellProvider();
     $this->addColumn(new GridColumn('username', 'user.username', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     // Email.
     $cellProvider = new DataObjectGridCellProvider();
     $this->addColumn(new GridColumn('email', 'user.email', null, 'controllers/grid/gridCell.tpl', $cellProvider));
 }
 function initialize(&$request)
 {
     parent::initialize($request);
     // Basic grid configuration
     $this->setId('preparedEmailsGrid');
     AppLocale::requireComponents(LOCALE_COMPONENT_PKP_MANAGER);
     // Set the grid title.
     $this->setTitle('grid.preparedEmails.title');
     $this->setInstructions('grid.preparedEmails.description');
     // Elements to be displayed in the grid
     $emailTemplateDao =& DAORegistry::getDAO('EmailTemplateDAO');
     /* @var $emailTemplateDao EmailTemplateDAO */
     $emailTemplates =& $emailTemplateDao->getEmailTemplates(AppLocale::getLocale(), $this->getContextId($request));
     $rowData = array();
     foreach ($emailTemplates as $emailTemplate) {
         $rowData[$emailTemplate->getEmailKey()] = $emailTemplate;
     }
     $this->setGridDataElements($rowData);
     // Grid actions
     import('lib.pkp.controllers.grid.settings.preparedEmails.linkAction.EditEmailLinkAction');
     $addEmailLinkAction = new EditEmailLinkAction($request);
     $this->addAction($addEmailLinkAction);
     import('lib.pkp.classes.linkAction.LinkAction');
     import('lib.pkp.classes.linkAction.request.RemoteActionConfirmationModal');
     $router =& $request->getRouter();
     $this->addAction(new LinkAction('resetAll', new RemoteActionConfirmationModal(__('manager.emails.resetAll.message'), null, $router->url($request, null, 'grid.settings.preparedEmails.PreparedEmailsGridHandler', 'resetAllEmails')), __('manager.emails.resetAll'), 'reset_default'));
     // Columns
     import('lib.pkp.controllers.grid.settings.preparedEmails.PreparedEmailsGridCellProvider');
     $cellProvider = new PreparedEmailsGridCellProvider();
     $this->addColumn(new GridColumn('name', 'common.name', null, 'controllers/grid/gridCell.tpl', $cellProvider, array('width' => 40)));
     $this->addColumn(new GridColumn('sender', 'email.sender', null, 'controllers/grid/gridCell.tpl', $cellProvider, array('width' => 10)));
     $this->addColumn(new GridColumn('recipient', 'email.recipient', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     $this->addColumn(new GridColumn('subject', 'common.subject', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     $this->addColumn(new GridColumn('enabled', 'common.enabled', null, 'controllers/grid/common/cell/selectStatusCell.tpl', $cellProvider, array('width' => 5)));
 }
 function initialize(&$request)
 {
     parent::initialize($request);
     // Basic grid configuration
     $this->setId('preparedEmailsGrid');
     $this->setTitle('grid.preparedEmails.currentList');
     Locale::requireComponents(array(LOCALE_COMPONENT_PKP_MANAGER));
     // Elements to be displayed in the grid
     $press =& $request->getPress();
     $emailTemplateDao =& DAORegistry::getDAO('EmailTemplateDAO');
     /* @var $emailTemplateDao EmailTemplateDAO */
     $emailTemplates =& $emailTemplateDao->getEmailTemplates(Locale::getLocale(), $press->getId());
     $rowData = array();
     foreach ($emailTemplates as $emailTemplate) {
         $rowData[$emailTemplate->getEmailKey()] = $emailTemplate;
     }
     $this->setGridDataElements($rowData);
     // Grid actions
     import('lib.pkp.classes.linkAction.LinkAction');
     import('lib.pkp.classes.linkAction.request.ConfirmationModal');
     $router =& $request->getRouter();
     $this->addAction(new LinkAction('resetAll', new ConfirmationModal(__('manager.emails.resetAll.message'), null, $router->url($request, null, 'grid.settings.preparedEmails.PreparedEmailsGridHandler', 'resetAllEmails')), __('manager.emails.resetAll'), 'delete'));
     import('controllers.grid.settings.preparedEmails.linkAction.EditEmailLinkAction');
     $addEmailLinkAction =& new EditEmailLinkAction($request);
     $this->addAction($addEmailLinkAction);
     // Columns
     import('controllers.grid.settings.preparedEmails.PreparedEmailsGridCellProvider');
     $cellProvider =& new PreparedEmailsGridCellProvider();
     $this->addColumn(new GridColumn('name', 'common.name', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     $this->addColumn(new GridColumn('sender', 'email.sender', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     $this->addColumn(new GridColumn('recipient', 'email.recipient', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     $this->addColumn(new GridColumn('subject', 'common.subject', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     $this->addColumn(new GridColumn('enabled', 'common.enabled', null, 'controllers/grid/common/cell/checkMarkCell.tpl', $cellProvider));
 }
 function initialize(&$request)
 {
     parent::initialize($request);
     // Load submission-specific translations
     Locale::requireComponents(array(LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_PKP_MANAGER, LOCALE_COMPONENT_PKP_USER, LOCALE_COMPONENT_OMP_EDITOR));
     // Basic grid configuration
     $this->setTitle('user.role.reviewers');
     // Get the monograph
     $submission =& $this->getAuthorizedContextObject(ASSOC_TYPE_MONOGRAPH);
     assert(is_a($submission, 'SeriesEditorSubmission'));
     $monographId = $submission->getId();
     // Get the review round currently being looked at
     $reviewType = $request->getUserVar('reviewType');
     $round = $request->getUserVar('round');
     // Get the existing review assignments for this monograph
     $reviewAssignments =& $submission->getReviewAssignments($reviewType, $round);
     $this->setData($reviewAssignments);
     // Grid actions
     $router =& $request->getRouter();
     $actionArgs = array('monographId' => $monographId, 'reviewType' => $reviewType, 'round' => $round);
     $this->addAction(new LegacyLinkAction('addReviewer', LINK_ACTION_MODE_MODAL, LINK_ACTION_TYPE_APPEND, $router->url($request, null, null, 'addReviewer', null, $actionArgs), 'editor.monograph.addReviewer'));
     // Columns
     $cellProvider = new ReviewerGridCellProvider();
     $this->addColumn(new GridColumn('name', 'user.name', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     // Add a column for the stage editor.
     // FIXME: We're just adding some placeholder text here until this
     // is correctly implemented, see #6233.
     $this->addColumn(new GridColumn('FIXME', null, 'FIXME', 'controllers/grid/common/cell/roleCell.tpl', $cellProvider));
     // Add a column for the assigned reviewer.
     $this->addColumn(new GridColumn('reviewer', 'user.role.reviewer', null, 'controllers/grid/common/cell/roleCell.tpl', $cellProvider));
 }
 function initialize(&$request)
 {
     parent::initialize($request);
     // Retrieve the authorized monograph.
     $this->setMonograph($this->getAuthorizedContextObject(ASSOC_TYPE_MONOGRAPH));
     // Load submission-specific translations
     Locale::requireComponents(array(LOCALE_COMPONENT_OMP_SUBMISSION, LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_PKP_USER, LOCALE_COMPONENT_OMP_DEFAULT_SETTINGS));
     // Basic grid configuration
     $this->setTitle('submission.submit.stageParticipants');
     // Get the monograph id
     $monograph =& $this->getMonograph();
     assert(is_a($monograph, 'Monograph'));
     $monographId = $monograph->getId();
     // Retrieve the stageParticipants associated with this monograph to be displayed in the grid
     $signoffDao =& DAORegistry::getDAO('SignoffDAO');
     $data =& $signoffDao->getAllBySymbolic('SIGNOFF_STAGE', ASSOC_TYPE_MONOGRAPH, $monographId, null, $monograph->getCurrentStageId());
     $this->setData($data);
     // Grid actions
     $router =& $request->getRouter();
     $actionArgs = array('monographId' => $monographId, 'stageId' => $monograph->getCurrentStageId());
     $this->addAction(new LegacyLinkAction('addStageParticipant', LINK_ACTION_MODE_MODAL, LINK_ACTION_TYPE_REPLACE, $router->url($request, null, null, 'addStageParticipant', null, $actionArgs), 'submission.submit.addStageParticipant'));
     // Columns
     $cellProvider = new StageParticipantGridCellProvider();
     $this->addColumn(new GridColumn('name', 'author.users.contributor.name', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     $this->addColumn(new GridColumn('userGroup', 'author.users.contributor.role', null, 'controllers/grid/gridCell.tpl', $cellProvider));
 }
 /**
  * @copydoc PKPHandler::initialize()
  */
 function initialize($request)
 {
     parent::initialize($request);
     // Load user-related translations.
     AppLocale::requireComponents(LOCALE_COMPONENT_PKP_USER, LOCALE_COMPONENT_PKP_MANAGER, LOCALE_COMPONENT_APP_MANAGER);
     // Basic grid configuration.
     $this->setTitle('grid.user.currentUsers');
     // Grid actions.
     $router = $request->getRouter();
     $pluginName = $request->getUserVar('pluginName');
     assert(!empty($pluginName));
     $this->_pluginName = $pluginName;
     $dispatcher = $request->getDispatcher();
     $url = $dispatcher->url($request, ROUTE_PAGE, null, 'manager', 'importexport', array('plugin', $pluginName, 'exportAllUsers'));
     $this->addAction(new LinkAction('exportAllUsers', new RedirectConfirmationModal(__('grid.users.confirmExportAllUsers'), null, $url), __('grid.action.exportAllUsers'), 'export_users'));
     //
     // Grid columns.
     //
     // First Name.
     $cellProvider = new DataObjectGridCellProvider();
     $this->addColumn(new GridColumn('firstName', 'user.firstName', null, null, $cellProvider));
     // Last Name.
     $cellProvider = new DataObjectGridCellProvider();
     $this->addColumn(new GridColumn('lastName', 'user.lastName', null, null, $cellProvider));
     // User name.
     $cellProvider = new DataObjectGridCellProvider();
     $this->addColumn(new GridColumn('username', 'user.username', null, null, $cellProvider));
     // Email.
     $cellProvider = new DataObjectGridCellProvider();
     $this->addColumn(new GridColumn('email', 'user.email', null, null, $cellProvider));
 }
 function initialize(&$request)
 {
     parent::initialize($request);
     if (!is_null($request->getUserVar('rowCategoryId'))) {
         $this->_currentCategoryId = (string) $request->getUserVar('rowCategoryId');
     }
 }
 /**
  * @copydoc PKPHandler::initialize()
  */
 function initialize($request)
 {
     parent::initialize($request);
     $context = $request->getContext();
     $this->_contextId = $context->getId();
     // Load user-related translations.
     AppLocale::requireComponents(LOCALE_COMPONENT_PKP_USER, LOCALE_COMPONENT_PKP_MANAGER, LOCALE_COMPONENT_APP_MANAGER, LOCALE_COMPONENT_PKP_SUBMISSION);
     // Basic grid configuration.
     $this->setTitle('grid.roles.currentRoles');
     // Add grid-level actions.
     $router = $request->getRouter();
     $this->addAction(new LinkAction('addUserGroup', new AjaxModal($router->url($request, null, null, 'addUserGroup'), __('grid.roles.add'), 'modal_add_role'), __('grid.roles.add'), 'add_role'));
     import('lib.pkp.controllers.grid.settings.roles.UserGroupGridCellProvider');
     $cellProvider = new UserGroupGridCellProvider();
     $workflowStagesLocales = WorkflowStageDAO::getWorkflowStageTranslationKeys();
     // Set array containing the columns info with the same cell provider.
     $columnsInfo = array(1 => array('id' => 'name', 'title' => 'settings.roles.roleName', 'template' => null), 2 => array('id' => 'abbrev', 'title' => 'settings.roles.roleAbbrev', 'template' => null));
     foreach ($workflowStagesLocales as $stageId => $stageTitleKey) {
         $columnsInfo[] = array('id' => $stageId, 'title' => $stageTitleKey, 'template' => 'controllers/grid/common/cell/selectStatusCell.tpl');
     }
     // Add array columns to the grid.
     foreach ($columnsInfo as $columnInfo) {
         $this->addColumn(new GridColumn($columnInfo['id'], $columnInfo['title'], null, $columnInfo['template'], $cellProvider));
     }
 }
 function initialize($request)
 {
     parent::initialize($request);
     // Retrieve the authorized submission.
     $this->setSubmission($this->getAuthorizedContextObject(ASSOC_TYPE_SUBMISSION));
     $this->setTitle('submission.contributors');
     $this->setInstructions('submission.contributorsDescription');
     // Load pkp-lib translations
     AppLocale::requireComponents(LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_PKP_USER, LOCALE_COMPONENT_PKP_DEFAULT);
     if ($this->canAdminister()) {
         $this->setReadOnly(false);
         // Grid actions
         $router = $request->getRouter();
         $actionArgs = $this->getRequestArgs();
         $this->addAction(new LinkAction('addAuthor', new AjaxModal($router->url($request, null, null, 'addAuthor', null, $actionArgs), __('grid.action.addContributor'), 'modal_add_user'), __('grid.action.addContributor'), 'add_user'));
     } else {
         $this->setReadOnly(true);
     }
     // Columns
     $cellProvider = new PKPAuthorGridCellProvider();
     $this->addColumn(new GridColumn('name', 'author.users.contributor.name', null, 'controllers/grid/gridCell.tpl', $cellProvider, array('width' => 40, 'alignment' => COLUMN_ALIGNMENT_LEFT)));
     $this->addColumn(new GridColumn('email', 'author.users.contributor.email', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     $this->addColumn(new GridColumn('role', 'author.users.contributor.role', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     $this->addColumn(new GridColumn('principalContact', 'author.users.contributor.principalContact', null, 'controllers/grid/users/author/primaryContact.tpl', $cellProvider));
     $this->addColumn(new GridColumn('includeInBrowse', 'author.users.contributor.includeInBrowse', null, 'controllers/grid/users/author/includeInBrowse.tpl', $cellProvider));
 }
 /**
  * @see GridHandler::initialize()
  */
 function initialize($request, $args = null)
 {
     parent::initialize($request, $args);
     // Basic grid configuration
     $this->setId('preparedEmailsGrid');
     AppLocale::requireComponents(LOCALE_COMPONENT_PKP_MANAGER, LOCALE_COMPONENT_PKP_USER);
     // Set the grid title.
     $this->setTitle('grid.preparedEmails.title');
     $this->setInstructions('grid.preparedEmails.description');
     // Grid actions
     import('lib.pkp.controllers.grid.settings.preparedEmails.linkAction.EditEmailLinkAction');
     $addEmailLinkAction = new EditEmailLinkAction($request);
     $this->addAction($addEmailLinkAction);
     import('lib.pkp.classes.linkAction.LinkAction');
     import('lib.pkp.classes.linkAction.request.RemoteActionConfirmationModal');
     $router = $request->getRouter();
     $this->addAction(new LinkAction('resetAll', new RemoteActionConfirmationModal(__('manager.emails.resetAll.message'), null, $router->url($request, null, 'grid.settings.preparedEmails.PreparedEmailsGridHandler', 'resetAllEmails')), __('manager.emails.resetAll'), 'reset_default'));
     // Columns
     import('lib.pkp.controllers.grid.settings.preparedEmails.PreparedEmailsGridCellProvider');
     $cellProvider = new PreparedEmailsGridCellProvider();
     $this->addColumn(new GridColumn('name', 'common.name', null, null, $cellProvider, array('width' => 40)));
     $this->addColumn(new GridColumn('sender', 'email.sender', null, null, $cellProvider, array('width' => 10)));
     $this->addColumn(new GridColumn('recipient', 'email.recipient', null, null, $cellProvider));
     $this->addColumn(new GridColumn('subject', 'common.subject', null, null, $cellProvider));
     $this->addColumn(new GridColumn('enabled', 'common.enabled', null, 'controllers/grid/common/cell/selectStatusCell.tpl', $cellProvider, array('width' => 5)));
 }
 /**
  * @copydoc PKPHandler::initialize()
  */
 function initialize($request)
 {
     parent::initialize($request);
     // Load submission-specific translations.
     AppLocale::requireComponents(LOCALE_COMPONENT_APP_COMMON, LOCALE_COMPONENT_APP_SUBMISSION, LOCALE_COMPONENT_PKP_SUBMISSION);
     // Fetch the authorized roles and determine if the user is a manager.
     $authorizedRoles = $this->getAuthorizedContextObject(ASSOC_TYPE_USER_ROLES);
     $this->_isManager = in_array(ROLE_ID_MANAGER, $authorizedRoles);
     // If there is more than one context in the system, add a context column
     $contextDao = Application::getContextDAO();
     $contexts = $contextDao->getAll();
     $cellProvider = new SubmissionsListGridCellProvider($authorizedRoles);
     if ($contexts->getCount() > 1) {
         $hasRoleCount = 0;
         $userGroupDao = DAORegistry::getDAO('UserGroupDAO');
         $user = $request->getUser();
         while ($context = $contexts->next()) {
             $userGroups = $userGroupDao->getByUserId($user->getId(), $context->getId());
             if ($userGroups->getCount() > 0) {
                 $hasRoleCount++;
             }
         }
         if ($hasRoleCount > 1 || $request->getContext() == null) {
             $this->addColumn(new GridColumn('context', 'context.context', null, null, $cellProvider));
         }
     }
     $this->addColumn(new GridColumn('id', null, __('common.id'), 'controllers/grid/gridCell.tpl', $cellProvider, array('alignment' => COLUMN_ALIGNMENT_LEFT, 'width' => 10)));
     $this->addColumn(new GridColumn('title', 'submission.title', null, null, $cellProvider, array('html' => true, 'alignment' => COLUMN_ALIGNMENT_LEFT)));
     $this->addColumn(new GridColumn('stage', 'workflow.stage', null, null, $cellProvider, array('alignment' => COLUMN_ALIGNMENT_LEFT, 'width' => 15)));
 }
 /**
  * @copydoc Gridhandler::initialize()
  */
 function initialize($request, $args = null)
 {
     parent::initialize($request);
     $context = $request->getContext();
     // Set the grid title.
     $this->setTitle('plugins.generic.customBlockManager.customBlocks');
     // Set the grid instructions.
     $this->setEmptyRowText('plugins.generic.customBlockManager.noneCreated');
     // Get the blocks and add the data to the grid
     $customBlockManagerPlugin = $this->plugin;
     $blocks = $customBlockManagerPlugin->getSetting($context->getId(), 'blocks');
     $gridData = array();
     if (is_array($blocks)) {
         foreach ($blocks as $block) {
             $gridData[$block] = array('title' => $block);
         }
     }
     $this->setGridDataElements($gridData);
     // Add grid-level actions
     $router = $request->getRouter();
     import('lib.pkp.classes.linkAction.request.AjaxModal');
     $this->addAction(new LinkAction('addCustomBlock', new AjaxModal($router->url($request, null, null, 'addCustomBlock'), __('plugins.generic.customBlockManager.addBlock'), 'modal_add_item'), __('plugins.generic.customBlockManager.addBlock'), 'add_item'));
     // Columns
     $this->addColumn(new GridColumn('title', 'plugins.generic.customBlockManager.blockName', null, 'controllers/grid/gridCell.tpl'));
 }
 function initialize(&$request)
 {
     parent::initialize($request);
     // Retrieve the authorized monograph.
     $this->setMonograph($this->getAuthorizedContextObject(ASSOC_TYPE_MONOGRAPH));
     // Load submission-specific translations
     Locale::requireComponents(array(LOCALE_COMPONENT_OMP_SUBMISSION, LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_PKP_USER, LOCALE_COMPONENT_OMP_DEFAULT_SETTINGS));
     // Basic grid configuration
     $this->setTitle('submission.submit.addAuthor');
     // Get the monograph id
     $monograph =& $this->getMonograph();
     assert(is_a($monograph, 'Monograph'));
     $monographId = $monograph->getId();
     // Retrieve the submissionContributors associated with this monograph to be displayed in the grid
     $authorDao =& DAORegistry::getDAO('AuthorDAO');
     $data =& $authorDao->getAuthorsByMonographId($monographId);
     $this->setData($data);
     // Grid actions
     $router =& $request->getRouter();
     $actionArgs = array('monographId' => $monographId);
     $this->addAction(new LegacyLinkAction('addSubmissionContributor', LINK_ACTION_MODE_MODAL, LINK_ACTION_TYPE_APPEND, $router->url($request, null, null, 'addSubmissionContributor', null, $actionArgs), 'grid.action.addAuthor'));
     // Columns
     $cellProvider = new SubmissionContributorGridCellProvider();
     $this->addColumn(new GridColumn('name', 'author.users.contributor.name', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     $this->addColumn(new GridColumn('email', 'author.users.contributor.email', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     $this->addColumn(new GridColumn('role', 'author.users.contributor.role', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     $this->addColumn(new GridColumn('principalContact', 'author.users.contributor.principalContact', null, 'controllers/grid/users/submissionContributor/primaryContact.tpl', $cellProvider));
 }
 function initialize(&$request)
 {
     parent::initialize($request);
     // Retrieve the authorized monograph.
     $this->_monograph =& $this->getAuthorizedContextObject(ASSOC_TYPE_MONOGRAPH);
     // Load submission-specific translations
     Locale::requireComponents(array(LOCALE_COMPONENT_OMP_SUBMISSION, LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_PKP_USER, LOCALE_COMPONENT_OMP_DEFAULT_SETTINGS));
     // Get the monograph id
     $monograph =& $this->getMonograph();
     assert(is_a($monograph, 'Monograph'));
     $monographId = $monograph->getId();
     // Retrieve the submissionParticipants associated with this monograph to be displayed in the grid
     $signoffDao =& DAORegistry::getDAO('SignoffDAO');
     /* @var $signoffDao SignoffDAO */
     $users =& $signoffDao->getUsersBySymbolic('SIGNOFF_STAGE', ASSOC_TYPE_MONOGRAPH, $monographId);
     $rowData = array();
     while ($user =& $users->next()) {
         $userId = $user->getId();
         $rowData[$userId] = $user;
     }
     $this->setData($rowData);
     // Columns
     $cellProvider = new SubmissionParticipantGridCellProvider();
     $this->addColumn(new GridColumn('name', 'author.users.contributor.name', null, 'controllers/grid/gridCell.tpl', $cellProvider));
 }
 /**
  * @copydoc PKPHandler::initialize()
  */
 function initialize($request)
 {
     parent::initialize($request);
     // Load user-related translations.
     AppLocale::requireComponents(LOCALE_COMPONENT_PKP_USER, LOCALE_COMPONENT_PKP_MANAGER);
     // Basic grid configuration.
     $this->setTitle('common.languages');
 }
 /**
  * @see GridHandler::initialize
  */
 function initialize(&$request, $addItemLink = true)
 {
     parent::initialize($request);
     if ($addItemLink) {
         import('lib.pkp.classes.linkAction.request.NullAction');
         $this->addAction(new LinkAction('addItem', new NullAction(), __('grid.action.addItem'), 'add_item'));
     }
 }
 /**
  * @see GridHandler::initialize
  * @param $request PKPRequest
  * @param $addItemLink boolean optional True/default to present an "add item" link action
  */
 function initialize($request, $addItemLink = true)
 {
     parent::initialize($request);
     if ($addItemLink) {
         import('lib.pkp.classes.linkAction.request.NullAction');
         $this->addAction($this->getAddItemLinkAction(new NullAction()));
     }
 }
 /**
  * @copydoc GridHandler::initialize()
  */
 function initialize($request)
 {
     parent::initialize($request);
     import('controllers.grid.manageCatalog.CatalogMonographsGridCellProvider');
     $cellProvider = new CatalogMonographsGridCellProvider($this->assocType, $this->assocId, $this->getRequestArgs());
     $this->addColumn(new GridColumn('id', 'common.id', null, null, $cellProvider, array('alignment' => COLUMN_ALIGNMENT_LEFT, 'width' => 5)));
     $this->addColumn(new GridColumn('title', 'grid.submission.itemTitle', null, null, $cellProvider));
     $this->addColumn(new GridColumn('isFeatured', $this->getIsFeaturedColumnTitle(), null, 'controllers/grid/common/cell/selectStatusCell.tpl', $cellProvider, array('width' => 20)));
     $this->addColumn(new GridColumn('isNewRelease', $this->getNewReleaseColumnTitle(), null, 'controllers/grid/common/cell/selectStatusCell.tpl', $cellProvider, array('width' => 20)));
 }
 /**
  * @copydoc Gridhandler::initialize()
  */
 function initialize($request, $args = null)
 {
     parent::initialize($request);
     $this->tabsSelector = $request->getUserVar('tabsSelector');
     // Set the grid details.
     $this->setInstructions('plugins.generic.translator.localeDescription');
     $this->setGridDataElements(AppLocale::getAllLocales());
     // Columns
     $cellProvider = new LiteralGridCellProvider();
     $this->addColumn(new GridColumn('id', 'common.language', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     $this->addColumn(new GridColumn('name', 'common.name', null, 'controllers/grid/gridCell.tpl', $cellProvider, array('width' => 80, 'alignment' => COLUMN_ALIGNMENT_LEFT)));
 }
 /**
  * Configure the grid
  * @param $request PKPRequest
  */
 function initialize($request)
 {
     parent::initialize($request);
     $this->setTitle('submission.layout.galleys');
     // Load pkp-lib translations
     AppLocale::requireComponents(LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_PKP_USER, LOCALE_COMPONENT_PKP_EDITOR, LOCALE_COMPONENT_APP_EDITOR);
     import('controllers.grid.articleGalleys.ArticleGalleyGridCellProvider');
     $cellProvider = new ArticleGalleyGridCellProvider($this->getSubmission());
     // Columns
     $this->addColumn(new GridColumn('label', 'common.name', null, null, $cellProvider));
     $router = $request->getRouter();
     $this->addAction(new LinkAction('addGalley', new AjaxModal($router->url($request, null, null, 'addGalley', null, $this->getRequestArgs()), __('submission.layout.newGalley'), 'modal_add_item'), __('grid.action.addGalley'), 'add_item'));
 }
 /**
  * @copydoc PKPHandler::initialize()
  */
 function initialize($request)
 {
     parent::initialize($request);
     // Load user-related translations.
     AppLocale::requireComponents(LOCALE_COMPONENT_PKP_USER, LOCALE_COMPONENT_PKP_MANAGER, LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_PKP_READER);
     // Basic grid configuration.
     $this->setTitle('submission.metadata');
     $cellProvider = new MetadataGridCellProvider($request->getContext());
     // Field name.
     $this->addColumn(new GridColumn('name', 'common.name', null, 'controllers/grid/gridCell.tpl', $cellProvider, array('width' => 60)));
     $this->addColumn(new GridColumn('workflow', 'common.enabled', null, 'controllers/grid/common/cell/selectStatusCell.tpl', $cellProvider, array('alignment' => 'center')));
     $this->addColumn(new GridColumn('submission', 'manager.setup.metadata.submission', null, 'controllers/grid/common/cell/selectStatusCell.tpl', $cellProvider, array('alignment' => 'center')));
 }
 /**
  * @copydoc Gridhandler::initialize()
  */
 function initialize($request, $args = null)
 {
     parent::initialize($request);
     $this->tabsSelector = $request->getUserVar('tabsSelector');
     $this->locale = $request->getUserVar('locale');
     if (!AppLocale::isLocaleValid($this->locale)) {
         fatalError('Invalid locale.');
     }
     $this->addColumns();
     if ($this->locale != MASTER_LOCALE) {
         $this->addColumn(new GridColumn('status', 'common.status', null, 'controllers/grid/gridCell.tpl', null, array('html' => true, 'alignment' => COLUMN_ALIGNMENT_LEFT)));
     }
 }
 /**
  * Configure the grid
  * @param $request PKPRequest
  */
 function initialize($request)
 {
     parent::initialize($request);
     $this->setTitle('submission.query.messages');
     // Load pkp-lib translations
     AppLocale::requireComponents(LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_PKP_USER, LOCALE_COMPONENT_PKP_EDITOR);
     import('lib.pkp.controllers.grid.queries.QueryNotesGridCellProvider');
     $cellProvider = new QueryNotesGridCellProvider($this->getSubmission());
     // Columns
     $this->addColumn(new GridColumn('contents', 'common.note', null, null, $cellProvider, array('width' => 80, 'html' => true)));
     $this->addColumn(new GridColumn('from', 'submission.query.from', null, null, $cellProvider, array('html' => true)));
     $this->_user = $request->getUser();
 }
Exemple #25
0
 /**
  * @see PKPHandler::initialize()
  */
 function initialize($request, $args)
 {
     parent::initialize($request, $args);
     AppLocale::requireComponents(LOCALE_COMPONENT_APP_EDITOR);
     // Grid columns.
     import('controllers.grid.issues.IssueGridCellProvider');
     $issueGridCellProvider = new IssueGridCellProvider();
     // Issue identification
     $this->addColumn(new GridColumn('identification', 'issue.issue', null, 'controllers/grid/gridCell.tpl', $issueGridCellProvider));
     $this->_addCenterColumns($issueGridCellProvider);
     // Number of articles
     $this->addColumn(new GridColumn('numArticles', 'editor.issues.numArticles', null, 'controllers/grid/gridCell.tpl', $issueGridCellProvider));
 }
 /**
  * Configure the grid
  * @param $request PKPRequest
  */
 function initialize($request)
 {
     parent::initialize($request);
     // Retrieve the authorized monograph.
     $submission = $this->getAuthorizedContextObject(ASSOC_TYPE_SUBMISSION);
     $this->setSubmission($submission);
     // Load submission-specific translations
     AppLocale::requireComponents(LOCALE_COMPONENT_APP_SUBMISSION, LOCALE_COMPONENT_PKP_SUBMISSION);
     // Columns
     $cellProvider = new EventLogGridCellProvider();
     $this->addColumn(new GridColumn('date', 'common.date', null, null, new DateGridCellProvider($cellProvider, Config::getVar('general', 'date_format_short'))));
     $this->addColumn(new GridColumn('user', 'common.user', null, null, $cellProvider));
     $this->addColumn(new GridColumn('event', 'common.event', null, null, $cellProvider, array('width' => 60)));
 }
 /**
  * @copydoc PKPHandler::initialize()
  */
 function initialize($request)
 {
     parent::initialize($request);
     // Load submission-specific translations.
     AppLocale::requireComponents(LOCALE_COMPONENT_APP_COMMON, LOCALE_COMPONENT_APP_SUBMISSION, LOCALE_COMPONENT_PKP_SUBMISSION);
     // Fetch the authorized roles and determine if the user is a manager.
     $authorizedRoles = $this->getAuthorizedContextObject(ASSOC_TYPE_USER_ROLES);
     $this->_isManager = in_array(ROLE_ID_MANAGER, $authorizedRoles);
     // If there is more than one context in the system, add a context column
     $cellProvider = new SubmissionsListGridCellProvider($request->getUser(), $authorizedRoles);
     $this->addColumn(new GridColumn('id', null, __('common.id'), 'controllers/grid/gridCell.tpl', $cellProvider, array('alignment' => COLUMN_ALIGNMENT_LEFT, 'width' => 10)));
     $this->addColumn(new GridColumn('title', 'grid.submission.itemTitle', null, null, $cellProvider, array('html' => true, 'alignment' => COLUMN_ALIGNMENT_LEFT)));
     $this->addColumn(new GridColumn('stage', 'workflow.stage', null, null, $cellProvider, array('alignment' => COLUMN_ALIGNMENT_LEFT, 'width' => 15)));
 }
 /**
  * @copydoc GridHandler::initialize()
  */
 function initialize($request)
 {
     parent::initialize($request);
     // Set the no items row text
     $this->setEmptyRowText('announcement.noneExist');
     $context = $request->getContext();
     // Columns
     import('lib.pkp.controllers.grid.announcements.AnnouncementGridCellProvider');
     $announcementCellProvider = new AnnouncementGridCellProvider();
     $this->addColumn(new GridColumn('title', 'common.title', null, 'controllers/grid/gridCell.tpl', $announcementCellProvider, array('width' => 60)));
     $this->addColumn(new GridColumn('type', 'common.type', null, 'controllers/grid/gridCell.tpl', $announcementCellProvider));
     $dateCellProvider = new DateGridCellProvider(new DataObjectGridCellProvider(), Config::getVar('general', 'date_format_short'));
     $this->addColumn(new GridColumn('datePosted', 'announcement.posted', null, 'controllers/grid/gridCell.tpl', $dateCellProvider));
 }
 /**
  * @see PKPHandler::initialize()
  */
 function initialize($request, $args = null)
 {
     parent::initialize($request);
     AppLocale::requireComponents(LOCALE_COMPONENT_APP_SUBMISSION, LOCALE_COMPONENT_PKP_SUBMISSION);
     $this->_selectedNotificationIds = (array) $request->getUserVar('selectedNotificationIds');
     $cellProvider = new NotificationsGridCellProvider();
     $this->addColumn(new GridColumn('task', $this->getNotificationsColumnTitle(), null, null, $cellProvider, array('anyhtml' => true, 'alignment' => COLUMN_ALIGNMENT_LEFT)));
     // Set the no items row text
     $this->setEmptyRowText('grid.noItems');
     import('lib.pkp.classes.linkAction.request.NullAction');
     $this->addAction(new LinkAction('markNew', new NullAction(), __('grid.action.markNew'), 'edit'), GRID_ACTION_POSITION_BELOW);
     $this->addAction(new LinkAction('markRead', new NullAction(), __('grid.action.markRead'), 'edit'), GRID_ACTION_POSITION_BELOW);
     $router = $request->getRouter();
     $this->addAction(new LinkAction('deleteNotifications', new NullAction(), __('grid.action.delete'), 'delete'), GRID_ACTION_POSITION_BELOW);
 }
 function initialize($request)
 {
     parent::initialize($request);
     AppLocale::requireComponents(LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_PKP_MANAGER, LOCALE_COMPONENT_PKP_USER, LOCALE_COMPONENT_PKP_EDITOR, LOCALE_COMPONENT_APP_EDITOR);
     $this->setTitle('editor.submission.findAndSelectReviewer');
     // Columns
     $cellProvider = new ReviewerSelectGridCellProvider();
     $this->addColumn(new GridColumn('select', '', null, 'controllers/grid/users/reviewerSelect/reviewerSelectRadioButton.tpl', $cellProvider, array('width' => 5)));
     $this->addColumn(new GridColumn('name', 'author.users.contributor.name', null, null, $cellProvider, array('alignment' => COLUMN_ALIGNMENT_LEFT, 'width' => 30)));
     $this->addColumn(new GridColumn('done', 'common.done', null, null, $cellProvider));
     $this->addColumn(new GridColumn('avg', 'editor.review.days', null, null, $cellProvider));
     $this->addColumn(new GridColumn('last', 'editor.submissions.lastAssigned', null, null, $cellProvider));
     $this->addColumn(new GridColumn('active', 'common.active', null, null, $cellProvider));
     $this->addColumn(new GridColumn('interests', 'user.interests', null, null, $cellProvider, array('width' => 20)));
 }