From: Marc Tobias Metten Date: Mon, 29 Feb 2016 12:55:19 +0000 (+0100) Subject: corrected layout of keywords on HTML details page X-Git-Tag: v3.0.0~201^2~4 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/27406c8daa514a6b03480972f393d32b709cb315?ds=sidebyside corrected layout of keywords on HTML details page --- diff --git a/lib/template/details-html.php b/lib/template/details-html.php index 463eb4aa..404450c0 100644 --- a/lib/template/details-html.php +++ b/lib/template/details-html.php @@ -113,6 +113,19 @@ 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.')'; + } + echo "\n"; + } + ?> @@ -209,7 +222,7 @@ headline('Name Keywords'); foreach($aPlaceSearchNameKeywords as $aRow) { - echo '
'.$aRow['word_token']."
\n"; + _one_keyword_row($aRow['word_token']); } } @@ -218,7 +231,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']); } }