View | Details | Raw Unified | Return to bug 2683 | Differences between
and this patch

Collapse All | Expand All

(-)classes/submission/sectionEditor/SectionEditorAction.inc.php (-2 / +1 lines)
 Lines 233-239    Link Here 
233
						'editorialContactSignature' => $user->getContactSignature(),
233
						'editorialContactSignature' => $user->getContactSignature(),
234
						'reviewGuidelines' => $journal->getLocalizedSetting('reviewGuidelines'),
234
						'reviewGuidelines' => $journal->getLocalizedSetting('reviewGuidelines'),
235
						'submissionReviewUrl' => $submissionUrl,
235
						'submissionReviewUrl' => $submissionUrl,
236
						'abstractTermIfEnabled' => ($sectionEditorSubmission->getAbstract() == ''?'':Locale::translate('article.abstract')),
236
						'abstractTermIfEnabled' => ($sectionEditorSubmission->getArticleAbstract() == ''?'':Locale::translate('article.abstract')),
237
						'passwordResetUrl' => Request::url(null, 'login', 'resetPassword', $reviewer->getUsername(), array('confirm' => Validation::generatePasswordResetHash($reviewer->getUserId())))
237
						'passwordResetUrl' => Request::url(null, 'login', 'resetPassword', $reviewer->getUsername(), array('confirm' => Validation::generatePasswordResetHash($reviewer->getUserId())))
238
					);
238
					);
239
					$email->assignParams($paramArray);
239
					$email->assignParams($paramArray);
 Lines 2112-2118    Link Here 
2112
		}
2112
		}
2113
		return $breadcrumb;
2113
		return $breadcrumb;
2114
	}
2114
	}
2115
2116
}
2115
}
2117
2116
2118
?>
2117
?>
(-)classes/submission/sectionEditor/SectionEditorSubmission.inc.php (+244 lines)
 Lines 900-905    Link Here 
900
		);
900
		);
901
		return $editorDecisionOptions;
901
		return $editorDecisionOptions;
902
	}
902
	}
903
904
	/**
905
	 * Get the CSS class for highlighting this submission in a list, based on status.
906
	 * @return string
907
	 */
