Skip to content

Commit d261355

Browse files
authored
Merge pull request #543 from AtlasOfLivingAustralia/release/3.0.10
Release/3.0.10
2 parents 86ae3f3 + 05b393b commit d261355

File tree

11 files changed

+56
-31
lines changed

11 files changed

+56
-31
lines changed

build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ buildscript {
1010
}
1111
}
1212

13-
version "3.0.9"
13+
version "3.0.10"
1414
group "au.org.ala.plugins.grails"
1515

1616
apply plugin:"eclipse"
@@ -88,7 +88,7 @@ dependencies {
8888

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

9494
}

grails-app/assets/javascripts/search.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,9 @@ $(document).ready(function() {
234234
$.getJSON(jsonUri, function(data) {
235235
// use HTML template, see http://stackoverflow.com/a/1091493/249327
236236
var speciesPageUri = BC_CONF.bieWebappUrl + "/species/" + lsid;
237-
var speciesPageLink = "<a href='" + speciesPageUri + "' title='Species page' target='BIE'>view species page</a>";
237+
var speciesPageLinkTitle = jQuery.i18n.prop("search.species.view.title");
238+
var speciesPageLinkDesc = jQuery.i18n.prop("search.species.view.desc");
239+
var speciesPageLink = "<a href='" + speciesPageUri + "' title='" + speciesPageLinkTitle + "' target='BIE'>" + speciesPageLinkDesc + "</a>";
238240
$clone.find('a.btn').text(nameString).attr("href", speciesPageUri);
239241
$clone.find('.nameString').text(nameString);
240242
$clone.find('.speciesPageLink').html(speciesPageLink);

grails-app/controllers/au/org/ala/biocache/hubs/OccurrenceController.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ class OccurrenceController {
396396
Boolean userHasRoleAdmin = false
397397

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

grails-app/i18n/messages_en.properties

+22-7
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ advancedsearch.table10col02.des = (YYYY-MM-DD) leave blank for most recent recor
8888
advancedsearch.dataset.col.label = Data Resource
8989
advancedsearch.dataset.select.default = -- select a Data Resource --
9090
advancedsearch.button.submit = Search
91+
advancedsearch.button.clear.all=Clear all
9192
home.index.taxaupload.des01 = Enter a list of taxon names/scientific names, one name per line (common names not currently supported).
9293
home.index.taxaupload.button01 = Search
9394
home.index.catalogupload.des01 = Enter a list of catalogue numbers (one number per line).
@@ -335,7 +336,10 @@ list.sandbox.reloadData.label=Reload data
335336
list.sandbox.reloadData.tooltip=Reload data for temporary data resource
336337

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

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

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

@@ -1187,12 +1194,18 @@ dq.selectmultiple.form.submit = Apply
11871194
dq.view.excluded = View excluded records
11881195
dq.excluded.count = records are excluded by this category
11891196
dq.warning.dataprofile.title = Results filtering with data profiles
1190-
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.
1197+
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.
1198+
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.
11911199
dq.warning.dataprofile.buttonleft.text = Learn More
11921200
dq.warning.dataprofile.buttonright.text = Got it
11931201
dq.userpref.defaultprofile = -- Select a profile --
11941202
dq.data.profiles.disabled = Data profiles have been disabled for this search
11951203
dq.warning.failedtosave = Failed to save user preferences. Please try again
1204+
dq.disabled = Disabled
1205+
dq.click.to.switch.profiles=Click to switch profile
1206+
dq.click.to.disable.data.profiles = Click to disable all data profiles
1207+
dq.click.to.enable.the.profile.quality.filter = Click to enable the {0} quality filters
1208+
quality.filters.excludeCount = records excluded
11961209
record.compare_table.heading = You are indicating that
11971210
record.compare_table.source_record.heading = This record
11981211
record.compare_table.target_record.heading = This record ID provided
@@ -1214,7 +1227,9 @@ related.record.reason.explanation.sameoccurrence=This record is a duplicate occu
12141227
related.record.reason.explanation.tissuesample=This record is a tissue sample of this record:
12151228
related.record.reason.explanation.splitspecimen=This record is a split specimen of this record:
12161229
home.index.taxaupload.batchRadioPrefix=Search on:
1217-
home.index.taxaupload.batchMode.matched=Matched name (via the ALA taxonomy)
1230+
home.index.taxaupload.batchMode.matched.param=Matched name (via the {0} taxonomy)
12181231
home.index.taxaupload.batchMode.provided=Supplied name (note: is case-sensitive so genus should be capitalised)
1219-
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
1232+
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
12201233
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.
1234+
search.species.view.title = Species page
1235+
search.species.view.desc = view species page

grails-app/taglib/au/org/ala/biocache/hubs/OccurrenceTagLib.groovy

+7-3
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ class OccurrenceTagLib {
265265
def facetResult = attrs.facetResult
266266
def queryParam = attrs.queryParam
267267
def mb = new MarkupBuilder(out)
268-
def linkTitle = "${alatag.message(code:"alatag.filter.results.by")} ${attrs.fieldDisplayName ?: facetResult.fieldName}"
268+
def linkTitle = "${alatag.message(code:"alatag.filter.results.by")} ${attrs.fieldDisplayName ? attrs.fieldDisplayName.uncapitalize(): facetResult.fieldName}"
269269

270270
def addCounts = { count ->
271271
mb.span(class:"facetCount") {
@@ -299,7 +299,11 @@ class OccurrenceTagLib {
299299
mkp.yieldUnescaped("&nbsp;")
300300
}
301301
span(class: "facet-item") {
302-
if (fieldResult.i18nCode) {
302+
// If we have a translation, we use it, if not we try to use the label translation
303+
// and if not, directly use the label. If the label is missing, use "unknown"
304+
// In search.js this is done a bit differently:
305+
// https://github.com/AtlasOfLivingAustralia/biocache-hubs/blob/00f263640edd802d10a071f5d09d146eaa24af34/grails-app/assets/javascripts/search.js#L1946
306+
if (fieldResult.i18nCode && alatag.message(code: fieldResult.i18nCode) != fieldResult.i18nCode ) {
303307
mkp.yield(alatag.message(code: fieldResult.i18nCode, default: fieldResult.label))
304308
} else {
305309
mkp.yield(alatag.message(code: fieldResult.label ?: 'unknown', default: fieldResult.label))
@@ -497,7 +501,7 @@ class OccurrenceTagLib {
497501
mb.tr() {
498502
if (i == 0) {
499503
td(class:"noStripe", rowspan:"${group.value.length()}") {
500-
b(group.key)
504+
b(g.message(code: "facet.group.${group.key}", default: "${group.key}"))
501505
}
502506
}
503507
td(alatag.databaseFieldName(text: field.name))

grails-app/views/home/_advanced.gsp

+2-2
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,9 @@
218218
</div>
219219
</div>
220220

221-
<input type="submit" value=<g:message code="advancedsearch.button.submit" default="Search"/> class="btn btn-primary" />
221+
<input type="submit" value="<g:message code="advancedsearch.button.submit" default="Search"/>" class="btn btn-primary" />
222222
&nbsp;&nbsp;
223-
<input type="reset" value="Clear all" id="clearAll" class="btn btn-default" onclick="$('input#solrQuery').val(''); $('input.clear_taxon').click(); return true;"/>
223+
<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;"/>
224224
</form>
225225
<asset:script type="text/javascript">
226226
$(document).ready(function() {

grails-app/views/home/index.gsp

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<g:set var="biocacheServiceUrl" value="${grailsApplication.config.biocache.baseUrl}"/>
1111
<g:set var="serverName" value="${grailsApplication.config.serverName ?: grailsApplication.config.biocache.baseUrl}"/>
1212
<g:set var="biocacheServiceUrl" value="${alatag.getBiocacheAjaxUrl()}"/>
13+
<g:set var="shortName" value="${grailsApplication.config.skin.orgNameShort}"/>
1314
<!DOCTYPE html>
1415
<html>
1516
<head>
@@ -368,13 +369,13 @@
368369
<g:message code="home.index.taxaupload.batchRadioPrefix" default="Search on:"/>
369370
</div>
370371
</div>
371-
<g:set var="matchedTaxonTooltip" value="${g.message(code:"advanced.taxon.tooltip.matched",default:"N/A")}"/>
372+
<g:set var="matchedTaxonTooltip" value="${g.message(code:"advanced.taxon.tooltip.matched.param",default:"N/A", args:[shortName])}" />
372373
<g:set var="suppliedTaxonTooltip" value="${g.message(code:"advanced.taxon.tooltip.supplied",default:"N/A")}"/>
373374
<div class="col-sm-10">
374375
<div class="radio ">
375376
<label>
376377
<input type="radio" name="field" id="batchModeMatched" value="taxa" checked>
377-
<g:message code="home.index.taxaupload.batchMode.matched" default="Matched name"/>
378+
<g:message code="home.index.taxaupload.batchMode.matched.param" default="Matched name" args="${[shortName]}" />
378379
</label>
379380
<a href="#" data-toggle="tooltip" data-placement="right" title="${matchedTaxonTooltip}"><i class="glyphicon glyphicon-question-sign"></i></a>
380381
</div>

grails-app/views/occurrence/_download.gsp

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
--%>
66
<!-- download modal form - used for old style downloads -->
77
<g:set var="biocacheServiceUrl" value="${alatag.getBiocacheAjaxUrl()}"/>
8+
<g:set var="orgNameLong" value="${grailsApplication.config.skin.orgNameLong}"/>
89

910
<div id="downloadModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="downloadModalLabel">
1011
<div class="modal-dialog" role="document">
@@ -16,7 +17,7 @@
1617
</div>
1718
<div class="modal-body">
1819
<p id="termsOfUseDownload">
19-
<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"/>
20+
<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}"/>
2021
<a href="http://www.ala.org.au/about/terms-of-use/#TOUusingcontent"><g:message code="download.termsofusedownload.02" default="Terms of Use"/></a>
2122
<g:message code="download.termsofusedownload.03" default="and any Data Provider Terms associated with the data download."/>
2223
<br/><br/>

grails-app/views/occurrence/_facets.gsp

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
</div>
4242
<div class="facetsGroup" id="group_data_quality" style="display:none;">
4343

44-
<h4><span class="FieldName">Categories</span></h4>
44+
<h4><span class="FieldName"><alatag:message code="dq.selectmultiple.categorytable.header.categories" default="Categories" /></span></h4>
4545
<div class="subnavlist nano" style="clear:left">
4646
<ul class="facets nano-content dq-categories">
4747
<g:each var="qualityCategory" in="${qualityCategories}">
@@ -93,7 +93,7 @@
9393
<g:set var="fieldDisplayName" value="${alatag.formatDynamicFacetName(fieldName:"${facetResult.fieldName}")}"/>
9494
<h4><span class="FieldName">${fieldDisplayName?:facetResult.fieldName}</span></h4>
9595
<div class="subnavlist nano" style="clear:left">
96-
<alatag:facetLinkList facetResult="${facetResult}" queryParam="${queryParam}"/>
96+
<alatag:facetLinkList facetResult="${facetResult}" queryParam="${queryParam}" fieldDisplayName="${fieldDisplayName}"/>
9797
</div>
9898
%{--<div class="fadeout"></div>--}%
9999
<g:if test="${facetResult.fieldResult.length() > 1}">

grails-app/views/occurrence/_map.gsp

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
<%@ page contentType="text/html;charset=UTF-8" %>
22
<asset:stylesheet src="map.css"/>
3+
<g:set var="shortName" value="${grailsApplication.config.skin.orgNameShort}"/>
34
<div style="margin-bottom: 10px">
45
<g:if test="${grailsApplication.config.skin.useAlaSpatialPortal?.toBoolean()}">
56
<g:set var='spatialPortalLink' value="${sr.urlParameters}"/>
67
<g:set var='spatialPortalUrlParams' value="${grailsApplication.config.spatial.params}"/>
78
<g:set var='spatialEnableQualityWarning' value="${grailsApplication.config.getProperty('spatial.enableQualityWarning', Boolean, false)}" />
89
<g:if test="${!spatialEnableQualityWarning || searchRequestParams.disableAllQualityFilters || qualityFiltersByLabel.isEmpty()}">
910
<a id="spatialPortalLink" class="btn btn-default btn-sm tooltips"
10-
href="${grailsApplication.config.spatial.baseUrl}${spatialPortalLink}${spatialPortalUrlParams}" title="<g:message code="map.spatialportal.btn.title"/>">
11+
href="${grailsApplication.config.spatial.baseUrl}${spatialPortalLink}${spatialPortalUrlParams}" title="<g:message code="map.spatialportal.btn.title.param" args="${[shortName]}"/>">
1112
<i class="fa fa-map-marker"></i>&nbsp;&nbsp;<g:message code="map.spatialportal.btn.label" default="View in spatial portal"/></a>
1213
</g:if>
1314
<g:else>
14-
<a href="#gotoSpatial" role="button" data-toggle="modal" class="btn btn-default btn-sm tooltips" title="<g:message code="map.spatialportal.btn.title"/>">
15+
<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]}"/>">
1516
<i class="fa fa-map-marker"></i>&nbsp;&nbsp;<g:message code="map.spatialportal.btn.label" default="View in spatial portal"/></a>
1617
</g:else>
1718
</g:if>
@@ -745,7 +746,7 @@
745746
</div>
746747
<div class="modal-footer">
747748
<button class="btn btn-default" data-dismiss="modal" aria-hidden="true"><g:message code="map.spatialportal.redirect.btn.cancel.label" default="Cancel"/></button>
748-
<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>
749+
<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>
749750
</div>
750751
</div>
751752
</div>

0 commit comments

Comments
 (0)