Bonjour,
Je souhaiterai masquer certains filtres présent dans la page "view_all_bug_page.php" car je ne m'en sers pas pour la saisie des tickets (donc inutile de faire un recherche par ce filtre) mais je parviens pas à comprendre comment faire.
Après quelques recherche, il faudrait modifier le fichier "filter_api" mais comment ? Pourriez-vous m'indiquer comment masquer par exemple le filtre "plate-forme" ?
Merci d'avance.
Anthony
Personnaliser les filtres dans "afficher les bogues"
Moderators: Developer, Contributor
-
- Posts: 7
- Joined: 18 Apr 2017, 12:20
Personnaliser les filtres dans "afficher les bogues"
Mantis Addict
Re: Personnaliser les filtres dans "afficher les bogues"
Bonjour,
Il faut mettre en commentaire toutes lignes en rapport avec PLATFORM dans les fichiers suivants :
Filter_constants_inc.php
Line 77
Filter_form.php
Line 440 - 456
Line 430 - 431
Line 2537 - 2543
Filter_api.php
Line 314 - 317
Line 675
Line 1872 - 1898
Line 3116
Line 3394
MantisBT V2.5.0
Il faut mettre en commentaire toutes lignes en rapport avec PLATFORM dans les fichiers suivants :
Filter_constants_inc.php
Line 77
Filter_form.php
Line 440 - 456
Line 430 - 431
Line 2537 - 2543
Filter_api.php
Line 314 - 317
Line 675
Line 1872 - 1898
Line 3116
Line 3394
MantisBT V2.5.0
-
- Posts: 7
- Joined: 18 Apr 2017, 12:20
Re: Personnaliser les filtres dans "afficher les bogues"
Merci pour ton ade.
Je n'ai toutefois pas réussi à mettre en commentaire les lignes correctement.
Voici ce que j'ai inséré comme code et qui plante ma page.
Je suis (grand) débutant donc il doit y avoir une coquille...peut être dans le filter constant
Filter Constants
L77
/*define( 'FILTER_PROPERTY_PLATFORM', 'platform' );*/
Filter Form
L440-456
/*function print_filter_platform( array $p_filter = null ) {
global $g_filter;
if( null === $p_filter ) {
$p_filter = $g_filter;
}
?>
<!-- Platform -->
<select class="input-xs" <?php echo filter_select_modifier( $p_filter ) ?> name="<?php echo FILTER_PROPERTY_PLATFORM;?>[]">
<option value="<?php echo META_FILTER_ANY?>"<?php check_selected( $p_filter[FILTER_PROPERTY_PLATFORM], (string)META_FILTER_ANY );?>>[<?php echo lang_get( 'any' )?>]</option>
<?php
log_event( LOG_FILTERING, 'Platform = ' . var_export( $p_filter[FILTER_PROPERTY_PLATFORM], true ) );
print_platform_option_list( $p_filter[FILTER_PROPERTY_PLATFORM] );
?>
</select>
<?php
}
*/
L430-431
/*function print_filter_values_platform( array $p_filter ) {
print_multivalue_field( FILTER_PROPERTY_PLATFORM, $p_filter[FILTER_PROPERTY_PLATFORM] );*/
L2537-2543
/* $get_field_header( 'show_profile_filter', lang_get( 'profile' ) ),
filter_form_get_input( $t_filter, 'show_profile', $t_show_inputs ),
/* 1 /* colspan */,
/* null /* class */,
/* 'show_profile_filter_target' /* content id */
));
/* $t_row3->add_item( new TableFieldsItem(
$get_field_header( 'platform_filter', lang_get( 'platform' ) ),
filter_form_get_input( $t_filter, 'platform', $t_show_inputs ),
1 /* colspan */,
/* null /* class */,
/* 'platform_filter_target' /* content id */
/* ));
$t_row3->add_item( new TableFieldsItem(*/
Filter api
L314-317
/* if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_PLATFORM] ) ) {
$t_query[] = filter_encode_field_and_value( FILTER_PROPERTY_PLATFORM, $p_custom_filter[FILTER_PROPERTY_PLATFORM] );
}
*/
L675
/* FILTER_PROPERTY_PLATFORM => 'string',*/
L1872-1898
/* # platform
if( !filter_field_is_any( $t_filter[FILTER_PROPERTY_PLATFORM] ) ) {
$t_clauses = array();
foreach( $t_filter[FILTER_PROPERTY_PLATFORM] as $t_filter_member ) {
$t_filter_member = stripslashes( $t_filter_member );
if( filter_field_is_none( $t_filter_member ) ) {
array_push( $t_clauses, '' );
} else {
$c_platform = $t_filter_member;
array_push( $t_clauses, $c_platform );
}
}
if( 1 < count( $t_clauses ) ) {
$t_where_tmp = array();
foreach( $t_clauses as $t_clause ) {
$t_where_tmp[] = db_param();
$t_where_params[] = $t_clause;
}
array_push( $t_where_clauses, '( {bug}.platform in (' . implode( ', ', $t_where_tmp ) . ') )' );
} else {
$t_where_params[] = $t_clauses[0];
array_push( $t_where_clauses, '( {bug}.platform = ' . db_param() . ' )' );
}
}
*/
L3116
/*$f_platform = gpc_get( FILTER_PROPERTY_PLATFORM, $t_filter[FILTER_PROPERTY_PLATFORM] );*/
L3394
/* $t_filter_input[FILTER_PROPERTY_PLATFORM] = $f_platform;*/
Je n'ai toutefois pas réussi à mettre en commentaire les lignes correctement.
Voici ce que j'ai inséré comme code et qui plante ma page.
Je suis (grand) débutant donc il doit y avoir une coquille...peut être dans le filter constant
Filter Constants
L77
/*define( 'FILTER_PROPERTY_PLATFORM', 'platform' );*/
Filter Form
L440-456
/*function print_filter_platform( array $p_filter = null ) {
global $g_filter;
if( null === $p_filter ) {
$p_filter = $g_filter;
}
?>
<!-- Platform -->
<select class="input-xs" <?php echo filter_select_modifier( $p_filter ) ?> name="<?php echo FILTER_PROPERTY_PLATFORM;?>[]">
<option value="<?php echo META_FILTER_ANY?>"<?php check_selected( $p_filter[FILTER_PROPERTY_PLATFORM], (string)META_FILTER_ANY );?>>[<?php echo lang_get( 'any' )?>]</option>
<?php
log_event( LOG_FILTERING, 'Platform = ' . var_export( $p_filter[FILTER_PROPERTY_PLATFORM], true ) );
print_platform_option_list( $p_filter[FILTER_PROPERTY_PLATFORM] );
?>
</select>
<?php
}
*/
L430-431
/*function print_filter_values_platform( array $p_filter ) {
print_multivalue_field( FILTER_PROPERTY_PLATFORM, $p_filter[FILTER_PROPERTY_PLATFORM] );*/
L2537-2543
/* $get_field_header( 'show_profile_filter', lang_get( 'profile' ) ),
filter_form_get_input( $t_filter, 'show_profile', $t_show_inputs ),
/* 1 /* colspan */,
/* null /* class */,
/* 'show_profile_filter_target' /* content id */
));
/* $t_row3->add_item( new TableFieldsItem(
$get_field_header( 'platform_filter', lang_get( 'platform' ) ),
filter_form_get_input( $t_filter, 'platform', $t_show_inputs ),
1 /* colspan */,
/* null /* class */,
/* 'platform_filter_target' /* content id */
/* ));
$t_row3->add_item( new TableFieldsItem(*/
Filter api
L314-317
/* if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_PLATFORM] ) ) {
$t_query[] = filter_encode_field_and_value( FILTER_PROPERTY_PLATFORM, $p_custom_filter[FILTER_PROPERTY_PLATFORM] );
}
*/
L675
/* FILTER_PROPERTY_PLATFORM => 'string',*/
L1872-1898
/* # platform
if( !filter_field_is_any( $t_filter[FILTER_PROPERTY_PLATFORM] ) ) {
$t_clauses = array();
foreach( $t_filter[FILTER_PROPERTY_PLATFORM] as $t_filter_member ) {
$t_filter_member = stripslashes( $t_filter_member );
if( filter_field_is_none( $t_filter_member ) ) {
array_push( $t_clauses, '' );
} else {
$c_platform = $t_filter_member;
array_push( $t_clauses, $c_platform );
}
}
if( 1 < count( $t_clauses ) ) {
$t_where_tmp = array();
foreach( $t_clauses as $t_clause ) {
$t_where_tmp[] = db_param();
$t_where_params[] = $t_clause;
}
array_push( $t_where_clauses, '( {bug}.platform in (' . implode( ', ', $t_where_tmp ) . ') )' );
} else {
$t_where_params[] = $t_clauses[0];
array_push( $t_where_clauses, '( {bug}.platform = ' . db_param() . ' )' );
}
}
*/
L3116
/*$f_platform = gpc_get( FILTER_PROPERTY_PLATFORM, $t_filter[FILTER_PROPERTY_PLATFORM] );*/
L3394
/* $t_filter_input[FILTER_PROPERTY_PLATFORM] = $f_platform;*/
Mantis Addict
-
- Posts: 7
- Joined: 18 Apr 2017, 12:20
Re: Personnaliser les filtres dans "afficher les bogues"
Est-ce que quelqu'un aurait une idée ?
Mantis Addict
Re: Personnaliser les filtres dans "afficher les bogues"
Salut
J'ai eu le même soucis que toi au début du coup ce que j'ai fait c'est que j'ai fait une copie du code originel (au cas ou) puis pour la partie c'est écrit en HTML j'ai carrément tout viré car sinon j'avais des erreurs et c'est tout à fait fonctionnel de mon côté
J'ai eu le même soucis que toi au début du coup ce que j'ai fait c'est que j'ai fait une copie du code originel (au cas ou) puis pour la partie c'est écrit en HTML j'ai carrément tout viré car sinon j'avais des erreurs et c'est tout à fait fonctionnel de mon côté