View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0010811 | mantisbt | filters | public | 2009-08-07 10:06 | 2009-08-24 05:45 |
Reporter | cas | Assigned To | |||
Priority | normal | Severity | tweak | Reproducibility | N/A |
Status | new | Resolution | open | ||
Product Version | 1.2.0rc1 | ||||
Summary | 0010811: Only show filters that are active | ||||
Description | Have modified filters-api such that it only shows active filters. Not fully done but like to have some comments | ||||
Steps To Reproduce | Simply replace filter_api.php with the 2 files in the zipfile. | ||||
Additional Information | The filtersection is standard to big in our view hence this adjustment | ||||
Tags | No tags attached. | ||||
Attached Files | filter_api.patch (32,764 bytes)
2036,2078c2036,2075 < ?> < < <br /> < <form method="post" name="filters<?php echo $t_form_name_suffix?>" id="filters_form<?php echo $t_form_name_suffix?>" action="<?php echo $t_action;?>"> < <input type="hidden" name="type" value="1" /> < <?php < if( $p_for_screen == false ) { < echo '<input type="hidden" name="print" value="1" />'; < echo '<input type="hidden" name="offset" value="0" />'; < } < ?> < <input type="hidden" name="page_number" value="<?php echo $t_page_number?>" /> < <input type="hidden" name="view_type" value="<?php echo $t_view_type?>" /> < <table class="width100" cellspacing="1"> < < <?php < $t_filter_cols = config_get( 'filter_custom_fields_per_row' ); < if( $p_expanded ) { < $t_custom_cols = $t_filter_cols; < < $t_current_user_access_level = current_user_get_access_level(); < $t_accessible_custom_fields_ids = array(); < $t_accessible_custom_fields_names = array(); < $t_accessible_custom_fields_values = array(); < $t_num_custom_rows = 0; < $t_per_row = 0; < < if( ON == config_get( 'filter_by_custom_fields' ) ) { < $t_custom_fields = custom_field_get_linked_ids( $t_project_id ); < < foreach( $t_custom_fields as $t_cfid ) { < $t_field_info = custom_field_cache_row( $t_cfid, true ); < if( $t_field_info['access_level_r'] <= $t_current_user_access_level && $t_field_info['filter_by'] ) { < $t_accessible_custom_fields_ids[] = $t_cfid; < $t_accessible_custom_fields_names[] = $t_field_info['name']; < $t_accessible_custom_fields_types[] = $t_field_info['type']; < $t_accessible_custom_fields_values[] = custom_field_distinct_values( $t_field_info ); < } < } < < if( count( $t_accessible_custom_fields_ids ) > 0 ) { < $t_per_row = config_get( 'filter_custom_fields_per_row' ); < $t_num_custom_rows = ceil( count( $t_accessible_custom_fields_ids ) / $t_per_row ); --- > <br /> > <form method="post" name="filters<?php echo $t_form_name_suffix?>" id="filters_form<?php echo $t_form_name_suffix?>" action="<?php echo $t_action;?>"> > <input type="hidden" name="type" value="1" /> > <?php > if( $p_for_screen == false ) { > echo '<input type="hidden" name="print" value="1" />'; > echo '<input type="hidden" name="offset" value="0" />'; > } > ?> > <input type="hidden" name="page_number" value="<?php echo $t_page_number?>" /> > <input type="hidden" name="view_type" value="<?php echo $t_view_type?>" /> > <table class="width100" cellspacing="1"> > <?php > $t_filter_cols = config_get( 'filter_custom_fields_per_row' ); > if( $p_expanded ) { > $t_custom_cols = $t_filter_cols; > $t_current_user_access_level = current_user_get_access_level(); > $t_accessible_custom_fields_ids = array(); > $t_accessible_custom_fields_names = array(); > $t_accessible_custom_fields_values = array(); > $t_num_custom_rows = 0; > $t_per_row = 0; > > if( $p_custom_filter === null ) { > if( $t_user_id == $t_current_user_id ) { > $p_custom_filter = current_user_get_bug_filter(); > } else { > $p_custom_filter = user_get_bug_filter( $t_user_id, $t_project_id ); > } > } > > if( ON == config_get( 'filter_by_custom_fields' ) ) { > $t_custom_fields = custom_field_get_linked_ids( $t_project_id ); > foreach( $t_custom_fields as $t_cfid ) { > $t_field_info = custom_field_cache_row( $t_cfid, true ); > if( $t_field_info['access_level_r'] <= $t_current_user_access_level && $t_field_info['filter_by'] ) { > $t_accessible_custom_fields_ids[] = $t_cfid; > $t_accessible_custom_fields_names[] = $t_field_info['name']; > $t_accessible_custom_fields_types[] = $t_field_info['type']; > $t_accessible_custom_fields_values[] = custom_field_distinct_values( $t_field_info ); 2082,2084c2079,2081 < $t_filters_url = 'view_filters_page.php?for_screen=' . $p_for_screen; < if( 'advanced' == $t_view_type ) { < $t_filters_url = $t_filters_url . '&view_type=advanced'; --- > if( count( $t_accessible_custom_fields_ids ) > 0 ) { > $t_per_row = config_get( 'filter_custom_fields_per_row' ); > $t_num_custom_rows = ceil( count( $t_accessible_custom_fields_ids ) / $t_per_row ); 2086c2083 < $t_filters_url = $t_filters_url . '&target_field='; --- > } 2088,2089c2085,2089 < $t_show_build = config_get( 'enable_product_build' ); < $t_show_product_version = ( ON == config_get( 'show_product_version' ) ) || (( AUTO == config_get( 'show_product_version' ) ) && ( count( version_get_all_rows_with_subs( $t_project_id ) ) > 0 ) ); --- > $t_filters_url = 'view_filters_page.php?for_screen=' . $p_for_screen; > if( 'advanced' == $t_view_type ) { > $t_filters_url = $t_filters_url . '&view_type=advanced'; > } > $t_filters_url = $t_filters_url . '&target_field='; 2091,2097c2091,2095 < # overload handler_id setting if user isn't supposed to see them (ref #6189) < if( !access_has_project_level( config_get( 'view_handler_threshold' ), $t_project_id ) ) { < $t_filter[FILTER_PROPERTY_HANDLER_ID] = array( < META_FILTER_ANY, < ); < } < ?> --- > # overload handler_id setting if user isn't supposed to see them (ref #6189) > if( !access_has_project_level( config_get( 'view_handler_threshold' ), $t_project_id ) ) { > $t_filter[FILTER_PROPERTY_HANDLER_ID] = array( META_FILTER_ANY,); > } > ?> 2099,2102c2097,2105 < <tr <?php echo "class=\"" . $t_trclass . "\"";?>> < <td class="small-caption" valign="top"> < <a href="<?php echo $t_filters_url . FILTER_PROPERTY_REPORTER_ID . '[]';?>" id="reporter_id_filter"><?php echo lang_get( 'reporter' )?>:</a> < </td> --- > <tr <?php echo "class=\"" . $t_trclass . "\"";?>> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_REPORTER_ID] ) ) { ?> > <td class="small-caption" valign="top"> > <a href="<?php echo $t_filters_url . FILTER_PROPERTY_REPORTER_ID . '[]';?>" id="reporter_id_filter"><?php echo lang_get( 'reporter' )?>:</a> > </td> > <?PHP } ?> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_MONITOR_USER_ID] ) ) { ?> 2105a2109,2111 > <?PHP } ?> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_HANDLER_ID] ) ) { ?> 2108a2115,2164 > <?PHP } ?> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_CATEGORY] ) ) { ?> > <td colspan="2" class="small-caption" valign="top"> > <a href="<?php echo $t_filters_url . FILTER_PROPERTY_CATEGORY . '[]';?>" id="show_category_filter"><?php echo lang_get( 'category' )?>:</a> > </td> > <?PHP } ?> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_SEVERITY_ID] ) ) { ?> > <td class="small-caption" valign="top"> > <a href="<?php echo $t_filters_url . FILTER_PROPERTY_SEVERITY_ID . '[]';?>" id="show_severity_filter"><?php echo lang_get( 'severity' )?>:</a> > </td> > <?PHP } ?> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_RESOLUTION_ID] ) ) { ?> > <td class="small-caption" valign="top"> > <a href="<?php echo $t_filters_url . FILTER_PROPERTY_RESOLUTION_ID . '[]';?>" id="show_resolution_filter"><?php echo lang_get( 'resolution' )?>:</a> > </td> > <?PHP } ?> > > <?php if( ON == config_get( 'enable_profiles' ) ) { ?> > <td class="small-caption" valign="top"> > <a href="<?php echo $t_filters_url . 'show_profile[]';?>" id="show_profile_filter"><?php echo lang_get( 'profile' )?>:</a> > </td> > <?php } ?> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_STATUS_ID] ) ) { ?> > <td class="small-caption" valign="top"> > <a href="<?php echo $t_filters_url . FILTER_PROPERTY_STATUS_ID . '[]';?>" id="show_status_filter"><?php echo lang_get( 'status' )?>:</a> > </td> > <?PHP } ?> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_HIDE_STATUS_ID] ) ) { ?> > <?php if( 'simple' == $t_view_type ) {?> > <td class="small-caption" valign="top"> > <a href="<?php echo $t_filters_url . FILTER_PROPERTY_HIDE_STATUS_ID . '[]';?>" id="hide_status_filter"><?php echo lang_get( 'hide_status' )?>:</a> > </td> > <?php }?> > <?PHP } ?> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_PRODUCT_BUILD] ) ) { ?> > <?php if ( $t_show_build ) { ?> > <td class="small-caption" valign="top"> > <a href="<?php echo $t_filters_url . FILTER_PROPERTY_PRODUCT_BUILD . '[]';?>" id="show_build_filter"><?php echo lang_get( 'product_build' )?>:</a> > </td> > <?php } ?> > <?PHP } ?> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_PRODUCT_VERSION] ) ) { ?> > <?php if( $t_show_product_version ) {?> 2110c2166 < <a href="<?php echo $t_filters_url . FILTER_PROPERTY_CATEGORY . '[]';?>" id="show_category_filter"><?php echo lang_get( 'category' )?>:</a> --- > <a href="<?php echo $t_filters_url . FILTER_PROPERTY_PRODUCT_VERSION . '[]';?>" id="show_version_filter"><?php echo lang_get( 'product_version' )?>:</a> 2112,2113c2168,2173 < <td class="small-caption" valign="top"> < <a href="<?php echo $t_filters_url . FILTER_PROPERTY_SEVERITY_ID . '[]';?>" id="show_severity_filter"><?php echo lang_get( 'severity' )?>:</a> --- > <?PHP } ?> > <?PHP } ?> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_FIXED_IN_VERSION] ) ) { ?> > <td colspan="1" class="small-caption" valign="top"> > <a href="<?php echo $t_filters_url . FILTER_PROPERTY_FIXED_IN_VERSION . '[]';?>" id="show_fixed_in_version_filter"><?php echo lang_get( 'fixed_in_version' )?>:</a> 2115,2116c2175,2226 < <td class="small-caption" valign="top"> < <a href="<?php echo $t_filters_url . FILTER_PROPERTY_RESOLUTION_ID . '[]';?>" id="show_resolution_filter"><?php echo lang_get( 'resolution' )?>:</a> --- > <?php }?> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_PRIORITY_ID] ) ) { ?> > <td colspan="1" class="small-caption" valign="top"> > <a href="<?php echo $t_filters_url . FILTER_PROPERTY_PRIORITY_ID . '[]';?>" id="show_priority_filter"><?php echo lang_get( 'priority' )?>:</a> > </td> > <?PHP } ?> > > <?php if( $t_filter_cols > 8 ) { > echo '<td class="small-caption" valign="top" colspan="' . ( $t_filter_cols - 8 ) . '"> </td>'; > }?> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_ISSUES_PER_PAGE] ) ) { ?> > <td class="small-caption" valign="top"> > <a href="<?php echo $t_filters_url . FILTER_PROPERTY_ISSUES_PER_PAGE;?>" id="per_page_filter"><?php echo lang_get( 'show' )?>:</a> > </td> > <?PHP } ?> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_VIEW_STATE_ID] ) ) { ?> > <td class="small-caption" valign="top"> > <a href="<?php echo $t_filters_url . FILTER_PROPERTY_VIEW_STATE_ID;?>" id="view_state_filter"><?php echo lang_get( 'view_status' )?>:</a> > </td> > <?PHP } ?> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_SHOW_STICKY_ISSUES] ) ) { ?> > <td class="small-caption" valign="top"> > <a href="<?php echo $t_filters_url . FILTER_PROPERTY_SHOW_STICKY_ISSUES;?>" id="sticky_issues_filter"><?php echo lang_get( 'sticky' )?>:</a> > </td> > <?PHP } ?> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_HIGHLIGHT_CHANGED] ) ) { ?> > <td class="small-caption" valign="top" colspan="2"> > <a href="<?php echo $t_filters_url . FILTER_PROPERTY_HIGHLIGHT_CHANGED;?>" id="highlight_changed_filter"><?php echo lang_get( 'changed' )?>:</a> > </td> > <?PHP } ?> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_NOTE_USER_ID] ) ) { ?> > <td class="small-caption category2" valign="top"> > <a href="<?php echo $t_filters_url . FILTER_PROPERTY_NOTE_USER_ID;?>" id="note_user_id_filter"><?php echo lang_get( 'note_user_id' )?>:</a> > </td> > <?PHP } ?> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_FILTER_BY_DATE] ) ) { ?> > <td class="small-caption" valign="top" > > <a href="<?php echo $t_filters_url . FILTER_PROPERTY_FILTER_BY_DATE;?>" id="do_filter_by_date_filter"><?php echo lang_get( 'use_date_filters' )?>:</a> > </td> > <?PHP } ?> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_RELATIONSHIP_TYPE] ) ) { ?> > > <td class="small-caption" valign="top" colspan="2"> > <a href="<?php echo $t_filters_url . FILTER_PROPERTY_RELATIONSHIP_TYPE;?>" id="relationship_type_filter"><?php echo lang_get( 'bug_relationships' )?>:</a> 2118,2126c2228 < <td class="small-caption" valign="top"> < <?php if( ON == config_get( 'enable_profiles' ) ) { ?> < <a href="<?php echo $t_filters_url . 'show_profile[]';?>" id="show_profile_filter"><?php echo lang_get( 'profile' )?>:</a> < <?php } ?> < </td> < <?php if( $t_filter_cols > 8 ) { < echo '<td class="small-caption" valign="top" colspan="' . ( $t_filter_cols - 8 ) . '"> </td>'; < }?> < </tr> --- > <?PHP } ?> 2128,2131c2230,2247 < <tr class="row-1"> < <td class="small-caption" valign="top" id="reporter_id_filter_target"> < <?php < $t_output = ''; --- > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_TAG_STRING] ) ) { ?> > <td class="small-caption" valign="top" colspan="5"> > <?php if ( access_has_global_level( config_get( 'tag_view_threshold' ) ) ) { ?> > <a href="<?php echo $t_filters_url . FILTER_PROPERTY_TAG_STRING;?>" id="tag_string_filter"><?php echo lang_get( 'tags' )?>:</a> > <?php } ?> > </td> > <?PHP } ?> > > <?php if( $t_filter_cols > 8 ) { > echo '<td class="small-caption" valign="top" colspan="' . ( $t_filter_cols - 8 ) . '"> </td>'; > }?> > > </tr> <tr class="row-1"> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_REPORTER_ID] ) ) { ?> > <td class="small-caption" valign="top" id="reporter_id_filter_target"> > <?php > $t_output = ''; 2168a2285,2287 > <?PHP } ?> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_MONITOR_USER_ID] ) ) { ?> 2206a2326,2328 > <?PHP } ?> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_HANDLER_ID] ) ) { ?> 2246c2368,2371 < <td colspan="2" class="small-caption" valign="top" id="show_category_filter_target"> --- > <?PHP } ?> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_CATEGORY] ) ) { ?> > <td colspan="2" class="small-caption" valign="top" id="show_category_filter_target"> 2276a2402,2405 > <?PHP } ?> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_SEVERITY_ID] ) ) { ?> > 2307a2437,2440 > > <?PHP } ?> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_RESOLUTION_ID] ) ) { ?> 2341c2474,2477 < <?php if( ON == config_get( 'enable_profiles' ) ) { ?> --- > > <?PHP } ?> > > <?php if( ON == config_get( 'enable_profiles' ) ) { ?> 2377,2429c2513,2516 < <?php } else { ?> < <td></td> < <?php } < if( $t_filter_cols > 8 ) { < echo '<td class="small-caption" valign="top" colspan="' . ( $t_filter_cols - 8 ) . '"> </td>'; < }?> < </tr> < < <tr <?php echo "class=\"" . $t_trclass . "\"";?>> < <td class="small-caption" valign="top"> < <a href="<?php echo $t_filters_url . FILTER_PROPERTY_STATUS_ID . '[]';?>" id="show_status_filter"><?php echo lang_get( 'status' )?>:</a> < </td> < <td class="small-caption" valign="top"> < <?php if( 'simple' == $t_view_type ) {?> < <a href="<?php echo $t_filters_url . FILTER_PROPERTY_HIDE_STATUS_ID . '[]';?>" id="hide_status_filter"><?php echo lang_get( 'hide_status' )?>:</a> < <?php < }?> < </td> < <td class="small-caption" valign="top"> < <?php if ( $t_show_build ) { ?> < <a href="<?php echo $t_filters_url . FILTER_PROPERTY_PRODUCT_BUILD . '[]';?>" id="show_build_filter"><?php echo lang_get( 'product_build' )?>:</a> < <?php } ?> < </td> < <?php if( $t_show_product_version ) {?> < <td colspan="2" class="small-caption" valign="top"> < <a href="<?php echo $t_filters_url . FILTER_PROPERTY_PRODUCT_VERSION . '[]';?>" id="show_version_filter"><?php echo lang_get( 'product_version' )?>:</a> < </td> < <td colspan="1" class="small-caption" valign="top"> < <a href="<?php echo $t_filters_url . FILTER_PROPERTY_FIXED_IN_VERSION . '[]';?>" id="show_fixed_in_version_filter"><?php echo lang_get( 'fixed_in_version' )?>:</a> < </td> < <?php < } else {?> < <td colspan="2" class="small-caption" valign="top"> < < </td> < <td colspan="1" class="small-caption" valign="top"> < < </td> < <?php < }?> < <td colspan="1" class="small-caption" valign="top"> < <a href="<?php echo $t_filters_url . FILTER_PROPERTY_PRIORITY_ID . '[]';?>" id="show_priority_filter"><?php echo lang_get( 'priority' )?>:</a> < </td> < <td colspan="1" class="small-caption" valign="top"> < <a href="<?php echo $t_filters_url . FILTER_PROPERTY_TARGET_VERSION . '[]';?>" id="show_target_version_filter"><?php echo lang_get( 'target_version' )?>:</a> < </td> < <?php if( $t_filter_cols > 8 ) { < echo '<td class="small-caption" valign="top" colspan="' . ( $t_filter_cols - 7 ) . '"> </td>'; < }?> < </tr> < < <tr class="row-1"> < <td class="small-caption" valign="top" id="show_status_filter_target"> --- > <?php } ?> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_STATUS_ID] ) ) { ?> > <td class="small-caption" valign="top" id="show_status_filter_target"> 2459a2547,2550 > <?PHP } ?> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_HIDE_STATUS_ID] ) ) { ?> > 2497c2588,2591 < <?php if ( $t_show_build ) { ?> --- > <?PHP } ?> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_PRODUCT_BUILD] ) ) { ?> > <?php if ( $t_show_build ) { ?> 2532,2534c2626,2629 < <?php } else { ?> < <td class="small-caption" valign="top"></td> < <?php } --- > <?PHP }} ?> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PRODUCT_VERSION] ) ) { > 2571a2667,2669 > <?PHP }} ?> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_FIXED_IN_VERSION] ) ) { ?> 2606,2616c2704,2707 < <?php < } else {?> < <td colspan="2" class="small-caption" valign="top"> < < </td> < <td colspan="1" class="small-caption" valign="top"> < < </td> < <?php < }?> < <td colspan="1" class="small-caption" valign="top" id="show_priority_filter_target"> --- > <?php }?> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_PRIORITY_ID] ) ) { ?> > <td colspan="1" class="small-caption" valign="top" id="show_priority_filter_target"> 2647,2710c2738,2740 < <td colspan="1" class="small-caption" valign="top" id="show_target_version_filter_target"> < <?php < $t_output = ''; < $t_any_found = false; < if( count( $t_filter[FILTER_PROPERTY_TARGET_VERSION] ) == 0 ) { < echo lang_get( 'any' ); < } else { < $t_first_flag = true; < foreach( $t_filter[FILTER_PROPERTY_TARGET_VERSION] as $t_current ) { < $t_current = stripslashes( $t_current ); < echo '<input type="hidden" name="', FILTER_PROPERTY_TARGET_VERSION, '[]" value="', string_display( $t_current ), '" />'; < $t_this_string = ''; < if( filter_field_is_any( $t_current ) ) { < $t_any_found = true; < } else if( filter_field_is_none( $t_current ) ) { < $t_this_string = lang_get( 'none' ); < } else { < $t_this_string = string_display( $t_current ); < } < if( $t_first_flag != true ) { < $t_output = $t_output . '<br />'; < } else { < $t_first_flag = false; < } < $t_output = $t_output . $t_this_string; < } < if( true == $t_any_found ) { < echo lang_get( 'any' ); < } else { < echo $t_output; < } < } < ?> < </td> < <?php if( $t_filter_cols > 8 ) { < echo '<td class="small-caption" valign="top" colspan="' . ( $t_filter_cols - 7 ) . '"> </td>'; < }?> < < </tr> < < <tr <?php echo "class=\"" . $t_trclass . "\"";?>> < <td class="small-caption" valign="top"> < <a href="<?php echo $t_filters_url . FILTER_PROPERTY_ISSUES_PER_PAGE;?>" id="per_page_filter"><?php echo lang_get( 'show' )?>:</a> < </td> < <td class="small-caption" valign="top"> < <a href="<?php echo $t_filters_url . FILTER_PROPERTY_VIEW_STATE_ID;?>" id="view_state_filter"><?php echo lang_get( 'view_status' )?>:</a> < </td> < <td class="small-caption" valign="top"> < <a href="<?php echo $t_filters_url . FILTER_PROPERTY_SHOW_STICKY_ISSUES;?>" id="sticky_issues_filter"><?php echo lang_get( 'sticky' )?>:</a> < </td> < <td class="small-caption" valign="top" colspan="2"> < <a href="<?php echo $t_filters_url . FILTER_PROPERTY_HIGHLIGHT_CHANGED;?>" id="highlight_changed_filter"><?php echo lang_get( 'changed' )?>:</a> < </td> < <td class="small-caption" valign="top" > < <a href="<?php echo $t_filters_url . FILTER_PROPERTY_FILTER_BY_DATE;?>" id="do_filter_by_date_filter"><?php echo lang_get( 'use_date_filters' )?>:</a> < </td> < <td class="small-caption" valign="top" colspan="2"> < <a href="<?php echo $t_filters_url . FILTER_PROPERTY_RELATIONSHIP_TYPE;?>" id="relationship_type_filter"><?php echo lang_get( 'bug_relationships' )?>:</a> < </td> < <?php if( $t_filter_cols > 8 ) { < echo '<td class="small-caption" valign="top" colspan="' . ( $t_filter_cols - 8 ) . '"> </td>'; < }?> < </tr> < <tr class="row-1"> --- > <?PHP } ?> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_ISSUES_PER_PAGE] ) ) { ?> 2717c2747,2750 < <td class="small-caption" valign="top" id="view_state_filter_target"> --- > <?PHP } ?> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_VIEW_STATE_ID] ) ) { ?> > <td class="small-caption" valign="top" id="view_state_filter_target"> 2729a2763,2765 > <?PHP } ?> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_SHOW_STICKY_ISSUES] ) ) { ?> 2736a2773,2776 > <?PHP } ?> > > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_HIGHLIGHT_CHANGED] ) ) { ?> 2742a2783,2827 > <?PHP } ?> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_NOTE_USER_ID] ) ) { ?> > <td class="small-caption" valign="top" id="note_user_id_filter_target"> > <?php > $t_output = ''; > $t_any_found = false; > if( count( $t_filter[FILTER_PROPERTY_NOTE_USER_ID] ) == 0 ) { > echo lang_get( 'any' ); > } else { > $t_first_flag = true; > foreach( $t_filter[FILTER_PROPERTY_NOTE_USER_ID] as $t_current ) { > echo '<input type="hidden" name="', FILTER_PROPERTY_NOTE_USER_ID, '[]" value="', $t_current, '" />'; > $t_this_name = ''; > if( filter_field_is_none( $t_current ) ) { > $t_this_name = lang_get( 'none' ); > } else if( filter_field_is_any( $t_current ) ) { > $t_any_found = true; > } else if( filter_field_is_myself( $t_current ) ) { > if( access_has_project_level( config_get( 'handle_bug_threshold' ) ) ) { > $t_this_name = '[' . lang_get( 'myself' ) . ']'; > } else { > $t_any_found = true; > } > } else { > $t_this_name = user_get_name( $t_current ); > } > if( $t_first_flag != true ) { > $t_output = $t_output . '<br />'; > } else { > $t_first_flag = false; > } > $t_output = $t_output . $t_this_name; > } > if( true == $t_any_found ) { > echo lang_get( 'any' ); > } else { > echo $t_output; > } > } > ?> > </td> > <?PHP } ?> > > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_FILTER_BY_DATE] ) ) { ?> 2813a2899 > <?PHP } ?> 2814a2901 > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_RELATIONSHIP_TYPE] ) ) { ?> 2829,2877c2916 < <?php if( $t_filter_cols > 8 ) { < echo '<td class="small-caption" valign="top" colspan="' . ( $t_filter_cols - 8 ) . '"> </td>'; < }?> < </tr> < <tr <?php echo "class=\"" . $t_trclass . "\"";?>> < <td class="small-caption" valign="top"> < <?php if( ON == config_get( 'enable_profiles' ) ) { ?> < <a href="<?php echo $t_filters_url . FILTER_PROPERTY_PLATFORM;?>" id="platform_filter"><?php echo lang_get( 'platform' )?>:</a> < <?php } ?> < </td> < <td class="small-caption" valign="top"> < <?php if( ON == config_get( 'enable_profiles' ) ) { ?> < <a href="<?php echo $t_filters_url . FILTER_PROPERTY_OS;?>" id="os_filter"><?php echo lang_get( 'os' )?>:</a> < <?php } ?> < </td> < <td class="small-caption" valign="top"> < <?php if( ON == config_get( 'enable_profiles' ) ) { ?> < <a href="<?php echo $t_filters_url . FILTER_PROPERTY_OS_BUILD;?>" id="os_build_filter"><?php echo lang_get( 'os_version' )?>:</a> < <?php } ?> < </td> < <td class="small-caption" valign="top" colspan="5"> < <?php if ( access_has_global_level( config_get( 'tag_view_threshold' ) ) ) { ?> < <a href="<?php echo $t_filters_url . FILTER_PROPERTY_TAG_STRING;?>" id="tag_string_filter"><?php echo lang_get( 'tags' )?>:</a> < <?php } ?> < </td> < <?php if( $t_filter_cols > 8 ) { < echo '<td class="small-caption" valign="top" colspan="' . ( $t_filter_cols - 8 ) . '"> </td>'; < }?> < </tr> < <tr class="row-1"> < <?php if( ON == config_get( 'enable_profiles' ) ) { ?> < <td class="small-caption" valign="top" id="platform_filter_target"> < <?php < print_multivalue_field( FILTER_PROPERTY_PLATFORM, $t_filter[FILTER_PROPERTY_PLATFORM] ); < ?> < </td> < <td class="small-caption" valign="top" id="os_filter_target"> < <?php < print_multivalue_field( FILTER_PROPERTY_OS, $t_filter[FILTER_PROPERTY_OS] ); < ?> < </td> < <td class="small-caption" valign="top" id="os_build_filter_target"> < <?php < print_multivalue_field( FILTER_PROPERTY_OS_BUILD, $t_filter[FILTER_PROPERTY_OS_BUILD] ); < ?> < </td> < <?php } else {?> < <td colspan="3"> </td> < <?php } ?> --- > <?PHP } ?> 2879c2918,2919 < <td class="small-caption" valign="top" id="tag_string_filter_target" colspan="5"> --- > <?PHP if( !filter_field_is_any( $p_custom_filter[FILTER_PROPERTY_TAG_STRING] ) ) { ?> > <td class="small-caption" valign="top" id="tag_string_filter_target" colspan="5"> 2890,2891c2930,2936 < </tr> < <?php --- > <?PHP } ?> > > <?php if( $t_filter_cols > 8 ) { > echo '<td class="small-caption" valign="top" colspan="' . ( $t_filter_cols - 8 ) . '"> </td>'; > }?> > </tr> > <?php 3014c3059 < ?> --- > ?> 3165,3282c3210 < <tr class="row-1"> < <td class="small-caption category2" valign="top"> < <a href="<?php echo $t_filters_url . FILTER_PROPERTY_NOTE_USER_ID;?>" id="note_user_id_filter"><?php echo lang_get( 'note_user_id' )?>:</a> < </td> < <td class="small-caption" valign="top" id="note_user_id_filter_target"> < <?php < $t_output = ''; < $t_any_found = false; < if( count( $t_filter[FILTER_PROPERTY_NOTE_USER_ID] ) == 0 ) { < echo lang_get( 'any' ); < } else { < $t_first_flag = true; < foreach( $t_filter[FILTER_PROPERTY_NOTE_USER_ID] as $t_current ) { < echo '<input type="hidden" name="', FILTER_PROPERTY_NOTE_USER_ID, '[]" value="', $t_current, '" />'; < $t_this_name = ''; < if( filter_field_is_none( $t_current ) ) { < $t_this_name = lang_get( 'none' ); < } else if( filter_field_is_any( $t_current ) ) { < $t_any_found = true; < } else if( filter_field_is_myself( $t_current ) ) { < if( access_has_project_level( config_get( 'handle_bug_threshold' ) ) ) { < $t_this_name = '[' . lang_get( 'myself' ) . ']'; < } else { < $t_any_found = true; < } < } else { < $t_this_name = user_get_name( $t_current ); < } < if( $t_first_flag != true ) { < $t_output = $t_output . '<br />'; < } else { < $t_first_flag = false; < } < $t_output = $t_output . $t_this_name; < } < if( true == $t_any_found ) { < echo lang_get( 'any' ); < } else { < echo $t_output; < } < } < ?> < </td> < <td class="small-caption" valign="top"> < <a href="<?php echo $t_filters_url . 'show_sort';?>" id="show_sort_filter"><?php echo lang_get( 'sort' )?>:</a> < </td> < <td class="small-caption" valign="top" id="show_sort_filter_target"> < <?php < $t_sort_fields = explode( ',', $t_filter[FILTER_PROPERTY_SORT_FIELD_NAME] ); < $t_dir_fields = explode( ',', $t_filter[FILTER_PROPERTY_SORT_DIRECTION] ); < < for( $i = 0;$i < 2;$i++ ) { < if( isset( $t_sort_fields[$i] ) ) { < if( 0 < $i ) { < echo ', '; < } < $t_sort = $t_sort_fields[$i]; < if( strpos( $t_sort, 'custom_' ) === 0 ) { < $t_field_name = string_display( lang_get_defaulted( utf8_substr( $t_sort, utf8_strlen( 'custom_' ) ) ) ); < } else { < $t_field_name = string_get_field_name( $t_sort ); < } < < echo $t_field_name . ' ' . lang_get( 'bugnote_order_' . utf8_strtolower( $t_dir_fields[$i] ) ); < echo '<input type="hidden" name="', FILTER_PROPERTY_SORT_FIELD_NAME, '_', $i, '" value="', $t_sort_fields[$i], '" />'; < echo '<input type="hidden" name="', FILTER_PROPERTY_SORT_DIRECTION, '_', $i, '" value="', $t_dir_fields[$i], '" />'; < } < } < ?> < </td> < <?php < if( 'advanced' == $t_view_type ) { < ?> < <td class="small-caption" valign="top" colspan="2"> < <a href="<?php echo $t_filters_url . FILTER_PROPERTY_PROJECT_ID;?>" id="project_id_filter"><?php echo lang_get( 'email_project' )?>:</a> < </td> < <td class="small-caption" valign="top" id="project_id_filter_target"> < <?php < $t_output = ''; < if( !is_array( $t_filter[FILTER_PROPERTY_PROJECT_ID] ) ) { < $t_filter[FILTER_PROPERTY_PROJECT_ID] = Array( < $t_filter[FILTER_PROPERTY_PROJECT_ID], < ); < } < if( count( $t_filter[FILTER_PROPERTY_PROJECT_ID] ) == 0 ) { < echo lang_get( 'current' ); < } else { < $t_first_flag = true; < foreach( $t_filter[FILTER_PROPERTY_PROJECT_ID] as $t_current ) { < echo '<input type="hidden" name="', FILTER_PROPERTY_PROJECT_ID, '[]" value="', $t_current, '" />'; < $t_this_name = ''; < if( META_FILTER_CURRENT == $t_current ) { < $t_this_name = lang_get( 'current' ); < } else { < $t_this_name = project_get_name( $t_current ); < } < if( $t_first_flag != true ) { < $t_output = $t_output . '<br />'; < } else { < $t_first_flag = false; < } < $t_output = $t_output . $t_this_name; < } < echo $t_output; < } < ?> < </td> < <?php < if( $t_filter_cols > 6 ) { < echo '<td class="small-caption" valign="top" colspan="' . ( $t_filter_cols - 5 ) . '"> </td>'; < } < } else { < if( $t_filter_cols > 3 ) { < echo '<td class="small-caption" valign="top" colspan="' . ( $t_filter_cols - 2 ) . '"> </td>'; < } < } < ?> < </tr> --- > 3288,3289c3216,3217 < <tr> < <td colspan="2"> --- > > <td colspan="1"> 3307,3321d3234 < $t_view_filters = config_get( 'view_filters' ); < if(( SIMPLE_ONLY != $t_view_filters ) && ( ADVANCED_ONLY != $t_view_filters ) ) { < if( 'advanced' == $t_view_type ) { < print_bracket_link( $f_switch_view_link . 'simple', lang_get( 'simple_filters' ) ); < } else { < print_bracket_link( $f_switch_view_link . 'advanced', lang_get( 'advanced_filters' ) ); < } < } < < if( access_has_project_level( config_get( 'create_permalink_threshold' ) ) ) { < print_bracket_link( 'permalink_page.php?url=' . urlencode( filter_get_url( $t_filter ) ), lang_get( 'create_filter_link' ), < < /* new window = */ < true ); < } 3355a3269,3274 > > <form method="get" name="set_query" action="view_filters_page.php?for_screen=1"> > <input type="submit" name="set_query_button" class="button-small" value="<?php echo 'Define Filter'?>" /> > </form> > > 3363a3283,3284 > > 3375c3296 < <?php --- > | ||||
Can you please provide this patch (and all future patches) in unified diff format so we can quickly see just the code you've changed? |
|
Have adjusted function "filter_draw_selection_area2" within filter_api.php. Will see if i find time to deliver in a different format |
|
Created the patchfile using winmerge. |
|