ILS updates #146

Merged
hughrun merged 1 commit from ils into main 2022-09-03 17:12:04 +10:00
3 changed files with 31 additions and 30 deletions

View file

@ -54,7 +54,7 @@ Mid Western Regional Council Library Service,Mid-Western Regional,nsw,yes,3,Civi
MidCoast Libraries,Mid-Coast,nsw,no,3,Libero,https://library.midcoast.nsw.gov.au/Home, MidCoast Libraries,Mid-Coast,nsw,no,3,Libero,https://library.midcoast.nsw.gov.au/Home,
Mosman Library,Mosman,nsw,yes,3,AIT Aurora,https://www.mosman.nsw.gov.au/library, Mosman Library,Mosman,nsw,yes,3,AIT Aurora,https://www.mosman.nsw.gov.au/library,
Nambucca Shire Council Libraries,Nambucca,nsw,yes,3,Civica Spydus,https://www.nambucca.nsw.gov.au/cp_themes/library/home.asp, Nambucca Shire Council Libraries,Nambucca,nsw,yes,3,Civica Spydus,https://www.nambucca.nsw.gov.au/cp_themes/library/home.asp,
Newcastle Region Library,Newcastle,nsw,adults,4,SirsiDynix Horizon,https://www.newcastle.nsw.gov.au/library/home, Newcastle Region Library,Newcastle,nsw,adults,4,Innovative Polaris,https://www.newcastle.nsw.gov.au/library/home,
North Western Library,North Western,nsw,?,3,Civica Spydus,https://www.northwesternlibrary.com.au, North Western Library,North Western,nsw,?,3,Civica Spydus,https://www.northwesternlibrary.com.au,
Northern Beaches Library,Northern Beaches,nsw,yes,3,Civica Spydus,https://www.northernbeaches.nsw.gov.au/library, Northern Beaches Library,Northern Beaches,nsw,yes,3,Civica Spydus,https://www.northernbeaches.nsw.gov.au/library,
Oberon Council Library,Oberon,nsw,?,?,Civica Spydus,https://www.oberon.nsw.gov.au/council/venues/council-venues/oberon-council-library, Oberon Council Library,Oberon,nsw,?,?,Civica Spydus,https://www.oberon.nsw.gov.au/council/venues/council-venues/oberon-council-library,

1 long_name name state fines standard_loan_weeks ILS website
54 MidCoast Libraries Mid-Coast nsw no 3 Libero https://library.midcoast.nsw.gov.au/Home
55 Mosman Library Mosman nsw yes 3 AIT Aurora https://www.mosman.nsw.gov.au/library
56 Nambucca Shire Council Libraries Nambucca nsw yes 3 Civica Spydus https://www.nambucca.nsw.gov.au/cp_themes/library/home.asp
57 Newcastle Region Library Newcastle nsw adults 4 SirsiDynix Horizon Innovative Polaris https://www.newcastle.nsw.gov.au/library/home
58 North Western Library North Western nsw ? 3 Civica Spydus https://www.northwesternlibrary.com.au
59 Northern Beaches Library Northern Beaches nsw yes 3 Civica Spydus https://www.northernbeaches.nsw.gov.au/library
60 Oberon Council Library Oberon nsw ? ? Civica Spydus https://www.oberon.nsw.gov.au/council/venues/council-venues/oberon-council-library

View file

@ -1,5 +1,5 @@
lat,lng,town,address,phone,ils lat,lng,town,address,phone,ils
-37.809815,144.96513,State Library of Victoria,"328 Swanston Street, Melbourne",03 8664 7000,Ex Libris Voyager -37.809815,144.96513,State Library of Victoria,"328 Swanston Street, Melbourne",03 8664 7000,Ex Libris Alma
-35.2964664654173,149.129530279015,National Library of Australia,"Parkes Place, Canberra",02 6262 1111,Ex Libris Voyager -35.2964664654173,149.129530279015,National Library of Australia,"Parkes Place, Canberra",02 6262 1111,Ex Libris Voyager
-33.8658844393665,151.213300984753,State Library of New South Wales,"Macquarie Street, Sydney",02 9273 1414,Ex Libris Alma -33.8658844393665,151.213300984753,State Library of New South Wales,"Macquarie Street, Sydney",02 9273 1414,Ex Libris Alma
-27.4709532627151,153.018134355766,State Library of Queensland,"Stanley Place, South Brisbane",07 3840 7666,Ex Libris Alma -27.4709532627151,153.018134355766,State Library of Queensland,"Stanley Place, South Brisbane",07 3840 7666,Ex Libris Alma

1 lat lng town address phone ils
2 -37.809815 144.96513 State Library of Victoria 328 Swanston Street, Melbourne 03 8664 7000 Ex Libris Voyager Ex Libris Alma
3 -35.2964664654173 149.129530279015 National Library of Australia Parkes Place, Canberra 02 6262 1111 Ex Libris Voyager
4 -33.8658844393665 151.213300984753 State Library of New South Wales Macquarie Street, Sydney 02 9273 1414 Ex Libris Alma
5 -27.4709532627151 153.018134355766 State Library of Queensland Stanley Place, South Brisbane 07 3840 7666 Ex Libris Alma

