Skip to content

Commit

Permalink
Merge pull request #553 from AtlasOfLivingAustralia/552_records_page_…
Browse files Browse the repository at this point in the history
…error

552 records page error
  • Loading branch information
qifeng-bai committed Jul 25, 2022
2 parents 05ceea2 + d21f996 commit 7beb979
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 29 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ branches:
- EYA-enhancements
- develop
- feature/data-quality
- 552_records_page_error
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {
}
}

version "3.0.12.4"
version "3.0.12.5"
group "au.org.ala.plugins.grails"

apply plugin:"eclipse"
Expand Down
48 changes: 20 additions & 28 deletions grails-app/views/occurrence/_recordCore.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -195,28 +195,17 @@
</g:set>
<g:set var="recordedByField" value="${recordedByField.trim()}"/>
${fieldsMap.put(recordedByField, true)}
<g:set var="rawRecordedBy" value="${record.raw.occurrence[recordedByField]}"/>
<g:set var="proRecordedBy" value="${record.processed.occurrence[recordedByField]}"/>
<g:if test="${record.processed.occurrence[recordedByField] && record.raw.occurrence[recordedByField] && record.processed.occurrence[recordedByField] == record.raw.occurrence[recordedByField]}">
<g:each status="i" in="${proRecordedBy}" var="proRB">
${i + 1}. ${proRB} &nbsp;
<g:if test="${record.processed.occurrence[recordedByField]}">
<g:each status="i" in="${record.processed.occurrence[recordedByField]}" var="proRB">
<g:if test="${record.processed.occurrence[recordedByField].size() > 1}">
${i + 1}.&nbsp;
</g:if>
${proRB} &nbsp;
</g:each>
<br/><span class="originalValue"><g:message code="recordcore.span05" default="Supplied as"/> "${record.raw.occurrence[recordedByField]}"</span>
</g:if>
<g:elseif test="${record.processed.occurrence[recordedByField] && record.raw.occurrence[recordedByField]}">
<g:each status="i" in="${proRecordedBy}" var="proRB">
${i + 1}. ${proRB} &nbsp;
</g:each>
<g:if test="${proRecordedBy != rawRecordedBy}">
<br/><span class="originalValue"><g:message code="recordcore.span05" default="Supplied as"/> "${rawRecordedBy}"</span>
</g:if>
</g:elseif>
<g:elseif test="${record.processed.occurrence[recordedByField]}">
<g:each status="i" in="${proRecordedBy}" var="proRB">
${i + 1}. ${proRB} &nbsp;
</g:each>
</g:elseif>
<g:elseif test="${record.raw.occurrence[recordedByField]}">
${rawRecordedBy}
${record.raw.occurrence[recordedByField]}
</g:elseif>
</alatag:occurrenceTableRow>
<!-- ALA user id -->
Expand Down Expand Up @@ -253,18 +242,18 @@
<g:if test="${record.processed.identification.typeStatus}">
<span style="text-transform: capitalize;">
<g:each status="i" in="${record.processed.identification.typeStatus}" var="typeStatus">
${i + 1}. ${typeStatus} &nbsp;
<g:if test="${record.processed.identification.typeStatus.size() > 1}">
${i + 1}.&nbsp;
</g:if>
${typeStatus} &nbsp;
</g:each>
</span>
<br/><span class="originalValue"><g:message code="recordcore.st.01" default="Supplied as"/> "${record.raw.identification.typeStatus}"</span>
</g:if>
<g:else>
<g:each status="i" in="${record.raw.identification.typeStatus}" var="typeStatus">
${i + 1}. ${typeStatus} &nbsp;
</g:each>
${record.raw.identification.typeStatus}
</g:else>
<g:if test="${record.processed.identification.typeStatus && record.raw.identification.typeStatus && (record.processed.identification.typeStatus.toLowerCase() != record.raw.identification.typeStatus.toLowerCase())}">
<br/><span class="originalValue"><g:message code="recordcore.st.01" default="Supplied as"/> "${record.raw.identification.typeStatus}"</span>
</g:if>

</alatag:occurrenceTableRow>
<!-- Identification Qualifier -->
<alatag:occurrenceTableRow annotate="true" section="dataset" fieldCode="identificationQualifier" fieldName="Identification qualifier">
Expand Down Expand Up @@ -342,7 +331,7 @@

<table class="occurrenceTable table table-bordered table-striped table-condensed" id="eventTable">
<!-- dataset -->
<alatag:occurrenceTableRow annotate="true" section="dataset" fieldCode="datasetName" fieldName="Dateset / Survey Name">
<alatag:occurrenceTableRow annotate="true" section="dataset" fieldCode="datasetName" fieldName="Dataset / Survey Name">
${fieldsMap.put("datasetName", true)}
<g:each status="i" in="${record.raw.event.datasetName}" var="datasetName">
<g:if test="${record.raw.event.datasetName.size() > 1}">
Expand Down Expand Up @@ -408,7 +397,10 @@
<alatag:occurrenceTableRow annotate="true" section="dataset" fieldCode="samplingProtocol" fieldName="Sampling protocol">
${fieldsMap.put("samplingProtocol", true)}
<g:each status="i" in="${record.raw.occurrence.samplingProtocol}" var="samplingProtocol">
${samplingProtocol}<br/>
<g:if test="${record.raw.occurrence.samplingProtocol.size() > 1}">
${i + 1}.&nbsp;&nbsp;
</g:if>
${samplingProtocol} &nbsp;
</g:each>
</alatag:occurrenceTableRow>
<alatag:formatExtraDwC compareRecord="${compareRecord}" fieldsMap="${fieldsMap}" group="Event" exclude="${dwcExcludeFields}"/>
Expand Down

0 comments on commit 7beb979

Please sign in to comment.