X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/daea333875ff6b51d99dea24997019e573e201c2..009e6267f7b7cf46be7958327d83e4cf261334b0:/src/pages/DetailsPage.svelte

diff --git a/src/pages/DetailsPage.svelte b/src/pages/DetailsPage.svelte
index 225d1a0..a8bb120 100644
--- a/src/pages/DetailsPage.svelte
+++ b/src/pages/DetailsPage.svelte
@@ -63,6 +63,11 @@
     );
   }
 
+  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') {
@@ -155,7 +160,7 @@
     <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>
@@ -172,7 +177,8 @@
               {#each aPlace.address as addressLine}
                 <DetailsOneRow addressLine={addressLine}
                                bMarkUnusedLines={true}
-                               bDistanceInMeters={false} />
+                               bDistanceInMeters={false}
+                               sCountryCode={country_code(aPlace)} />
               {/each}
             {/if}
 
@@ -236,7 +242,7 @@
                 {/each}
 
                 {#if Object.keys(aPlace.hierarchy) > 500}
-                  <p>There are more child objects which are not shown.</p>
+                  <tr><td><p>There are more child objects which are not shown.</p></td></tr>
                 {/if}
               {:else}
                 <tr><td>Place is not parent of other places</td></tr>
