2 # MantisBT - A PHP based bugtracking system
4 # MantisBT is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, either version 2 of the License, or
7 # (at your option) any later version.
9 # MantisBT is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with MantisBT. If not, see <http://www.gnu.org/licenses/>.
19 * @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
20 * @copyright Copyright (C) 2002 - 2010 MantisBT Team - mantisbt-dev@lists.sourceforge.net
21 * @link http://www.mantisbt.org
23 * @uses access_api.php
24 * @uses authentication_api.php
25 * @uses columns_api.php
26 * @uses constant_inc.php
27 * @uses current_user_api.php
30 * @uses helper_api.php
36 require_api( 'access_api.php' );
37 require_api( 'authentication_api.php' );
38 require_api( 'columns_api.php' );
39 require_api( 'constant_inc.php' );
40 require_api( 'current_user_api.php' );
41 require_api( 'file_api.php' );
42 require_api( 'form_api.php' );
43 require_api( 'helper_api.php' );
44 require_api( 'html_api.php' );
45 require_api( 'lang_api.php' );
46 require_api( 'print_api.php' );
48 $t_manage_page = defined( 'MANAGE_COLUMNS' );
49 $t_account_page = defined( 'ACCOUNT_COLUMNS' );
51 # Protect against direct access to this script.
52 if ( !$t_manage_page && !$t_account_page ) {
56 $t_project_id = helper_get_current_project();
58 # Calculate the user id to set the configuration for.
59 if ( $t_manage_page ) {
62 $t_user_id = auth_get_current_user_id();
65 $t_columns = columns_get_all( $t_project_id );
66 $t_all = implode( ', ', $t_columns );
68 $t_columns = helper_get_columns_to_view( COLUMNS_TARGET_CSV_PAGE
, /* $p_viewable_only */ false, $t_user_id );
69 $t_csv = implode( ', ', $t_columns );
71 $t_columns = helper_get_columns_to_view( COLUMNS_TARGET_VIEW_PAGE
, /* $p_viewable_only */ false, $t_user_id );
72 $t_view_issues = implode( ', ', $t_columns );
74 $t_columns = helper_get_columns_to_view( COLUMNS_TARGET_PRINT_PAGE
, /* $p_viewable_only */ false, $t_user_id );
75 $t_print_issues = implode( ', ', $t_columns );
77 $t_columns = helper_get_columns_to_view( COLUMNS_TARGET_EXCEL_PAGE
, /* $p_viewable_only */ false, $t_user_id );
78 $t_excel = implode( ', ', $t_columns );
84 <form name
="report_bug_form" method
="post" <?php
if ( file_allow_bug_upload() ) { echo 'enctype="multipart/form-data"'; } ?
> action
="manage_config_columns_set.php">
85 <?php
echo form_security_field( 'manage_config_columns_set' ) ?
>
86 <table
class="width50" cellspacing
="1">
90 <td
class="form-title">
91 <input type
="hidden" name
="project_id" value
="<?php echo $t_project_id ?>" />
92 <input type
="hidden" name
="form_page" value
="<?php echo $t_account_page ? 'account' : 'manage'; ?>" />
93 <?php
echo lang_get( 'manage_columns_config' ) ?
>
97 if ( $t_account_page ) {
98 print_account_menu( 'account_manage_columns_page.php' );
104 <!-- view issues columns
-->
105 <tr
<?php
echo helper_alternate_class() ?
>>
106 <td
class="category">
107 <?php
echo lang_get( 'all_columns_title' )?
>
110 <textarea
<?php
echo helper_get_tab_index() ?
> name
="all_columns" readonly
="readonly" cols
="80" rows
="5"><?php
echo $t_all ?
></textarea
>
114 <!-- view issues columns
-->
115 <tr
<?php
echo helper_alternate_class() ?
>>
116 <td
class="category">
117 <?php
echo lang_get( 'view_issues_columns_title' ), '<span class="required">*</span>' ?
>
120 <textarea
<?php
echo helper_get_tab_index() ?
> name
="view_issues_columns" cols
="80" rows
="5"><?php
echo $t_view_issues ?
></textarea
>
124 <!-- print issues columns
-->
125 <tr
<?php
echo helper_alternate_class() ?
>>
126 <td
class="category">
127 <?php
echo lang_get( 'print_issues_columns_title' ), '<span class="required">*</span>' ?
>
130 <textarea
<?php
echo helper_get_tab_index() ?
> name
="print_issues_columns" cols
="80" rows
="5"><?php
echo $t_print_issues ?
></textarea
>
135 <tr
<?php
echo helper_alternate_class() ?
>>
136 <td
class="category">
137 <?php
echo lang_get( 'csv_columns_title' ), '<span class="required">*</span>' ?
>
140 <textarea
<?php
echo helper_get_tab_index() ?
> name
="csv_columns" cols
="80" rows
="5"><?php
echo $t_csv ?
></textarea
>
145 <tr
<?php
echo helper_alternate_class() ?
>>
146 <td
class="category">
147 <?php
echo lang_get( 'excel_columns_title' ), '<span class="required">*</span>' ?
>
150 <textarea
<?php
echo helper_get_tab_index() ?
> name
="excel_columns" cols
="80" rows
="5"><?php
echo $t_excel ?
></textarea
>
154 <!-- Submit Button
-->
157 <span
class="required"> * <?php
echo lang_get( 'required' ) ?
></span
>
161 if ( $t_account_page ) {
162 if ( $t_project_id == ALL_PROJECTS
) { ?
>
163 <input
<?php
echo helper_get_tab_index() ?
> type
="submit" class="button" name
="update_columns_as_my_default" value
="<?php echo lang_get( 'update_columns_as_my_default' ) ?>" />
165 <input
<?php
echo helper_get_tab_index() ?
> type
="submit" class="button" name
="update_columns_for_current_project" value
="<?php echo lang_get( 'update_columns_for_current_project' ) ?>" />
167 <?php
if ( $t_manage_page && current_user_is_administrator() ) { ?
>
168 <input
<?php
echo helper_get_tab_index() ?
> type
="submit" class="button" name
="update_columns_as_global_default" value
="<?php echo lang_get( 'update_columns_as_global_default' ) ?>" />
178 <form method
="post" action
="manage_columns_copy.php">
179 <?php
echo form_security_field( 'manage_columns_copy' ) ?
>
180 <table
class="width50" cellspacing
="1">
182 <!-- Copy Columns
-->
184 <td
class="left" colspan
="3">
185 <input type
="hidden" name
="project_id" value
="<?php echo $t_project_id ?>" />
186 <input type
="hidden" name
="manage_page" value
="<?php echo $t_manage_page ?>" />
188 <select name
="other_project_id">
189 <?php
print_project_option_list( /* project_id */ null, /* include_all_projects */ true, /* filter_project_id */ $t_project_id ); ?
>
192 # Skip "Copy From" if the current project is ALL PROJECTS, the current page is management page, and the user is not administrator
193 if ( !$t_manage_page ||
( $t_project_id != ALL_PROJECTS
) ||
current_user_is_administrator() ) {
195 <input type
="submit" name
="copy_from" class="button" value
="<?php echo lang_get( 'copy_columns_from' ) ?>" />
199 <input type
="submit" name
="copy_to" class="button" value
="<?php echo lang_get( 'copy_columns_to' ) ?>" />
209 if ( $t_account_page ) {
211 <!-- RESET CONFIGURATION
-->
212 <div
class="border center">
213 <!-- Reset Button
-->
214 <form method
="post" action
="manage_config_columns_reset.php">
215 <?php
echo form_security_field( 'manage_config_columns_reset' ) ?
>
216 <input type
="submit" class="button" value
="<?php echo lang_get( 'reset_columns_configuration' ) ?>" />