15 import(
'lib.pkp.classes.controllers.grid.GridCellProvider');
16 import(
'lib.pkp.classes.linkAction.request.AjaxModal');
28 $element = $row->getData();
29 $columnId = $column->getId();
30 assert(is_a($element,
'GalleryPlugin') && !empty($columnId));
34 return array(
'label' =>
'');
37 $label = $element->getLocalizedSummary();
38 return array(
'label' => $label);
41 switch ($element->getCurrentStatus()) {
42 case PLUGIN_GALLERY_STATE_NEWER:
43 $statusKey =
'manager.plugins.installedVersionNewer.short';
45 case PLUGIN_GALLERY_STATE_UPGRADABLE:
46 $statusKey =
'manager.plugins.installedVersionOlder.short';
48 case PLUGIN_GALLERY_STATE_CURRENT:
49 $statusKey =
'manager.plugins.installedVersionNewest.short';
51 case PLUGIN_GALLERY_STATE_AVAILABLE:
54 case PLUGIN_GALLERY_STATE_INCOMPATIBLE:
55 $statusKey =
'manager.plugins.noCompatibleVersion.short';
57 default:
return assert(
false);
59 return array(
'label' => __($statusKey));
71 function getCellActions($request, $row, $column, $position = GRID_ACTION_POSITION_DEFAULT) {
72 $element = $row->getData();
73 switch ($column->getId()) {
75 $router = $request->getRouter();
79 $router->url($request,
null,
null,
'viewPlugin',
null, array(
'rowId' => $row->getId()+1)),
80 htmlspecialchars($element->getLocalizedName()),
84 htmlspecialchars($element->getLocalizedName()),
88 return parent::getCellActions($request, $row, $column, $position);