Quote
nathalie
sa fonctionne, merci beaucoup!
je voudrais savoir aussi comment faire pour aligner à gauche les données du tableau.
merci.
Utiliser le code de Vincent avec cette petite modif :
echo '<td align=\'left\'>';
Code de Vincent avec la modif :
function custom_function_default_print_column_value( $p_column, $p_issue_row, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) {
if ( COLUMNS_TARGET_CSV_PAGE == $p_columns_target ) {
$t_column_start = '';
$t_column_end = '';
$t_column_empty = '';
} else {
$t_column_start = '<td align=\'left\'>';
$t_column_end = '</td>';
$t_column_empty = ' ';
}
if ( strpos( $p_column, 'custom_' ) === 0 ) {
echo $t_column_start;
$t_custom_field = substr( $p_column, 7 );
$t_field_id = custom_field_get_id_from_name( $t_custom_field );
if ( $t_field_id === false ) {
echo '@', $t_custom_field, '@';
} else {
$t_issue_id = $p_issue_row['id'];
$t_project_id = $p_issue_row['project_id'];
if ( custom_field_is_linked( $t_field_id, $t_project_id ) ) {
$t_def = custom_field_get_definition( $t_field_id );
print_custom_field_value( $t_def, $t_field_id, $t_issue_id );
} else {
// field is not linked to project
echo $t_column_empty;
}
}
echo $t_column_end;
} else {
if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) {
$t_function = 'print_column_' . $p_column;
} else {
$t_function = 'csv_format_' . $p_column;
}
if ( $p_column == 'priority' ) {
if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) {
echo '<td align=\'left\'>';
print_formatted_priority_string( $p_issue_row['status'], $p_issue_row['priority'] );
echo '</td>';
} else {
return csv_escape_string( get_enum_element( 'priority', $p_issue_row['priority'] ) );
}
} else if ( function_exists( $t_function ) ) {
if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) {
$t_function( $p_issue_row, $p_columns_target );
} else {
$t_function( $p_issue_row[$p_column] );
}
} else {
if ( isset( $p_issue_row[$p_column] ) ) {
echo $t_column_start . $p_issue_row[$p_column] . $t_column_end;
} else {
echo $t_column_start . '@' . $p_column . '@' . $t_column_end;
}
}
}
}
Gôm
Mantis : 1.0.6 - 1.1.2 (avec Plugins)
Apache : 2.0.63
PHP : 4.4.9
MySQL : 5.0.51b
OS : Windows 2003 Server R2 SP2
Environnement : WAMP Server 2.0c
Edited 1 time(s). Last edit at 10/15/2008 11:36AM by gom.