Adjust item street address display

This commit is contained in:
Edward Betts 2021-05-14 17:05:38 +02:00
parent fa3a2880bf
commit be182d26d6

View file

@ -286,6 +286,11 @@ function build_item_detail(item, tag_or_key_list) {
popup += `<br><a href="${isa_url}" target="_blank">${isa_label}</a> (${isa_qid})`; popup += `<br><a href="${isa_url}" target="_blank">${isa_label}</a> (${isa_qid})`;
} }
} }
if (item.street_address && item.street_address.length) {
popup += "<br><strong>street address</strong>";
popup += `<br>${item.street_address[0]}`;
}
popup += '</div><div class="col">' popup += '</div><div class="col">'
if (tag_or_key_list && tag_or_key_list.length) { if (tag_or_key_list && tag_or_key_list.length) {
@ -295,11 +300,6 @@ function build_item_detail(item, tag_or_key_list) {
} }
} }
if (item.street_address && item.street_address.length) {
popup += "<br><strong>street address</strong>";
popup += `<br>${item.street_address[0]["text"]}`;
}
popup += "</div></div>"; popup += "</div></div>";
return popup; return popup;