| Server IP : 10.10.92.66 / Your IP : 104.23.197.230 Web Server : Apache/2.4.52 (Ubuntu) System : Linux jurnalpolinema 5.15.0-177-generic #187-Ubuntu SMP Sat Apr 11 22:54:33 UTC 2026 x86_64 User : jurnal ( 1001) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/jurnal/public_html/controllers/grid/articleGalleys/ |
Upload File : |
<?php
/**
* @file controllers/grid/articleGalleys/ArticleGalleyGridRow.inc.php
*
* Copyright (c) 2016-2021 Simon Fraser University
* Copyright (c) 2000-2021 John Willinsky
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
*
* @class ArticleGalleyGridRow
* @ingroup controllers_grid_articleGalleys
*
* @brief Representation of an article galley grid row.
*/
import('lib.pkp.classes.controllers.grid.GridRow');
class ArticleGalleyGridRow extends GridRow {
/** @var Submission **/
var $_submission;
/** @var Publication **/
var $_publication;
/** @var boolean */
var $_isEditable;
/**
* Constructor
* @param $submission Submission
* @param $isEditable boolean
*/
function __construct($submission, $publication, $isEditable) {
$this->_submission = $submission;
$this->_publication = $publication;
$this->_isEditable = $isEditable;
parent::__construct();
}
//
// Overridden methods from GridRow
//
/**
* @copydoc GridRow::initialize()
*/
function initialize($request, $template = null) {
// Do the default initialization
parent::initialize($request, $template);
// Is this a new row or an existing row?
$rowId = $this->getId();
if (!empty($rowId) && is_numeric($rowId)) {
// Only add row actions if this is an existing row
$router = $request->getRouter();
$actionArgs = $this->getRequestArgs();
$actionArgs['representationId'] = $rowId;
// Add row-level actions
import('lib.pkp.classes.linkAction.request.AjaxModal');
$this->addAction(new LinkAction(
'editGalley',
new AjaxModal(
$router->url($request, null, null, 'editGalley', null, $actionArgs),
($this->_isEditable)?__('submission.layout.editGalley'):__('submission.layout.viewGalley'),
'modal_edit'
),
($this->_isEditable)?__('grid.action.edit'):__('grid.action.view'),
'edit'
));
if ($this->_isEditable) {
$galley = $this->getData();
if ($galley->getRemoteUrl() == '') {
import('lib.pkp.controllers.api.file.linkAction.AddFileLinkAction');
import('lib.pkp.classes.submission.SubmissionFile'); // Constants
$this->addAction(new AddFileLinkAction(
$request, $this->getSubmission()->getId(), WORKFLOW_STAGE_ID_PRODUCTION,
array(ROLE_ID_MANAGER, ROLE_ID_SUB_EDITOR, ROLE_ID_ASSISTANT),
SUBMISSION_FILE_PROOF, ASSOC_TYPE_REPRESENTATION, $rowId,
null
));
}
import('lib.pkp.classes.linkAction.request.RemoteActionConfirmationModal');
$this->addAction(new LinkAction(
'deleteGalley',
new RemoteActionConfirmationModal(
$request->getSession(),
__('common.confirmDelete'),
__('grid.action.delete'),
$router->url($request, null, null, 'deleteGalley', null, $actionArgs), 'modal_delete'),
__('grid.action.delete'),
'delete'
));
}
}
}
/**
* Get the submission for this row (already authorized)
* @return Submission
*/
function getSubmission() {
return $this->_submission;
}
/**
* Get the publication for this row (already authorized)
* @return Publication
*/
function getPublication() {
return $this->_publication;
}
/**
* Get the base arguments that will identify the data in the grid.
* @return array
*/
function getRequestArgs() {
return array(
'submissionId' => $this->getSubmission()->getId(),
'publicationId' => $this->getPublication()->getId(),
);
}
}