[Fusionforge-commits] r7328 - in trunk/gforge: . etc etc/local.d www/include www/project/admin www/softwaremap www/themes/gforge

Julien HEYMAN jheyman at libremir.placard.fr.eu.org
Fri Apr 3 13:49:28 CEST 2009


Author: jheyman
Date: 2009-04-03 13:49:27 +0200 (Fri, 03 Apr 2009)
New Revision: 7328

Modified:
   trunk/gforge/etc/local.d/25features
   trunk/gforge/etc/local.inc.example
   trunk/gforge/setup
   trunk/gforge/www/include/Layout.class.php
   trunk/gforge/www/include/features_boxes.php
   trunk/gforge/www/include/project_home.php
   trunk/gforge/www/project/admin/editgroupinfo.php
   trunk/gforge/www/project/admin/index.php
   trunk/gforge/www/softwaremap/full_list.php
   trunk/gforge/www/softwaremap/index.php
   trunk/gforge/www/softwaremap/tag_cloud.php
   trunk/gforge/www/softwaremap/trove_list.php
   trunk/gforge/www/themes/gforge/Theme.class.php
Log:
Add features : sys_use_project_tags and sys_use_project_full_list

Modified: trunk/gforge/etc/local.d/25features
===================================================================
--- trunk/gforge/etc/local.d/25features	2009-04-03 11:20:16 UTC (rev 7327)
+++ trunk/gforge/etc/local.d/25features	2009-04-03 11:49:27 UTC (rev 7328)
@@ -21,6 +21,8 @@
 $sys_use_private_project={sys_use_private_project};
 $sys_use_diary={sys_use_diary};
 $sys_use_bookmarks={sys_use_bookmarks};
+$sys_use_project_tags={sys_use_project_tags};
+$sys_use_project_full_list={sys_use_project_full_list};
 
 // Enable/Disable user ratings
 $sys_use_ratings={sys_use_ratings};

Modified: trunk/gforge/etc/local.inc.example
===================================================================
--- trunk/gforge/etc/local.inc.example	2009-04-03 11:20:16 UTC (rev 7327)
+++ trunk/gforge/etc/local.inc.example	2009-04-03 11:49:27 UTC (rev 7328)
@@ -162,6 +162,8 @@
 $sys_use_private_project=true;
 $sys_use_diary=true;
 $sys_use_bookmarks=true;
+$sys_use_project_tags=true;
+$sys_use_project_full_list=true;
 
 // Enable/Disable user ratings
 $sys_use_ratings=true;

Modified: trunk/gforge/setup
===================================================================
--- trunk/gforge/setup	2009-04-03 11:20:16 UTC (rev 7327)
+++ trunk/gforge/setup	2009-04-03 11:49:27 UTC (rev 7328)
@@ -108,6 +108,8 @@
 	DEFAULTsys_use_ftpuploads=false
 	DEFAULTsys_use_diary=true
 	DEFAULTsys_use_bookmarks=true
+	DEFAULTsys_use_project_tags=true
+	DEFAULTsys_use_project_full_list=true
 	DEFAULTsys_use_gateways=true
 	DEFAULTsys_use_project_vhost=true
 	DEFAULTsys_use_project_database=false

