[evolvis-commits] r7078: modularise PM Select Columns code, for later adoption in Tasks↵

mirabilos at evolvis.org mirabilos at evolvis.org
Wed Nov 17 16:15:15 CET 2010


Author: mirabilos
Date: 2010-11-17 16:15:15 +0100 (Wed, 17 Nov 2010)
New Revision: 7078

Modified:
   trunk/gforge_base/evolvisforge/gforge/www/pm/include/pm_columns.php
   trunk/gforge_base/evolvisforge/gforge/www/pm/select_columns.php
   trunk/gforge_base/evolvisforge/gforge/www/pm/task.php
Log:
modularise PM Select Columns code, for later adoption in Tasks


Modified: trunk/gforge_base/evolvisforge/gforge/www/pm/include/pm_columns.php
===================================================================
--- trunk/gforge_base/evolvisforge/gforge/www/pm/include/pm_columns.php	2010-11-17 15:15:13 UTC (rev 7077)
+++ trunk/gforge_base/evolvisforge/gforge/www/pm/include/pm_columns.php	2010-11-17 15:15:15 UTC (rev 7078)
@@ -78,3 +78,7 @@
 	/* don't need to repeat */
 	pm_prefset("seen", 1);
 }
+
+$subidname = 'group_project_id';
+$pm_columns_title = _('Select PM Display Columns');
+$pm_columns_retf = "/pm/task.php?func=post_select_columns&";

Modified: trunk/gforge_base/evolvisforge/gforge/www/pm/select_columns.php
===================================================================
--- trunk/gforge_base/evolvisforge/gforge/www/pm/select_columns.php	2010-11-17 15:15:13 UTC (rev 7077)
+++ trunk/gforge_base/evolvisforge/gforge/www/pm/select_columns.php	2010-11-17 15:15:15 UTC (rev 7078)
@@ -32,7 +32,7 @@
 require_once $gfwww.'include/pre.php';
 
 $group_id = getIntFromRequest('group_id');
-$group_project_id = getIntFromRequest('group_project_id');
+$subid = getIntFromRequest($subidname);
 
 $u =& session_get_user();
 if (!$u) {
@@ -40,8 +40,6 @@
 	$u = new NotUser();
 }
 
-require_once $gfwww.'pm/include/pm_columns.php';
-
 echo '<' . '?xml version="1.0" encoding="utf-8" ?' . '>'; ?>
 <!DOCTYPE html
 	PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
@@ -72,15 +70,15 @@
 		}
 	}
   /* ]]> */</script>
-  <title><?php echo _('Select PM Display Columns'); ?></title>
+  <title><?php echo $pm_columns_title; ?></title>
  </head>
  <body onload="document.forms[0].selectDeselect.checked = areAllCheckFieldsSelected()">
 <h1><?php echo _('Modify columns'); ?></h1>
 <p><?php echo _('Select which columns to display.'); ?></p>
-<form action="<?php echo util_make_url("/pm/task.php?group_id=$group_id&amp;group_project_id=$group_project_id&amp;func=post_select_columns"); ?>" method="post">
+<form action="<?php echo util_make_url($pm_columns_retf . "group_id=$group_id&amp;$subidname=$subid"); ?>" method="post">
 <?php
 	echo "<input type=\"hidden\" name=\"group_id\" value=\"$group_id\" />\n";
-	echo "<input type=\"hidden\" name=\"group_project_id\" value=\"$group_project_id\" />\n";
+	echo "<input type=\"hidden\" name=\"$subidname\" value=\"$subid\" />\n";
 ?>
 	<table>
 		<tr><th><?php echo _('Columns'); ?></th><th><?php echo _('Add'); ?></th></tr>

Modified: trunk/gforge_base/evolvisforge/gforge/www/pm/task.php
===================================================================
--- trunk/gforge_base/evolvisforge/gforge/www/pm/task.php	2010-11-17 15:15:13 UTC (rev 7077)
+++ trunk/gforge_base/evolvisforge/gforge/www/pm/task.php	2010-11-17 15:15:15 UTC (rev 7078)
@@ -522,6 +522,7 @@
 	//	Show the task view columns selection page
 	//
 	case 'select_columns' : {
+		require_once $gfwww.'pm/include/pm_columns.php';
 		include $gfwww.'pm/select_columns.php';
 		break;
 	}



More information about the evolvis-commits mailing list