[Mapbender-commits] r9603 - in trunk/mapbender/http: classes css php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Sep 26 07:07:19 PDT 2016


Author: armin11
Date: 2016-09-26 07:07:19 -0700 (Mon, 26 Sep 2016)
New Revision: 9603

Added:
   trunk/mapbender/http/css/metadata_responsiv.css
Modified:
   trunk/mapbender/http/classes/class_iso19139.php
   trunk/mapbender/http/php/mod_showMetadata.php
Log:
Fix for category handling of metadata and new responsive design for metadata html view - thanx to karl owesny

Modified: trunk/mapbender/http/classes/class_iso19139.php
===================================================================
--- trunk/mapbender/http/classes/class_iso19139.php	2016-09-22 13:47:26 UTC (rev 9602)
+++ trunk/mapbender/http/classes/class_iso19139.php	2016-09-26 14:07:19 UTC (rev 9603)
@@ -18,6 +18,7 @@
 require_once(dirname(__FILE__)."/../../core/globalSettings.php");
 require_once(dirname(__FILE__)."/class_connector.php");
 require_once(dirname(__FILE__)."/class_Uuid.php");
+require_once(dirname(__FILE__) . "/class_propagateMetadata.php");
 require_once dirname(__FILE__) . "/../../tools/wms_extent/extent_service.conf";
 class Iso19139 {
 	//values for handling apriori ows metadataurls
@@ -442,12 +443,34 @@
 			$this->resourceResponsibleParty = $this->resourceResponsibleParty[0];
 			$this->resourceContactEmail = $iso19139Xml->xpath('//gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty/gmd:contactInfo/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:electronicMailAddress/gco:CharacterString');
 			$this->resourceContactEmail = $this->resourceContactEmail[0];
+			$this->qualifyMetadata();
 			return $this;
 		} else {
 			return false;
 		}
 	}
 	
+	public function qualifyMetadata() {
+		//delete 0 entries from integer categories values
+		//all categories
+		$types = array("md_topic", "inspire", "custom");
+		foreach ($types as $cat) {
+			switch ($cat) {
+				case "md_topic":
+					$objectPrefix = 'iso';
+				break;
+				default:
+					$objectPrefix = $cat;
+				break;
+			}
+		}
+		//qualify keywords 
+		$this->keywords = array_unique($this->keywords);
+		/*if (count($this->{$objectPrefix."Categories"}) && $this->{$objectPrefix."Categories"}[0] == 0) {
+			$this->{$objectPrefix."Categories"} = array();
+		}*/
+	}
+
 	public function parsePolygon($iso19139Xml, $pathToPolygon) {
 		$polygonalExtentExterior = array();		
 		// //gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_BoundingPolygon/gmd:polygon/
@@ -560,8 +583,8 @@
 				$iso19139Hash[$a]['value'] = ltrim($iso19139Hash[$a]['value'],',');
 			}
 			//generate html
-			$html = '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="'.$languageCode.'">';
-			$html .= '<body>';
+			$html = '<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="'.$languageCode.'">';
+
 			$metadataStr .= '<head>' . 
 				'<title>'._mb("Metadata").'</title>' . 
 				'<meta name="description" content="'._mb("Metadata").'" xml:lang="'.$languageCode.'" />'.
@@ -572,10 +595,12 @@
 				'<meta http-equiv="content-language" content="'.$languageCode.'" />'.
 				'<meta http-equiv="content-style-type" content="text/css" />'.
 				'<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">' . 	
+				'<meta http-equiv="X-UA-Compatible" content="IE=edge" />' . 
 				'</head>';
 			$html .= $metadataStr;
+			$html .= '<body>';
 			//define the javascripts to include
-			$html .= '<link type="text/css" href="../css/metadata.css" rel="Stylesheet" />';
+			$html .= '<link type="text/css" href="../css/metadata_responsiv.css" rel="Stylesheet" />';
 			if ($layout == 'tabs') {
 				$html .= '<link type="text/css" href="../extensions/jquery-ui-1.8.1.custom/css/custom-theme/jquery-ui-1.8.5.custom.css" rel="Stylesheet" />';	
 				$html .= '<script type="text/javascript" src="../extensions/jquery-ui-1.8.1.custom/js/jquery-1.4.2.min.js"></script>';
@@ -1117,14 +1142,15 @@
 			$row = db_fetch_assoc($res);
 			$this->termsOfUseRef = $row['fkey_termsofuse_id'];
 			if ($this->termsOfUseRef == null) {
-				$e = new mb_exception("no predefined license set");
+				$e = new mb_notice("no predefined license set");
 			} else {
-				$e = new mb_exception("Predefined license found: ".$this->termsOfUseRef);
+				$e = new mb_notice("Predefined license found: ".$this->termsOfUseRef);
 			}
 		} else {
 			$e = new mb_exception("Could not get metadata with id ".$metadataId." from DB!");
 		return false;
 		}
+		//$this->qualifyMetadata();
 		return true;
 	}
 
@@ -1436,7 +1462,7 @@
 		}
 		//map keys into relevant ids
 		$sqlInsert = "";
-		if (count($this->isoCategories) > 0) {
+		if (count($this->isoCategories) > 0 && $this->customCategories[0] !== 0) {
 			if (count($this->isoCategories) == 1) {
 				$sqlInsert .= "(".(integer)$metadataId.",".(integer)$this->isoCategories[0].")";
 			} else {
@@ -1445,7 +1471,7 @@
 				}
 			}
 			$sqlInsert = rtrim($sqlInsert,",");
-			//$e = new mb_exception("class_Iso19139: insert topic categories: ".$sqlInsert);
+			$e = new mb_exception("class_Iso19139: insert topic categories: ".$sqlInsert);
 			$sql = "INSERT INTO mb_metadata_md_topic_category (fkey_metadata_id, fkey_md_topic_category_id) VALUES ".$sqlInsert;
 			$res = db_query($sql);
 			if (!$res) {
@@ -1453,7 +1479,7 @@
 			}
 		}
 		$sqlInsert = "";
