]> git.openstreetmap.org Git - nominatim-ui.git/blobdiff - src/components/DetailsOneRow.svelte
validate hidden fields against pattern only when filled
[nominatim-ui.git] / src / components / DetailsOneRow.svelte
index cd74d93ecdb65ccfef42f4fe9f0c287d3ba6a262..7455245a2e1ce88407ae10f2b00debbd0897048a 100644 (file)
@@ -7,12 +7,13 @@
 
   export let addressLine;
   export let bDistanceInMeters;
+  export let bMarkUnusedLines = false;
 
   $: bAddressLineUsed = addressLine.isaddress;
 
 </script>
 
-<tr class:notused={!bAddressLineUsed}>
+<tr class:notused={bMarkUnusedLines && !bAddressLineUsed}>
   <td class="name font-weight-bold">
     {#if addressLine.localname}
       {addressLine.localname}
@@ -29,9 +30,9 @@
     {#if addressLine.osm_id}
       <DetailsLink feature={addressLine}>details</DetailsLink>
     {:else if addressLine.type.match(/^country/)}
-      <PageLink page='search', params_hash={{ country: addressLine.localname }}>search by name</PageLink>
+      <PageLink page='search' params_hash={{ country: addressLine.localname }}>search by name</PageLink>
     {:else if addressLine.type === 'postcode'}
-      <PageLink page='search', params_hash={{ postalcode: addressLine.localname }}>search by name</PageLink>
+      <PageLink page='search' params_hash={{ postalcode: addressLine.localname }}>search by name</PageLink>
     {/if}
   </td>
 </tr>
@@ -43,4 +44,9 @@
   .noname{
     color:#800;
   }
+
+  td {
+    padding: 2px 8px;
+    font-size: 0.9em;
+  }
 </style>