908
	function getHighlightClass() {
909
		$highlightClass = 'highlight';
910
		$overdueSeconds = 60 * 60 * 24 * 14; // Two weeks
911
912
		// Submissions that are not still queued (i.e. published) are not highlighted.
913
		if ($this->getStatus() != STATUS_QUEUED) return null;
914
915
		// Awaiting assignment.
916
		$editAssignments = $this->getEditAssignments();
917
		if (empty($editAssignments)) return $highlightClass;
918
919
		$journal =& Request::getJournal();
920
		// Sanity check
921
		if (!$journal || $journal->getJournalId() != $this->getJournalId()) return null;
922
923
		// Check whether it's in review or editing.
924
		$inEditing = false;
925
		$decisionsEmpty = true;
926
		$lastDecisionDate = null;
927
		$decisions = $this->getDecisions();
928
		$decision = array_pop($decisions);
929
		if (!empty($decision)) {
930
			$latestDecision = array_pop($decision);
931
			if (is_array($latestDecision)) {
932
				if ($latestDecision['decision'] == SUBMISSION_EDITOR_DECISION_ACCEPT) $inEditing = true;
933
				$decisionsEmpty = false;
934
				$lastDecisionDate = strtotime($latestDecision['dateDecided']);
935
			}
936
		}
937
938
		if ($inEditing) {
939
			// ---
940
			// --- Highlighting conditions for submissions in editing
941
			// ---
942
943
			// COPYEDITING
944
945
			// First round of copyediting
946
			$dateCopyeditorNotified = $this->getCopyeditorDateNotified() ?
947
				strtotime($this->getCopyeditorDateNotified()) : 0;
948
			$dateCopyeditorUnderway = $this->getCopyeditorDateUnderway() ?
949
				strtotime($this->getCopyeditorDateUnderway()) : 0;
950
			$dateCopyeditorCompleted = $this->getCopyeditorDateCompleted() ?
951
				strtotime($this->getCopyeditorDateCompleted()) : 0;
952
			$dateCopyeditorAcknowledged = $this->getCopyeditorDateAcknowledged() ?
953
				strtotime($this->getCopyeditorDateAcknowledged()) : 0;
954
			$dateLastCopyeditor = max($dateCopyeditorNotified, $dateCopyeditorUnderway);
955
956
			// Check if the copyeditor is overdue on round 1
957
			if (	$dateLastCopyeditor &&
958
				!$dateCopyeditorCompleted &&
959
				$dateLastCopyeditor + $overdueSeconds < time()
960
			) return $highlightClass;
961
962
			// Check if acknowledgement is overdue for CE round 1
963
			if ($dateCopyeditorCompleted && !$dateCopyeditorAcknowledged) return $highlightClass;
964
965
			// Second round of copyediting
966
			$dateCopyeditorAuthorNotified = $this->getCopyeditorDateAuthorNotified() ?
967
				strtotime($this->getCopyeditorDateAuthorNotified()) : 0;
968
			$dateCopyeditorAuthorUnderway = $this->getCopyeditorDateAuthorUnderway() ?
969
				strtotime($this->getCopyeditorDateAuthorUnderway()) : 0;
970
			$dateCopyeditorAuthorCompleted = $this->getCopyeditorDateAuthorCompleted() ?
971
				strtotime($this->getCopyeditorDateAuthorCompleted()) : 0;
972
			$dateCopyeditorAuthorAcknowledged = $this->getCopyeditorDateAuthorAcknowledged() ?
973
				strtotime($this->getCopyeditorDateAuthorAcknowledged()) : 0;
974
			$dateLastCopyeditorAuthor = max($dateCopyeditorAuthorNotified, $dateCopyeditorAuthorUnderway);
975
976
			// Check if acknowledgement is overdue for CE round 2
977
			if ($dateCopyeditorAuthorCompleted && !$dateCopyeditorAuthorAcknowledged) return $highlightClass;
978
979
			// Check if author is overdue on CE round 2
980
			if (	$dateLastCopyeditorAuthor &&
981
				!$dateCopyeditorAuthorCompleted &&
982
				$dateLastCopyeditorAuthor + $overdueSeconds < time()
983
			) return $highlightClass;
984
985
			// Third round of copyediting
986
			$dateCopyeditorFinalNotified = $this->getCopyeditorDateFinalNotified() ?
987
				strtotime($this->getCopyeditorDateFinalNotified()) : 0;
988
			$dateCopyeditorFinalUnderway = $this->getCopyeditorDateFinalUnderway() ?
989
				strtotime($this->getCopyeditorDateFinalUnderway()) : 0;
990
			$dateCopyeditorFinalCompleted = $this->getCopyeditorDateFinalCompleted() ?
991
				strtotime($this->getCopyeditorDateFinalCompleted()) : 0;
992
			$dateLastCopyeditorFinal = max($dateCopyeditorFinalNotified, $dateCopyeditorUnderway);
993
994
			// Check if copyeditor is overdue on round 3
995
			if (	$dateLastCopyeditorFinal &&
996
				!$dateCopyeditorFinalCompleted &&
997
				$dateLastCopyeditorFinal + $overdueSeconds < time()
998
			) return $highlightClass;
999
1000
			// Check if acknowledgement is overdue for CE round 3
1001
			if ($dateCopyeditorFinalCompleted && !$dateCopyeditorFinalAcknowledged) return $highlightClass;
1002
1003
			// LAYOUT EDITING
1004
			$layoutAssignment =& $this->getLayoutAssignment();
1005
1006
			$dateLayoutNotified = $layoutAssignment->getDateNotified() ?
1007
				strtotime($layoutAssignment->getDateNotified()) : 0;
1008
			$dateLayoutUnderway = $layoutAssignment->getDateUnderway() ?
1009
				strtotime($layoutAssignment->getDateUnderway()) : 0;
1010
			$dateLayoutCompleted = $layoutAssignment->getDateCompleted() ?
1011
				strtotime($layoutAssignment->getDateCompleted()) : 0;
1012
			$dateLayoutAcknowledged = $layoutAssignment->getDateAcknowledged() ?
1013
				strtotime($layoutAssignment->getDateAcknowledged()) : 0;
1014
			$dateLastLayout = max($dateLayoutNotified, $dateLayoutUnderway);
1015
1016
			// Check if layout editor is overdue
1017
			if (	$dateLastLayout &&
1018
				!$dateLayoutCompleted &&
1019
				$dateLastLayout + $overdueSeconds < time()
1020
			) return $highlightClass;
1021
1022
			// Check if acknowledgement is overdue for layout
1023
			if ($dateLayoutCompleted && !$dateLayoutAcknowledged) return $highlightClass;
1024
1025
			// PROOFREADING
1026
			$proofAssignment =& $this->getProofAssignment();
1027
1028
			// First round of proofreading
1029
			$dateAuthorNotified = $proofAssignment->getDateAuthorNotified() ?
1030
				strtotime($proofAssignment->getDateAuthorNotified()) : 0;
1031
			$dateAuthorUnderway = $proofAssignment->getDateAuthorUnderway() ?
1032
				strtotime($proofAssignment->getDateAuthorUnderway()) : 0;
1033
			$dateAuthorCompleted = $proofAssignment->getDateAuthorCompleted() ?
1034
				strtotime($proofAssignment->getDateAuthorCompleted()) : 0;
1035
			$dateAuthorAcknowledged = $proofAssignment->getDateAuthorAcknowledged() ?
1036
				strtotime($proofAssignment->getDateAuthorAcknowledged()) : 0;
1037
			$dateLastAuthor = max($dateAuthorNotified, $dateAuthorUnderway);
1038
1039
			// Check if the author is overdue on round 1 of proofreading
1040
			if (	$dateLastAuthor &&
1041
				!$dateAuthorCompleted &&
1042
				$dateLastAuthor + $overdueSeconds < time()
1043
			) return $highlightClass;
1044
1045
			// Check if acknowledgement is overdue for proofreading round 1
1046
			if ($dateAuthorCompleted && !$dateAuthorAcknowledged) return $highlightClass;
1047
1048
			// Second round of proofreading
1049
			$dateProofreaderNotified = $proofAssignment->getDateProofreaderNotified() ?
1050
				strtotime($proofAssignment->getDateProofreaderNotified()) : 0;
1051
			$dateProofreaderUnderway = $proofAssignment->getDateProofreaderUnderway() ?
1052
				strtotime($proofAssignment->getDateProofreaderUnderway()) : 0;
1053
			$dateProofreaderCompleted = $proofAssignment->getDateProofreaderCompleted() ?
1054
				strtotime($proofAssignment->getDateProofreaderCompleted()) : 0;
1055
			$dateProofreaderAcknowledged = $proofAssignment->getDateProofreaderAcknowledged() ?
1056
				strtotime($proofAssignment->getDateProofreaderAcknowledged()) : 0;
1057
			$dateLastProofreader = max($dateProofreaderNotified, $dateProofreaderUnderway);
1058
1059
			// Check if acknowledgement is overdue for proofreading round 2
1060
			if ($dateProofreaderCompleted && !$dateProofreaderAcknowledged) return $highlightClass;
1061
1062
			// Check if proofreader is overdue on proofreading round 2
1063
			if (	$dateLastProofreader &&
1064
				!$dateProofreaderCompleted &&
1065
				$dateLastProofreader + $overdueSeconds < time()
1066
			) return $highlightClass;
1067
1068
			// Third round of proofreading
1069
			$dateLayoutEditorNotified = $proofAssignment->getDateLayoutEditorNotified() ?
1070
				strtotime($proofAssignment->getDateLayoutEditorNotified()) : 0;
1071
			$dateLayoutEditorUnderway = $proofAssignment->getDateLayoutEditorUnderway() ?
1072
				strtotime($proofAssignment->getDateLayoutEditorUnderway()) : 0;
1073
			$dateLayoutEditorCompleted = $proofAssignment->getDateLayoutEditorCompleted() ?
1074
				strtotime($proofAssignment->getDateLayoutEditorCompleted()) : 0;
1075
			$dateLastLayoutEditor = max($dateLayoutEditorNotified, $dateCopyeditorUnderway);
1076
1077
			// Check if proofreader is overdue on round 3 of proofreading
1078
			if (	$dateLastLayoutEditor &&
1079
				!$dateLayoutEditorCompleted &&
1080
				$dateLastLayoutEditor + $overdueSeconds < time()
1081
			) return $highlightClass;
1082
1083
			// Check if acknowledgement is overdue for proofreading round 3
1084
			if ($dateLayoutEditorCompleted && !$dateLayoutEditorAcknowledged) return $highlightClass;
1085
		} else {
1086
			// ---
1087
			// --- Highlighting conditions for submissions in review
1088
			// ---
1089
			$reviewAssignments =& $this->getReviewAssignments($this->getCurrentRound());
1090
			if (is_array($reviewAssignments) && !empty($reviewAssignments)) {
1091
				$allReviewsComplete = true;
1092
				foreach ($reviewAssignments as $i => $junk) {
1093
					$reviewAssignment =& $reviewAssignments[$i];
1094
1095
					// If the reviewer has not been notified, highlight.
1096
					if ($reviewAssignment->getDateNotified() === null) return $highlightClass;
1097
1098
					// Check review status.
1099
					if (!$reviewAssignment->getCancelled() && !$reviewAssignment->getDeclined()) {
1100
						if (!$reviewAssignment->getDateCompleted()) $allReviewsComplete = false;
1101
1102
						$dateReminded = $reviewAssignment->getDateReminded() ?
1103
							strtotime($reviewAssignment->getDateReminded()) : 0;
1104
						$dateNotified = $reviewAssignment->getDateNotified() ?
1105
							strtotime($reviewAssignment->getDateNotified()) : 0;
1106
						$dateConfirmed = $reviewAssignment->getDateConfirmed() ?
1107
							strtotime($reviewAssignment->getDateConfirmed()) : 0;
1108
1109
						// Check whether a reviewer is overdue to confirm invitation
1110
						if (	!$reviewAssignment->getDateCompleted() &&
1111
							!$dateConfirmed &&
1112
							!$journal->getSetting('remindForInvite') &&
1113
							max($dateReminded, $dateNotified) + $overdueSeconds < time()
1114
						) return $highlightClass;
1115
1116
						// Check whether a reviewer is overdue to complete review
1117
						if (	!$reviewAssignment->getDateCompleted() &&
1118
							$dateConfirmed &&
1119
							!$journal->getSetting('remindForSubmit') &&
1120
							max($dateReminded, $dateConfirmed) + $overdueSeconds < time()
1121
						) return $highlightClass;
1122
					}
1123
1124
					unset($reviewAssignment);
1125
				}
1126
				// If all reviews are complete but no decision is recorded, highlight.
1127
				if ($allReviewsComplete && $decisionsEmpty) return $highlightClass;
1128
1129
				// If the author's last file upload hasn't been taken into account in
1130
				// the most recent decision or author/editor correspondence, highlight.
1131
				$comment = $this->getMostRecentEditorDecisionComment();
1132
				$commentDate = $comment ? strtotime($comment->getDatePosted()) : 0;
1133
				$authorFileRevisions = $this->getAuthorFileRevisions($this->getCurrentRound());
1134
				$authorFileDate = null;
1135
				if (is_array($authorFileRevisions) && !empty($authorFileRevisions)) {
1136
					$authorFile = array_pop($authorFileRevisions);
1137
					$authorFileDate = strtotime($authorFile->getDateUploaded());
1138
				}
1139
				if (	($lastDecisionDate || $commentDate) &&
1140
					$authorFileDate &&
1141
					$authorFileDate > max($lastDecisionDate, $commentDate)
1142
				) return $highlightClass;
1143
			}
1144
		}
1145
		return null;
1146
	}
