X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/8b491e85448629c8921b4bb7399df319f73977be..f0d962f8a0bd6aac32c07420956c35479d5ec467:/lib/template/details-html.php?ds=sidebyside diff --git a/lib/template/details-html.php b/lib/template/details-html.php index 6845cbb2..ae36b411 100644 --- a/lib/template/details-html.php +++ b/lib/template/details-html.php @@ -78,18 +78,6 @@ return $sHTML; } - // function hash_to_subtable($aAssociatedList) - // { - // $sHTML = ''; - // foreach($aAssociatedList as $sKey => $sValue) - // { - // $sHTML = $sHTML . ''."\n"; - // } - // $sHTML = $sHTML . '
'.$sKey.''.$sValue.'
'; - // return $sHTML; - // } - - function map_icon($sIcon) { if ($sIcon){ @@ -106,13 +94,24 @@ echo ' ' . $aAddressLine['class'].':'.$aAddressLine['type'] . "\n"; echo ' ' . osm_link($aAddressLine) . "\n"; echo ' ' . (isset($aAddressLine['admin_level']) ? $aAddressLine['admin_level'] : '') . "\n"; - // echo '' . (isset($aAddressLine['rank_search_label']) ? $aAddressLine['rank_search_label'] : '') ."\n"; - // echo ', '.($aAddressLine['fromarea']=='t'?'Polygon':'Point').''; echo ' ' . format_distance($aAddressLine['distance'])."\n"; echo ' ' . nominatim_link($aAddressLine,'details >') . "\n"; echo "\n"; } + function _one_keyword_row($keyword_token,$word_id){ + echo "\n"; + echo ''; + // mark partial tokens (those starting with a space) with a star for readability + echo ($keyword_token[0]==' '?'*':''); + echo $keyword_token; + if (isset($word_id)) + { + echo 'word id: '.$word_id; + } + echo "\n"; + } + ?> @@ -174,7 +173,6 @@ Type OSM Admin level - Distance @@ -209,7 +207,7 @@ headline('Name Keywords'); foreach($aPlaceSearchNameKeywords as $aRow) { - echo '
'.$aRow['word_token']."
\n"; + _one_keyword_row($aRow['word_token'], $aRow['word_id']); } } @@ -218,7 +216,7 @@ headline('Address Keywords'); foreach($aPlaceSearchAddressKeywords as $aRow) { - echo '
'.($aRow['word_token'][0]==' '?'*':'').$aRow['word_token'].'('.$aRow['word_id'].')'."
\n"; + _one_keyword_row($aRow['word_token'], $aRow['word_id']); } } @@ -251,9 +249,6 @@ } } - // headline('Other Parts'); - // headline('Linked To'); - echo "\n"; ?> @@ -264,21 +259,21 @@