/** * Get the form for a particular tab. */ function _getFormFromCurrentTab(&$form, &$notificationKey, $request) { parent::_getFormFromCurrentTab($form, $notificationKey, $request); // give PKP-lib a chance to set the form and key. if (!$form) { // nothing applicable in parent. $submission = $this->getSubmission(); switch ($this->getCurrentTab()) { case 'publication': import('controllers.tab.issueEntry.form.IssueEntryPublicationMetadataForm'); $user = $request->getUser(); $form = new IssueEntryPublicationMetadataForm($submission->getId(), $user->getId(), $this->getStageId(), array('displayedInContainer' => true, 'tabPos' => $this->getTabPosition())); $notificationKey = 'notification.savedIssueMetadata'; import('lib.pkp.classes.log.SubmissionLog'); SubmissionLog::logEvent($request, $submission, SUBMISSION_LOG_ISSUE_METADATA_UPDATE, 'submission.event.issueMetadataUpdated'); break; } } }
/** * Get the form for a particular tab. */ function _getFormFromCurrentTab(&$form, &$notificationKey, $request) { parent::_getFormFromCurrentTab($form, $notificationKey, $request); // give PKP-lib a chance to set the form and key. if (!$form) { // nothing applicable in parent. $submission = $this->getSubmission(); switch ($this->getCurrentTab()) { case 'catalog': import('controllers.tab.catalogEntry.form.CatalogEntryCatalogMetadataForm'); $user = $request->getUser(); $form = new CatalogEntryCatalogMetadataForm($submission->getId(), $user->getId(), $this->getStageId(), array('displayedInContainer' => true, 'tabPos' => $this->getTabPosition())); $notificationKey = 'notification.savedCatalogMetadata'; SubmissionLog::logEvent($request, $submission, SUBMISSION_LOG_CATALOG_METADATA_UPDATE, 'submission.event.catalogMetadataUpdated'); break; case 'identifiers': import('lib.pkp.controllers.tab.pubIds.form.PKPPublicIdentifiersForm'); $form = new PKPPublicIdentifiersForm($submission, $this->getStageId(), array('displayedInContainer' => true, 'tabPos' => $this->getTabPosition())); $notificationKey = 'common.changesSaved'; break; default: // publication format tabs import('controllers.tab.catalogEntry.form.CatalogEntryFormatMetadataForm'); $representationId = $request->getUserVar('representationId'); // perform some validation to make sure this format is enabled and assigned to this monograph $publishedMonographDao = DAORegistry::getDAO('PublishedMonographDAO'); $publicationFormatDao = DAORegistry::getDAO('PublicationFormatDAO'); $formats = $publicationFormatDao->getBySubmissionId($submission->getId()); $form = null; while ($format = $formats->next()) { if ($format->getId() == $representationId) { $form = new CatalogEntryFormatMetadataForm($submission->getId(), $representationId, $format->getPhysicalFormat(), $format->getRemoteURL(), $this->getStageId(), array('displayedInContainer' => true, 'tabPos' => $this->getTabPosition())); $notificationKey = 'notification.savedPublicationFormatMetadata'; SubmissionLog::logEvent($request, $submission, SUBMISSION_LOG_PUBLICATION_FORMAT_METADATA_UPDATE, 'submission.event.publicationMetadataUpdated', array('formatName' => $format->getLocalizedName())); break; } } break; } } }
/** * Constructor */ function __construct() { parent::__construct(); $this->addRoleAssignment(array(ROLE_ID_SUB_EDITOR, ROLE_ID_MANAGER), array('publicationMetadata', 'savePublicationMetadataForm', 'identifiers', 'clearPubId', 'updateIdentifiers', 'assignPubIds', 'uploadCoverImage', 'deleteCoverImage')); }