-		if (count($this->inspireCategories) > 0) {
+		if (count($this->inspireCategories) > 0 && $this->inspireCategories[0] !== 0) {
 			if (count($this->inspireCategories) == 1) {
 				$sqlInsert .= "(".(integer)$metadataId.",".(integer)$this->inspireCategories[0].")";
 			} else {
@@ -1463,14 +1489,14 @@
 			}
 			$sqlInsert = rtrim($sqlInsert,",");
 			$sql = "INSERT INTO mb_metadata_inspire_category (fkey_metadata_id, fkey_inspire_category_id) VALUES ".$sqlInsert;
-			//$e = new mb_exception("class_Iso19139: insert inspire categories: ".$sqlInsert);
+			$e = new mb_exception("class_Iso19139: insert inspire categories: ".$sqlInsert);
 			$res = db_query($sql);
 			if (!$res) {
 				$e = new mb_exception("class_Iso19139:"._mb("Cannot insert inspire categories for this metadata!"));
 			}
 		}
 		$sqlInsert = "";
-		if (count($this->customCategories) > 0) {
+		if (count($this->customCategories) > 0 && $this->customCategories[0] !== 0) {
 			if (count($this->customCategories) == 1) {
 				$sqlInsert .= "(".(integer)$metadataId.",".(integer)$this->customCategories[0].")";
 			} else {
@@ -1480,7 +1506,7 @@
 			}	
 			$sqlInsert = rtrim($sqlInsert,",");
 			$sql = "INSERT INTO mb_metadata_custom_category (fkey_metadata_id, fkey_custom_category_id) VALUES ".$sqlInsert;
-			//$e = new mb_exception("class_Iso19139: insert custom categories: ".$sqlInsert);
+			$e = new mb_exception("class_Iso19139: insert custom categories: ".$sqlInsert);
 			$res = db_query($sql);
 			if (!$res) {
 				$e = new mb_exception("class_Iso19139:"._mb("Cannot insert custom categories for this metadata!"));
@@ -1656,7 +1682,7 @@
 				$e = new mb_exception("classes/class_Iso19139.php: "._mb("Cannot insert termsofuse relation!"));
 			}
 		} else {
-			$e = new mb_exception("classes/class_Iso19139.php: license id is null!");
+			$e = new mb_notice("classes/class_Iso19139.php: license id is null!");
 		}
 		
 	}
@@ -1709,7 +1735,7 @@
 				break;
 			}
 			$sqlInsertCoupledResource = "";
