Skip to content

Commit

Permalink
Merge pull request #192 from charvolant/develop
Browse files Browse the repository at this point in the history
Remove NPE from dud entries
  • Loading branch information
Rita-C authored Feb 17, 2020
2 parents 1bae65b + 1e33818 commit e3ed4f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions grails-app/views/species/_overview.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@
<div class="panel panel-default panel-actions">
<div class="panel-body">
<ul class="list-unstyled">
<g:if test="${citizenSciUrl}">
<g:if test="${citizenSciUrl && guid && scientificName}">
<li>
<a href="${java.text.MessageFormat.format(citizenSciUrl, URLEncoder.encode(guid), URLEncoder.encode(scientificName))}"><span class="glyphicon glyphicon-map-marker"></span> <g:message code="label.recordSighting" default="Record a sighting"/></a>
<a href="${java.text.MessageFormat.format(citizenSciUrl, URLEncoder.encode(guid, "UTF-8"), URLEncoder.encode(scientificName, "UTF-8"))}"><span class="glyphicon glyphicon-map-marker"></span> <g:message code="label.recordSighting" default="Record a sighting"/></a>
</li>
</g:if>
<li><a id="alertsButton" href="#"><span
Expand Down
4 changes: 2 additions & 2 deletions grails-app/views/species/search.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,8 @@
<li><g:link controller="species" action="imageSearch" params="[id:result.guid]">View images of species within this ${result.rank}</g:link></li>
</g:if>

<g:if test="${grailsApplication.config.sightings.url}">
<li><a href="${java.text.MessageFormat.format(grailsApplication.config.sightings.url, URLEncoder.encode(result.guid), URLEncoder.encode(result.name))}"><g:message code="label.recordSighting" default="Record a sighting"/></a></li>
<g:if test="${grailsApplication.config.sightings.url && result.guid && result.name}">
<li><a href="${java.text.MessageFormat.format(grailsApplication.config.sightings.url, URLEncoder.encode(result.guid, "UTF-8"), URLEncoder.encode(result.name, "UTF-8"))}"><g:message code="label.recordSighting" default="Record a sighting"/></a></li>
</g:if>
<g:if test="${grailsApplication.config.occurrenceCounts.enabled.toBoolean() && result?.occurrenceCount?:0 > 0}">
<li>
Expand Down

0 comments on commit e3ed4f4

Please sign in to comment.