Skip to content

Commit a0c017c

Browse files
authoredMay 16, 2024
Merge pull request #249 from AtlasOfLivingAustralia/feature/issue248
Indicate unmatched species with ? icon #248
2 parents 6cb0e69 + e428c5f commit a0c017c

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed
 

‎build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ plugins {
1818
}
1919

2020

21-
version "6.3-SNAPSHOT"
21+
version "6.4-SNAPSHOT"
2222
group "org.grails.plugins"
2323

2424
apply plugin:"eclipse"

‎grails-app/assets/javascripts/speciesModel.js

+3
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,9 @@ var SpeciesViewModel = function(data, options, context) {
254254
self.transients.bieUrl = ko.observable();
255255
self.transients.speciesInformation = ko.observable();
256256
self.transients.speciesTitle = ko.observable();
257+
self.transients.matched = ko.computed(function() {
258+
return self.guid() && self.guid() != "A_GUID" && self.listId != "unmatched";
259+
});
257260
self.transients.editing = ko.observable(false);
258261
self.transients.textFieldValue = ko.observable();
259262
self.transients.bioProfileUrl = ko.computed(function (){

‎src/main/groovy/au/org/ala/ecodata/forms/EditModelWidgetRenderer.groovy

+2-2
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,8 @@ public class EditModelWidgetRenderer implements ModelWidgetRenderer {
371371
context.writer << """<div${context.attributes.toString()}>
372372
<div data-bind="with:${context.source}" class="input-group"">
373373
<select class="form-control form-control-sm" data-bind="speciesSelect2:\$data" ${context.validationAttr}></select>
374-
<div class="input-group-append">
375-
<span class="input-group-text" data-bind="visible:name(), popover: {title: transients.speciesTitle, content: transients.speciesInformation}"><i class="fa fa-info-circle"></i></span>
374+
<div class="input-group-append"">
375+
<span class="input-group-text" data-bind="visible:name(), popover: {title: transients.speciesTitle, content: transients.speciesInformation}, css:{'bg-warning':!transients.matched()}"><i class="fa" data-bind="css:{'fa-info-circle':transients.matched(), 'fa-question-circle':!transients.matched()}"></i></span>
376376
</div>
377377
</div></div>"""
378378
}

0 commit comments

Comments
 (0)