/
AuthorSubmissionsListGridRow.inc.php
76 lines (67 loc) · 1.98 KB
/
AuthorSubmissionsListGridRow.inc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
/**
* @file controllers/grid/submissions/author/AuthorSubmissionsListGridRow.inc.php
*
* Copyright (c) 2000-2009 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* @class AuthorSubmissionsListGridRow
* @ingroup controllers_grid_submissionsList_author
*
* @brief AuthorSubmissionsListGridRow grid row definition
*/
import('lib.pkp.classes.controllers.grid.GridRow');
class AuthorSubmissionsListGridRow extends GridRow {
/**
* Constructor
*/
function SubmissionsListGridRow() {
parent::GridRow();
}
//
// Overridden methods from GridRow
//
/**
* @see GridRow::initialize()
* @param $request PKPRequest
*/
function initialize(&$request) {
// Do the default initialization
parent::initialize($request);
// Set a non-default template that supports row actions
$this->setTemplate('controllers/grid/gridRowWithActions.tpl');
// Is this a new row or an existing row?
$rowId = $this->getId();
if (!empty($rowId) && is_numeric($rowId)) {
// Only add row actions if this is an existing row
$router =& $request->getRouter();
$actionArgs = array(
'monographId' => $rowId,
);
$monographDao =& DAORegistry::getDAO('MonographDAO');
$monograph =& $monographDao->getMonograph($rowId);
$this->addAction(
new LinkAction(
'deleteSubmission',
LINK_ACTION_MODE_CONFIRM,
LINK_ACTION_TYPE_REMOVE,
$router->url($request, null, null, 'deleteSubmission', null, $actionArgs),
'grid.action.delete',
null,
'delete',
Locale::translate('common.confirmDelete')
)
);
$this->addAction(
new LinkAction(
'moreInfo',
LINK_ACTION_MODE_MODAL,
LINK_ACTION_TYPE_NOTHING,
$router->url($request, null, 'informationCenter.SubmissionInformationCenterHandler', 'viewInformationCenter', null, array('monographId' => $rowId, 'itemId' => $rowId, 'stageId' => $monograph->getCurrentStageId())),
'grid.action.moreInformation',
null,
'more_info'
));
}
}
}