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

controllers/grid/users/reviewer/ReviewerGridRow.inc.php

00001 <?php
00002 
00015 import('lib.pkp.classes.controllers.grid.GridRow');
00016 
00017 class ReviewerGridRow extends GridRow {
00021    function ReviewerGridRow() {
00022       parent::GridRow();
00023    }
00024 
00025    //
00026    // Overridden methods from GridRow
00027    //
00032    function initialize(&$request) {
00033       parent::initialize($request);
00034 
00035       // Retrieve the monograph id from the request
00036       // These parameters need not be validated as we're just
00037       // passing them along to another request, where they will be
00038       // checked before they're used.
00039       $monographId = (int) $request->getUserVar('monographId');
00040       $stageId = (int) $request->getUserVar('stageId');
00041       $round = (int) $request->getUserVar('round');
00042 
00043       // Is this a new row or an existing row?
00044       $rowId = $this->getId();
00045       if (!empty($rowId) && is_numeric($rowId)) {
00046          // Only add row actions if this is an existing row
00047          $router =& $request->getRouter();
00048          $actionArgs = array(
00049             'monographId' => $monographId,
00050             'reviewAssignmentId' => $rowId,
00051             'stageId' => $stageId,
00052             'round' => $round
00053          );
00054 
00055          $this->addAction(
00056             new LinkAction(
00057                'history',
00058                new AjaxModal(
00059                   $router->url($request, null, null, 'reviewHistory', null, $actionArgs),
00060                   __('submission.history'),
00061                   'modal_information',
00062                   true
00063                ),
00064                __('submission.history'),
00065                'more_info'
00066             )
00067          );
00068 
00069          $this->addAction(
00070             new LinkAction(
00071                'email',
00072                new AjaxModal(
00073                   $router->url($request, null, null, 'sendEmail', null, $actionArgs),
00074                   __('grid.user.email'),
00075                   'modal_email',
00076                   true
00077                ),
00078             __('grid.user.email'),
00079             'notify'
00080             )
00081          );
00082 
00083          $reviewAssignment =& $this->getData();
00084          // Only assign this action if the reviewer has not acknowledged yet.
00085          if (!$reviewAssignment->getDateConfirmed()) {
00086             import('lib.pkp.classes.linkAction.request.RemoteActionConfirmationModal');
00087             $this->addAction(
00088                new LinkAction(
00089                   'remove',
00090                   new RemoteActionConfirmationModal(
00091                      __('common.confirmDelete'), __('common.remove'),
00092                      $router->url($request, null, null, 'deleteReviewer', null, $actionArgs),
00093                      'modal_delete'
00094                   ),
00095                __('grid.action.unassignUser'),
00096                'delete'
00097                )
00098             );
00099          }
00100       }
00101    }
00102 }
00103 
00104 ?>

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