View file

@ -36,6 +36,7 @@ function getIlsColor(f) {
f == 'Ex Libris Voyager' ? 'yellow' : f == 'Ex Libris Voyager' ? 'yellow' :
f == 'Follett Destiny' ? '#df4917' : f == 'Follett Destiny' ? '#df4917' :
f == 'Infor V-smart' ? '#e174c1' : f == 'Infor V-smart' ? '#e174c1' :
f == 'Innovative Polaris' ? '#8e7cc3' :
f == 'Innovative Sierra' ? '#ff0000' : f == 'Innovative Sierra' ? '#ff0000' :
f == 'Koha ILS' ? '#2fbf2f' : f == 'Koha ILS' ? '#2fbf2f' :
f == 'Libero' ? '#ffa500' : f == 'Libero' ? '#ffa500' :
@ -55,17 +56,17 @@ function LocationsLayer(data, color, outline, type) {
this.type = type; this.type = type;
return L.layerGroup([ return L.layerGroup([
L.geoCsv(data, { L.geoCsv(data, {
firstLineTitles: true, firstLineTitles: true,
fieldSeparator: ',', fieldSeparator: ',',
onEachFeature: function (feature, layer) { onEachFeature: function (feature, layer) {
if (type === 'ils') { if (type === 'ils') {
layer.bindPopup( layer.bindPopup(
`<strong>${feature.properties.town}</strong>` + `<strong>${feature.properties.town}</strong>` +
`<p>${feature.properties.ils}</p>` `<p>${feature.properties.ils}</p>`
) )
} else { } else {
layer.bindPopup( layer.bindPopup(
`<strong>${feature.properties.town}</strong>` + `<strong>${feature.properties.town}</strong>` +
`<p>${feature.properties.address}<br/>` + `<p>${feature.properties.address}<br/>` +
`phone: ${feature.properties.phone}</p>` `phone: ${feature.properties.phone}</p>`
) )
@ -77,11 +78,11 @@ function LocationsLayer(data, color, outline, type) {
} }
}), }),
L.geoCsv(data, { L.geoCsv(data, {
firstLineTitles: true, firstLineTitles: true,
fieldSeparator: ',', fieldSeparator: ',',
onEachFeature: function (feature, layer) { onEachFeature: function (feature, layer) {
layer.bindPopup( layer.bindPopup(
`<strong>${feature.properties.town}</strong>` + `<strong>${feature.properties.town}</strong>` +
`<p>${feature.properties.address}<br/>` + `<p>${feature.properties.address}<br/>` +
`phone: ${feature.properties.phone}</p>` `phone: ${feature.properties.phone}</p>`
) )
@ -179,7 +180,7 @@ Promise.all([boundaries, branchesCsv, ikcCsv, mechanics, nslaBranches])
const loanThree = new L.StripePattern({ const loanThree = new L.StripePattern({
color: '#000' color: '#000'
}); });
loanThree.addTo(map); loanThree.addTo(map);
const loanFour = new L.StripePattern({ const loanFour = new L.StripePattern({
@ -187,7 +188,7 @@ Promise.all([boundaries, branchesCsv, ikcCsv, mechanics, nslaBranches])
weight: 6, weight: 6,
spaceWeight: 2, spaceWeight: 2,
angle: 45 angle: 45
}); });
loanFour.addTo(map); loanFour.addTo(map);
const loanSix = new L.StripePattern({ const loanSix = new L.StripePattern({
@ -195,7 +196,7 @@ Promise.all([boundaries, branchesCsv, ikcCsv, mechanics, nslaBranches])
weight: 2, weight: 2,
spaceWeight: 6, spaceWeight: 6,
angle: 135 angle: 135
}); });
loanSix.addTo(map); loanSix.addTo(map);
function getLoanFillPattern(w) { function getLoanFillPattern(w) {
@ -291,8 +292,8 @@ Promise.all([boundaries, branchesCsv, ikcCsv, mechanics, nslaBranches])
// add control layers // add control layers
var mapControl = L.control.layers( var mapControl = L.control.layers(
baseMaps, baseMaps,
overlayMaps, overlayMaps,
{ 'collapsed' : isSmallScreen } { 'collapsed' : isSmallScreen }
).addTo(map); ).addTo(map);
@ -362,20 +363,20 @@ Promise.all([boundaries, branchesCsv, ikcCsv, mechanics, nslaBranches])
function zoomToFeature(e, props) { function zoomToFeature(e, props) {
map.fitBounds(e.target.getBounds()); map.fitBounds(e.target.getBounds());
e.target.bindPopup(` e.target.bindPopup(`
<strong>${props.name}</strong>` + <strong>${props.name}</strong>` +
`<p>Fines: ` + `<p>Fines: ` +
( (
props.fines === 'no' ? 'No' : props.fines === 'no' ? 'No' :
props.fines == 'no_unconfirmed' ? 'Probably no' : props.fines == 'no_unconfirmed' ? 'Probably no' :
props.fines === 'yes' ? 'Yes' : props.fines === 'yes' ? 'Yes' :
props.fines == 'adults' ? 'No for children' : props.fines == 'adults' ? 'No for children' :
props.fines == 'by_lga' ? 'Varies by LGA' : 'Unknown' props.fines == 'by_lga' ? 'Varies by LGA' : 'Unknown'
) + ) +
`<br/>Loans : ` + `<br/>Loans : ` +
(!props.standard_loan_weeks || props.standard_loan_weeks == '?' ? `Unknown` : `${props.standard_loan_weeks} weeks`) + (!props.standard_loan_weeks || props.standard_loan_weeks == '?' ? `Unknown` : `${props.standard_loan_weeks} weeks`) +
`<br/>Software : ` + `<br/>Software : ` +
(!props.ILS || props.ILS == '?' ? `Unknown` : `${props.ILS}`) + (!props.ILS || props.ILS == '?' ? `Unknown` : `${props.ILS}`) +
`<br/>Website: ` + `<br/>Website: ` +
(!props.website || props.website == '?' ? `Unknown` : `<a target="_blank" href="`+ `${props.website}` + `" >` + `${props.website}` + `</a>`) + (!props.website || props.website == '?' ? `Unknown` : `<a target="_blank" href="`+ `${props.website}` + `" >` + `${props.website}` + `</a>`) +
`</p>` `</p>`
).openPopup() ).openPopup()
@ -397,7 +398,7 @@ Promise.all([boundaries, branchesCsv, ikcCsv, mechanics, nslaBranches])
// FINES LEGEND // FINES LEGEND
infoBoxes.fines.onAdd = addLegend; infoBoxes.fines.onAdd = addLegend;
infoBoxes.fines.update = function (props) { infoBoxes.fines.update = function (props) {
this._div.innerHTML = this._div.innerHTML =
`<p>Hover over an area for more information</p> `<p>Hover over an area for more information</p>
<section> <section>
<div><div class="circle" style="background-color: #4dac26"></div>Fine free</div> <div><div class="circle" style="background-color: #4dac26"></div>Fine free</div>
@ -426,7 +427,7 @@ Promise.all([boundaries, branchesCsv, ikcCsv, mechanics, nslaBranches])
infoBoxes.loanPeriod.update = function (props) { infoBoxes.loanPeriod.update = function (props) {
this._div.innerHTML = ` this._div.innerHTML = `
<section> <section>
<div><div class="circle" style="background: <div><div class="circle" style="background:
radial-gradient(4px 4px at 6px 6px, #3a3a3a 50%, transparent 75%), radial-gradient(4px 4px at 6px 6px, #3a3a3a 50%, transparent 75%),
radial-gradient(4px 4px at 16px 6px, #3a3a3a 50%, transparent 75%), radial-gradient(4px 4px at 16px 6px, #3a3a3a 50%, transparent 75%),
radial-gradient(4px 4px at 2px 12px, #3a3a3a 50%, transparent 75%), radial-gradient(4px 4px at 2px 12px, #3a3a3a 50%, transparent 75%),
@ -467,16 +468,16 @@ Promise.all([boundaries, branchesCsv, ikcCsv, mechanics, nslaBranches])
infoBoxes.serviceInfo.update = function(props) { infoBoxes.serviceInfo.update = function(props) {
if (props) { if (props) {
this._div.innerHTML = `<h4>${props.name}</h4>` + this._div.innerHTML = `<h4>${props.name}</h4>` +
'<section><p>' + '<section><p>' +
( (
props.fines === "no" ? "Fine free for overdue items" : props.fines === "no" ? "Fine free for overdue items" :
props.fines == "no_unconfirmed" ? "Probably no overdue fines" : props.fines == "no_unconfirmed" ? "Probably no overdue fines" :
props.fines === "yes" ? "Overdue fines for all users" : props.fines === "yes" ? "Overdue fines for all users" :
props.fines == "adults" ? "No overdue fines for children" : props.fines == "adults" ? "No overdue fines for children" :
props.fines == "by_lga" ? "Fine policy varies" : "No fines data" props.fines == "by_lga" ? "Fine policy varies" : "No fines data"
) + '<br/>' + ) + '<br/>' +
(!props.standard_loan_weeks || props.standard_loan_weeks == "?" ? `No loan period data` : `${props.standard_loan_weeks} week loans`) + (!props.standard_loan_weeks || props.standard_loan_weeks == "?" ? `No loan period data` : `${props.standard_loan_weeks} week loans`) +
`<br/>Software: ` + `<br/>Software: ` +
(!props.ILS || props.ILS == "?" ? `Unknown` : `${props.ILS}`) + (!props.ILS || props.ILS == "?" ? `Unknown` : `${props.ILS}`) +
'</p></section>' '</p></section>'
} }