903
}
1147
}
904
1148
905
?>
1149
?>
(-)pages/editor/EditorHandler.inc.php (-1 / +4 lines)
 Lines 74-80    Link Here 
74
				null,
74
				null,
75
				$rangeInfo
75
				$rangeInfo
76
			);
76
			);
77
			$submissions = &new DAOResultFactory($rawSubmissions, $editorSubmissionDao, '_returnEditorSubmissionFromRow');
77
			
78
			// EditorSubmissionDAO does not return edit assignments, so we need this.
79
			$sectionEditorSubmissionDao =& DAORegistry::getDAO('SectionEditorSubmissionDAO');
80
			$submissions = &new DAOResultFactory($rawSubmissions, $sectionEditorSubmissionDao, '_returnSectionEditorSubmissionFromRow');
78
81
79
82
80
			$templateMgr->assign_by_ref('submissions', $submissions);
83
			$templateMgr->assign_by_ref('submissions', $submissions);
(-)styles/common.css (-1 / +5 lines)
 Lines 324-329    Link Here 
324
table.listing {
324
table.listing {
325
}
325
}
326
326
327
table.listing tr.highlight {
328
	background: yellow;
329
}
330
327
table.listing td {
331
table.listing td {
328
	padding: 0.25em 0.5em 0.25em 0.5em;
332
	padding: 0.25em 0.5em 0.25em 0.5em;
329
}
333
}
 Lines 491-494    Link Here 
