diff --git a/classes/OccurrenceDownload.php b/classes/OccurrenceDownload.php index 80ebdd3089..54caebe991 100644 --- a/classes/OccurrenceDownload.php +++ b/classes/OccurrenceDownload.php @@ -610,13 +610,14 @@ public function getProcessingStatusList($collid = 0){ if($collid){ $sql .= 'WHERE collid = '.$collid; } + $sql .= ' ORDER BY processingstatus ASC'; $rs = $this->conn->query($sql); while($r = $rs->fetch_object()){ if($r->processingstatus) $psArr[] = $r->processingstatus; } $rs->free(); //Special sort - $templateArr = array('unprocessed','unprocessed-nlp','pending duplicate','stage 1','stage 2','stage 3','pending review','reviewed'); + $templateArr = array('unprocessed','unprocessed-nlp','stage 1','stage 2','stage 3','pending duplicate','pending review','expert required','reviewed', 'closed'); //Get all active processing statuses and then merge all extra statuses that may exists for one reason or another return array_merge(array_intersect($templateArr,$psArr),array_diff($psArr,$templateArr)); } diff --git a/classes/SpecProcessorManager.php b/classes/SpecProcessorManager.php index 221d3effd4..ff2647a260 100644 --- a/classes/SpecProcessorManager.php +++ b/classes/SpecProcessorManager.php @@ -284,14 +284,14 @@ public function getSpecNoOcr($procStatus = ''){ public function getProcessingStatusList(){ $retArr = array(); if($this->collid){ - $sql = 'SELECT DISTINCT processingstatus FROM omoccurrences WHERE collid = '.$this->collid; + $sql = 'SELECT DISTINCT processingstatus FROM omoccurrences WHERE collid = '.$this->collid.' ORDER BY processingstatus ASC'; //echo $sql; $rs = $this->conn->query($sql); while($r = $rs->fetch_object()){ if($r->processingstatus) $retArr[] = $r->processingstatus; } $rs->free(); - sort($retArr); + //sort($retArr); } return $retArr; } diff --git a/collections/admin/specupload.php b/collections/admin/specupload.php index e4bec8d074..87895d39e0 100644 --- a/collections/admin/specupload.php +++ b/collections/admin/specupload.php @@ -92,6 +92,28 @@ $duManager->setVerifyImageUrls($verifyImages); $duManager->setProcessingStatus($processingStatus); +//Bring in config variables +if($duManager->getCollInfo('colltype') == 'General Observations'){ + if(file_exists('../editor/includes/config/occurVarGenObs'.$SYMB_UID.'.php')){ + //Specific to particular general observation collection + include('../editor/includes/config/occurVarGenObs'.$SYMB_UID.'.php'); + } + elseif(file_exists('../editor/includes/config/occurVarGenObsDefault.php')){ + //Specific to Default values for portal + include('../editor/includes/config/occurVarGenObsDefault.php'); + } +} +else{ + if($collid && file_exists('../editor/includes/config/occurVarColl'.$collid.'.php')){ + //Specific to particular collection + include('../editor/includes/config/occurVarColl'.$collid.'.php'); + } + elseif(file_exists('../editor/includes/config/occurVarDefault.php')){ + //Specific to Default values for portal + include('../editor/includes/config/occurVarDefault.php'); + } +} + if($action == 'Automap Fields'){ $autoMap = true; } @@ -642,8 +664,16 @@ function pkChanged(selObj){ 'Unprocessed', 'stage 1' => 'Stage 1', 'stage 2' => 'Stage 2', 'stage 3' => 'STAGE_3', 'pending review' => 'Pending Review', - 'expert required' => 'Expert Required', 'pending review-nfn' => 'Pending Review-NfN', 'reviewed' => 'Reviewed', 'closed' => 'Closed'); + + // Set the list of processing statuses, from the collection editor template + $processingStatusArr = array(); + if(defined('PROCESSINGSTATUS') && PROCESSINGSTATUS){ + $processingStatusArr = PROCESSINGSTATUS; + } + else{ + $processingStatusArr = array('unprocessed','unprocessed/NLP','stage 1','stage 2','stage 3','pending duplicate','pending review-nfn','pending review','expert required','reviewed','closed'); + } + if($ulPath && ($uploadType == $DWCAUPLOAD || $uploadType == $IPTUPLOAD)){ //Data has been uploaded and it's a DWCA upload type if($duManager->analyzeUpload()){ @@ -826,8 +856,11 @@ function pkChanged(selObj){ '.ucwords($ps).''; + foreach($processingStatusArr as $v){ + + $keyOut = strtolower($v); + + echo ''; } ?> @@ -871,8 +904,11 @@ function pkChanged(selObj){ '.ucwords($ps).''; + foreach($processingStatusArr as $v){ + + $keyOut = strtolower($v); + + echo ''; } ?> @@ -1001,8 +1037,11 @@ function pkChanged(selObj){ '.ucwords($ps).''; + foreach($processingStatusArr as $v){ + + $keyOut = strtolower($v); + + echo ''; } ?> @@ -1055,4 +1094,4 @@ function pkChanged(selObj){ include($SERVER_ROOT.'/includes/footer.php'); ?> - \ No newline at end of file + diff --git a/collections/editor/batchdeterminations.php b/collections/editor/batchdeterminations.php index 0077b201d4..1f8bab2dca 100644 --- a/collections/editor/batchdeterminations.php +++ b/collections/editor/batchdeterminations.php @@ -41,6 +41,16 @@ } } } + +// Add collection customization variables +if($collid && file_exists('includes/config/occurVarColl'.$collid.'.php')){ + //Specific to particular collection + include('includes/config/occurVarColl'.$collid.'.php'); +} +elseif(file_exists('includes/config/occurVarDefault.php')){ + //Specific to Default values for portal + include('includes/config/occurVarDefault.php'); +} ?> @@ -315,12 +325,12 @@ function openPopup(urlStr){
-
- : +
+ :
-
+
:
@@ -354,8 +364,8 @@ function openPopup(urlStr){   - - + + @@ -364,7 +374,7 @@ function openPopup(urlStr){
-
+
:
@@ -374,48 +384,48 @@ function openPopup(urlStr){

-
- : +
+ :
-
- : +
+ :
-
- : +
+ :
-
- : +
+ :
-
- : +
+ :
-
- : +
+ :
-
- : +
+ :
-
- : +
+ :
-
+
-
+
diff --git a/collections/editor/dev/occurdataentry.php b/collections/editor/dev/occurdataentry.php index 254fcb33aa..1a25dd5d0e 100644 --- a/collections/editor/dev/occurdataentry.php +++ b/collections/editor/dev/occurdataentry.php @@ -245,7 +245,7 @@ <<
- +
@@ -324,7 +324,7 @@
'; } ?> @@ -349,7 +349,7 @@
- +
diff --git a/collections/editor/dev/occureditor.php b/collections/editor/dev/occureditor.php index 21c071cb84..d627077a59 100644 --- a/collections/editor/dev/occureditor.php +++ b/collections/editor/dev/occureditor.php @@ -1124,7 +1124,7 @@ function requestImage(){
'; } ?> diff --git a/collections/editor/imageoccursubmit.php b/collections/editor/imageoccursubmit.php index 8f62833256..c71be42d5e 100644 --- a/collections/editor/imageoccursubmit.php +++ b/collections/editor/imageoccursubmit.php @@ -175,11 +175,11 @@ function validateImgOccurForm(f){ :
- : - -
+
+ : + +
+
+ : +
+
+ - : +
+ : + +
-
- :
+
+ :
-
- :
+
+ :
-
- :
+
+ :
@@ -226,7 +236,7 @@ function validateImgOccurForm(f){ -
+
/>
diff --git a/collections/editor/includes/config/occurVarColl1_template.php b/collections/editor/includes/config/occurVarColl1_template.php index 818175462e..7b65ee2b98 100644 --- a/collections/editor/includes/config/occurVarColl1_template.php +++ b/collections/editor/includes/config/occurVarColl1_template.php @@ -1,25 +1,32 @@ \ No newline at end of file diff --git a/collections/editor/includes/config/occurVarDefault_template.php b/collections/editor/includes/config/occurVarDefault_template.php index 514856c13f..5ff66b6c94 100644 --- a/collections/editor/includes/config/occurVarDefault_template.php +++ b/collections/editor/includes/config/occurVarDefault_template.php @@ -1,18 +1,18 @@ \ No newline at end of file diff --git a/collections/editor/includes/config/occurVarGenObsDefault_template.php b/collections/editor/includes/config/occurVarGenObsDefault_template.php index 638673aeb7..50d1dc7cbd 100644 --- a/collections/editor/includes/config/occurVarGenObsDefault_template.php +++ b/collections/editor/includes/config/occurVarGenObsDefault_template.php @@ -1,25 +1,32 @@ \ No newline at end of file diff --git a/collections/editor/includes/determinationtab.php b/collections/editor/includes/determinationtab.php index b55faae33c..4e713e20c7 100644 --- a/collections/editor/includes/determinationtab.php +++ b/collections/editor/includes/determinationtab.php @@ -10,6 +10,8 @@ $sciName = $_GET['sciname']; $crowdSourceMode = $_GET['csmode']; $editMode = $_GET['em']; +$collId = $_GET['collid']; +$isGenObs = $_GET['isgenobs']; $annotatorname = $_GET['annotatorname']; $annotatoremail = $_GET['annotatoremail']; @@ -24,6 +26,32 @@ $specImgArr = $occManager->getImageMap(); // find out if there are images in order to show/hide the button to display/hide images. +//Bring in config variables +if($isGenObs){ + if(file_exists('config/occurVarGenObs'.$SYMB_UID.'.php')){ + //Specific to particular collection + include('config/occurVarGenObs'.$SYMB_UID.'.php'); + } + elseif(file_exists('config/occurVarGenObsDefault.php')){ + //Specific to Default values for portal + include('config/occurVarGenObsDefault.php'); + } +} +else{ + if($collId && file_exists('config/occurVarColl'.$collId.'.php')){ + //Specific to particular collection + include('config/occurVarColl'.$collId.'.php'); + } + elseif(file_exists('config/occurVarDefault.php')){ + //Specific to Default values for portal + include('config/occurVarDefault.php'); + } + if($crowdSourceMode && file_exists('config/crowdSourcingVar.php')){ + //Specific to Crowdsourcing + include('config/crowdSourcingVar.php'); + } +} + ?>
@@ -44,8 +72,8 @@ ?>