[evolvis-commits] r17228: merge bm:taramir51/patches/xhtml-improvements

mirabilos at evolvis.org mirabilos at evolvis.org
Fri May 13 14:12:30 CEST 2011


Author: mirabilos
Date: 2011-05-13 14:12:30 +0200 (Fri, 13 May 2011)
New Revision: 17228

Modified:
   trunk/gforge_base/evolvisforge-5.1/src/common/widget/Widget_ProjectInfo.class.php
   trunk/gforge_base/evolvisforge-5.1/src/common/widget/Widget_ProjectPublicAreas.class.php
   trunk/gforge_base/evolvisforge-5.1/src/www/include/Layout.class.php
Log:
merge bm:taramir51/patches/xhtml-improvements

Modified: trunk/gforge_base/evolvisforge-5.1/src/common/widget/Widget_ProjectInfo.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/common/widget/Widget_ProjectInfo.class.php	2011-05-13 08:47:43 UTC (rev 17227)
+++ trunk/gforge_base/evolvisforge-5.1/src/common/widget/Widget_ProjectInfo.class.php	2011-05-13 12:12:30 UTC (rev 17228)
@@ -51,12 +51,12 @@
 					print _('No tag defined for this project');
 				}
 			}
-			echo '</p>';
+			echo "</p>\n";
 		}
 
 		if(forge_get_config('use_trove')) {
 			print "<br />\n";
-			print stripslashes(trove_getcatlisting($group_id,0,1,1));
+			print stripslashes(trove_getcatlisting($group_id,0,1,1))."\n";
 		}
 
 		// registration date
@@ -64,7 +64,7 @@
 		print(_('Registered: ') . 
 				'<span property="doap:created" content="'.date('Y-m-d', $project_start_date).'">'.
 				date(_('Y-m-d H:i'), $project_start_date).
-				'</span>');
+				"</span>\n");
 
 		// Get the activity percentile
 		// CB hide stats if desired
@@ -79,12 +79,12 @@
 			if (!$actv_res) {
 				$actv_res=0;
 			}
-			print '<br />'.sprintf (_('Activity Ranking: %d'), $actv_res) ;
-			print '<br />'.sprintf(_('View project <a href="%1$s" >Statistics</a>'),util_make_url ('/project/stats/?group_id='.$group_id));
+			print '<br />'.sprintf (_('Activity Ranking: %d'), $actv_res)."\n";
+			print '<br />'.sprintf(_('View project <a href="%1$s" >Statistics</a>'),util_make_url ('/project/stats/?group_id='.$group_id))."\n";
 			if ( ($project->usesTracker() && forge_get_config('use_tracker')) || ($project->usesPm() && forge_get_config('use_pm')) ) {
-				print sprintf(_(' or <a href="%1$s">Activity</a>'),util_make_url ('/project/report/?group_id='.$group_id));
+				print sprintf(_(' or <a href="%1$s">Activity</a>'),util_make_url ('/project/report/?group_id='.$group_id))."\n";
 			}
