From: Sarah Hoffmann Date: Sat, 6 Feb 2016 11:51:47 +0000 (+0100) Subject: Merge pull request #361 from mtmail/detail-page-big-table2 X-Git-Tag: v.2.5.0~7 X-Git-Url: https://git.openstreetmap.org/nominatim.git/commitdiff_plain/8b491e85448629c8921b4bb7399df319f73977be?ds=inline;hp=-c Merge pull request #361 from mtmail/detail-page-big-table2 UI: columns nicer aligned in details table(s) --- 8b491e85448629c8921b4bb7399df319f73977be diff --combined lib/template/details-html.php index ec4a2108,d5c18252..6845cbb2 --- a/lib/template/details-html.php +++ b/lib/template/details-html.php @@@ -6,13 -6,19 +6,18 @@@ - ".$sTitle."\n"; + echo "

".$sTitle."

\n"; + } + + function headline3($sTitle) + { + echo "

".$sTitle."

\n"; } function osm_link($aFeature) @@@ -96,15 -102,15 +101,15 @@@ 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"; } @@@ -113,7 -119,6 +118,7 @@@ +
@@@ -184,8 -189,6 +189,6 @@@ } ?> - - '; foreach($aLinkedLines as $aAddressLine) { _one_row($aAddressLine); } - echo ''; } @@@ -220,7 -221,7 +221,7 @@@ echo '
'.($aRow['word_token'][0]==' '?'*':'').$aRow['word_token'].'('.$aRow['word_id'].')'."
\n"; } } - + if (sizeof($aParentOfLines)) { headline('Parent Of'); @@@ -238,14 -239,12 +239,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 -253,8 +253,8 @@@ // headline('Other Parts'); // headline('Linked To'); + + echo "\n"; ?>
@@@ -261,23 -262,13 +262,23 @@@