function removeArticleCoverPage($args) { import('pages.copyeditor.SubmissionCopyeditHandler'); SubmissionCopyeditHandler::removeCoverPage($args); }
/** * Remove cover page from article */ function removeCoverPage($args) { $articleId = isset($args[0]) ? (int) $args[0] : 0; $formLocale = $args[1]; list($journal, $submission) = SubmissionCopyeditHandler::validate($articleId); import('file.PublicFileManager'); $publicFileManager =& new PublicFileManager(); $publicFileManager->removeJournalFile($journal->getJournalId(), $submission->getFileName($formLocale)); $submission->setFileName('', $formLocale); $submission->setOriginalFileName('', $formLocale); $submission->setWidth('', $formLocale); $submission->setHeight('', $formLocale); $articleDao =& DAORegistry::getDAO('ArticleDAO'); $articleDao->updateArticle($submission); Request::redirect(null, null, 'viewMetadata', $articleId); }
/** * Delete comment. */ function deleteComment($args) { CopyeditorHandler::validate(); CopyeditorHandler::setupTemplate(true); $articleId = $args[0]; $commentId = $args[1]; list($journal, $submission) = SubmissionCopyeditHandler::validate($articleId); list($comment) = SubmissionCommentsHandler::validate($commentId); CopyeditorAction::deleteComment($commentId); // Redirect back to initial comments page if ($comment->getCommentType() == COMMENT_TYPE_COPYEDIT) { Request::redirect(null, null, 'viewCopyeditComments', $articleId); } else { if ($comment->getCommentType() == COMMENT_TYPE_LAYOUT) { Request::redirect(null, null, 'viewLayoutComments', $articleId); } else { if ($comment->getCommentType() == COMMENT_TYPE_PROOFREAD) { Request::redirect(null, null, 'viewProofreadComments', $articleId); } } } }
/** * Proof galley (outputs file contents). * @param $args array ($articleId, $galleyId) */ function proofGalleyFile($args) { $articleId = isset($args[0]) ? (int) $args[0] : 0; $galleyId = isset($args[1]) ? (int) $args[1] : 0; $this->validate($articleId); $galleyDao =& DAORegistry::getDAO('ArticleGalleyDAO'); $galley =& $galleyDao->getGalley($galleyId, $articleId); import('classes.file.ArticleFileManager'); // FIXME if (isset($galley)) { if ($galley->isHTMLGalley()) { $templateMgr =& TemplateManager::getManager(); $templateMgr->assign_by_ref('galley', $galley); if ($galley->isHTMLGalley() && ($styleFile =& $galley->getStyleFile())) { $templateMgr->addStyleSheet(Request::url(null, 'article', 'viewFile', array($articleId, $galleyId, $styleFile->getFileId()))); } $templateMgr->display('submission/layout/proofGalleyHTML.tpl'); } else { // View non-HTML file inline SubmissionCopyeditHandler::viewFile(array($articleId, $galley->getFileId())); } } }
/** * Delete comment. */ function deleteComment($args) { $articleId = $args[0]; $commentId = $args[1]; $submissionCopyeditHandler = new SubmissionCopyeditHandler(); $submissionCopyeditHandler->validate($articleId); $this->addCheck(new HandlerValidatorSubmissionComment($this, $commentId)); $this->validate(); $comment =& $this->comment; $this->setupTemplate(true); CopyeditorAction::deleteComment($commentId); // Redirect back to initial comments page if ($comment->getCommentType() == COMMENT_TYPE_COPYEDIT) { Request::redirect(null, null, 'viewCopyeditComments', $articleId); } else { if ($comment->getCommentType() == COMMENT_TYPE_LAYOUT) { Request::redirect(null, null, 'viewLayoutComments', $articleId); } else { if ($comment->getCommentType() == COMMENT_TYPE_PROOFREAD) { Request::redirect(null, null, 'viewProofreadComments', $articleId); } } } }