Skip to content

Commit

Permalink
#4073: Edit filter page now too wide. 'Apply filter' button is drawn …
Browse files Browse the repository at this point in the history
…off screen.

git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@2728 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
narcissus committed Jul 19, 2004
1 parent 35cf1f8 commit d3044c1
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 95 deletions.
114 changes: 60 additions & 54 deletions core/filter_api.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: filter_api.php,v 1.48 2004-07-17 23:52:56 vboctor Exp $
# $Id: filter_api.php,v 1.49 2004-07-19 09:46:40 narcissus Exp $
# --------------------------------------------------------

$t_core_dir = dirname( __FILE__ ).DIRECTORY_SEPARATOR;
Expand Down Expand Up @@ -655,7 +655,7 @@ function filter_draw_selection_area2( $p_page_number, $p_for_screen = true, $p_e

<?php
if ( $p_expanded ) {
$t_filter_cols = 9;
$t_filter_cols = 7;
$t_custom_cols = $t_filter_cols;
if ( ON == config_get( 'filter_by_custom_fields' ) ) {
$t_custom_cols = config_get( 'filter_custom_fields_per_row' );
Expand Down Expand Up @@ -709,15 +709,9 @@ function filter_draw_selection_area2( $p_page_number, $p_for_screen = true, $p_e
<td class="small-caption" valign="top">
<a href="<?php PRINT $t_filters_url . 'show_severity[]'; ?>"><?php PRINT lang_get( 'severity' ) ?>:</a>
</td>
<td class="small-caption" valign="top">
<a href="<?php PRINT $t_filters_url . 'show_status[]'; ?>"><?php PRINT lang_get( 'status' ) ?>:</a>
</td>
<td class="small-caption" valign="top">
<a href="<?php PRINT $t_filters_url . 'show_resolution[]'; ?>"><?php PRINT lang_get( 'resolution' ) ?>:</a>
</td>
<td class="small-caption" valign="top">
<a href="<?php PRINT $t_filters_url . 'hide_status[]'; ?>"><?php PRINT lang_get( 'hide_status' ) ?>:</a>
</td>

<?php
if ( $t_custom_cols > $t_filter_cols ) {
Expand Down Expand Up @@ -904,16 +898,16 @@ function filter_draw_selection_area2( $p_page_number, $p_for_screen = true, $p_e
<?php
$t_output = '';
$t_any_found = false;
if ( count( $t_filter['show_status'] ) == 0 ) {
if ( count( $t_filter['show_resolution'] ) == 0 ) {
PRINT lang_get( 'any' );
} else {
$t_first_flag = true;
foreach( $t_filter['show_status'] as $t_current ) {
foreach( $t_filter['show_resolution'] as $t_current ) {
$t_this_string = '';
if ( ( $t_current == 'any' ) || ( is_blank( $t_current ) ) ) {
$t_any_found = true;
} else {
$t_this_string = get_enum_element( 'status', $t_current );
$t_this_string = get_enum_element( 'resolution', $t_current );
}
if ( $t_first_flag != true ) {
$t_output = $t_output . '<br>';
Expand All @@ -930,20 +924,46 @@ function filter_draw_selection_area2( $p_page_number, $p_for_screen = true, $p_e
}
?>
</td>
<?php
if ( $t_custom_cols > $t_filter_cols ) {
echo '<td colspan="' . ($t_custom_cols - $t_filter_cols) . '">&nbsp;</td>';
}
?>
</tr>

<tr <?php PRINT "class=\"" . $t_trclass . "\""; ?>>
<td class="small-caption" valign="top">
<a href="<?php PRINT $t_filters_url . 'show_status[]'; ?>"><?php PRINT lang_get( 'status' ) ?>:</a>
</td>
<td class="small-caption" valign="top">
<a href="<?php PRINT $t_filters_url . 'hide_status[]'; ?>"><?php PRINT lang_get( 'hide_status' ) ?>:</a>
</td>
<td class="small-caption" valign="top">
<a href="<?php PRINT $t_filters_url . 'show_build[]'; ?>"><?php PRINT lang_get( 'product_build' ) ?>:</a>
</td>
<td colspan="2" class="small-caption" valign="top">
<a href="<?php PRINT $t_filters_url . 'show_version[]'; ?>"><?php PRINT lang_get( 'product_version' ) ?>:</a>
</td>
<td colspan="2" class="small-caption" valign="top">
<a href="<?php PRINT $t_filters_url . 'fixed_in_version[]'; ?>"><?php PRINT lang_get( 'fixed_in_version' ) ?>:</a>
</td>
</tr>

<tr class="row-1">
<td class="small-caption" valign="top">
<?php
$t_output = '';
$t_any_found = false;
if ( count( $t_filter['show_resolution'] ) == 0 ) {
if ( count( $t_filter['show_status'] ) == 0 ) {
PRINT lang_get( 'any' );
} else {
$t_first_flag = true;
foreach( $t_filter['show_resolution'] as $t_current ) {
foreach( $t_filter['show_status'] as $t_current ) {
$t_this_string = '';
if ( ( $t_current == 'any' ) || ( is_blank( $t_current ) ) ) {
$t_any_found = true;
} else {
$t_this_string = get_enum_element( 'resolution', $t_current );
$t_this_string = get_enum_element( 'status', $t_current );
}
if ( $t_first_flag != true ) {
$t_output = $t_output . '<br>';
Expand Down Expand Up @@ -994,42 +1014,6 @@ function filter_draw_selection_area2( $p_page_number, $p_for_screen = true, $p_e
}
?>
</td>
<?php
if ( $t_custom_cols > $t_filter_cols ) {
echo '<td colspan="' . ($t_custom_cols - $t_filter_cols) . '">&nbsp;</td>';
}
?>
</tr>

<tr <?php PRINT "class=\"" . $t_trclass . "\""; ?>>
<td class="small-caption" valign="top">
<a href="<?php PRINT $t_filters_url . 'show_build[]'; ?>"><?php PRINT lang_get( 'product_build' ) ?>:</a>
</td>
<td class="small-caption" valign="top">
<a href="<?php PRINT $t_filters_url . 'show_version[]'; ?>"><?php PRINT lang_get( 'product_version' ) ?>:</a>
</td>
<td class="small-caption" valign="top">
<a href="<?php PRINT $t_filters_url . 'fixed_in_version[]'; ?>"><?php PRINT lang_get( 'fixed_in_version' ) ?>:</a>
</td>
<td class="small-caption" valign="top">
<a href="<?php PRINT $t_filters_url . 'per_page'; ?>"><?php PRINT lang_get( 'show' ) ?>:</a>
</td>
<td class="small-caption" valign="top">
<a href="<?php PRINT $t_filters_url . 'view_state'; ?>"><?php PRINT lang_get( 'view_status' ) ?>:</a>
</td>
<td class="small-caption" valign="top">
<a href="<?php PRINT $t_filters_url . 'highlight_changed'; ?>"><?php PRINT lang_get( 'changed' ) ?>:</a>
</td>
<td class="small-caption" valign="top" colspan="3">
<a href="<?php PRINT $t_filters_url . 'do_filter_by_date'; ?>"><?php PRINT lang_get( 'use_date_filters' ) ?>:</a>
</td>
<?php
if ( $t_custom_cols > $t_filter_cols ) {
echo '<td colspan="' . ($t_custom_cols - $t_filter_cols) . '">&nbsp;</td>';
}
?>
</tr>
<tr class="row-2">
<td class="small-caption" valign="top">
<?php
$t_output = '';
Expand Down Expand Up @@ -1060,7 +1044,7 @@ function filter_draw_selection_area2( $p_page_number, $p_for_screen = true, $p_e
}
?>
</td>
<td class="small-caption" valign="top">
<td colspan="2" class="small-caption" valign="top">
<?php
$t_output = '';
$t_any_found = false;
Expand Down Expand Up @@ -1090,7 +1074,7 @@ function filter_draw_selection_area2( $p_page_number, $p_for_screen = true, $p_e
}
?>
</td>
<td class="small-caption" valign="top">
<td colspan="2" class="small-caption" valign="top">
<?php
$t_output = '';
$t_any_found = false;
Expand Down Expand Up @@ -1120,6 +1104,28 @@ function filter_draw_selection_area2( $p_page_number, $p_for_screen = true, $p_e
}
?>
</td>
</tr>

<tr <?php PRINT "class=\"" . $t_trclass . "\""; ?>>
<td class="small-caption" valign="top">
<a href="<?php PRINT $t_filters_url . 'per_page'; ?>"><?php PRINT lang_get( 'show' ) ?>:</a>
</td>
<td class="small-caption" valign="top">
<a href="<?php PRINT $t_filters_url . 'view_state'; ?>"><?php PRINT lang_get( 'view_status' ) ?>:</a>
</td>
<td class="small-caption" valign="top">
<a href="<?php PRINT $t_filters_url . 'highlight_changed'; ?>"><?php PRINT lang_get( 'changed' ) ?>:</a>
</td>
<td class="small-caption" valign="top" colspan="4">
<a href="<?php PRINT $t_filters_url . 'do_filter_by_date'; ?>"><?php PRINT lang_get( 'use_date_filters' ) ?>:</a>
</td>
<?php
if ( $t_custom_cols > $t_filter_cols ) {
echo '<td colspan="' . ($t_custom_cols - $t_filter_cols) . '">&nbsp;</td>';
}
?>
</tr>
<tr class="row-1">
<td class="small-caption" valign="top">
<?php PRINT $t_filter['per_page']; ?>
</td>
Expand All @@ -1137,7 +1143,7 @@ function filter_draw_selection_area2( $p_page_number, $p_for_screen = true, $p_e
<td class="small-caption" valign="top">
<?php PRINT $t_filter['highlight_changed']; ?>
</td>
<td class="small-caption" valign="top" colspan="3">
<td class="small-caption" valign="top" colspan="4">
<?php
if ( 'on' == $t_filter['do_filter_by_date'] ) {
$t_chars = preg_split( '//', config_get( 'short_date_format' ), -1, PREG_SPLIT_NO_EMPTY );
Expand Down Expand Up @@ -1299,7 +1305,7 @@ function filter_draw_selection_area2( $p_page_number, $p_for_screen = true, $p_e
</td>
</form>

<td class="right" colspan="6">
<td class="right" colspan="4">
<?php
$t_stored_queries_arr = array();
$t_stored_queries_arr = filter_db_get_available_queries();
Expand Down
1 change: 1 addition & 0 deletions doc/ChangeLog
Expand Up @@ -2,6 +2,7 @@ Mantis ChangeLog

2004.08.xx - 0.19.0xx

- 0004073: [filters] Edit filter page now too wide. 'Apply filter' button is drawn off screen.
- 0004122: Upgrade script seems to swap the duplicate relationship (masc)

2004.07.20 - 0.19.0a2
Expand Down
87 changes: 46 additions & 41 deletions view_filters_page.php
Expand Up @@ -70,7 +70,7 @@ function SwitchDateFields() {
$t_accessible_custom_fields_ids = array();
$t_accessible_custom_fields_names = array();
$t_accessible_custom_fields_values = array();
$t_filter_cols = 9;
$t_filter_cols = 7;
$t_custom_cols = 1;
$t_custom_rows = 0;

Expand Down Expand Up @@ -161,17 +161,7 @@ function SwitchDateFields() {
<td class="small-caption" colspan="<?php echo ( 1 * $t_custom_cols ); ?>"><?php echo lang_get( 'assigned_to' ) ?></td>
<td class="small-caption" colspan="<?php echo ( 2 * $t_custom_cols ); ?>"><?php echo lang_get( 'category' ) ?></td>
<td class="small-caption" colspan="<?php echo ( 1 * $t_custom_cols ); ?>"><?php echo lang_get( 'severity' ) ?></td>
<td class="small-caption" colspan="<?php echo ( 1 * $t_custom_cols ); ?>"><?php echo lang_get( 'status' ) ?></td>
<td class="small-caption" colspan="<?php echo ( 1 * $t_custom_cols ); ?>"><?php echo lang_get( 'resolution' ) ?></td>
<td class="small-caption" colspan="<?php echo ( 1 * $t_custom_cols ); ?>">
<?php
if ( 'simple' == $f_view_type ) {
echo lang_get( 'hide_status' );
} else {
echo '&nbsp;';
}
?>
</td>
</tr>
<tr class="row-1">
<!-- Reporter -->
Expand Down Expand Up @@ -244,23 +234,41 @@ function SwitchDateFields() {
<?php print_enum_string_option_list( 'severity', $t_filter['show_severity'] ) ?>
</select>
</td>
<!-- Status -->
<!-- Resolution -->
<td valign="top" colspan="<?php echo ( 1 * $t_custom_cols ); ?>">
<select <?php PRINT $t_select_modifier;?> name="show_status[]">
<select <?php PRINT $t_select_modifier;?> name="show_resolution[]">
<option value="any"><?php echo lang_get( 'any' ) ?></option>
<option value="any"></option>
<?php print_enum_string_option_list( 'status', $t_filter['show_status'] ) ?>
<?php print_enum_string_option_list( 'resolution', $t_filter['show_resolution'] ) ?>
</select>
</td>
<!-- Resolution -->
</tr>

<tr class="row-category2">
<td class="small-caption" colspan="<?php echo ( 1 * $t_custom_cols ); ?>"><?php echo lang_get( 'status' ) ?></td>
<td class="small-caption" colspan="<?php echo ( 1 * $t_custom_cols ); ?>">
<?php
if ( 'simple' == $f_view_type ) {
echo lang_get( 'hide_status' );
} else {
echo '&nbsp;';
}
?>
</td>
<td class="small-caption" colspan="<?php echo ( 1 * $t_custom_cols ); ?>"><?php echo lang_get( 'product_build' ) ?></td>
<td class="small-caption" colspan="<?php echo ( 2 * $t_custom_cols ); ?>"><?php echo lang_get( 'product_version' ) ?></td>
<td class="small-caption" colspan="<?php echo ( 2 * $t_custom_cols ); ?>"><?php echo lang_get( 'fixed_in_version' ) ?></td>
</tr>
<tr class="row-1">
<!-- Status -->
<td valign="top" colspan="<?php echo ( 1 * $t_custom_cols ); ?>">
<select <?php PRINT $t_select_modifier;?> name="show_resolution[]">
<select <?php PRINT $t_select_modifier;?> name="show_status[]">
<option value="any"><?php echo lang_get( 'any' ) ?></option>
<option value="any"></option>
<?php print_enum_string_option_list( 'resolution', $t_filter['show_resolution'] ) ?>
<?php print_enum_string_option_list( 'status', $t_filter['show_status'] ) ?>
</select>
</td>
<!-- Hide closed and resolved bugs -->
<!-- Hide Status -->
<td valign="top" colspan="<?php echo ( 1 * $t_custom_cols ); ?>">
<?php
if ( 'simple' == $f_view_type ) {
Expand All @@ -276,24 +284,6 @@ function SwitchDateFields() {
}
?>
</td>
</tr>

<tr class="row-category2">
<td class="small-caption" colspan="<?php echo ( 1 * $t_custom_cols ); ?>"><?php echo lang_get( 'product_build' ) ?></td>
<td class="small-caption" colspan="<?php echo ( 1 * $t_custom_cols ); ?>"><?php echo lang_get( 'product_version' ) ?></td>
<td class="small-caption" colspan="<?php echo ( 1 * $t_custom_cols ); ?>"><?php echo lang_get( 'fixed_in_version' ) ?></td>
<td class="small-caption" colspan="<?php echo ( 1 * $t_custom_cols ); ?>"><?php echo lang_get( 'show' ) ?></td>
<td class="small-caption" colspan="<?php echo ( 1 * $t_custom_cols ); ?>"><?php echo lang_get( 'view_status' ) ?></td>
<td class="small-caption" colspan="<?php echo ( 1 * $t_custom_cols ); ?>"><?php echo lang_get( 'changed' ) ?></td>
<td class="small-caption" colspan="<?php echo ( 3 * $t_custom_cols ); ?>">
<input type="checkbox" name="do_filter_by_date" <?php
check_checked( $t_filter['do_filter_by_date'], 'on' );
if ( ON == config_get( 'use_javascript' ) ) {
print "onclick=\"SwitchDateFields();\""; } ?> />
<?php echo lang_get( 'use_date_filters' ) ?>
</td>
</tr>
<tr class="row-2">
<!-- Build -->
<td valign="top" colspan="<?php echo ( 1 * $t_custom_cols ); ?>">
<select <?php PRINT $t_select_modifier;?> name="show_build[]">
Expand All @@ -303,21 +293,36 @@ function SwitchDateFields() {
</select>
</td>
<!-- Version -->
<td valign="top" colspan="<?php echo ( 1 * $t_custom_cols ); ?>">
<td valign="top" colspan="<?php echo ( 2 * $t_custom_cols ); ?>">
<select <?php PRINT $t_select_modifier;?> name="show_version[]">
<option value="any"><?php echo lang_get( 'any' ) ?></option>
<option value="any"></option>
<?php print_version_option_list( $t_filter['show_version'], null, VERSION_RELEASED ) ?>
</select>
</td>
<!-- Fixed in Version -->
<td valign="top" colspan="<?php echo ( 1 * $t_custom_cols ); ?>">
<td valign="top" colspan="<?php echo ( 2 * $t_custom_cols ); ?>">
<select <?php PRINT $t_select_modifier;?> name="fixed_in_version[]">
<option value="any"><?php echo lang_get( 'any' ) ?></option>
<option value="any"></option>
<?php print_version_option_list( $t_filter['fixed_in_version'], null, VERSION_ALL ) ?>
</select>
</td>
</tr>

<tr class="row-category2">
<td class="small-caption" colspan="<?php echo ( 1 * $t_custom_cols ); ?>"><?php echo lang_get( 'show' ) ?></td>
<td class="small-caption" colspan="<?php echo ( 1 * $t_custom_cols ); ?>"><?php echo lang_get( 'view_status' ) ?></td>
<td class="small-caption" colspan="<?php echo ( 1 * $t_custom_cols ); ?>"><?php echo lang_get( 'changed' ) ?></td>
<td class="small-caption" colspan="<?php echo ( 4 * $t_custom_cols ); ?>">
<input type="checkbox" name="do_filter_by_date" <?php
check_checked( $t_filter['do_filter_by_date'], 'on' );
if ( ON == config_get( 'use_javascript' ) ) {
print "onclick=\"SwitchDateFields();\""; } ?> />
<?php echo lang_get( 'use_date_filters' ) ?>
</td>
</tr>
<tr class="row-2">
<!-- Number of bugs per page -->
<td valign="top" colspan="<?php echo ( 1 * $t_custom_cols ); ?>">
<input type="text" name="per_page" size="3" maxlength="7" value="<?php echo $t_filter['per_page'] ?>" />
Expand All @@ -343,7 +348,7 @@ function SwitchDateFields() {
<td valign="top" colspan="<?php echo ( 1 * $t_custom_cols ); ?>">
<input type="text" name="highlight_changed" size="3" maxlength="7" value="<?php echo $t_filter['highlight_changed'] ?>" />
</td>
<td valign="top" class="left" colspan="<?php echo ( 3 * $t_custom_cols ); ?>">
<td valign="top" class="left" colspan="<?php echo ( 4 * $t_custom_cols ); ?>">
<table cellspacing="0" cellpadding="0">
<!-- Start date -->
<tr>
Expand Down Expand Up @@ -465,15 +470,15 @@ function SwitchDateFields() {

<tr class="row-category2">
<td class="small-caption" colspan="<?php echo ( 1 * $t_custom_cols ); ?>"><?php echo lang_get( 'search' ) ?></td>
<td class="small-caption" colspan="<?php echo ( 8 * $t_custom_cols ); ?>"></td>
<td class="small-caption" colspan="<?php echo ( 6 * $t_custom_cols ); ?>"></td>
</tr>
<tr>
<!-- Search field -->
<td colspan="<?php echo ( 1 * $t_custom_cols ); ?>">
<input type="text" size="16" name="search" value="<?php echo $t_filter['search']; ?>" />
</td>

<td class="small-caption" colspan="<?php echo ( 7 * $t_custom_cols ); ?>"></td>
<td class="small-caption" colspan="<?php echo ( 5 * $t_custom_cols ); ?>"></td>

<!-- Submit button -->
<td class="right" colspan="<?php echo ( 1 * $t_custom_cols ); ?>">
Expand Down

0 comments on commit d3044c1

Please sign in to comment.