-			if (count($this->{$objectPrefix."Categories"}) > 0) {
+			if (count($this->{$objectPrefix."Categories"}) > 0 && $this->{$objectPrefix."Categories"}[0] !== 0) {
 				if (count($this->{$objectPrefix."Categories"}) == 1) {
 					$sqlInsertCoupledResource .= "(".(integer)$metadataId.",".(integer)$this->{$objectPrefix."Categories"}[0].",".$resourceId.")";
 				} else {
@@ -2168,7 +2194,7 @@
 
 		//check if metadata record already exists, if not create a new one, else insert relation only and update the metadata itself!
 		$metadataId = $this->isFileIdentifierAlreadyInDB();
-		$e = new mb_exception("found metadata_id: ".$metadataId);
+		//$e = new mb_exception("found metadata_id: ".$metadataId);
 		
 		if ($metadataId != false) {
 			//update the metadata - new random id set therefor there is no problem when setting the relation afterwards
@@ -2182,7 +2208,7 @@
 		} else {
 			//check if href already exists
 			$metadataId = $this->isLinkAlreadyInDB();
-			$e = new mb_exception("found metadata_id by link : ".$metadataId);
+			//$e = new mb_exception("found metadata_id by link : ".$metadataId);
 			//if so, the metadataset will be the same - (same url same metadataset) - update this as before
 			if ($metadataId != false) {
 				//the link to an existing metadataset already exists - don't store it again or insert anything
@@ -2224,6 +2250,12 @@
 				$result['message'] = "Cannot get metadata record with following uuid from database: ".$uuid;
 				return $result;
 			} else {
+				//update metadata record in connected csw if configured
+				//Propagate information for each new layer to csw if configured*******************
+				$propagation = new propagateMetadata();
+				$uuidArray[0] = $this->fileIdentifier;
+				$result = $propagation->doPropagation("metadata", false, "push",  $uuidArray);
+				//********************************************************************************
 				//insert relations
 				$row = db_fetch_assoc($res);
 				$metadataId = $row['metadata_id'];
@@ -2246,6 +2278,14 @@
 					$result['message'] = "Cannot insert metadata relation!";
 					return $result;
 				} else {
+					//update related view and download service metadata to resolve the coupling and references - operatesOn attribute and so on ...
+					//get ids and uuids of searchable layers to pull all service metadata records
+					$sql = "SELECT layer_id, layer.uuid from layer INNER JOIN ows_relation_metadata ON ows_relation_metadata.fkey_layer_id = layer.layer_id WHERE fkey_metadata_id = $1 AND layer.layer_searchable = 1";
+					$v = array($metadataId);
+					$t = array('i');
+					$res = db_prep_query($sql,$v,$t);
+					
+					//
 					$sql = "UPDATE mb_metadata SET harvestresult = 1 where metadata_id = $1";
 					$v = array($metadataId);
 					$t = array('i');

Added: trunk/mapbender/http/css/metadata_responsiv.css
===================================================================
--- trunk/mapbender/http/css/metadata_responsiv.css	                        (rev 0)
+++ trunk/mapbender/http/css/metadata_responsiv.css	2016-09-26 14:07:19 UTC (rev 9603)
@@ -0,0 +1,46 @@
+* {box-sizing: border-box;word-wrap:break-word;}
+fieldset * {font-size: 1em;}
+html {font-size:12px; font-family:Verdana,Arial,sans-serif;padding: 0;}
+body {	margin: 0;	padding: 0;}
+h4 {margin:1.5em 0 0 0;padding:1em;background-color:rgba(210, 210, 210, 0.7);}
+#tr {	border-bottom: 3px solid rgba(210, 210, 210, 0.7);}
+.lesscss {border: 0px none;margin:0;padding:0 1em 0.5em 0;font-weight:normal;}
+tr a {;text-decoration:none;cursor:pointer;}
+#tr a:hover {text-decoration:underline;}
+.lesscsstable {border:0 none;padding:0;margin:0;}
+.lesscss th {font-style:italic;}
+.lesscss2 {min-width:3em;padding:0 0em 0em 0;}
+.lesscss2 img {margin: 7px 0 -7px;}
+.linkjs:hover{text-decoration:underline;cursor:pointer;}
+th, td {padding: 0.5em 1em 0.5em 1em;}
+th {	font-size: 1.0em;}
+tbody th {text-align: left;min-width:12em;}
+#td:last-child {text-align: left;}
+#img:not(:first-child) {	margin-left: 5px;}
+img {margin: 0 5px -4px 0;}
+.normalizeicon {width:1.5em;height:auto;}
+input{width:100%;}
+
+ at media screen and (max-width: 60em) {
+table {table-layout:fixed;width:100%;}
+tr, th, td {white-space:normal;hyphens:auto;word-wrap:break-word;padding: 0.5em 1em 0.5em 0em;}
+.lesscss th {max-width:8em;min-width:8em;}
+.lesscss2 {width:3em;min-width:3em;padding:0;}
+.lesscss2 img {margin: 7px 0 -7px;}
+tbody tr {max-width:60em}
+tbody td {max-width:48em}
+th {width:30%}
+.responsivimg {max-width: 100%;height: auto;}
+}
+
+ at media screen and (max-width: 35em) {
+
+table {table-layout: fixed;width: 100%;}
+tbody th {max-width:28em}
+.lesscss {padding: 0 0 0.5em 0;}
+.lesscss th {max-width:100%;min-width:100%}
+.lesscss2 {display:inline}
+	tr, th, td {display: block;padding: 0.5em 0em 0.5em 0em;word-wrap:break-word;max-width:28em}
+	th, td {width:100%;}
+.responsivimg {max-width: 100%;height: auto;}
+}

Modified: trunk/mapbender/http/php/mod_showMetadata.php
===================================================================
--- trunk/mapbender/http/php/mod_showMetadata.php	2016-09-22 13:47:26 UTC (rev 9602)
+++ trunk/mapbender/http/php/mod_showMetadata.php	2016-09-26 14:07:19 UTC (rev 9603)
@@ -189,6 +189,8 @@
 		$translation['securedCapabilities'] = 'Secured Capabilities URL';
 		$translation['inspireCapabilities'] = 'INSPIRE Capabilities URL';
 		$translation['capabilities'] = 'Link zum Capabilities Dokument';
+		$translation['showDocument'] = 'Dokument anzeigen';
+		$translation['showLink'] = 'Link anzeigen';
 		$translation['inspireMetadataValidation'] = 'Validierung gegen INSPIRE Geoportal';
 		$translation['showInspireMetadataValidation'] = 'Validierung starten';
 		$translation['statusOK'] = 'Stabil';
@@ -269,6 +271,8 @@
 		$translation['showInspireMetadata'] = 'Metadatendatei';
 		$translation['securedCapabilities'] = 'Secured Capabilities URL';
 		$translation['capabilities'] = 'Link zum Capabilities Dokument';
+		$translation['showDocument'] = 'Show document';
+		$translation['showLink'] = 'Show link';
 		$translation['inspireMetadataValidation'] = 'Validation against INSPIRE Geoportal';
 		$translation['showInspireMetadataValidation'] = 'Start Validation';
 		$translation['statusOK'] = 'stable';
@@ -349,6 +353,8 @@
 		$translation['showInspireMetadata'] = 'Fichier des métadonnées';
 		$translation['securedCapabilities'] = 'Capabilities sécurisées';
 		$translation['capabilities'] = 'Liens sur les capabilities';
+		$translation['showDocument'] = 'Présenter le document';
+		$translation['showLink'] = 'Présenter le lien';
 		$translation['inspireMetadataValidation'] = 'Validation sur le géoportail INSPIRE';
 		$translation['showInspireMetadataValidation'] = 'Démarrer la validation';
 		$translation['statusOK'] = 'stable';
@@ -652,19 +658,19 @@
 	//$resP = db_prep_query($sqlP, $vP, $tP);
 	//$rowP = db_fetch_array($resP);
 	//if ($rowP['layer_map_preview_filename'] != "") {
-		$resourceMetadata['preview'] = "<img src = '../geoportal/mod_showPreview.php?resource=layer&id=".$layerId."'>";
+		$resourceMetadata['preview'] = "<img class='responsivimg' src = '../geoportal/mod_showPreview.php?resource=layer&id=".$layerId."'>";
 
 	//}
 	//if ($rowP['layer_legend_preview_filename'] != "") {
-		$resourceMetadata['legend'] .= "<img src = '../geoportal/mod_showPreview.php?resource=layerlegend&id=".$layerId."'>";
+		$resourceMetadata['legend'] .= "<img class='responsivimg' src = '../geoportal/mod_showPreview.php?resource=layerlegend&id=".$layerId."'>";
 	//}
 /*	if ($rowP['layer_extent_preview_filename'] != "") {
-		$resourceMetadata['extent'] .= "<img src = '../geoportal/layer_preview/".$rowP['layer_extent_preview_filename']."'>";
+		$resourceMetadata['extent'] .= "<img class='responsivimg' src = '../geoportal/layer_preview/".$rowP['layer_extent_preview_filename']."'>";
 	}*/
 	
 }
 if ($resource == 'wmc') {
-	$resourceMetadata['preview'] = "<img src = '../geoportal/mod_showPreview.php?resource=wmc&id=".$resourceMetadata['contentid']."'>";
+	$resourceMetadata['preview'] = "<img class='responsivimg' src = '../geoportal/mod_showPreview.php?resource=wmc&id=".$resourceMetadata['contentid']."'>";
 }
 //db select for service quality
 if ($resource == 'wms' or $resource == 'layer') {
@@ -729,7 +735,7 @@
 
 //e.g. tabs and their content
 $html = '<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="'.$languageCode.'">';
-$html .= '<body>';
+
 $metadataStr .= '<head>' . 
 		'<title>'.$translation['metadata'].'</title>' . 
 		'<meta name="description" content="'.$translation['metadata'].'" xml:lang="'.$languageCode.'" />'.
@@ -740,10 +746,12 @@
 		'<meta http-equiv="content-language" content="'.$languageCode.'" />'.
 		'<meta http-equiv="content-style-type" content="text/css" />'.
 		'<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">' . 	
+		'<meta http-equiv="X-UA-Compatible" content="IE=edge" />' .
 		'</head>';
 $html .= $metadataStr;
+$html .= '<body>';
 //define the javascripts to include
-	$html .= '<link type="text/css" href="../css/metadata.css" rel="Stylesheet" />';
+	$html .= '<link type="text/css" href="../css/metadata_responsiv.css" rel="Stylesheet" />';
 
 if ($layout == 'tabs') {
 	$html .= '<link type="text/css" href="../extensions/jquery-ui-1.8.1.custom/css/custom-theme/jquery-ui-1.8.5.custom.css" rel="Stylesheet" />';	
@@ -762,9 +770,9 @@
 			$html .= 'autoOpen: true,';
 			$html .= 'resizable: false,';
 			$html .= 'modal: true,';
-			$html .= 'width: 400,';
-			$html .= 'height: 90,';
-			$html .= 'pos: [600,40]';
+			$html .= 'width: innerWidth * 0.8,';
+			$html .= 'height: 110';
+
 		$html .= '});';
 	$html .= '};';
 	
@@ -837,7 +845,10 @@
 //some placeholders
 $tableBegin =  "<table>\n";
 $t_a = "\t<tr>\n\t\t<th>\n\t\t\t";
+$t_a1 = "\t<tr class='lesscss'>\n\t\t<th class='lesscss'>\n\t\t\t";
+$t_a2 = "\t<tr>\n\t\t<th class='lesscss2'>\n\t\t\t";
 $t_b = "\n\t\t</th>\n\t\t<td>\n\t\t\t";
+$t_b1 = "\n\t\t</th>\n\t\t<td class='lesscss'>\n\t\t\t";
 $t_c = "\n\t\t</td>\n\t</tr>\n";
 $tableEnd = "</table>\n";
 //**************************overview part begin******************************
@@ -853,7 +864,7 @@
 	$html .= '<h3>'.$translation["overview"].'</h3>';
 	$html .= '<div>';
 }
-$html .= '<p>';
+//$html .= '<p>';
 $html .= $tableBegin;
 if ($resourceMetadata['contenttitle'] !='') {
 	$html .= $t_a.$translation['resourceTitle'].$t_b."<em>".displayText($resourceMetadata['contenttitle'])."</em>".$t_c;
@@ -888,7 +899,7 @@
 	if (isset($resourceMetadata['legend'])) {
 		$html .= $resourceMetadata['legend'];
 	}
-	$html .= $t_c;
+	//$html .= $t_c;
 }
 
 
@@ -1007,7 +1018,7 @@
 #data-url="'.$dataUrl.'"
 
 $html .= $tableEnd;
-$html .= '</p>';
+//$html .= '</p>';
 $html .= '</div>';
 
 //**************************overview part end******************************
@@ -1024,7 +1035,7 @@
 	$html .= '<h3>'.$translation["properties"].'</h3>';
 	$html .= '<div>';
 }
-$html .= '<p>';
+//$html .= '<p>';
 $html .= $tableBegin;
 
 if ($resource == 'wms' or $resource == 'layer'){
@@ -1095,8 +1106,8 @@
 	//show preview map - dynamically
 	
 }
-$html .= $tableEnd;
-$html .= $tableBegin;
+//$html .= $tableEnd;
+//$html .= $tableBegin;
 
 //Scales
 if ((isset($resourceMetadata['contentminscale']) & $resourceMetadata['contentminscale'] != '0') or (isset($resourceMetadata['contentmaxscale']) & $resourceMetadata['contentmaxscale'] != '0')){
@@ -1130,13 +1141,14 @@
 	#$html .= $t_a.$translation['describeFeaturetype'].$t_b."<a href='".$resourceMetadata['wfs_describefeaturetype']."&REQUEST=DescribeFeaturetype&typename=".$resourceMetadata['contentname']."' >Link</a>".$t_c;
 }
 
+
 if (isset($resourceMetadata['featuretype_geomType']) && ($resourceMetadata['featuretype_geomType'] != '')) {
 	$html .= $t_a.$translation['geomtype'].$t_b.$resourceMetadata['featuretype_geomType'].$t_c;
 }
-$html .= $tableEnd;
+//$html .= $tableEnd;
 
 if ($resource == 'wms' or $resource == 'layer'){
-	$html .= $tableBegin;
+	//$html .= $tableBegin;
 	//part for coupled resources - if they exists (first this is realized only for layers):
 	//get metadata entries
 	//get MetadataURLs from md_metadata table
@@ -1206,12 +1218,12 @@
 		$html .= $metadataList;
 	}
 	
-	$html .= $t_c;
-	$html .= $tableEnd;
+	//$html .= $t_c;
+	//$html .= $tableEnd;
 }
 
 $html .= $tableEnd;
-$html .= '</p>';
+//$html .= '</p>';
 $html .= '</div>';
 //**************************properties  part end******************************
 
@@ -1227,7 +1239,7 @@
 	$html .= '<h3>'.$translation["contact"].'</h3>';
 	$html .= '<div>';
 }
-$html .= '<p>';
+//$html .= '<p>';
 if ($resource == 'wmc') {
 	$html .= '<h4>'.$translation['wmcProvider'].'</h4>';
 } else {
@@ -1254,7 +1266,7 @@
 	$html .= $t_a.$translation['email'].$t_b.displayText($resourceMetadata['contactelectronicmailaddress']).$t_c;
 	$html .= $tableEnd;
 }
-$html .= '</p>';
+//$html .= '</p>';
 
 $html .= '</div>';
 //**************************contact part end******************************
@@ -1271,7 +1283,7 @@
 	$html .= '<h3>'.$translation["termsOfUse"].'</h3>';
 	$html .= '<div>';
 }
-$html .= '<p>';
+//$html .= '<p>';
 
 if ($resource == 'wms' or $resource == 'layer') {
 	$constraints = new OwsConstraints();
@@ -1295,7 +1307,7 @@
 } else {
 	$html .= $tou;
 }
-$html .= '</p>';
+//$html .= '</p>';
 $html .= '</div>';
 //**************************termsOfUse part end******************************
 //**************************quality part begin******************************
@@ -1310,7 +1322,7 @@
 	$html .= '<h3>'.$translation["quality"].'</h3>';
 	$html .= '<div>';
 }