Modified: trunk/gforge/www/include/Layout.class.php
===================================================================
--- trunk/gforge/www/include/Layout.class.php	2009-04-03 11:20:16 UTC (rev 7327)
+++ trunk/gforge/www/include/Layout.class.php	2009-04-03 11:49:27 UTC (rev 7328)
@@ -410,11 +410,11 @@
 	}
 
 	function outerTabs($params) {
-		global $sys_use_trove,$sys_use_snippet,$sys_use_people;
+		global $sys_use_trove,$sys_use_snippet,$sys_use_people,$sys_use_project_tags, $sys_use_project_full_list;
 
 		$TABS_DIRS[]='/';
 		$TABS_DIRS[]='/my/';
-		if ($sys_use_trove) {
+		if ($sys_use_trove || $sys_use_project_tags || $sys_use_project_full_list) {
 			$TABS_DIRS[]='/softwaremap/';
 		}
 		if ($sys_use_snippet) {
@@ -425,8 +425,8 @@
 		}
 		$TABS_TITLES[]=_('Home');
 		$TABS_TITLES[]=_('My Page');
-		if ($sys_use_trove) {
-			$TABS_TITLES[]=_('Project Tree');
+		if ($sys_use_trove || $sys_use_project_tags || $sys_use_project_full_list) {
+			$TABS_TITLES[]=_('Projects');
 		}
 		if ($sys_use_snippet) {
 			$TABS_TITLES[]=_('Code Snippets');

Modified: trunk/gforge/www/include/features_boxes.php
===================================================================
--- trunk/gforge/www/include/features_boxes.php	2009-04-03 11:20:16 UTC (rev 7327)
+++ trunk/gforge/www/include/features_boxes.php	2009-04-03 11:49:27 UTC (rev 7328)
@@ -13,14 +13,18 @@
 require_once $gfcommon.'include/tag_cloud.php';
 
 function show_features_boxes() {
-	GLOBAL $HTML,$sys_use_ratings,$sys_use_frs;
+	GLOBAL $HTML,$sys_use_ratings,$sys_use_frs,$sys_use_project_tags;
 	
 	$return = '';
-	$return .= $HTML->boxTop(_('Tag Cloud'));
-	$return .= '<center>';
-	$return .= tag_cloud();
-	$return .= '</center>';
-	$return .= $HTML->boxMiddle(sprintf(_('%1$s Statistics'), $GLOBALS['sys_name']),0);
+	if ($sys_use_project_tags) {
+		$return .= $HTML->boxTop(_('Tag Cloud'));
+		$return .= '<center>';
+		$return .= tag_cloud();
+		$return .= '</center>';
+		$return .= $HTML->boxMiddle(sprintf(_('%1$s Statistics'), $GLOBALS['sys_name']),0);
+	} else {
+		$return .= $HTML->boxTop(sprintf(_('%1$s Statistics'), $GLOBALS['sys_name']),0);
+	}
 	$return .= show_sitestats();
 	if ($sys_use_frs) {
 		$return .= $HTML->boxMiddle(_('Top Project Downloads'));

Modified: trunk/gforge/www/include/project_home.php
===================================================================
--- trunk/gforge/www/include/project_home.php	2009-04-03 11:20:16 UTC (rev 7327)
+++ trunk/gforge/www/include/project_home.php	2009-04-03 11:49:27 UTC (rev 7328)
@@ -55,18 +55,20 @@
 print "<br />\n";
 
 // Tag list
-$list_tag = list_project_tag($group_id);
-if ($list_tag) {
-	print '<p>' . _('Tags').':&nbsp;'. $list_tag . '</p>';
-}
-else {
-	$project =& group_get_object($group_id);
-	$perm =& $project->getPermission(session_get_user());
-	if ($perm->isAdmin()) {
-		print '<p><a href="/project/admin/editgroupinfo.php?group_id=' . $group_id . '" >' . _('No tag defined for this project') . '</a>.</p>';
+if ($GLOBALS['sys_use_project_tags']) {
+	$list_tag = list_project_tag($group_id);
+	if ($list_tag) {
+		print '<p>' . _('Tags').':&nbsp;'. $list_tag . '</p>';
 	}
 	else {
-		print '<p>' . _('No tag defined for this project') . '</p>';
+		$project =& group_get_object($group_id);
+		$perm =& $project->getPermission(session_get_user());
+		if ($perm->isAdmin()) {
+			print '<p><a href="/project/admin/editgroupinfo.php?group_id=' . $group_id . '" >' . _('No tag defined for this project') . '</a>.</p>';
+		}
+		else {
+			print '<p>' . _('No tag defined for this project') . '</p>';
+		}
 	}
 }
 

Modified: trunk/gforge/www/project/admin/editgroupinfo.php
===================================================================
--- trunk/gforge/www/project/admin/editgroupinfo.php	2009-04-03 11:20:16 UTC (rev 7327)
+++ trunk/gforge/www/project/admin/editgroupinfo.php	2009-04-03 11:49:27 UTC (rev 7328)
@@ -131,10 +131,12 @@
 </textarea>
 </p>
 
+<?php if ($GLOBALS['sys_use_project_tags']) { ?>
 <p>
 <?php echo _('Tags') ?>:<br />
 <input type="text" name="form_tags" size="100" value="<?php echo $group->getTags(); ?>" />
 </p>
+<?php } ?>
 
 <p>
 <?php echo _('Homepage Link') ?>:<br />

Modified: trunk/gforge/www/project/admin/index.php
===================================================================
--- trunk/gforge/www/project/admin/index.php	2009-04-03 11:20:16 UTC (rev 7327)
+++ trunk/gforge/www/project/admin/index.php	2009-04-03 11:49:27 UTC (rev 7328)
@@ -198,10 +198,12 @@
 	<p>[ <?php echo util_make_link ('/tarballs.php?group_id='.$group_id,_('Download Your Nightly SCM Tree Tarball')) ?> ]</p>
 <?php	} ?>
 
-<p>
-<?php echo _('Tags') ?>:&nbsp;
-<?php echo $group->getTags(); ?>
-</p>
+<?php if ($GLOBALS['sys_use_project_tags']) { ?>
+	<p>
+	<?php echo _('Tags') ?>:&nbsp;
+	<?php echo $group->getTags(); ?>
+	</p>
+<?php } ?>
 
 <?php	if($sys_use_trove) { ?>
 <p>

Modified: trunk/gforge/www/softwaremap/full_list.php
===================================================================
--- trunk/gforge/www/softwaremap/full_list.php	2009-04-03 11:20:16 UTC (rev 7327)
+++ trunk/gforge/www/softwaremap/full_list.php	2009-04-03 11:49:27 UTC (rev 7328)
@@ -46,25 +46,25 @@
 require_once $gfwww.'include/pre.php';
 require_once $gfwww.'include/trove.php';
 
-if (!$sys_use_trove) {
-	exit_disabled();
+$HTML->header(array('title'=>_('Software Map'),'pagename'=>'softwaremap'));
+$subMenuTitle = array();
+$subMenuUrl = array();
+
+if ($GLOBALS['sys_use_project_tags']) {
+	$subMenuTitle[] = _('Tag cloud');
+	$subMenuUrl[] = '/softwaremap/tag_cloud.php';
 }
 
-$HTML->header(array('title'=>_('Software Map'),'pagename'=>'softwaremap'));
+if ($GLOBALS['sys_use_trove']) {
+	$subMenuTitle[] = _('Project Tree');
+	$subMenuUrl[] = '/softwaremap/trove_list.php';
+}
 
-echo ($HTML->subMenu(
-		array(
-			_('Tag cloud'),
-			_('Project Tree'),
-			_('Project List')
-		),
-		array(
-			'/softwaremap/tag_cloud.php',
-			'/softwaremap/trove_list.php',
-			'/softwaremap/full_list.php'
-		)
-	));
+$subMenuTitle[] = _('Project List');
+$subMenuUrl[] = '/softwaremap/full_list.php';
 
+echo ($HTML->subMenu($subMenuTitle, $subMenuUrl));
+
 $res_grp = db_query("
 	SELECT group_id, group_name, unix_group_name, short_description, register_time
 	FROM groups

Modified: trunk/gforge/www/softwaremap/index.php
===================================================================
--- trunk/gforge/www/softwaremap/index.php	2009-04-03 11:20:16 UTC (rev 7327)
+++ trunk/gforge/www/softwaremap/index.php	2009-04-03 11:49:27 UTC (rev 7328)
@@ -9,6 +9,12 @@
   *
   */
 
-header('Location: tag_cloud.php');
-
-?>
+require_once('../env.inc.php');
+require_once $gfwww.'include/pre.php';
+if ($GLOBALS['sys_use_project_tags']) {
+	header('Location: '.util_make_url('softwaremap/tag_cloud.php'));
+}elseif ($GLOBALS['sys_use_trove']){
+	header('Location: '.util_make_url('softwaremap/trove_list.php'));
+}else{
+header('Location: '.util_make_url('softwaremap/full_list.php'));
+}?>

Modified: trunk/gforge/www/softwaremap/tag_cloud.php
===================================================================
--- trunk/gforge/www/softwaremap/tag_cloud.php	2009-04-03 11:20:16 UTC (rev 7327)
+++ trunk/gforge/www/softwaremap/tag_cloud.php	2009-04-03 11:49:27 UTC (rev 7328)
@@ -46,21 +46,30 @@
 require_once $gfwww.'include/trove.php';
 require_once $gfcommon.'include/tag_cloud.php';
 
+if (!$sys_use_project_tags) {
+	exit_disabled();
+}
+
 $HTML->header(array('title'=>_('Software Map'),'pagename'=>'softwaremap'));
 
-echo ($HTML->subMenu(
-	array(
-		_('Tag cloud'),
-		_('Project Tree'),
-		_('Project List')
-		),
-	array(
-		'/softwaremap/tag_cloud.php',
-		'/softwaremap/trove_list.php',
-		'/softwaremap/full_list.php'
-		)
-	));
+$subMenuTitle = array();
+$subMenuUrl = array();
 
+if ($GLOBALS['sys_use_project_tags']) {
+	$subMenuTitle[] = _('Tag cloud');
+	$subMenuUrl[] = '/softwaremap/tag_cloud.php';
+}
+
+if ($GLOBALS['sys_use_trove']) {
+	$subMenuTitle[] = _('Project Tree');
+	$subMenuUrl[] = '/softwaremap/trove_list.php';
+}
+
+$subMenuTitle[] = _('Project List');
+$subMenuUrl[] = '/softwaremap/full_list.php';
+
+echo ($HTML->subMenu($subMenuTitle, $subMenuUrl));
+
 $selected_tag = getStringFromRequest('tag');
 $page = getIntFromRequest('page', 1);
 

Modified: trunk/gforge/www/softwaremap/trove_list.php
===================================================================
--- trunk/gforge/www/softwaremap/trove_list.php	2009-04-03 11:20:16 UTC (rev 7327)
+++ trunk/gforge/www/softwaremap/trove_list.php	2009-04-03 11:49:27 UTC (rev 7328)
@@ -46,19 +46,24 @@
 
 $HTML->header(array('title'=>_('Software Map')));
 
-echo ($HTML->subMenu(
-		array(
-			_('Tag cloud'),
-			_('Project Tree'),
-			_('Project List')
-		),
-		array(
-			'/softwaremap/tag_cloud.php',
-			'/softwaremap/trove_list.php',
-			'/softwaremap/full_list.php'
-		)
-	));
+$subMenuTitle = array();
+$subMenuUrl = array();
 
+if ($GLOBALS['sys_use_project_tags']) {
+	$subMenuTitle[] = _('Tag cloud');
+	$subMenuUrl[] = '/softwaremap/tag_cloud.php';
+}
+
+if ($GLOBALS['sys_use_trove']) {
+	$subMenuTitle[] = _('Project Tree');
+	$subMenuUrl[] = '/softwaremap/trove_list.php';
+}
+
+$subMenuTitle[] = _('Project List');
+$subMenuUrl[] = '/softwaremap/full_list.php';
+
+echo ($HTML->subMenu($subMenuTitle, $subMenuUrl));
+
 echo'
 	<hr />';
 

Modified: trunk/gforge/www/themes/gforge/Theme.class.php
===================================================================
--- trunk/gforge/www/themes/gforge/Theme.class.php	2009-04-03 11:20:16 UTC (rev 7327)
+++ trunk/gforge/www/themes/gforge/Theme.class.php	2009-04-03 11:49:27 UTC (rev 7328)
@@ -360,13 +360,13 @@
     }
 
     function outerTabs($params) {
-        global $sys_use_trove,$sys_use_snippet,$sys_use_people;
+        global $sys_use_trove,$sys_use_snippet,$sys_use_people,$sys_use_project_tags,$sys_use_project_full_list;
 
         $TABS_DIRS[]='/';
         $TABS_DIRS[]='/my/';
-        if ($sys_use_trove) {
-            $TABS_DIRS[]='/softwaremap/';
-        }
+	if ($sys_use_trove || $sys_use_project_tags || $sys_use_project_full_list) {
+        	$TABS_DIRS[]='/softwaremap/';
+	}
         if ($sys_use_snippet) {
             $TABS_DIRS[]='/snippet/';
         }
@@ -375,9 +375,9 @@
         }
         $TABS_TITLES[]=_('Home');
         $TABS_TITLES[]=_('My&nbsp;Page');
-        if ($sys_use_trove) {
-            $TABS_TITLES[]=_('Project&nbsp;Tree');
-        }
+	if ($sys_use_trove || $sys_use_project_tags || $sys_use_project_full_list) {
+        	$TABS_TITLES[]=_('Projects');
+	}
         if ($sys_use_snippet) {
             $TABS_TITLES[]=_('Code&nbsp;Snippets');
         }




More information about the Fusionforge-commits mailing list