Skip to content

Commit

Permalink
Merge pull request #543 from AtlasOfLivingAustralia/release/3.0.10
Browse files Browse the repository at this point in the history
Release/3.0.10
  • Loading branch information
nickdos committed Apr 1, 2022
2 parents 86ae3f3 + 05b393b commit d261355
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 31 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {
}
}

version "3.0.9"
version "3.0.10"
group "au.org.ala.plugins.grails"

apply plugin:"eclipse"
Expand Down Expand Up @@ -88,7 +88,7 @@ dependencies {

if(!inplace) {
compile "au.org.ala.plugins.grails:images-client-plugin:1.2", noCache
compile "au.org.ala.plugins.grails:ala-charts-plugin:2.0.1", noCache
compile "au.org.ala.plugins.grails:ala-charts-plugin:2.1.2", noCache
}

}
Expand Down
4 changes: 3 additions & 1 deletion grails-app/assets/javascripts/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,9 @@ $(document).ready(function() {
$.getJSON(jsonUri, function(data) {
// use HTML template, see http:https://stackoverflow.com/a/1091493/249327
var speciesPageUri = BC_CONF.bieWebappUrl + "/species/" + lsid;
var speciesPageLink = "<a href='" + speciesPageUri + "' title='Species page' target='BIE'>view species page</a>";
var speciesPageLinkTitle = jQuery.i18n.prop("search.species.view.title");
var speciesPageLinkDesc = jQuery.i18n.prop("search.species.view.desc");
var speciesPageLink = "<a href='" + speciesPageUri + "' title='" + speciesPageLinkTitle + "' target='BIE'>" + speciesPageLinkDesc + "</a>";
$clone.find('a.btn').text(nameString).attr("href", speciesPageUri);
$clone.find('.nameString').text(nameString);
$clone.find('.speciesPageLink').html(speciesPageLink);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ class OccurrenceController {
Boolean userHasRoleAdmin = false

// Check (optionally comma-separated) list of authorise.roles - if we get `true` then stop checking
grailsApplication.config.getProperty('authorise.roles', String).tokenize(',').each {
grailsApplication.config.getProperty('authorise.roles', String, "").tokenize(',').each {
!userHasRoleAdmin ? userHasRoleAdmin = authService?.userInRole( it ) : null
}

Expand Down
29 changes: 22 additions & 7 deletions grails-app/i18n/messages_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ advancedsearch.table10col02.des = (YYYY-MM-DD) leave blank for most recent recor
advancedsearch.dataset.col.label = Data Resource
advancedsearch.dataset.select.default = -- select a Data Resource --
advancedsearch.button.submit = Search
advancedsearch.button.clear.all=Clear all
home.index.taxaupload.des01 = Enter a list of taxon names/scientific names, one name per line (common names not currently supported).
home.index.taxaupload.button01 = Search
home.index.catalogupload.des01 = Enter a list of catalogue numbers (one number per line).
Expand Down Expand Up @@ -335,7 +336,10 @@ list.sandbox.reloadData.label=Reload data
list.sandbox.reloadData.tooltip=Reload data for temporary data resource

eya.title01 = Explore Your Area
eya.title02 = Atlas of Living Australia
# Commented because is not used now and to avoid confusion
# eya.title02 = Atlas of Living Australia
# See:
# https://github.com/search?q=org%3AAtlasOfLivingAustralia+eya.title02&type=Code
eya.breadcrumb.navigator01 = Home
eya.breadcrumb.navigator02 = Locations
eya.breadcrumb.navigator03 = Your Area
Expand Down Expand Up @@ -363,7 +367,7 @@ eya.maptips.01 = Tips
eya.maptips.02 = you can fine-tune the location of the area by dragging the blue marker icon

download.download.title = Downloads
download.termsofusedownload.01 = By downloading this content you are agreeing to use it in accordance with the Atlas of Living Australia
download.termsofusedownload.01.param = By downloading this content you are agreeing to use it in accordance with the {0}
download.termsofusedownload.02 = Terms of Use
download.termsofusedownload.03 = and any Data Provider Terms associated with the data download.
download.termsofusedownload.04 = Please provide the following details before downloading (* required)
Expand Down Expand Up @@ -430,7 +434,7 @@ recordcore.div.addtionalproperties.title = Additional properties
recordcore.occurenceevent.title = Event

map.spatialportal.btn.label = View in spatial portal
map.spatialportal.btn.title = Continue analysis in ALA Spatial Portal
map.spatialportal.btn.title.param = Continue analysis in {0} Spatial Portal
map.spatialportal.redirect.title = Warning
map.spatialportal.redirect.content = Please be aware that Data Quality filters will not be applied when records are viewed in Spatial Portal.
map.spatialportal.redirect.btn.cancel.label = Cancel
Expand Down Expand Up @@ -514,7 +518,10 @@ generic.navbar02.li01 = Home
generic.navbar02.li02 = About
generic.navbar02.li03 = Contact
generic.footer.link01 = This site is licensed under a
generic.footer.link02 = Creative Commons Attribution 3.0 Australia License
# Commented because is not used now and to avoid confusion
# generic.footer.link02 = Creative Commons Attribution 3.0 Australia License
# See:
# https://github.com/search?q=org%3AAtlasOfLivingAustralia+generic.footer.link02&type=code
generic.footer.link03 = Provider content may be covered by other
generic.footer.link04 = Terms of Use

Expand Down Expand Up @@ -1187,12 +1194,18 @@ dq.selectmultiple.form.submit = Apply
dq.view.excluded = View excluded records
dq.excluded.count = records are excluded by this category
dq.warning.dataprofile.title = Results filtering with data profiles
dq.warning.dataprofile.content.line1 = Search results are now filtered by default to exclude lower quality records according to the ALA General data profile. Data profiles may be disabled or other data profiles are available via the data profile drop down.
dq.warning.dataprofile.content.line1.param = Search results are now filtered by default to exclude lower quality records according to the {0} General data profile. Data profiles may be disabled or other data profiles are available via the data profile drop down.
dq.warning.dataprofile.content.line2 = Information on the data profiles and the filters used in each data profile is available via the <a><i class='fa fa-info-circle'></i></a> icons.
dq.warning.dataprofile.buttonleft.text = Learn More
dq.warning.dataprofile.buttonright.text = Got it
dq.userpref.defaultprofile = -- Select a profile --
dq.data.profiles.disabled = Data profiles have been disabled for this search
dq.warning.failedtosave = Failed to save user preferences. Please try again
dq.disabled = Disabled
dq.click.to.switch.profiles=Click to switch profile
dq.click.to.disable.data.profiles = Click to disable all data profiles
dq.click.to.enable.the.profile.quality.filter = Click to enable the {0} quality filters
quality.filters.excludeCount = records excluded
record.compare_table.heading = You are indicating that
record.compare_table.source_record.heading = This record
record.compare_table.target_record.heading = This record ID provided
Expand All @@ -1214,7 +1227,9 @@ related.record.reason.explanation.sameoccurrence=This record is a duplicate occu
related.record.reason.explanation.tissuesample=This record is a tissue sample of this record:
related.record.reason.explanation.splitspecimen=This record is a split specimen of this record:
home.index.taxaupload.batchRadioPrefix=Search on:
home.index.taxaupload.batchMode.matched=Matched name (via the ALA taxonomy)
home.index.taxaupload.batchMode.matched.param=Matched name (via the {0} taxonomy)
home.index.taxaupload.batchMode.provided=Supplied name (note: is case-sensitive so genus should be capitalised)
advanced.taxon.tooltip.matched=Input names will be matched to their accepted scientific name in the ALA taxonomy. Results will include records for known synonyms
advanced.taxon.tooltip.matched.param=Input names will be matched to their accepted scientific name in the {0} taxonomy. Results will include records for known synonyms
advanced.taxon.tooltip.supplied=Input names will only match the scientific name supplied in the original occurrence record. Results will NOT include records for known synonyms. Note: searching is case sensitive.
search.species.view.title = Species page
search.species.view.desc = view species page
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ class OccurrenceTagLib {
def facetResult = attrs.facetResult
def queryParam = attrs.queryParam
def mb = new MarkupBuilder(out)
def linkTitle = "${alatag.message(code:"alatag.filter.results.by")} ${attrs.fieldDisplayName ?: facetResult.fieldName}"
def linkTitle = "${alatag.message(code:"alatag.filter.results.by")} ${attrs.fieldDisplayName ? attrs.fieldDisplayName.uncapitalize(): facetResult.fieldName}"

def addCounts = { count ->
mb.span(class:"facetCount") {
Expand Down Expand Up @@ -299,7 +299,11 @@ class OccurrenceTagLib {
mkp.yieldUnescaped("&nbsp;")
}
span(class: "facet-item") {
if (fieldResult.i18nCode) {
// If we have a translation, we use it, if not we try to use the label translation
// and if not, directly use the label. If the label is missing, use "unknown"
// In search.js this is done a bit differently:
// https://github.com/AtlasOfLivingAustralia/biocache-hubs/blob/00f263640edd802d10a071f5d09d146eaa24af34/grails-app/assets/javascripts/search.js#L1946
if (fieldResult.i18nCode && alatag.message(code: fieldResult.i18nCode) != fieldResult.i18nCode ) {
mkp.yield(alatag.message(code: fieldResult.i18nCode, default: fieldResult.label))
} else {
mkp.yield(alatag.message(code: fieldResult.label ?: 'unknown', default: fieldResult.label))
Expand Down Expand Up @@ -497,7 +501,7 @@ class OccurrenceTagLib {
mb.tr() {
if (i == 0) {
td(class:"noStripe", rowspan:"${group.value.length()}") {
b(group.key)
b(g.message(code: "facet.group.${group.key}", default: "${group.key}"))
}
}
td(alatag.databaseFieldName(text: field.name))
Expand Down
4 changes: 2 additions & 2 deletions grails-app/views/home/_advanced.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,9 @@
</div>
</div>

<input type="submit" value=<g:message code="advancedsearch.button.submit" default="Search"/> class="btn btn-primary" />
<input type="submit" value="<g:message code="advancedsearch.button.submit" default="Search"/>" class="btn btn-primary" />
&nbsp;&nbsp;
<input type="reset" value="Clear all" id="clearAll" class="btn btn-default" onclick="$('input#solrQuery').val(''); $('input.clear_taxon').click(); return true;"/>
<input type="reset" value="<g:message code="advancedsearch.button.clear.all" default="Clear all"/>" id="clearAll" class="btn btn-default" onclick="$('input#solrQuery').val(''); $('input.clear_taxon').click(); return true;"/>
</form>
<asset:script type="text/javascript">
$(document).ready(function() {
Expand Down
5 changes: 3 additions & 2 deletions grails-app/views/home/index.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<g:set var="biocacheServiceUrl" value="${grailsApplication.config.biocache.baseUrl}"/>
<g:set var="serverName" value="${grailsApplication.config.serverName ?: grailsApplication.config.biocache.baseUrl}"/>
<g:set var="biocacheServiceUrl" value="${alatag.getBiocacheAjaxUrl()}"/>
<g:set var="shortName" value="${grailsApplication.config.skin.orgNameShort}"/>
<!DOCTYPE html>
<html>
<head>
Expand Down Expand Up @@ -368,13 +369,13 @@
<g:message code="home.index.taxaupload.batchRadioPrefix" default="Search on:"/>
</div>
</div>
<g:set var="matchedTaxonTooltip" value="${g.message(code:"advanced.taxon.tooltip.matched",default:"N/A")}"/>
<g:set var="matchedTaxonTooltip" value="${g.message(code:"advanced.taxon.tooltip.matched.param",default:"N/A", args:[shortName])}" />
<g:set var="suppliedTaxonTooltip" value="${g.message(code:"advanced.taxon.tooltip.supplied",default:"N/A")}"/>
<div class="col-sm-10">
<div class="radio ">
<label>
<input type="radio" name="field" id="batchModeMatched" value="taxa" checked>
<g:message code="home.index.taxaupload.batchMode.matched" default="Matched name"/>
<g:message code="home.index.taxaupload.batchMode.matched.param" default="Matched name" args="${[shortName]}" />
</label>
<a href="#" data-toggle="tooltip" data-placement="right" title="${matchedTaxonTooltip}"><i class="glyphicon glyphicon-question-sign"></i></a>
</div>
Expand Down
3 changes: 2 additions & 1 deletion grails-app/views/occurrence/_download.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
--%>
<!-- download modal form - used for old style downloads -->
<g:set var="biocacheServiceUrl" value="${alatag.getBiocacheAjaxUrl()}"/>
<g:set var="orgNameLong" value="${grailsApplication.config.skin.orgNameLong}"/>

<div id="downloadModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="downloadModalLabel">
<div class="modal-dialog" role="document">
Expand All @@ -16,7 +17,7 @@
</div>
<div class="modal-body">
<p id="termsOfUseDownload">
<g:message code="download.termsofusedownload.01" default="By downloading this content you are agreeing to use it in accordance with the Atlas of Living Australia"/>
<g:message code="download.termsofusedownload.01.param" args="${[orgNameLong]}" default="By downloading this content you are agreeing to use it in accordance with the {0}"/>
<a href="http:https://www.ala.org.au/about/terms-of-use/#TOUusingcontent"><g:message code="download.termsofusedownload.02" default="Terms of Use"/></a>
<g:message code="download.termsofusedownload.03" default="and any Data Provider Terms associated with the data download."/>
<br/><br/>
Expand Down
4 changes: 2 additions & 2 deletions grails-app/views/occurrence/_facets.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
</div>
<div class="facetsGroup" id="group_data_quality" style="display:none;">

<h4><span class="FieldName">Categories</span></h4>
<h4><span class="FieldName"><alatag:message code="dq.selectmultiple.categorytable.header.categories" default="Categories" /></span></h4>
<div class="subnavlist nano" style="clear:left">
<ul class="facets nano-content dq-categories">
<g:each var="qualityCategory" in="${qualityCategories}">
Expand Down Expand Up @@ -93,7 +93,7 @@
<g:set var="fieldDisplayName" value="${alatag.formatDynamicFacetName(fieldName:"${facetResult.fieldName}")}"/>
<h4><span class="FieldName">${fieldDisplayName?:facetResult.fieldName}</span></h4>
<div class="subnavlist nano" style="clear:left">
<alatag:facetLinkList facetResult="${facetResult}" queryParam="${queryParam}"/>
<alatag:facetLinkList facetResult="${facetResult}" queryParam="${queryParam}" fieldDisplayName="${fieldDisplayName}"/>
</div>
%{--<div class="fadeout"></div>--}%
<g:if test="${facetResult.fieldResult.length() > 1}">
Expand Down
7 changes: 4 additions & 3 deletions grails-app/views/occurrence/_map.gsp
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
<%@ page contentType="text/html;charset=UTF-8" %>
<asset:stylesheet src="map.css"/>
<g:set var="shortName" value="${grailsApplication.config.skin.orgNameShort}"/>
<div style="margin-bottom: 10px">
<g:if test="${grailsApplication.config.skin.useAlaSpatialPortal?.toBoolean()}">
<g:set var='spatialPortalLink' value="${sr.urlParameters}"/>
<g:set var='spatialPortalUrlParams' value="${grailsApplication.config.spatial.params}"/>
<g:set var='spatialEnableQualityWarning' value="${grailsApplication.config.getProperty('spatial.enableQualityWarning', Boolean, false)}" />
<g:if test="${!spatialEnableQualityWarning || searchRequestParams.disableAllQualityFilters || qualityFiltersByLabel.isEmpty()}">
<a id="spatialPortalLink" class="btn btn-default btn-sm tooltips"
href="${grailsApplication.config.spatial.baseUrl}${spatialPortalLink}${spatialPortalUrlParams}" title="<g:message code="map.spatialportal.btn.title"/>">
href="${grailsApplication.config.spatial.baseUrl}${spatialPortalLink}${spatialPortalUrlParams}" title="<g:message code="map.spatialportal.btn.title.param" args="${[shortName]}"/>">
<i class="fa fa-map-marker"></i>&nbsp;&nbsp;<g:message code="map.spatialportal.btn.label" default="View in spatial portal"/></a>
</g:if>
<g:else>
<a href="#gotoSpatial" role="button" data-toggle="modal" class="btn btn-default btn-sm tooltips" title="<g:message code="map.spatialportal.btn.title"/>">
<a href="#gotoSpatial" role="button" data-toggle="modal" class="btn btn-default btn-sm tooltips" title="<g:message code="map.spatialportal.btn.title.param" args="${[shortName]}"/>">
<i class="fa fa-map-marker"></i>&nbsp;&nbsp;<g:message code="map.spatialportal.btn.label" default="View in spatial portal"/></a>
</g:else>
</g:if>
Expand Down Expand Up @@ -745,7 +746,7 @@
</div>
<div class="modal-footer">
<button class="btn btn-default" data-dismiss="modal" aria-hidden="true"><g:message code="map.spatialportal.redirect.btn.cancel.label" default="Cancel"/></button>
<a class="btn btn-primary" href="${grailsApplication.config.spatial.baseUrl}${spatialPortalLink}${spatialPortalUrlParams}" title="<g:message code="map.spatialportal.btn.title"/>"><g:message code="map.spatialportal.redirect.btn.ok.label" default="Go to Spatial Portal"/></a>
<a class="btn btn-primary" href="${grailsApplication.config.spatial.baseUrl}${spatialPortalLink}${spatialPortalUrlParams}" title="<g:message code="map.spatialportal.btn.title.param" args="${[shortName]}"/>"><g:message code="map.spatialportal.redirect.btn.ok.label" default="Go to Spatial Portal"/></a>
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit d261355

Please sign in to comment.