-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVolumeGridRow.inc.php
74 lines (66 loc) · 1.51 KB
/
VolumeGridRow.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
<?php
/**
* @file plugins/generic/volumesForm/controllers/grid/VolumeGridRow.inc.php
*
* Handle volume grid row requests.
*/
import('lib.pkp.classes.controllers.grid.GridRow');
class VolumeGridRow extends GridRow
{
/**
* Constructor
*/
function __construct()
{
parent::__construct();
}
//
// Overridden template methods
//
/**
* @copydoc GridRow::initialize()
*/
function initialize($request, $template = null)
{
parent::initialize($request, $template);
// Is this a new row or an existing row?
$rowId = $this->getId();
if (!empty($rowId) && is_numeric($rowId)) {
$router = $request->getRouter();
$actionArgs = array(
'volumeId' => $rowId
);
// Create the "edit" action.
import('lib.pkp.classes.linkAction.request.AjaxModal');
$this->addAction(
new LinkAction(
'editVolume',
new AjaxModal(
$router->url($request, null, null, 'editVolume', null, $actionArgs),
__('grid.action.edit'),
'modal_edit',
true
),
__('grid.action.edit'),
'edit'
)
);
// Create the "delete" action.
import('lib.pkp.classes.linkAction.request.RemoteActionConfirmationModal');
$this->addAction(
new LinkAction(
'deleteVolume',
new RemoteActionConfirmationModal(
$request->getSession(),
__('common.confirmDelete'),
__('grid.action.delete'),
$router->url($request, null, null, 'deleteVolume', null, $actionArgs),
'modal_delete'
),
__('grid.action.delete'),
'delete'
)
);
}
}
}