本文整理汇总了PHP中GridHandler::initialize方法的典型用法代码示例。如果您正苦于以下问题:PHP GridHandler::initialize方法的具体用法?PHP GridHandler::initialize怎么用?PHP GridHandler::initialize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GridHandler
的用法示例。
在下文中一共展示了GridHandler::initialize方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initialize
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));
}
示例2: initialize
/**
* @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));
}
示例3: initialize
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)));
}
示例4: initialize
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));
}
示例5: initialize
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));
}
示例6: initialize
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));
}
示例7: initialize
/**
* @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));
}
开发者ID:relaciones-internacionales-journal,项目名称:pkp-lib,代码行数:34,代码来源:ExportableUsersGridHandler.inc.php
示例8: initialize
function initialize(&$request)
{
parent::initialize($request);
if (!is_null($request->getUserVar('rowCategoryId'))) {
$this->_currentCategoryId = (string) $request->getUserVar('rowCategoryId');
}
}
示例9: initialize
/**
* @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));
}
}
示例10: initialize
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));
}
示例11: initialize
/**
* @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)));
}
开发者ID:relaciones-internacionales-journal,项目名称:pkp-lib,代码行数:29,代码来源:PreparedEmailsGridHandler.inc.php
示例12: initialize
/**
* @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)));
}
示例13: initialize
/**
* @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'));
}
示例14: initialize
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));
}
示例15: initialize
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));
}