From 634d04068d4ed9f918a2fa4736b4e83ef88ac213 Mon Sep 17 00:00:00 2001 From: marc tobias Date: Sat, 6 Feb 2016 12:39:51 +0100 Subject: [PATCH] UI: columns nicer aligned in details table(s) --- lib/template/details-html.php | 37 +++++++++++++++++++---------------- website/css/details.css | 11 +++++++++++ 2 files changed, 31 insertions(+), 17 deletions(-) diff --git a/lib/template/details-html.php b/lib/template/details-html.php index 548cee7a..7b9226fd 100644 --- a/lib/template/details-html.php +++ b/lib/template/details-html.php @@ -13,7 +13,14 @@ function headline($sTitle) { - echo "

".$sTitle."

\n"; + // echo "

".$sTitle."

\n"; + echo "

".$sTitle."

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

".$sTitle."

\n"; + echo "

".$sTitle."

\n"; } function osm_link($aFeature) @@ -97,15 +104,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"; } @@ -184,8 +191,6 @@ } ?> - - '; foreach($aLinkedLines as $aAddressLine) { _one_row($aAddressLine); } - echo ''; } @@ -220,7 +223,7 @@ echo '
'.($aRow['word_token'][0]==' '?'*':'').$aRow['word_token'].'('.$aRow['word_id'].')'."
\n"; } } - + if (sizeof($aParentOfLines)) { headline('Parent Of'); @@ -238,14 +241,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 +255,8 @@ // headline('Other Parts'); // headline('Linked To'); + + echo "\n"; ?> diff --git a/website/css/details.css b/website/css/details.css index 3eca1667..f1234295 100644 --- a/website/css/details.css +++ b/website/css/details.css @@ -5,11 +5,22 @@ h1 { h2 { font-size: 2em; padding-left: 8px; + background-color: white; } h3 { font-size: 1.5em; padding-left: 8px; } + +tr.all-columns { + background-color: white !important; + border: none; +} +tr.all-columns td { + border-top: none !important; + padding-left: 0 !important; +} + .table { width: 100%; } -- 2.39.5