Skip to content

Commit

Permalink
merge changes from beta
Browse files Browse the repository at this point in the history
  • Loading branch information
mlluciano committed Jun 5, 2024
2 parents 049b726 + 3ed0b74 commit bf9c820
Show file tree
Hide file tree
Showing 16 changed files with 552 additions and 194 deletions.
6 changes: 3 additions & 3 deletions app/controllers/publishers.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import async from 'async'
import _ from 'lodash'
import RecordsetPage from 'public/client/js/react/build/recordset'
import StatsPage from 'public/client/js/react/build/stats'

import moment from 'moment'
import React from 'react'
import ReactDOMServer from 'react-dom/server'

Expand Down Expand Up @@ -122,7 +122,7 @@ export default {
var collected = {};
var taxon = {};
var flags = {};
var defaultMin = "2015-01-16";
var defaultMin = moment().subtract(3,'years').startOf('month');
async.parallel([
function(cback) {
var params = {"dateInterval": "month", "minDate": defaultMin};
Expand Down Expand Up @@ -271,7 +271,7 @@ export default {
});
},
function(cback) {
var params = {"dateInterval": "month", "recordset": req.params.id, "minDate": "2015-01-15"};
var params = {"dateInterval": "month", "recordset": req.params.id, "minDate": moment().subtract(3,'years').startOf('month')};
request.post({"url": config.api + 'summary/stats/search', "json": true, "body": params}, function(a_err, a_resp, a_body) {
use = a_body;
cback(a_err, 'four');
Expand Down
10 changes: 5 additions & 5 deletions app/views/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@

</div>
<div style="padding:3px 15px;background:#272727;" id="alert-banner">
<div class="alert alert-info alert-dismissible" style="margin-bottom:0px;">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<a href="//ufl.qualtrics.com/jfe/form/SV_77ehHphc3xtBv7v?optOut=false" target="_blank" class="alert-link" data-dismiss="alert">Take our 30-second survey</a>
<div class="alert alert-info" style="color: #31708f; background-color: #d9edf7; border-color: #bce8f1; padding-right: 35px; padding: 15px; margin-bottom: 20px; border: 1px solid transparent; border-radius: 4px; margin-bottom:0px;">
<a style="font-weight: 700" href="#" class="close" data-dismiss="alert">&times;</a>
<a style="font-weight: 700" href="//ufl.qualtrics.com/jfe/form/SV_77ehHphc3xtBv7v?optOut=false" target="_blank" class="alert-link" data-dismiss="alert">Take our 30-second survey</a>
<div>The U.S. National Science Foundation and iDigBio are required to collect information on use of digitized collections-based specimen data. Please help us meet this requirement every time you use this search portal. Sustainability of the national digitization effort depends on evidence of data use!
<a href="//ufl.qualtrics.com/jfe/form/SV_77ehHphc3xtBv7v?optOut=true" target="_blank" class="alert-link" data-dismiss="alert">Maybe later</a>.</div>
</div>
Expand Down Expand Up @@ -116,7 +116,7 @@
<a href="/portal/list/index.html" alt="specimen links" style="display:none;">specimen list</a>
<!-- footer section -->
<footer class="container-fluid">
<div class="sixteen columns" id="footer">
<div class="sixteen columns" id="footer" style="height: auto;">

<ul id="logo-list">
<li><a target="_blank" href="http://ufl.edu"><img alt="University of Florida logo" class="logo-center" src="https://static.idigbio.org/website-static-content/logos/UFlogo-60x60.png" style="padding-right:8px;"></a></li>
Expand All @@ -140,7 +140,7 @@

</div>
<div class="sixteen columns" id="footnote">
<p>iDigBio is funded by grants from the National Science Foundation [DBI-1115210 (2011-2018), DBI-1547229 (2016-2022), & DBI-2027654 (2021-2026)]. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation. © 2011-2023 iDigBio</p>
<p>iDigBio is funded by grants from the National Science Foundation [DBI-1115210 (2011-2018), DBI-1547229 (2016-2022), & DBI-2027654 (2021-2026)]. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation. © 2011-2024 iDigBio</p>
</div>

</footer>
Expand Down
11 changes: 10 additions & 1 deletion app/views/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,19 @@
<meta property="og:type" content="website" />
<meta property="og:url" content="{{user.protocol}}://{{ user.host }}/portal/search" />

<style>
#loader {
position: absolute;
top: 50%;
left: 50%;
}
</style>

{% endblock %}

{% block content %}
<div id="main" style="margin:0px;">
<div id="main" style="margin:0px; height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ZYFFb+A41E4H4OhkOipXwBElYITDAckFEOBgMQ3arkMkUBdxIUGZpEb7kaQBRlASPg0FQQHAbEEMGDSVEAA1QBhAED1E0NgwFAooCDWljaQIQCE5qMHcNhCkjIQAh+QQACgALACwAAAAAEAAQAAAFeSAgAgIpnOSoLgxxvqgKLEcCC65KEAByKK8cSpA4DAiHQ/DkKhGKh4ZCtCyZGo6F6iYYPAqFgYy02xkSaLEMV34tELyRYNEsCQyHlvWkGCzsPgMCEAY7Cg04Uk48LAsDhRA8MVQPEF0GAgqYYwSRlycNcWskCkApIyEAOwAAAAAAAAAAAA==" />
</div>
{% endblock %}

Expand Down
8 changes: 4 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ gulp.task('build', function() {
.pipe(buffer())
// load and init sourcemaps
.pipe(sourcemaps.init({loadMaps: true}))
// .pipe(uglify())
.pipe(uglify())
// write sourcemaps
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest('./public/client/js/react/build'));
Expand All @@ -106,7 +106,7 @@ gulp.task('libs', function() {
.pipe(buffer())
.pipe(sourcemaps.init({loadMaps: true}))
// Add transformation tasks to the pipeline here.
// .pipe(uglify())
.pipe(uglify())
.on('error', log.error)
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest('./public/js/'));
Expand All @@ -124,7 +124,7 @@ gulp.task('mapper', function() {
.pipe(buffer())
.pipe(sourcemaps.init({loadMaps: true}))
// Add transformation tasks to the pipeline here.
// .pipe(uglify())
.pipe(uglify())
.on('error', log.error)
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest('./public/js/'));
Expand All @@ -142,7 +142,7 @@ gulp.task('client', function() {
.pipe(buffer())
.pipe(sourcemaps.init({loadMaps: true}))
// Add transformation tasks to the pipeline here.
// .pipe(uglify())
.pipe(uglify())
.on('error', log.error)
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest('./public/js/'));
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@bower_components/leaflet-utfgrid": "danzel/Leaflet.utfgrid",
"@bower_components/leaflet.fullscreen": "brunob/leaflet.fullscreen",
"@elastic/filesaver": "^1.1.2",
"antd": "^5.15.4",
"antd": "^5.16.1",
"async": "^2.0.0",
"body-parser": "^1.16.1",
"bootstrap": "^3.3.6",
Expand Down
48 changes: 46 additions & 2 deletions public/client/js/lib/dwc_fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ module.exports = {
"dwc:taxonRemarks"
],
"specimen": [
"dwc:associatedOccurrences",
"dwc:typeStatus",
"dwc:identifiedBy",
"dwc:dateIdentified",
Expand Down Expand Up @@ -123,6 +124,18 @@ module.exports = {
"dwc:lowestBiostratigraphicZone",
"dwc:lithostratigraphicTerms"
],
"idhistory": [
"dwc:Identification"
],
"extendedmeasurementorfact": [
"obis:ExtendedMeasurementOrFact"
],
"materialsample": [
"ggbn:MaterialSample"
],
"chronometricage": [
"chrono:ChronometricAge"
],
"other": [
"dcterms:language",
"dcterms:modified",
Expand Down Expand Up @@ -476,6 +489,37 @@ module.exports = {
"idigbio:institutionName": "Institution Name",
"idigbio:collectionCategory": "Collection Category",
"idigbio:collectionSize": "Collection Size",
"idigbio:importantHoldings": "Important Holdings"
"idigbio:importantHoldings": "Important Holdings",
"dwc:associatedOccurrences": "Associated Occurrences",

"idhistory": "Identification History",
"dwc:identificationID": "Identification ID",
"dwc:verbatimIdentification": "Verbatim Identification",
"dwc:identifiedByID": "Identified By (ID)",
"dwc:identificationVerificationStatus": "Identification Verification Status",

"extendedmeasurementorfact": "Extended Measurement or Fact",
"dwc:measurementDeterminedBy": "Measurement Determined By",
"dwc:measurementDeterminedDate": "Measurement Determined Date",
"dwc:measurementType": "Measurement Type",
"dwc:measurementValue": "Measurement Value",
"obis:measurementTypeID": "Measurement Type ID",
"obis:measurementValueID": "Measurement Value ID",

"materialsample": "Material Sample",
"ggbn:concentrationUnit": "Concentration Unit",
"ggbn:concentration": "Concentration",
"ggbn:materialSampleType": "Material Sample Type",
"ggbn:ratioOfAbsorbance260_230": "Ratio of Absorbance (260/230 nm)", //| For DNA samples only
"ggbn:ratioOfAbsorbance260_280": "Ratio of Absorbance (260/280 nm)", //|
"ggbn:sampleDesignation": "Sample Designation",

"chronometricage": "Chronometric Age",
"chrono:chronometricAgeReferences": "Chronometric Age References",
"chrono:chronometricAgeRemarks": "Chronometric Age Remarks",
"chrono:maximumChronometricAge": "Maximum Chronometric Age",
"chrono:maximumChronometricAgeReferenceSystem": "Maximum Chronometric Age Reference System",
"chrono:minimumChronometricAge": "Minimum Chronometric Age",
"chrono:minimumChronometricAgeReferenceSystem": "Minimum Chronometric Age Reference System",
}
}
}
Loading

0 comments on commit bf9c820

Please sign in to comment.