|
|
ef5584 |
|
|
|
ef5584 |
# Mantis - a php based bugtracking system
|
|
|
ef5584 |
|
|
|
ef5584 |
# Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
|
|
|
ef5584 |
# Copyright (C) 2002 - 2007 Mantis Team - mantisbt-dev@lists.sourceforge.net
|
|
|
ef5584 |
|
|
|
ef5584 |
# Mantis is free software: you can redistribute it and/or modify
|
|
|
ef5584 |
# it under the terms of the GNU General Public License as published by
|
|
|
ef5584 |
# the Free Software Foundation, either version 2 of the License, or
|
|
|
ef5584 |
# (at your option) any later version.
|
|
|
ef5584 |
#
|
|
|
ef5584 |
# Mantis is distributed in the hope that it will be useful,
|
|
|
ef5584 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
ef5584 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
ef5584 |
# GNU General Public License for more details.
|
|
|
ef5584 |
#
|
|
|
ef5584 |
# You should have received a copy of the GNU General Public License
|
|
|
ef5584 |
# along with Mantis. If not, see <http://www.gnu.org/licenses/>.
|
|
|
ef5584 |
|
|
|
ef5584 |
# --------------------------------------------------------
|
|
|
ef5584 |
# $Id: manage_proj_edit_page.php,v 1.104.2.2 2007-10-19 07:25:59 vboctor Exp $
|
|
|
ef5584 |
# --------------------------------------------------------
|
|
|
ef5584 |
|
|
|
ef5584 |
require_once( 'core.php' );
|
|
|
ef5584 |
|
|
|
ef5584 |
$t_core_path = config_get( 'core_path' );
|
|
|
ef5584 |
|
|
|
ef5584 |
require_once( $t_core_path . 'category_api.php' );
|
|
|
ef5584 |
require_once( $t_core_path . 'version_api.php' );
|
|
|
ef5584 |
require_once( $t_core_path . 'custom_field_api.php' );
|
|
|
ef5584 |
require_once( $t_core_path . 'icon_api.php' );
|
|
|
ef5584 |
|
|
|
ef5584 |
auth_reauthenticate();
|
|
|
ef5584 |
|
|
|
ef5584 |
$f_project_id = gpc_get_int( 'project_id' );
|
|
|
ef5584 |
|
|
|
ef5584 |
access_ensure_project_level( config_get( 'manage_project_threshold' ), $f_project_id );
|
|
|
ef5584 |
|
|
|
ef5584 |
$row = project_get_row( $f_project_id );
|
|
|
ef5584 |
|
|
|
ef5584 |
html_page_top1( project_get_field( $f_project_id, 'name' ) );
|
|
|
ef5584 |
html_page_top2();
|
|
|
ef5584 |
|
|
|
ef5584 |
print_manage_menu( 'manage_proj_edit_page.php' );
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
<form method="post" action="manage_proj_update.php">
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
<input type="hidden" name="project_id" value="<?php echo $f_project_id ?>" />
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
<input type="text" name="name" size="50" maxlength="128" value="<?php echo string_attribute( $row['name'] ) ?>" />
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
<select name="status">
|
|
|
ef5584 |
|
|
|
ef5584 |
</select>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
<input type="checkbox" name="enabled" <?php check_checked( $row['enabled'], ON ); ?> />
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
<select name="view_state">
|
|
|
ef5584 |
|
|
|
ef5584 |
</select>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
<input type="text" name="file_path" size="50" maxlength="250" value="<?php echo string_attribute( $row['file_path'] ) ?>" />
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
<textarea name="description" cols="60" rows="5"></textarea>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
<input type="submit" class="button" value="<?php echo lang_get( 'update_project_button' ) ?>" />
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
</form>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
# You must have global permissions to delete projects
|
|
|
ef5584 |
if ( access_has_global_level ( config_get( 'delete_project_threshold' ) ) ) { ?>
|
|
|
ef5584 |
|
|
|
ef5584 |
<form method="post" action="manage_proj_delete.php">
|
|
|
ef5584 |
|
|
|
ef5584 |
<input type="hidden" name="project_id" value="<?php echo $f_project_id ?>" />
|
|
|
ef5584 |
<input type="submit" class="button" value="<?php echo lang_get( 'delete_project_button' ) ?>" />
|
|
|
ef5584 |
</form>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
# reset the class counter
|
|
|
ef5584 |
helper_alternate_class( 0 );
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
# Check the user's global access level before allowing project creation
|
|
|
ef5584 |
if ( access_has_global_level ( config_get( 'create_project_threshold' ) ) ) {
|
|
|
ef5584 |
print_button( 'manage_proj_create_page.php?parent_id=' . $f_project_id, lang_get( 'create_new_subproject_link' ) );
|
|
|
ef5584 |
}
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
$t_subproject_ids = current_user_get_accessible_subprojects( $f_project_id, /* show_disabled */ true );
|
|
|
ef5584 |
|
|
|
ef5584 |
if ( Array() != $t_subproject_ids ) {
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
foreach ( $t_subproject_ids as $t_subproject_id ) {
|
|
|
ef5584 |
$t_subproject = project_get_row( $t_subproject_id );
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
print_button( 'manage_proj_edit_page.php?project_id=' . $t_subproject['id'], lang_get( 'edit_link' ) );
|
|
|
ef5584 |
echo ' ';
|
|
|
ef5584 |
print_button( 'manage_proj_subproj_delete.php?project_id=' . $f_project_id . '&subproject_id=' . $t_subproject['id'] . form_security_param( 'manage_proj_subproj_delete' ), lang_get( 'unlink_link' ) );
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
} # End of foreach loop over subprojects
|
|
|
ef5584 |
} # End of hiding subproject listing if there are no subprojects
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
<form method="post" action="manage_proj_subproj_add.php">
|
|
|
ef5584 |
|
|
|
ef5584 |
<input type="hidden" name="project_id" value="<?php echo $f_project_id ?>" />
|
|
|
ef5584 |
<select name="subproject_id">
|
|
|
ef5584 |
|
|
|
ef5584 |
$t_all_subprojects = project_hierarchy_get_subprojects( $f_project_id, /* $p_show_disabled */ true );
|
|
|
ef5584 |
$t_all_subprojects[] = $f_project_id;
|
|
|
ef5584 |
$t_manage_access = config_get( 'manage_project_threshold' );
|
|
|
ef5584 |
|
|
|
ef5584 |
$t_projects = project_get_all_rows();
|
|
|
ef5584 |
|
|
|
ef5584 |
$t_projects = multi_sort( $t_projects, 'name', ASCENDING );
|
|
|
ef5584 |
|
|
|
ef5584 |
foreach ( $t_projects as $t_project ) {
|
|
|
ef5584 |
if ( in_array( $t_project['id'], $t_all_subprojects ) ||
|
|
|
ef5584 |
in_array( $f_project_id, project_hierarchy_get_all_subprojects( $t_project['id'] ) ) ||
|
|
|
ef5584 |
! access_has_project_level( $t_manage_access, $t_project['id'] ) ) {
|
|
|
ef5584 |
continue;
|
|
|
ef5584 |
}
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
<option value="<?php echo $t_project['id'] ?>"></option>
|
|
|
ef5584 |
|
|
|
ef5584 |
} # End looping over projects
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
</select>
|
|
|
ef5584 |
<input type="submit" value="<?php echo lang_get('add_subproject'); ?>">
|
|
|
ef5584 |
</form>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
$t_categories = category_get_all_rows( $f_project_id );
|
|
|
ef5584 |
|
|
|
ef5584 |
if ( count( $t_categories ) > 0 ) {
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
}
|
|
|
ef5584 |
|
|
|
ef5584 |
foreach ( $t_categories as $t_category ) {
|
|
|
ef5584 |
$t_name = $t_category['category'];
|
|
|
ef5584 |
|
|
|
ef5584 |
if ( NO_USER != $t_category['user_id'] && user_exists( $t_category['user_id'] )) {
|
|
|
ef5584 |
$t_user_name = user_get_name( $t_category['user_id'] );
|
|
|
ef5584 |
} else {
|
|
|
ef5584 |
$t_user_name = '';
|
|
|
ef5584 |
}
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
$t_name = urlencode( $t_name );
|
|
|
ef5584 |
|
|
|
ef5584 |
print_button( 'manage_proj_cat_edit_page.php?project_id=' . $f_project_id . '&category=' . $t_name, lang_get( 'edit_link' ) );
|
|
|
ef5584 |
echo ' ';
|
|
|
ef5584 |
print_button( 'manage_proj_cat_delete.php?project_id=' . $f_project_id . '&category=' . $t_name . form_security_param( 'manage_proj_cat_delete' ), lang_get( 'delete_link' ) );
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
} # end for loop
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
<form method="post" action="manage_proj_cat_add.php">
|
|
|
ef5584 |
|
|
|
ef5584 |
<input type="hidden" name="project_id" value="<?php echo $f_project_id ?>" />
|
|
|
ef5584 |
<input type="text" name="category" size="32" maxlength="64" />
|
|
|
ef5584 |
<input type="submit" class="button" value="<?php echo lang_get( 'add_category_button' ) ?>" />
|
|
|
ef5584 |
</form>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
<form method="post" action="manage_proj_cat_copy.php">
|
|
|
ef5584 |
|
|
|
ef5584 |
<input type="hidden" name="project_id" value="<?php echo $f_project_id ?>" />
|
|
|
ef5584 |
<select name="other_project_id">
|
|
|
ef5584 |
|
|
|
ef5584 |
</select>
|
|
|
ef5584 |
<input type="submit" name="copy_from" class="button" value="<?php echo lang_get( 'copy_categories_from' ) ?>" />
|
|
|
ef5584 |
<input type="submit" name="copy_to" class="button" value="<?php echo lang_get( 'copy_categories_to' ) ?>" />
|
|
|
ef5584 |
</form>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
# reset the class counter
|
|
|
ef5584 |
helper_alternate_class( 0 );
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
$t_versions = version_get_all_rows( $f_project_id );
|
|
|
ef5584 |
|
|
|
ef5584 |
if ( count( $t_versions ) > 0 ) {
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
}
|
|
|
ef5584 |
|
|
|
ef5584 |
foreach ( $t_versions as $t_version ) {
|
|
|
ef5584 |
$t_name = $t_version['version'];
|
|
|
ef5584 |
$t_released = $t_version['released'];
|
|
|
ef5584 |
$t_date_order = $t_version['date_order'];
|
|
|
ef5584 |
$t_date_formatted = string_format_complete_date( $t_version['date_order'] );
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
$t_version_id = version_get_id( $t_name, $f_project_id );
|
|
|
ef5584 |
|
|
|
ef5584 |
print_button( 'manage_proj_ver_edit_page.php?version_id=' . $t_version_id, lang_get( 'edit_link' ) );
|
|
|
ef5584 |
echo ' ';
|
|
|
ef5584 |
print_button( 'manage_proj_ver_delete.php?version_id=' . $t_version_id . form_security_param( 'manage_proj_ver_delete' ), lang_get( 'delete_link' ) );
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
} # end for loop
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
<form method="post" action="manage_proj_ver_add.php">
|
|
|
ef5584 |
|
|
|
ef5584 |
<input type="hidden" name="project_id" value="<?php echo $f_project_id ?>" />
|
|
|
ef5584 |
<input type="text" name="version" size="32" maxlength="64" />
|
|
|
ef5584 |
<input type="submit" name="add_version" class="button" value="<?php echo lang_get( 'add_version_button' ) ?>" />
|
|
|
ef5584 |
<input type="submit" name="add_and_edit_version" class="button" value="<?php echo lang_get( 'add_and_edit_version_button' ) ?>" />
|
|
|
ef5584 |
</form>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
<form method="post" action="manage_proj_ver_copy.php">
|
|
|
ef5584 |
|
|
|
ef5584 |
<input type="hidden" name="project_id" value="<?php echo $f_project_id ?>" />
|
|
|
ef5584 |
<select name="other_project_id">
|
|
|
ef5584 |
|
|
|
ef5584 |
</select>
|
|
|
ef5584 |
<input type="submit" name="copy_from" class="button" value="<?php echo lang_get( 'copy_versions_from' ) ?>" />
|
|
|
ef5584 |
<input type="submit" name="copy_to" class="button" value="<?php echo lang_get( 'copy_versions_to' ) ?>" />
|
|
|
ef5584 |
</form>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
# reset the class counter
|
|
|
ef5584 |
helper_alternate_class( 0 );
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
# You need either global permissions or project-specific permissions to link
|
|
|
ef5584 |
# custom fields
|
|
|
ef5584 |
if ( access_has_project_level( config_get( 'custom_field_link_threshold' ), $f_project_id ) &&
|
|
|
ef5584 |
( count( custom_field_get_ids() ) > 0 ) ) {
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
$t_custom_fields = custom_field_get_linked_ids( $f_project_id );
|
|
|
ef5584 |
|
|
|
ef5584 |
if ( count( $t_custom_fields ) > 0 ) {
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
$t_index = 0;
|
|
|
ef5584 |
|
|
|
ef5584 |
$t_custom_field_security = form_security_field( 'manage_proj_custom_field_update' );
|
|
|
ef5584 |
|
|
|
ef5584 |
foreach( $t_custom_fields as $t_field_id ) {
|
|
|
ef5584 |
$t_desc = custom_field_get_definition( $t_field_id );
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
<form method="post" action="manage_proj_custom_field_update.php">
|
|
|
ef5584 |
|
|
|
ef5584 |
<input type="hidden" name="project_id" value="<?php echo $f_project_id ?>" />
|
|
|
ef5584 |
<input type="hidden" name="field_id" value="<?php echo $t_field_id ?>" />
|
|
|
ef5584 |
<input type="text" name="sequence" value="<?php echo custom_field_get_sequence( $t_field_id, $f_project_id ) ?>" size="2" />
|
|
|
ef5584 |
<input type="submit" class="button-small" value="<?php echo lang_get( 'update' ) ?>" />
|
|
|
ef5584 |
</form>
|
|
|
ef5584 |
|
|
|
ef5584 |
$t_index++;
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
# You need global permissions to edit custom field defs
|
|
|
ef5584 |
print_button( "manage_proj_custom_field_remove.php?field_id={$t_field_id}&project_id={$f_project_id}", lang_get( 'remove_link' ) );
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
} # end for loop
|
|
|
ef5584 |
}
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
<form method="post" action="manage_proj_custom_field_add_existing.php">
|
|
|
ef5584 |
|
|
|
ef5584 |
<input type="hidden" name="project_id" value="<?php echo $f_project_id ?>" />
|
|
|
ef5584 |
<select name="field_id">
|
|
|
ef5584 |
|
|
|
ef5584 |
$t_custom_fields = custom_field_get_ids();
|
|
|
ef5584 |
|
|
|
ef5584 |
foreach( $t_custom_fields as $t_field_id )
|
|
|
ef5584 |
{
|
|
|
ef5584 |
if( !custom_field_is_linked( $t_field_id, $f_project_id ) ) {
|
|
|
ef5584 |
$t_desc = custom_field_get_definition( $t_field_id );
|
|
|
ef5584 |
echo "<option value=\"$t_field_id\">" . string_attribute( $t_desc['name'] ) . '</option>' ;
|
|
|
ef5584 |
}
|
|
|
ef5584 |
}
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
</select>
|
|
|
ef5584 |
<input type="submit" class="button" value="<?php echo lang_get( 'add_existing_custom_field' ) ?>" />
|
|
|
ef5584 |
</form>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
<form method="post" action="manage_proj_custom_field_copy.php">
|
|
|
ef5584 |
|
|
|
ef5584 |
<input type="hidden" name="project_id" value="<?php echo $f_project_id ?>" />
|
|
|
ef5584 |
<select name="other_project_id">
|
|
|
ef5584 |
|
|
|
ef5584 |
</select>
|
|
|
ef5584 |
<input type="submit" name="copy_from" class="button" value="<?php echo lang_get( 'copy_from' ) ?>" />
|
|
|
ef5584 |
<input type="submit" name="copy_to" class="button" value="<?php echo lang_get( 'copy_to' ) ?>" />
|
|
|
ef5584 |
</form>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
}
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
if ( VS_PUBLIC == project_get_field( $f_project_id, 'view_state' ) ) {
|
|
|
ef5584 |
echo lang_get( 'public_project_msg' );
|
|
|
ef5584 |
} else {
|
|
|
ef5584 |
echo lang_get( 'private_project_msg' );
|
|
|
ef5584 |
}
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
# We want to allow people with global permissions and people with high enough
|
|
|
ef5584 |
# permissions on the project we are editing
|
|
|
ef5584 |
if ( access_has_project_level( config_get( 'project_user_threshold' ), $f_project_id ) ) {
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
<form method="post" action="manage_proj_user_add.php">
|
|
|
ef5584 |
|
|
|
ef5584 |
<input type="hidden" name="project_id" value="<?php echo $f_project_id ?>" />
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
<select name="user_id[]" multiple="multiple" size="10">
|
|
|
ef5584 |
|
|
|
ef5584 |
</select>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
<select name="access_level">
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
</select>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
<input type="submit" class="button" value="<?php echo lang_get( 'add_user_button' ) ?>" />
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
</form>
|
|
|
ef5584 |
|
|
|
ef5584 |
<form method="post" action="manage_proj_user_copy.php">
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
<input type="hidden" name="project_id" value="<?php echo $f_project_id ?>" />
|
|
|
ef5584 |
<select name="other_project_id">
|
|
|
ef5584 |
|
|
|
ef5584 |
</select>
|
|
|
ef5584 |
<input type="submit" name="copy_from" class="button" value="<?php echo lang_get( 'copy_users_from' ) ?>" />
|
|
|
ef5584 |
<input type="submit" name="copy_to" class="button" value="<?php echo lang_get( 'copy_users_to' ) ?>" />
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
</form>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
}
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
$t_users = project_get_all_user_rows( $f_project_id );
|
|
|
ef5584 |
$t_display = array();
|
|
|
ef5584 |
$t_sort = array();
|
|
|
ef5584 |
foreach ( $t_users as $t_user ) {
|
|
|
ef5584 |
$t_user_name = string_attribute( $t_user['username'] );
|
|
|
ef5584 |
$t_sort_name = strtolower( $t_user_name );
|
|
|
ef5584 |
if ( ( isset( $t_user['realname'] ) ) && ( $t_user['realname'] > "" ) && ( ON == config_get( 'show_realname' ) ) ){
|
|
|
ef5584 |
$t_user_name = string_attribute( $t_user['realname'] ) . " (" . $t_user_name . ")";
|
|
|
ef5584 |
if ( ON == config_get( 'sort_by_last_name') ) {
|
|
|
ef5584 |
$t_sort_name_bits = split( ' ', strtolower( $t_user_name ), 2 );
|
|
|
ef5584 |
$t_sort_name = $t_sort_name_bits[1] . ', ' . $t_sort_name_bits[1];
|
|
|
ef5584 |
} else {
|
|
|
ef5584 |
$t_sort_name = strtolower( $t_user_name );
|
|
|
ef5584 |
}
|
|
|
ef5584 |
}
|
|
|
ef5584 |
$t_display[] = $t_user_name;
|
|
|
ef5584 |
$t_sort[] = $t_sort_name;
|
|
|
ef5584 |
}
|
|
|
ef5584 |
array_multisort( $t_sort, SORT_ASC, SORT_STRING, $t_users, $t_display );
|
|
|
ef5584 |
|
|
|
ef5584 |
# reset the class counter
|
|
|
ef5584 |
helper_alternate_class( 0 );
|
|
|
ef5584 |
|
|
|
ef5584 |
$t_user_remove_security = form_security_param( 'manage_proj_user_remove' );
|
|
|
ef5584 |
|
|
|
ef5584 |
for ($i = 0; $i < count( $t_sort ); $i++ ) {
|
|
|
ef5584 |
$t_user = $t_users[$i];
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
$t_email = user_get_email( $t_user['id'] );
|
|
|
ef5584 |
print_email_link( $t_email, $t_email );
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
# You need global or project-specific permissions to remove users
|
|
|
ef5584 |
# from this project
|
|
|
ef5584 |
if ( access_has_project_level( config_get( 'project_user_threshold' ), $f_project_id ) ) {
|
|
|
ef5584 |
if ( project_includes_user( $f_project_id, $t_user['id'] ) ) {
|
|
|
ef5584 |
print_button( 'manage_proj_user_remove.php?project_id=' . $f_project_id . '&user_id=' . $t_user['id'] . $t_user_remove_security, lang_get( 'remove_link' ) );
|
|
|
ef5584 |
}
|
|
|
ef5584 |
}
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
} # end for
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
# You need global or project-specific permissions to remove users
|
|
|
ef5584 |
# from this project
|
|
|
ef5584 |
if ( access_has_project_level( config_get( 'project_user_threshold' ), $f_project_id ) ) {
|
|
|
ef5584 |
print_button( 'manage_proj_user_remove.php?project_id=' . $f_project_id . $t_user_remove_security, lang_get( 'remove_all_link' ) );
|
|
|
ef5584 |
}
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|