Projects list in "Manage Projects page"

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
nla
Posts: 3
Joined: 03 Sep 2007, 12:43

Projects list in "Manage Projects page"

Post by nla »

Hello all!

As we have a huge list of projets and sub-projects, we were bored wainting the full project list to be displayed when getting in "manage projects page".
This is a small modification of the code, in order to display a list based on the selected project in the project listbox.

In config_defaults_inc.php file, add

Code: Select all

$g_manage_see_only_selected_project = ON;
In manage_proj_page.php, just after

Code: Select all

<?php
	$t_manage_project_threshold = config_get( 'manage_project_threshold' );
	$t_projects = user_get_accessible_projects( auth_get_current_user_id(), true );
add

Code: Select all

    #START mod - Display project list based on the project listbox selection
    if ( ON == config_get( 'manage_see_only_selected_project' ) ) {
        $t_project_asked = helper_get_current_project_trace();  //get selected project
            
        if ( $t_project_asked[0] != 0 AND in_array($t_project_asked[0],$t_projects) ) {
            $t_projects = array(); //reinit the project array
            $t_projects[0] = $t_project_asked[0];
        }
    }
   #END mod
    
That's it!
Now the project list is quick and contains only what I need :wink:

Bye
Post Reply