-			print '<br />'.sprintf(_('View list of <a href="%1$s">RSS feeds</a> available for this project.'), util_make_url ('/export/rss_project.php?group_id='.$group_id)). ' ' . html_image('ic/rss.png',16,16,array());
+			print '<br />'.sprintf(_('View list of <a href="%1$s">RSS feeds</a> available for this project.'), util_make_url ('/export/rss_project.php?group_id='.$group_id)). ' ' . html_image('ic/rss.png',16,16,array())."\n";
 		}
 
 		if(forge_get_config('use_people')) {
@@ -99,13 +99,14 @@
 			if ($jobs_res) {
 				$num=db_numrows($jobs_res);
 				if ($num>0) {
-					print '<br /><br />';
+					print '<p>';
 					printf(
 							ngettext('HELP WANTED: This project is looking for a <a href="%1$s">"%2$s"</a>.',
 								'HELP WANTED: This project is looking for people to fill <a href="%1$s">several different positions</a>.',
 								$num),
 							util_make_url ('/people/?group_id='.$group_id),
 							db_result($jobs_res,0,"name"));
+					print "</p>\n";
 					//print '<div rel="fusionforge:has_job" typeof="fusionforge:Job" xmlns:fusionforge="http://fusionforge.org/fusionforge#">';
 					//print '<span rel="dc:title" content="'. db_result($jobs_res,0,"name").'" xmlns:dc="http://purl.org/dc/elements/1.1/">'; 
 					//print '</span>';

Modified: trunk/gforge_base/evolvisforge-5.1/src/common/widget/Widget_ProjectPublicAreas.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/common/widget/Widget_ProjectPublicAreas.class.php	2011-05-13 08:47:43 UTC (rev 17227)
+++ trunk/gforge_base/evolvisforge-5.1/src/common/widget/Widget_ProjectPublicAreas.class.php	2011-05-13 12:12:30 UTC (rev 17228)
@@ -40,13 +40,12 @@
 
 		echo '<div class="public-area-box" rel="doap:homepage">';
 		echo util_make_link ('http://' . $project->getHomePage(), $HTML->getHomePic(_('Home Page')) . ' ' . _('Project Home Page'), false, true);
-		echo '</div>
-			';
+		echo "</div>\n";
 
 		// ################## ArtifactTypes
 
 		if ($project->usesTracker()) {
-			echo '<div class="public-area-box">';
+			echo '<div class="public-area-box">'."\n";
 			$link_content = $HTML->getFollowPic(_('Tracker')) . ' ' . _('Tracker');
 			echo util_make_link ( '/tracker/?group_id=' . $group_id, $link_content);
 
@@ -61,15 +60,15 @@
 			$rows = db_numrows($result);
 
 			if (!$result || $rows < 1) {
-				echo '<br /><em>'._('There are no public trackers available').'</em>';
+				echo "<br />\n<em>"._('There are no public trackers available').'</em>';
 			} else {
-				echo '<ul class="tracker" rel="doap:bug-database">';
+				echo "\n".'<ul class="tracker" rel="doap:bug-database">'."\n";
 				for ($j = 0; $j < $rows; $j++) {
 					// tracker REST paths are something like : /tracker/cm/project/A_PROJECT/atid/NUMBER to plan compatibility
 					// with OSLC-CM server API
 					$group_artifact_id = db_result($result, $j, 'group_artifact_id');
 					$tracker_stdzd_uri = util_make_url('/tracker/cm/project/'. $project->getUnixName() .'/atid/'. $group_artifact_id);
-					echo '<li about="'. $tracker_stdzd_uri . '" typeof="sioc:Container">'."\n";
+					echo "\t".'<li about="'. $tracker_stdzd_uri . '" typeof="sioc:Container">'."\n";
 					print '<span rel="http://www.w3.org/2002/07/owl#sameAs">'."\n";
 					echo util_make_link ('/tracker/?atid='. $group_artifact_id . '&group_id='.$group_id.'&func=browse',db_result($result, $j, 'name')) . ' ' ;
 					echo "</span>\n"; // /owl:sameAs
@@ -78,16 +77,16 @@
 					print '<span rel="sioc:has_space" resource="" ></span>'."\n";
 					echo "</li>\n";
 				}
-				echo '</ul>';
+				echo "</ul>\n";
 			}
-			echo '</div>';
+			echo "</div>\n";
 		}
 
 		// ################## forums
 
 		if ($project->usesForum()) {
-			echo '<div class="public-area-box">';
-			//	print '<hr size="1" /><a rel="sioc:container_of" href="'.util_make_url ('/forum/?group_id='.$group_id).'">';
+			echo '<div class="public-area-box">'."\n";
+			//	print '<hr size="1" /><a rel="sioc:container_of" xmlns:sioc="http://rdfs.org/sioc/ns#" href="'.util_make_url ('/forum/?group_id='.$group_id).'">';
 			$link_content = $HTML->getForumPic('') . ' ' . _('Public Forums');
 			echo util_make_link ( '/forum/?group_id=' . $group_id, $link_content);
 			print ' (';
@@ -103,29 +102,29 @@
 					// ##################### Doc Manager
 
 					if ($project->usesDocman()) {
-					echo '<div class="public-area-box">';
+					echo '<div class="public-area-box">'."\n";
 					$link_content = $HTML->getDocmanPic('') . ' ' . _('DocManager: Project Documentation');
 					//	<a rel="sioc:container_of" xmlns:sioc="http://rdfs.org/sioc/ns#" href="'.util_make_url ('/docman/?group_id='.$group_id).'">';
 					print util_make_link( '/docman/?group_id='.$group_id, $link_content);
-					echo '</div>';
+					echo "\n</div>\n";
 					}
 
 					// ##################### Mailing lists
 
 					if ($project->usesMail()) {
-						echo '<div class="public-area-box">';
+						echo '<div class="public-area-box">'."\n";
 						$link_content = $HTML->getMailPic('') . ' ' . _('Mailing Lists');
 						print util_make_link( '/mail/?group_id='.$group_id, $link_content);
 						$n = project_get_mail_list_count($group_id);
 						echo ' ';
 						printf(ngettext('(<strong>%1$s</strong> public mailing list)', '(<strong>%1$s</strong> public mailing lists)', $n), $n);
-						echo '</div>';
+						echo "\n</div>\n";
 					}
 
 					// ##################### Task Manager
 
 					if ($project->usesPm()) {
-						echo '<div class="public-area-box">';
+						echo '<div class="public-area-box">'."\n";
 						$link_content = $HTML->getPmPic('') . ' ' . _('Tasks');
 						print util_make_link( '/pm/?group_id='.$group_id, $link_content);
 
@@ -133,33 +132,33 @@
 								array ($group_id));
 						$rows = db_numrows($result);
 						if (!$result || $rows < 1) {
-							echo '<br /><em>'._('There are no public subprojects available').'</em>';
+							echo "<br />\n<em>"._('There are no public subprojects available').'</em>';
 						} else {
-							echo '<ul class="task-manager">';
+							echo "\n".'<ul class="task-manager">';
 							for ($j = 0; $j < $rows; $j++) {
-								echo '<li>' ;
+								echo "\n\t<li>";
 								print util_make_link ('/pm/task.php?group_project_id='.db_result($result, $j, 'group_project_id').'&group_id='.$group_id.'&func=browse',db_result($result, $j, 'project_name'));
 								echo '</li>' ;
 							}
-							echo '</ul>';
+							echo "\n</ul>";
 						}
-						echo '</div>';
+						echo "\n</div>\n";
 					}
 
 					// ######################### Surveys
 
 					if ($project->usesSurvey()) {
-						echo '<div class="public-area-box">';
+						echo '<div class="public-area-box">'."\n";
 						$link_content = $HTML->getSurveyPic('') . ' ' . _('Surveys');
 						echo util_make_link( '/survey/?group_id='.$group_id, $link_content);
 						echo ' (<strong>'. project_get_survey_count($group_id) .'</strong> ' . _('surveys').')';
-								echo '</div>';
+								echo "\n</div>\n";
 								}
 
 								// ######################### SCM
 
 								if ($project->usesSCM()) {
-								echo '<div class="public-area-box">';
+								echo '<div class="public-area-box">'."\n";
 
 								$link_content = $HTML->getScmPic('') . ' ' . _('SCM Repository');
 								//	print '<hr size="1" /><a rel="doap:repository" href="'.util_make_url ('/scm/?group_id='.$group_id).'">';
@@ -168,7 +167,7 @@
 								$hook_params = array () ;
 								$hook_params['group_id'] = $group_id ;
 								plugin_hook ("scm_stats", $hook_params) ;
-								echo '</div>';
+								echo "\n</div>\n";
 								}
 
 								// ######################### Plugins
@@ -182,12 +181,12 @@
 								// CB hide FTP if desired
 								if ($project->usesFTP()) {
 									if ($project->isActive()) {
-										echo '<div class="public-area-box">';
+										echo '<div class="public-area-box">'."\n";
 
 										$link_content = $HTML->getFtpPic('') . ' ' . _('Anonymous FTP Space');
 										//		print '<a rel="doap:anonymous root" href="ftp://' . $project->getUnixName() . '.' . forge_get_config('web_host') . '/pub/'. $project->getUnixName() .'/">';
 										print util_make_link('ftp://' . $project->getUnixName() . '.' . forge_get_config('web_host') . '/pub/'. $project->getUnixName(), $link_content, false, true);
-										echo '</div>';
+										echo "\n</div>\n";
 									}
 								}
 

Modified: trunk/gforge_base/evolvisforge-5.1/src/www/include/Layout.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/include/Layout.class.php	2011-05-13 08:47:43 UTC (rev 17227)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/include/Layout.class.php	2011-05-13 12:12:30 UTC (rev 17228)
@@ -1228,40 +1228,40 @@
 
 	function widget(&$widget, $layout_id, $readonly, $column_id, $is_minimized, $display_preferences, $owner_id, $owner_type) {
 		$element_id = 'widget_'. $widget->id .'-'. $widget->getInstanceId();
-		echo '<div class="widget" id="'. $element_id .'">';
-		echo '<div class="widget_titlebar '. ($readonly?'':'widget_titlebar_handle') .'">';
-		echo '<div class="widget_titlebar_title">'. $widget->getTitle() .'</div>';
+		echo '<div class="widget" id="'. $element_id . "\">\n";
+		echo '<div class="widget_titlebar '. ($readonly?'':'widget_titlebar_handle') . "\">\n";
+		echo '<div class="widget_titlebar_title">'. $widget->getTitle() . "</div>\n";
 		if (!$readonly) {
-			echo '<div class="widget_titlebar_close"><a href="/widgets/updatelayout.php?owner='. $owner_type.$owner_id .'&action=widget&name['. $widget->id .'][remove]='. $widget->getInstanceId() .'&column_id='. $column_id .'&layout_id='. $layout_id .'">'. $this->getPicto('ic/close.png', 'Close','Close') .'</a></div>';
+			echo '<div class="widget_titlebar_close"><a href="/widgets/updatelayout.php?owner='. $owner_type.$owner_id .'&action=widget&name['. $widget->id .'][remove]='. $widget->getInstanceId() .'&column_id='. $column_id .'&layout_id='. $layout_id .'">'. $this->getPicto('ic/close.png', 'Close','Close') . "</a></div>\n";
 			if ($is_minimized) {
-				echo '<div class="widget_titlebar_maximize"><a href="/widgets/updatelayout.php?owner='. $owner_type.$owner_id .'&action=maximize&name['. $widget->id .']='. $widget->getInstanceId() .'&column_id='. $column_id .'&layout_id='. $layout_id .'">'. $this->getPicto($this->_getTogglePlusForWidgets(),  'Maximize', 'Maximize') .'</a></div>';
+				echo '<div class="widget_titlebar_maximize"><a href="/widgets/updatelayout.php?owner='. $owner_type.$owner_id .'&action=maximize&name['. $widget->id .']='. $widget->getInstanceId() .'&column_id='. $column_id .'&layout_id='. $layout_id .'">'. $this->getPicto($this->_getTogglePlusForWidgets(),  'Maximize', 'Maximize') . "</a></div>\n";
 			} else {
-				echo '<div class="widget_titlebar_minimize"><a href="/widgets/updatelayout.php?owner='. $owner_type.$owner_id .'&action=minimize&name['. $widget->id .']='. $widget->getInstanceId() .'&column_id='. $column_id .'&layout_id='. $layout_id .'">'. $this->getPicto($this->_getToggleMinusForWidgets(),  'Minimize', 'Minimize') .'</a></div>';
+				echo '<div class="widget_titlebar_minimize"><a href="/widgets/updatelayout.php?owner='. $owner_type.$owner_id .'&action=minimize&name['. $widget->id .']='. $widget->getInstanceId() .'&column_id='. $column_id .'&layout_id='. $layout_id .'">'. $this->getPicto($this->_getToggleMinusForWidgets(),  'Minimize', 'Minimize') . "</a></div>\n";
 			}
 			if (strlen($widget->hasPreferences())) {
-				echo '<div class="widget_titlebar_prefs"><a href="/widgets/updatelayout.php?owner='. $owner_type.$owner_id .'&action=preferences&name['. $widget->id .']='. $widget->getInstanceId() .'&layout_id='. $layout_id .'">'. _('Preferences') .'</a></div>';
+				echo '<div class="widget_titlebar_prefs"><a href="/widgets/updatelayout.php?owner='. $owner_type.$owner_id .'&action=preferences&name['. $widget->id .']='. $widget->getInstanceId() .'&layout_id='. $layout_id .'">'. _('Preferences') . "</a></div>\n";
 			}
 		}
 		if ($widget->hasRss()) {
-			echo '<div class="widget_titlebar_rss"><a href="'.$widget->getRssUrl($owner_id, $owner_type).'">rss</a></div>';
+			echo '<div class="widget_titlebar_rss"><a href="'.$widget->getRssUrl($owner_id, $owner_type) . "\">rss</a></div>\n";
 		}
-		echo '</div>';
+		echo "</div>\n";
 		$style = '';
 		if ($is_minimized) {
 			$style = 'display:none;';
 		}
-		echo '<div class="widget_content" style="'. $style .'">';
+		echo '<div class="widget_content" style="'. $style . "\">\n";
 		if (!$readonly && $display_preferences) {
-			echo '<div class="widget_preferences">'. $widget->getPreferencesForm($layout_id, $owner_id, $owner_type) .'</div>';
+			echo '<div class="widget_preferences">'. $widget->getPreferencesForm($layout_id, $owner_id, $owner_type) . "</div>\n";
 		}
 		if ($widget->isAjax()) {
 			echo '<div id="'. $element_id .'-ajax">';
 			echo '<noscript><iframe width="99%" frameborder="0" src="'. $widget->getIframeUrl($owner_id, $owner_type) .'"></iframe></noscript>';
-			echo '</div>';
+			echo "</div>\n";
 		} else {
 			echo $widget->getContent();
 		}
-		echo '</div>';
+		echo "</div>\n";
 		if ($widget->isAjax()) {
 			echo '<script type="text/javascript">'."
 				document.observe('dom:loaded', function () {
@@ -1272,7 +1272,7 @@
 						});
 			</script>";
 		}
-		echo '</div>';
+		echo "</div>\n";
 	}
 
 	function _getTogglePlusForWidgets() {



More information about the evolvis-commits mailing list