Skip to content

Commit

Permalink
*6747* introduce fileStage = REVIEW_ATTACHMENT (not used yet)
Browse files Browse the repository at this point in the history
  • Loading branch information
jalperin committed Jul 21, 2011
1 parent 825d032 commit c1f8dbf
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions classes/file/MonographFileManager.inc.php
Expand Up @@ -17,6 +17,7 @@
* [monograph id]/submission
* [monograph id]/submission/original
* [monograph id]/submission/review
* [monograph_id/submission/review/attachment
* [monograph id]/submission/editor
* [monograph id]/submission/copyedit
* [monograph id]/submission/layout
Expand Down
1 change: 1 addition & 0 deletions classes/monograph/MonographFile.inc.php
Expand Up @@ -263,6 +263,7 @@ function _fileStageToPath($fileStage) {
MONOGRAPH_FILE_SUBMISSION => 'submission',
MONOGRAPH_FILE_NOTE => 'note',
MONOGRAPH_FILE_REVIEW => 'submission/review',
MONOGRAPH_FILE_REVIEW_ATTACHMENT => 'submission/review/attachment',
MONOGRAPH_FILE_FINAL => 'submission/final',
MONOGRAPH_FILE_FAIR_COPY => 'submission/fairCopy',
MONOGRAPH_FILE_EDITOR => 'submission/editor',
Expand Down
4 changes: 4 additions & 0 deletions controllers/api/file/linkAction/AddFileLinkAction.inc.php
Expand Up @@ -82,6 +82,10 @@ function _getTextLabels($fileStage) {
'wizardTitle' => 'editor.submissionReview.uploadFile',
'buttonLabel' => 'editor.submissionReview.uploadFile'
),
MONOGRAPH_FILE_REVIEW_ATTACHMENT => array(
'wizardTitle' => 'editor.submissionReview.uploadAttachment',
'buttonLabel' => 'editor.submissionReview.uploadAttachment'
),
MONOGRAPH_FILE_FINAL => array(
'wizardTitle' => 'submission.uploadAFinalDraft',
'buttonLabel' => 'submission.uploadAFinalDraft'
Expand Down
Expand Up @@ -100,8 +100,8 @@ function &getMonographFiles() {
// If we have a review stage id then we also expect a review round.
if ($this->getRound() < 1) fatalError('Invalid review round!');

// Can only upload submission files or review files.
if (!in_array($this->getData('fileStage'), array(MONOGRAPH_FILE_SUBMISSION, MONOGRAPH_FILE_REVIEW))) fatalError('Invalid file stage!');
// Can only upload submission files, review files, or review attachments.
if (!in_array($this->getData('fileStage'), array(MONOGRAPH_FILE_SUBMISSION, MONOGRAPH_FILE_REVIEW, MONOGRAPH_FILE_REVIEW_ATTACHMENT))) fatalError('Invalid file stage!');

// Retrieve the monograph files for the given review round.
$this->_monographFiles =& $submissionFileDao->getRevisionsByReviewRound(
Expand Down
Expand Up @@ -231,7 +231,8 @@ function &execute($request) {
$user->getId(), $uploaderUserGroupId, $revisedFileId, $fileGenre, $assocType, $assocId
);

if ($monographFile && $this->getData('fileStage') == MONOGRAPH_FILE_REVIEW) {
if ($monographFile && ($this->getData('fileStage') == MONOGRAPH_FILE_REVIEW
|| $this->getData('fileStage') == MONOGRAPH_FILE_REVIEW_ATTACHMENT) ) {
// Add the uploaded review file to the review round.
$submissionFileDao =& DAORegistry::getDAO('SubmissionFileDAO');
$submissionFileDao->assignRevisionToReviewRound($monographFile->getFileId(), $monographFile->getRevision(), $this->getStageId(), $this->getData('round'), $this->getData('monographId'));
Expand Down
3 changes: 2 additions & 1 deletion locale/en_US/editor.xml
Expand Up @@ -26,7 +26,8 @@
<message key="editor.submissionReview.open">Open</message>
<message key="editor.submissionReview.blind">Blind</message>
<message key="editor.submissionReview.doubleBlind">Double-blind</message>
<message key="editor.submissionReview.uploadFile">Upload Review Attachment</message>
<message key="editor.submissionReview.uploadFile">Upload Review File</message>
<message key="editor.submissionReview.uploadAttachment">Upload Review Attachment</message>
<message key="editor.monograph.addReviewer">Add Reviewer</message>
<message key="editor.monograph.initiateReview">Initiate Review</message>
<message key="editor.monograph.cancelReview">Cancel Request</message>
Expand Down

0 comments on commit c1f8dbf

Please sign in to comment.