Page 1 of 1
How to hide an unassigned project
Posted: 24 Apr 2008, 09:47
by testing
Hello,
1)we have created an mantis account for an user as reporter/updater and assigning the project for that user...In that user account if we login, it should display that assigned project details only..rather it displays all the projects and its details ..How should we hide the unassigned project from that user..
2)And also in projects dropdown only the assigned project should display..how to do that..
please reply as soon as possible..awaiting for the reply...
Thanks and regards,
Ani
Re: How to hide an unassigned project
Posted: 22 Dec 2009, 15:51
by phil mantis
Hello,
i'd like to do the same.
Well, i know that the lang/strings_french (for me) contains
$s_all_projects = 'Tous les projets';
the core/html_api.php is calling it
function print_project_menu_bar() {
$t_project_ids = current_user_get_accessible_projects();
PRINT '<table class="width100" cellspacing="0">';
PRINT '<tr>';
PRINT '<td class="menu">';
PRINT '<a href="set_project.php?project_id=' . ALL_PROJECTS . '">' . lang_get( 'all_projects' ) . '</a>';
foreach ( $t_project_ids as $t_id ) {
PRINT " | <a href=\"set_project.php?project_id=$t_id\">" . string_display( project_get_field( $t_id, 'name' ) ) . '</a>';
print_subproject_menu_bar( $t_id, $t_id . ';' );
}
PRINT '</td>';
PRINT '</tr>';
PRINT '</table>';
}
but i don't know exactly what to do....using a # on the line header ?
Regards
Re: How to hide an unassigned project
Posted: 22 Dec 2009, 16:07
by phil mantis
Hello,
i want to do something like that: w<ant to hide the first 'project dropdown list' : All Projects
I already found the $s_all_project variable in the translation file - lang/strings_french.txt
and a call in core/html_api.php
# Print the menu bar with a list of projects to which the user has access
function print_project_menu_bar() {
$t_project_ids = current_user_get_accessible_projects();
PRINT '<table class="width100" cellspacing="0">';
PRINT '<tr>';
PRINT '<td class="menu">';
PRINT '<a href="set_project.php?project_id=' . ALL_PROJECTS . '">' . lang_get( 'all_projects' ) . '</a>';
foreach ( $t_project_ids as $t_id ) {
PRINT " | <a href=\"set_project.php?project_id=$t_id\">" . string_display( project_get_field( $t_id, 'name' ) ) . '</a>';
print_subproject_menu_bar( $t_id, $t_id . ';' );
}
PRINT '</td>';
PRINT '</tr>';
PRINT '</table>';
}
can you explain how i can do it please?
Thanks.
Re: How to hide an unassigned project
Posted: 25 Mar 2010, 15:59
by AmirS
Hi, please help we !!! I have the same case. thx in advance !!!
Re: How to hide an unassigned project
Posted: 27 Mar 2010, 14:06
by atrol
testing wrote:we have created an mantis account for an user as reporter/updater and assigning the project for that user...In that user account if we login, it should display that assigned project details only..rather it displays all the projects and its details ..How should we hide the unassigned project from that user..
Your user should not see more than the one assigned project if you don't set your projects to "public"
Re: How to hide an unassigned project
Posted: 29 Mar 2010, 11:33
by AmirS
Thank a lot it works! finnallyyyy !!! thxxxxxx .......
Re: How to hide an unassigned project
Posted: 12 May 2011, 22:07
by devil72
Hello, the proposal solution works fine if you have only one public project;
what about if you need to hide different projects for different users?
Thanks