Open Journal Systems
3.3.0
SectionGridRow.inc.php
1
<?php
2
16
import
(
'lib.pkp.classes.controllers.grid.GridRow'
);
17
18
class
SectionGridRow
extends
GridRow
{
19
20
//
21
// Overridden template methods
22
//
26
function
initialize
($request, $template =
null
) {
27
parent::initialize($request, $template);
28
29
// Is this a new row or an existing row?
30
$sectionId = $this->
getId
();
31
if
(!empty($sectionId) && is_numeric($sectionId)) {
32
$router = $request->getRouter();
33
34
import
(
'lib.pkp.classes.linkAction.request.AjaxModal'
);
35
$this->
addAction
(
36
new
LinkAction
(
37
'editSection'
,
38
new
AjaxModal
(
39
$router->url($request,
null
,
null
,
'editSection'
,
null
, array(
'sectionId'
=> $sectionId)),
40
__(
'grid.action.edit'
),
41
'modal_edit'
,
42
true
),
43
__(
'grid.action.edit'
),
44
'edit'
45
)
46
);
47
48
import
(
'lib.pkp.classes.linkAction.request.RemoteActionConfirmationModal'
);
49
$this->
addAction
(
50
new
LinkAction
(
51
'deleteSection'
,
52
new
RemoteActionConfirmationModal
(
53
$request->getSession(),
54
__(
'manager.sections.confirmDelete'
),
55
__(
'grid.action.delete'
),
56
$router->url($request,
null
,
null
,
'deleteSection'
,
null
, array(
'sectionId'
=> $sectionId)),
'modal_delete'
57
),
58
__(
'grid.action.delete'
),
59
'delete'
60
)
61
);
62
}
63
}
64
}
65
66
RemoteActionConfirmationModal
Class defining a simple confirmation modal with a remote action and ok/cancel buttons.
Definition:
RemoteActionConfirmationModal.inc.php:18
GridRow\addAction
addAction($action, $position=GRID_ACTION_POSITION_DEFAULT)
Definition:
GridRow.inc.php:179
GridBodyElement\getId
getId()
Definition:
GridBodyElement.inc.php:57
SectionGridRow
Handle section grid row requests.
Definition:
SectionGridRow.inc.php:18
GridRow
GridRow implements a row of a Grid. See GridHandler for general information about grids.
Definition:
GridRow.inc.php:29
AjaxModal
A modal that retrieves its content from via AJAX.
Definition:
AjaxModal.inc.php:18
LinkAction
Base class defining an action that can be performed by the user in the user interface.
Definition:
LinkAction.inc.php:22
SectionGridRow\initialize
initialize($request, $template=null)
Definition:
SectionGridRow.inc.php:26
controllers
grid
settings
sections
SectionGridRow.inc.php
Generated on Fri Aug 28 2020 14:53:34 for Open Journal Systems by
1.8.17