-$html .= '<p>';
+//$html .= '<p>';
 $html .= $tableBegin;
 if ($resource != 'wmc') {
 	switch ($serviceQuality['last_status']) {
@@ -1334,7 +1346,7 @@
 }
 
 $html .= $tableEnd;
-$html .= '</p>';
+//$html .= '</p>';
 $html .= '</div>';
 //**************************quality part end******************************
 
@@ -1350,7 +1362,7 @@
 	$html .= '<h3>'.$translation["interfaces"].'</h3>';
 	$html .= '<div>';
 }
-$html .= '<p>';
+//$html .= '<p>';
 
 /*$translation['mapbenderCapabilities'] = 'Geoportal Capabilities';
 $translation['originalCapabilities'] = 'Original Capabilities';
@@ -1380,30 +1392,41 @@
 	$html .= $t_a;
 	$html .= $translation['mapbenderCapabilities'];
 	$html .= $t_b;
-	$html .= "<table>";
-	$html .= $t_a.$translation['mapbenderCapabilitiesSingleLayer'].$t_b."<a href = '../php/wms.php?layer_id=".$layerId."&PHPSESSID=".session_id()."&REQUEST=GetCapabilities&VERSION=1.1.1&SERVICE=WMS' target=_blank>".$translation['capabilities']."</a> <img src='../img/osgeo_graphics/geosilk/link.png' onclick='showCapabilitiesUrl(\"".$mapbenderBaseUrl.$_SERVER['PHP_SELF']."/../wms.php?layer_id=".$layerId."&PHPSESSID=".session_id()."&REQUEST=GetCapabilities&VERSION=1.1.1&SERVICE=WMS"."\",\"".$translation['mapbenderCapabilitiesSingleLayer']."\");'>".$t_c;
-
-	$html .= $t_a.$translation['mapbenderCapabilitiesWithSubLayer'].$t_b."<a href = '../php/wms.php?layer_id=".$layerId."&PHPSESSID=".session_id()."&REQUEST=GetCapabilities&VERSION=1.1.1&SERVICE=WMS&withChilds=1' target=_blank>".$translation['capabilities']."</a> <img src='../img/osgeo_graphics/geosilk/link.png' onclick='showCapabilitiesUrl(\"".$mapbenderBaseUrl.$_SERVER['PHP_SELF']."/../wms.php?layer_id=".$layerId."&PHPSESSID=".session_id()."&REQUEST=GetCapabilities&VERSION=1.1.1&SERVICE=WMS&withChilds=1"."\",\"".$translation['mapbenderCapabilitiesWithSubLayer']."\");'>".$t_c;
+	$html .= "<table class='lesscsstable'>";
+	$html .= $t_a1.$translation['mapbenderCapabilitiesSingleLayer'].$t_b1."<img class='normalizeicon' src='../img/gnome/edit-select-all.png'><a onclick='' class='linkjs' href = '../php/wms.php?layer_id=".$layerId."&PHPSESSID=".session_id()."&REQUEST=GetCapabilities&VERSION=1.1.1&SERVICE=WMS' target=_blank>".$translation['showDocument']."</a><br /><img class='normalizeicon' src='../img/osgeo_graphics/geosilk/link.png'><a class='linkjs' onclick='showCapabilitiesUrl(\"".$mapbenderBaseUrl.$_SERVER['PHP_SELF']."/../wms.php?layer_id=".$layerId."&PHPSESSID=".session_id()."&REQUEST=GetCapabilities&VERSION=1.1.1&SERVICE=WMS"."\",\"".$translation['mapbenderCapabilitiesSingleLayer']."\");'>".$translation['showLink']."</a>".$t_c;
+	$html .= $t_a1.$translation['mapbenderCapabilitiesWithSubLayer'].$t_b1."<img class='normalizeicon' src='../img/gnome/edit-select-all.png'><a class='linkjs' href = '../php/wms.php?layer_id=".$layerId."&PHPSESSID=".session_id()."&REQUEST=GetCapabilities&VERSION=1.1.1&SERVICE=WMS&withChilds=1' target=_blank>".$translation['showDocument']."</a><br /><img class='normalizeicon' src='../img/osgeo_graphics/geosilk/link.png'><a class='linkjs' onclick='showCapabilitiesUrl(\"".$mapbenderBaseUrl.$_SERVER['PHP_SELF']."/../wms.php?layer_id=".$layerId."&PHPSESSID=".session_id()."&REQUEST=GetCapabilities&VERSION=1.1.1&SERVICE=WMS&withChilds=1"."\",\"".$translation['mapbenderCapabilitiesWithSubLayer']."\");'>".$translation['showLink']."</a>".$t_c;
 	$html .= "</table>";
 	$html .= $t_c;
     $capUrl = $resourceMetadata['wms_getcapabilities'].getConjunctionCharacter($resourceMetadata['wms_getcapabilities']).'REQUEST=GetCapabilities&VERSION=1.1.1&SERVICE=WMS';
 
 	//show only original url if the resource is not secured!
 	if (!$resourceSecured) {	
-		$html .= $t_a.$translation['originalCapabilities'].$t_b."<a href = '".$capUrl."' target=_blank>".$translation['capabilities']."</a> <img src='../img/osgeo_graphics/geosilk/link.png' onclick='showCapabilitiesUrl(\"".$capUrl."\",\"".$translation['mapbenderCapabilities']."\");'>".$t_c;
-
+		$html .= $t_a.$translation['originalCapabilities'].$t_b."<img class='normalizeicon' src='../img/gnome/edit-select-all.png'><a class='linkjs' href = '".$capUrl."' target=_blank>".$translation['showDocument']."</a><br /><img class='normalizeicon' src='../img/osgeo_graphics/geosilk/link.png'><a class='linkjs' onclick='showCapabilitiesUrl(\"".$capUrl."\",\"".$translation['mapbenderCapabilities']."\");'>".$translation['showLink']."</a>".$t_c;
 	}
 
-	$html .= $t_a.$translation['inspireCapabilities'].$t_b."<a href = '../php/wms.php?layer_id=".$layerId."&PHPSESSID=".session_id()."&INSPIRE=1&REQUEST=GetCapabilities&VERSION=1.1.1&SERVICE=WMS' target=_blank>".$translation['capabilities']."</a> <img src='../img/osgeo_graphics/geosilk/link.png' onclick='showCapabilitiesUrl(\"".$mapbenderBaseUrl.$_SERVER['PHP_SELF']."/../wms.php?layer_id=".$layerId."&PHPSESSID=".session_id()."&INSPIRE=1&REQUEST=GetCapabilities&VERSION=1.1.1&SERVICE=WMS"."\",\"".$translation['inspireCapabilities']."\");'>".$t_c;
+	$html .= $t_a.$translation['inspireCapabilities'].$t_b."<img class='normalizeicon' src='../img/gnome/edit-select-all.png'><a class='linkjs' href = '../php/wms.php?layer_id=".$layerId."&PHPSESSID=".session_id()."&INSPIRE=1&REQUEST=GetCapabilities&VERSION=1.1.1&SERVICE=WMS' target=_blank>".$translation['showDocument']."</a><br /><img class='normalizeicon' src='../img/osgeo_graphics/geosilk/link.png'><a class='linkjs' onclick='showCapabilitiesUrl(\"".$mapbenderBaseUrl.$_SERVER['PHP_SELF']."/../wms.php?layer_id=".$layerId."&PHPSESSID=".session_id()."&INSPIRE=1&REQUEST=GetCapabilities&VERSION=1.1.1&SERVICE=WMS"."\",\"".$translation['inspireCapabilities']."\");'>".$translation['showLink']."</a>".$t_c;
 
-	$html .= $t_a.$translation['inspireMetadata'].$t_b."<a href='../php/mod_layerISOMetadata.php?SERVICE=WMS&outputFormat=iso19139&Id=".	$layerId."' target=_blank ><img style='border: none;' src='../img/inspire_tr_36.png' title='".$translation['inspireMetadata']."' style='width:34px;height:34px' alt='' /></a>"."<a href='../php/mod_layerISOMetadata.php?SERVICE=WMS&CN=false&outputFormat=rdf&Id=".	$layerId."' target=_blank ><img style='border: none;' src='../img/rdf_w3c_icon.48.gif' title='".$translation['inspireMetadata']." - RDF/XML (BETA)"."' style='width:34px;height:34px' alt='' /></a>".$t_c;
+	$html .= $t_a;
+	$html .= $translation['inspireMetadata'];
+	$html .= $t_b;
+	$html .= "<table class='lesscsstable'>";
+	$html .= $t_a2;
+	$html .= "<img  src='../img/inspire_tr_36.png'>";
+	$html .= $t_b."<img class='normalizeicon' src='../img/gnome/edit-select-all.png'><a class='linkjs' href='../php/mod_layerISOMetadata.php?SERVICE=WMS&outputFormat=iso19139&Id=".       $layerId."' target=_blank >".$translation['showDocument']."</a><br/><img class='normalizeicon' src='../img/osgeo_graphics/geosilk/link.png'><a class='linkjs' onclick='showCapabilitiesUrl(\"".$mapbenderBaseUrl.$_SERVER['PHP_SELF']."/../mod_layerISOMetadata.php?SERVICE=WMS&outputFormat=iso19139&Id=".$layerId."\",\"".$translation['inspireMetadaten']."\");'>".$translation['showLink']."</a>";
+	$html .= $t_c;
+	$html .= $t_a2."<img style='border: none;width:34px;height:34px' src='../img/rdf_w3c_icon.48.gif' title='".$translation['inspireMetadata']." - RDF/XML (BETA)"."' style='width:34px;height:34px' alt='' />";
 
-	$html .= $t_a.$translation['inspireMetadataValidation'].$t_b."<a href='../php/mod_layerISOMetadata.php?SERVICE=WMS&outputFormat=iso19139&Id=".$layerId."&validate=true' target=_blank title='".$translation['inspireMetadataValidation']."'>".$translation['showInspireMetadataValidation']."</a>".$t_c;
+	$html .= $t_b."<img class='normalizeicon' src='../img/gnome/edit-select-all.png'><a class='linkjs' href='../php/mod_layerISOMetadata.php?SERVICE=WMS&CN=false&outputFormat=rdf&Id=". $layerId."' target=_blank >".$translation['showDocument']."</a><br /><img class='normalizeicon' src='../img/osgeo_graphics/geosilk/link.png'><a class='linkjs' onclick='showCapabilitiesUrl(\"".$mapbenderBaseUrl.$_SERVER['PHP_SELF']."/../mod_layerISOMetadata.php?SERVICE=WMS&CN=false&outputFormat=rdf&Id=".$layerId."\",\"".$translation['inspireMetadaten']."\");'>".$translation['showLink']."</a>";
+        $html .= $t_c;
 
+	$html .= "</table>";
+	$html .= $t_c;
+	$html .= $t_a.$translation['inspireMetadataValidation'].$t_b."<a class='linkjs' href='../php/mod_layerISOMetadata.php?SERVICE=WMS&outputFormat=iso19139&Id=".$layerId."&validate=true' target=_blank title='".$translation['inspireMetadataValidation']."'>".$translation['showInspireMetadataValidation']."</a>".$t_c;
+
 	//if service is secured and http_auth is adjusted show secured url
 	if ($resourceSecured) {
 		$securedLink = HTTP_AUTH_PROXY."/".$layerId."?REQUEST=GetCapabilities&VERSION=1.1.1&SERVICE=WMS";
-		$html .= $t_a.$translation['securedCapabilities'].$t_b."<a href = '".$securedLink."' target=_blank>".$translation['capabilities']."</a> <img src='../img/osgeo_graphics/geosilk/link.png' onclick='showCapabilitiesUrl(\"".$securedLink."\",\"".$translation['securedCapabilities']."\");'>".$t_c;
+		$html .= $t_a.$translation['securedCapabilities'].$t_b."<img class='normalizeicon' src='../img/gnome/edit-select-all.png'><a class='linkjs'  href = '".$securedLink."' target=_blank>".$translation['showDocument']."</a><br /><img class='normalizeicon' src='../img/osgeo_graphics/geosilk/link.png'><a class='linkjs' onclick='showCapabilitiesUrl(\"".$securedLink."\",\"".$translation['securedCapabilities']."\");'>".$translation['showLink']."</a>".$t_c;
 	}
 
 	//kml
@@ -1414,27 +1437,41 @@
 	$html .= $t_a;
 	$html .= $translation['mapbenderCapabilities'];
 	$html .= $t_b;
-	$html .= "<table>";
-    $gcWfsParams = "REQUEST=GetCapabilities&VERSION=".$resourceMetadata['serviceversion']."&SERVICE=WFS";
-    $wfsuri = "wfs.php?FEATURETYPE_ID=".$featuretypeId."&PHPSESSID=".session_id()."&".$gcWfsParams;
-	$html .= $t_a.$translation['mapbenderCapabilitiesSingleLayer'].$t_b.'<a href ="../php/'.$wfsuri.'" target="_blank">'.$translation['capabilities']."</a> <img src='../img/osgeo_graphics/geosilk/link.png' onclick='showCapabilitiesUrl(\"".$mapbenderBaseUrl.$_SERVER['PHP_SELF'].'/../'.$wfsuri."\",\"".$translation['mapbenderCapabilitiesSingleLayer']."\");'>".$t_c;
+	$html .= "<table class='lesscsstable'>";
+    	$gcWfsParams = "REQUEST=GetCapabilities&VERSION=".$resourceMetadata['serviceversion']."&SERVICE=WFS";
+    	$wfsuri = "wfs.php?FEATURETYPE_ID=".$featuretypeId."&PHPSESSID=".session_id()."&".$gcWfsParams;
+	$html .= $t_a1.$translation['mapbenderCapabilitiesSingleLayer'].$t_b1.'<img class="normalizeicon" src="../img/gnome/edit-select-all.png"><a class="linkjs" href ="../php/'.$wfsuri.'" target="_blank">'.$translation['showDocument']."</a><br /><img class='normalizeicon' src='../img/osgeo_graphics/geosilk/link.png'><a class='linkjs' onclick='showCapabilitiesUrl(\"".$mapbenderBaseUrl.$_SERVER['PHP_SELF'].'/../'.$wfsuri."\",\"".$translation['mapbenderCapabilitiesSingleLayer']."\");'>".$translation['showLink']."</a>".$t_c;
 
 //	$html .= $t_a.$translation['mapbenderCapabilitiesWithSubLayer'].$t_b."<a href = '../php/wfs.php?layer_id=".$layerId."&PHPSESSID=".session_id()."&REQUEST=GetCapabilities&VERSION=1.1.1&SERVICE=WMS&withChilds=1' target=_blank>".$translation['capabilities']."</a> <img src='../img/osgeo_graphics/geosilk/link.png' onclick='showCapabilitiesUrl(\"".$mapbenderBaseUrl.$_SERVER['PHP_SELF']."/../wms.php?layer_id=".$layerId."&PHPSESSID=".session_id()."&REQUEST=GetCapabilities&VERSION=1.1.1&SERVICE=WMS&withChilds=1"."\",\"".$translation['mapbenderCapabilitiesWithSubLayer']."\");'>".$t_c;
 	$html .= "</table>";
 	$html .= $t_c;
-    $capUrl = $resourceMetadata['wfs_getcapabilities'].getConjunctionCharacter($resourceMetadata['wfs_getcapabilities']).$gcWfsParams;
+    	$capUrl = $resourceMetadata['wfs_getcapabilities'].getConjunctionCharacter($resourceMetadata['wfs_getcapabilities']).$gcWfsParams;
 
 	//show only original url if the resource is not secured!
 	if (!$resourceSecured) {	
-		$html .= $t_a.$translation['originalCapabilities'].$t_b."<a href = '".$capUrl."' target=_blank>".$translation['capabilities']."</a> <img src='../img/osgeo_graphics/geosilk/link.png' onclick='showCapabilitiesUrl(\"".$capUrl."\",\"".$translation['mapbenderCapabilities']."\");'>".$t_c;
+		$html .= $t_a.$translation['originalCapabilities'].$t_b."<img class='normalizeicon' src='../img/gnome/edit-select-all.png'><a class='linkjs' href = '".$capUrl."' target=_blank>".$translation['showDocument']."</a><br /><img class='normalizeicon' src='../img/osgeo_graphics/geosilk/link.png'><a class='linkjs' onclick='showCapabilitiesUrl(\"".$capUrl."\",\"".$translation['mapbenderCapabilities']."\");'>".$translation['showLink']."</a>".$t_c;
 	}
-	$html .= $t_a.$translation['inspireCapabilities'].$t_b.'<a href ="../php/'.$wfsuri.'&INSPIRE=1" target="_blank">'.$translation['capabilities']."</a> <img src='../img/osgeo_graphics/geosilk/link.png' onclick='showCapabilitiesUrl(\"".$mapbenderBaseUrl.$_SERVER['PHP_SELF']."/../".$wfsuri."\",\"".$translation['inspireCapabilities']."\");'>".$t_c;
-	$html .= $t_a.$translation['inspireMetadata'].$t_b."<a href='../php/mod_featuretypeISOMetadata.php?SERVICE=WFS&outputFormat=iso19139&Id=".$featuretypeId."' target=_blank ><img style='border: none;' src='../img/inspire_tr_36.png' title='".$translation['inspireMetadata']."' style='width:34px;height:34px' alt='' /></a>"."<a href='../php/mod_featuretypeISOMetadata.php?SERVICE=WFS&CN=false&outputFormat=rdf&Id=".$featuretypeId."' target=_blank ><img style='border: none;' src='../img/rdf_w3c_icon.48.gif' title='".$translation['inspireMetadata']." - RDF/XML (BETA)"."' style='width:34px;height:34px' alt='' /></a>".$t_c;
+	$html .= $t_a.$translation['inspireCapabilities'].$t_b.'<img class="normalizeicon" src="../img/gnome/edit-select-all.png"><a class="linkjs" href ="../php/'.$wfsuri.'&INSPIRE=1" target="_blank">'.$translation['showDocument']."</a><br /><img class='normalizeicon' src='../img/osgeo_graphics/geosilk/link.png'><a class='linkjs' onclick='showCapabilitiesUrl(\"".$mapbenderBaseUrl.$_SERVER['PHP_SELF']."/../".$wfsuri."\",\"".$translation['inspireCapabilities']."\");'>".$translation['showLink']."</a>".$t_c;
+	
+	$html .= $t_a;
+	$html .= $translation['inspireMetadata'];
+	$html .= $t_b;
+	$html .= "<table class='lesscsstable'>";
+	$html .= $t_a2;
+	$html .= "<img  src='../img/inspire_tr_36.png'>";
+	$html .= $t_b."<img class='normalizeicon' src='../img/gnome/edit-select-all.png'><a class='linkjs' href='../php/mod_featuretypeISOMetadata.php?SERVICE=WFS&outputFormat=iso19139&Id=".$featuretypeId."' target=_blank >".$translation['showDocument']."</a><br/><img class='normalizeicon' src='../img/osgeo_graphics/geosilk/link.png'><a class='linkjs' onclick='showCapabilitiesUrl(\"".$mapbenderBaseUrl.$_SERVER['PHP_SELF']."/../php/mod_featuretypeISOMetadata.php?SERVICE=WFS&outputFormat=iso19139&Id=".$featuretypeId."\",\"".$translation['inspireMetadaten']."\");'>".$translation['showLink']."</a>";
+	$html .= $t_c;
+	$html .= $t_a2."<img style='border: none;width:34px;height:34px' src='../img/rdf_w3c_icon.48.gif' title='".$translation['inspireMetadata']." - RDF/XML (BETA)"."' style='width:34px;height:34px' alt='' />";
+	$html .= $t_b."<img class='normalizeicon' src='../img/gnome/edit-select-all.png'><a class='linkjs' href='../php/mod_featuretypeISOMetadata.php?SERVICE=WFS&CN=false&outputFormat=rdf&Id=".$featuretypeId."' target=_blank >".$translation['showDocument']."</a><br /><img class='normalizeicon' src='../img/osgeo_graphics/geosilk/link.png'><a class='linkjs' onclick='showCapabilitiesUrl(\"".$mapbenderBaseUrl.$_SERVER['PHP_SELF']."/../php/mod_featuretypeISOMetadata.php?SERVICE=WFS&CN=false&outputFormat=rdf&Id=".$featuretypeId."\",\"".$translation['inspireMetadaten']."\");'>".$translation['showLink']."</a>";
+    $html .= $t_c;
+	$html .= "</table>";
+	$html .= $t_c;
+	
 	$html .= $t_a.$translation['inspireMetadataValidation'].$t_b."<a href='../php/mod_featuretypeISOMetadata.php?SERVICE=WFS&outputFormat=iso19139&Id=".$featuretypeId."&validate=true' target=_blank title='".$translation['inspireMetadataValidation']."'>".$translation['showInspireMetadataValidation']."</a>".$t_c;
 	//if service is secured and http_auth is adjusted show secured url
 	if ($resourceSecured) {
 		$securedLink = HTTP_AUTH_PROXY."/".$featuretypeId."?".$gcWfsParams;
-		$html .= $t_a.$translation['securedCapabilities'].$t_b."<a href = '".$securedLink."' target=_blank>".$translation['capabilities']."</a> <img src='../img/osgeo_graphics/geosilk/link.png' onclick='showCapabilitiesUrl(\"".$securedLink."\",\"".$translation['securedCapabilities']."\");'>".$t_c;
+		$html .= $t_a.$translation['securedCapabilities'].$t_b."<img class='normalizeicon' src='../img/gnome/edit-select-all.png'><a class='linkjs' href = '".$securedLink."' target=_blank>".$translation['showDocument']."</a><br /> <img class='normalizeicon' src='../img/osgeo_graphics/geosilk/link.png'><a class='linkjs' onclick='showCapabilitiesUrl(\"".$securedLink."\",\"".$translation['securedCapabilities']."\");'>".$translation['showLink']."</a>".$t_c;
 	}
 }
 
@@ -1442,7 +1479,7 @@
 
 
 $html .= $tableEnd;
-$html .= '</p>';
+//$html .= '</p>';
 $html .= '</div>';
 //**************************interfaces part end******************************
 



More information about the Mapbender_commits mailing list