491
	height: 27;
495
	height: 27;
492
	width: 505;
496
	width: 505;
493
	z-index:1;
497
	z-index:1;
494
}
498
}
(-)templates/editor/index.tpl (-1 / +3 lines)
 Lines 78-84    Link Here 
78
	</tr>
78
	</tr>
79
	
79
	
80
	{iterate from=submissions item=submission}
80
	{iterate from=submissions item=submission}
81
	<tr valign="top" {if $submission->getFastTracked()} class="fastTracked"{/if}>
81
	{assign var="highlightClass" value=$submission->getHighlightClass()}
82
	{assign var="fastTracked" value=$submission->getFastTracked()}
83
	<tr valign="top"{if $highlightClass || $fastTracked} class="{$highlightClass|escape} {if $fastTracked}fastTracked{/if}"{/if}>
82
		<td>{$submission->getArticleId()}</td>
84
		<td>{$submission->getArticleId()}</td>
83
		<td>{$submission->getDateSubmitted()|date_format:$dateFormatTrunc}</td>
85
		<td>{$submission->getDateSubmitted()|date_format:$dateFormatTrunc}</td>
84
		<td>{$submission->getSectionAbbrev()|escape}</td>
86
		<td>{$submission->getSectionAbbrev()|escape}</td>
(-)templates/editor/submissionsInEditing.tpl (-2 / +4 lines)
 Lines 32-38    Link Here 
