• Main Page
  • Modules
  • Classes
  • Files
  • File List

controllers/grid/settings/contributor/ContributorGridRow.inc.php

00001 <?php
00002 
00015 import('lib.pkp.classes.controllers.grid.GridRow');
00016 
00017 class ContributorGridRow extends GridRow {
00021    function ContributorGridRow() {
00022       parent::GridRow();
00023    }
00024 
00025    //
00026    // Overridden template methods
00027    //
00028    /*
00029     * Configure the grid row
00030     * @param $request PKPRequest
00031     */
00032    function initialize(&$request) {
00033       parent::initialize($request);
00034       // add Grid Row Actions
00035 
00036       // Is this a new row or an existing row?
00037       $rowId = $this->getId();
00038       if (!empty($rowId) && is_numeric($rowId)) {
00039          // Actions
00040          $router =& $request->getRouter();
00041          $actionArgs = array(
00042             'gridId' => $this->getGridId(),
00043             'rowId' => $rowId
00044          );
00045 
00046          $this->addAction(
00047             new LinkAction(
00048                'editContributor',
00049                new AjaxModal(
00050                   $router->url($request, null, null, 'editContributor', null, $actionArgs),
00051                   __('grid.action.edit'),
00052                   'modal_edit',
00053                   true
00054                   ),
00055                __('grid.action.edit'),
00056                'edit')
00057          );
00058 
00059          import('lib.pkp.classes.linkAction.request.RemoteActionConfirmationModal');
00060 
00061          $this->addAction(
00062             new LinkAction(
00063                'deleteContributor',
00064                new RemoteActionConfirmationModal(
00065                   __('grid.action.delete'),
00066                   __('common.delete'),
00067                   $router->url($request, null, null, 'deleteContributor', null, $actionArgs),
00068                   'modal_delete'
00069                ),
00070                __('grid.action.delete'),
00071                'delete')
00072          );
00073       }
00074    }
00075 }
00076 
00077 ?>

Generated on Mon Sep 17 2012 13:58:56 for Open Monograph Press by  doxygen 1.7.1