[Mapbender-commits] r6554 - trunk/mapbender/http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Sun Jul 4 05:51:13 EDT 2010


Author: verenadiewald
Date: 2010-07-04 09:51:13 +0000 (Sun, 04 Jul 2010)
New Revision: 6554

Modified:
   trunk/mapbender/http/php/mb_listGUIs.php
Log:
check if no gui category is available

Modified: trunk/mapbender/http/php/mb_listGUIs.php
===================================================================
--- trunk/mapbender/http/php/mb_listGUIs.php	2010-07-04 09:50:43 UTC (rev 6553)
+++ trunk/mapbender/http/php/mb_listGUIs.php	2010-07-04 09:51:13 UTC (rev 6554)
@@ -47,7 +47,7 @@
 	}
 	
 	$sql .= ") ORDER BY gc.category_name, gui_name";
-		
+
 	$result = db_prep_query($sql,$v,$t);
 	
 	$category = NULL;
@@ -56,9 +56,9 @@
 		 "<span style='color:#0000CE;font-size:24px;font-weight:bold;'>p</span>".
 		 "<span style='color:#C00000;font-size:24px;font-weight:bold;'>b</span>".
 		 "<span style='color:#000000;font-size:24px;font-weight:bold;'>ender</span>".
-		 "<span style='font-size:24px;font-weight:bold;'> - "._mb('available Applications')." </span>";
+		 "<span style='font-size:24px;font-weight:bold;'> - "._mb('available applications')." </span>";
 		
-	printf("<span><a href=\"../php/mod_logout.php?%s\"><img src=\"../img/button_gray/logout_off.png\" onmouseover=\"this.src='../img/button_gray/logout_over.png'\" onmouseout=\"this.src='../img/button_gray/logout_off.png'\" title=\"Logout\"></a></span>",SID);
+	printf("<span style='float:right;'><a href=\"../php/mod_logout.php?%s\"><img src=\"../img/button_gray/logout_off.png\" onmouseover=\"this.src='../img/button_gray/logout_over.png'\" onmouseout=\"this.src='../img/button_gray/logout_off.png'\" title=\"Logout\"></a></span>",SID);
 	
 	echo "<div id='guiListTabs' class='guiListTabs'>";
 	
@@ -82,6 +82,7 @@
 				echo '<li><a href="#guiListTab-'.$totalCategories.'">'._mb('Others').'</a></li>';
 			}
 			
+			
 			if($row["category_description"] == '') {
 				$row["category_description"] = '&nbsp;&nbsp;&nbsp;&nbsp;';
 			}
@@ -94,6 +95,18 @@
 			$totalCategories++;
 		}
 		
+		if(count($row["category_name"]) === 0 && !$dummyCategorySet)  {
+			echo '<li><a href="#guiListTab-0">'._mb('Others').'</a></li>';
+		
+			$divHtml .= '<div id="guiListTab-0">';
+			$divHtml .= '<div class="categoryDescription">';
+			$divHtml .= "<p><em>&nbsp;&nbsp;&nbsp;&nbsp;</em></p>";
+			$divHtml .= '</div>';
+			$divHtml .=	'<ul class="gui_list">';
+			
+			$dummyCategorySet = true;
+		} 
+				
 		$url   = "index.php?".strip_tags(SID)."&gui_id=".$row["gui_id"];
 		$divHtml .= "<li><div>".
 					"<a class='guiLink' href='".$url."'>".$row['gui_name']."</a></div>".



More information about the Mapbender_commits mailing list