32
	{iterate from=submissions item=submission}
32
	{iterate from=submissions item=submission}
33
	{assign var="layoutAssignment" value=$submission->getLayoutAssignment()}
33
	{assign var="layoutAssignment" value=$submission->getLayoutAssignment()}
34
	{assign var="proofAssignment" value=$submission->getProofAssignment()}
34
	{assign var="proofAssignment" value=$submission->getProofAssignment()}
35
	<tr valign="top" {if $submission->getFastTracked()} class="fastTracked"{/if}>
35
	{assign var="highlightClass" value=$submission->getHighlightClass()}
36
	{assign var="fastTracked" value=$submission->getFastTracked()}
37
	<tr valign="top"{if $highlightClass || $fastTracked} class="{$highlightClass|escape} {if $fastTracked}fastTracked{/if}"{/if}>
36
		<td>{$submission->getArticleId()}</td>
38
		<td>{$submission->getArticleId()}</td>
37
		<td>{$submission->getDateSubmitted()|date_format:$dateFormatTrunc}</td>
39
		<td>{$submission->getDateSubmitted()|date_format:$dateFormatTrunc}</td>
38
		<td>{$submission->getSectionAbbrev()|escape}</td>
40
		<td>{$submission->getSectionAbbrev()|escape}</td>
 Lines 63-66    Link Here 
63
		<td colspan="4" align="right">{page_links anchor="submissions" name="submissions" iterator=$submissions searchField=$searchField searchMatch=$searchMatch search=$search dateFromDay=$dateFromDay dateFromYear=$dateFromYear dateFromMonth=$dateFromMonth dateToDay=$dateToDay dateToYear=$dateToYear dateToMonth=$dateToMonth section=$section}</td>
65
		<td colspan="4" align="right">{page_links anchor="submissions" name="submissions" iterator=$submissions searchField=$searchField searchMatch=$searchMatch search=$search dateFromDay=$dateFromDay dateFromYear=$dateFromYear dateFromMonth=$dateFromMonth dateToDay=$dateToDay dateToYear=$dateToYear dateToMonth=$dateToMonth section=$section}</td>
64
	</tr>
66
	</tr>
65
{/if}
67
{/if}
66
</table>
68
</table>
(-)templates/editor/submissionsInReview.tpl (-2 / +4 lines)
 Lines 38-44    Link Here 
