# CHANGES
+* version 3.5.2 - 2024-04-05
+ * Detail page: Link to postcode search not includes the country code
+ * test-suite: fix typos based on a codespell run
+ * NPM package updates (Svelte 4.2)
+
* version 3.5.1 - 2024-02-14
* Automatic release creation for 3.5.0 failed on Github Actions
{
"name": "nominatim-ui",
"description": "Debug web interface for Nominatim geocoder",
- "version": "3.5.1",
+ "version": "3.5.2",
"license": "GPL-2.0",
"scripts": {
"build": "rollup -c",
export let addressLine;
export let bDistanceInMeters;
export let bMarkUnusedLines = false;
+ export let sCountryCode;
$: bAddressLineUsed = addressLine.isaddress;
$: reverse_only = Nominatim_Config.Reverse_Only;
search by name
</PageLink>
{:else if !reverse_only && addressLine.type === 'postcode'}
- <PageLink page='search' params_hash={{ postalcode: addressLine.localname }}>
+ <PageLink page='search'
+ params_hash={{ postalcode: addressLine.localname, country: sCountryCode }}>
search by name
</PageLink>
{/if}
);
}
+ function country_code(aThisPlace) {
+ let aLine = aThisPlace.address.find((address_line) => address_line.type === 'country_code');
+ return aLine ? aLine.localname : null;
+ }
+
$: {
let pageinfo = $page;
if (pageinfo.tab === 'details') {
<div class="row">
<div class="col-md-12">
<h2>Address</h2>
- <table id="address" class="table table-striped table-small">
+ <table id="address" class="table table-striped table-small">
<thead>
<tr>
<th>Local name</th>
{#each aPlace.address as addressLine}
<DetailsOneRow addressLine={addressLine}
bMarkUnusedLines={true}
- bDistanceInMeters={false} />
+ bDistanceInMeters={false}
+ sCountryCode={country_code(aPlace)} />
{/each}
{/if}
// Reverse-only installation have no search index, therefore no keywords
if (!reverse_only) {
+ it('should have a link to postcode which includes country code', async function () {
+ const url = 'search.html?postalcode=9490&country=li';
+
+ assert.strictEqual((await page.$$eval(`a[href="${url}"]`, (links) => links.length)), 1);
+ });
+
it('should change url and add new header on clicking display keywords', async function () {
let current_url;
let display_headers;