X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/a5883337f5e8442e3e21dd701cf01c33bbb7a205..d3ff9600b5e345239f4dc1b5d1b7244f5a25d051:/lib/template/details-html.php
diff --git a/lib/template/details-html.php b/lib/template/details-html.php
index ec4a2108..3e9e39d7 100644
--- a/lib/template/details-html.php
+++ b/lib/template/details-html.php
@@ -12,7 +12,12 @@
function headline($sTitle)
{
- echo "
".$sTitle."
\n";
+ echo "".$sTitle." |
\n";
+ }
+
+ function headline3($sTitle)
+ {
+ echo "".$sTitle." |
\n";
}
function osm_link($aFeature)
@@ -96,18 +101,31 @@
function _one_row($aAddressLine){
$bNotUsed = (isset($aAddressLine['isaddress']) && $aAddressLine['isaddress'] == 'f');
- echo '';
- echo ' '.(trim($aAddressLine['localname'])?$aAddressLine['localname']:'No Name').' | ';
- echo ' ' . $aAddressLine['class'].':'.$aAddressLine['type'] . ' | ';
- echo ' ' . osm_link($aAddressLine) . ' | ';
- echo ' ' . (isset($aAddressLine['admin_level']) ? $aAddressLine['admin_level'] : '') . ' | ';
- // echo '' . (isset($aAddressLine['rank_search_label']) ? $aAddressLine['rank_search_label'] : '') .' | ';
+ echo '
'."\n";
+ echo ' '.(trim($aAddressLine['localname'])?$aAddressLine['localname']:'No Name')." | \n";
+ 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']).' | ';;
- echo ' ' . nominatim_link($aAddressLine,'details >') . ' | ';;
+ 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";
+ }
+
?>
@@ -184,8 +202,6 @@
}
?>
-
-
';
foreach($aLinkedLines as $aAddressLine)
{
_one_row($aAddressLine);
}
- echo '';
}
@@ -208,7 +222,7 @@
headline('Name Keywords');
foreach($aPlaceSearchNameKeywords as $aRow)
{
- echo ''.$aRow['word_token']."
\n";
+ _one_keyword_row($aRow['word_token'], $aRow['word_id']);
}
}
@@ -217,10 +231,10 @@
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']);
}
}
-
+
if (sizeof($aParentOfLines))
{
headline('Parent Of');
@@ -238,14 +252,12 @@
foreach($aGroupedAddressLines as $sGroupHeading => $aParentOfLines)
{
$sGroupHeading = ucwords($sGroupHeading);
- echo "$sGroupHeading
\n";
+ headline3($sGroupHeading);
- echo '';
foreach($aParentOfLines as $aAddressLine)
{
_one_row($aAddressLine);
}
- echo '
';
}
if (sizeof($aParentOfLines) >= 500) {
echo 'There are more child objects which are not shown.
';
@@ -254,6 +266,8 @@
// headline('Other Parts');
// headline('Linked To');
+
+ echo "\n";
?>
@@ -263,21 +277,21 @@