38
	</tr>
38
	</tr>
39
	
39
	
40
	{iterate from=submissions item=submission}
40
	{iterate from=submissions item=submission}
41
	<tr valign="top" {if $submission->getFastTracked()} class="fastTracked"{/if}>
41
	{assign var="highlightClass" value=$submission->getHighlightClass()}
42
	{assign var="fastTracked" value=$submission->getFastTracked()}
43
	<tr valign="top"{if $highlightClass || $fastTracked} class="{$highlightClass|escape} {if $fastTracked}fastTracked{/if}"{/if}>
42
		<td>{$submission->getArticleId()}</td>
44
		<td>{$submission->getArticleId()}</td>
43
		<td>{$submission->getDateSubmitted()|date_format:$dateFormatTrunc}</td>
45
		<td>{$submission->getDateSubmitted()|date_format:$dateFormatTrunc}</td>
44
		<td>{$submission->getSectionAbbrev()|escape}</td>
46
		<td>{$submission->getSectionAbbrev()|escape}</td>
 Lines 106-109    Link Here 
106
		<td colspan="3" align="right">{page_links anchor="submissions" name="submissions" iterator=$submissions searchField=$searchField searchMatch=$searchMatch search=$search dateFromDay=$dateFromDay dateFromYear=$dateFromYear dateFromMonth=$dateFromMonth dateToDay=$dateToDay dateToYear=$dateToYear dateToMonth=$dateToMonth section=$section}</td>
108
		<td colspan="3" align="right">{page_links anchor="submissions" name="submissions" iterator=$submissions searchField=$searchField searchMatch=$searchMatch search=$search dateFromDay=$dateFromDay dateFromYear=$dateFromYear dateFromMonth=$dateFromMonth dateToDay=$dateToDay dateToYear=$dateToYear dateToMonth=$dateToMonth section=$section}</td>
107
	</tr>
109
	</tr>
108
{/if}
110
{/if}
109
</table>
111
</table>
(-)templates/sectionEditor/submissionsInEditing.tpl (-1 / +2 lines)
 Lines 29-35    Link Here 
29
	{assign var="layoutAssignment" value=$submission->getLayoutAssignment()}
29
	{assign var="layoutAssignment" value=$submission->getLayoutAssignment()}
30
	{assign var="proofAssignment" value=$submission->getProofAssignment()}
30
	{assign var="proofAssignment" value=$submission->getProofAssignment()}
31
	{assign var="articleId" value=$submission->getArticleId()}
31
	{assign var="articleId" value=$submission->getArticleId()}
32
	<tr valign="top">
32
	{assign var="highlightClass" value=$submission->getHighlightClass()}
33
	<tr valign="top"{if $highlightClass} class="{$highlightClass|escape}"{/if}>
33
		<td>{$submission->getArticleId()}</td>
34
		<td>{$submission->getArticleId()}</td>
34
		<td>{$submission->getDateSubmitted()|date_format:$dateFormatTrunc}</td>
35
		<td>{$submission->getDateSubmitted()|date_format:$dateFormatTrunc}</td>
35
		<td>{$submission->getSectionAbbrev()|escape}</td>
36
		<td>{$submission->getSectionAbbrev()|escape}</td>
(-)templates/sectionEditor/submissionsInReview.tpl (-1 / +2 lines)
 Lines 35-41    Link Here 
35
{iterate from=submissions item=submission}
35
{iterate from=submissions item=submission}
36
36
37
	{assign var="articleId" value=$submission->getArticleId()}
37
	{assign var="articleId" value=$submission->getArticleId()}
38
	<tr valign="top">
38
	{assign var="highlightClass" value=$submission->getHighlightClass()}
39
	<tr valign="top"{if $highlightClass} class="{$highlightClass|escape}"{/if}>
39
		<td>{$submission->getArticleId()}</td>
40
		<td>{$submission->getArticleId()}</td>
40
		<td>{$submission->getDateSubmitted()|date_format:$dateFormatTrunc}</td>
41
		<td>{$submission->getDateSubmitted()|date_format:$dateFormatTrunc}</td>
41
		<td>{$submission->getSectionAbbrev()|escape}</td>
42
		<td>{$submission->getSectionAbbrev()|escape}</td>

Return to bug 2683