Skip to content

Commit

Permalink
Changed position and label of 'Changed(Hrs)' filter
Browse files Browse the repository at this point in the history
This setting is actually not a filter but a display option that
just highlights the last updated date. The field has been moved next to
'Sort by', and its label changed to reflect its real function.

Fixes #7737

This is a port of the original 1.2.x commits from the pull request
(squashed).

Signed-off-by: Damien Regad <dregad@mantisbt.org>
  • Loading branch information
langerheiko authored and dregad committed Feb 13, 2014
1 parent b90d6fc commit cbe44c0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
25 changes: 18 additions & 7 deletions core/filter_api.php
Expand Up @@ -2854,7 +2854,6 @@ function filter_draw_selection_area2( $p_page_number, $p_for_screen = true, $p_e
<a href="<?php echo $t_filters_url . FILTER_PROPERTY_STICKY;?>" id="sticky_issues_filter"<?php echo $t_dynamic_filter_expander_class ?>><?php echo lang_get( 'sticky_label' )?></a>
</td>
<td class="small-caption" colspan="2">
<a href="<?php echo $t_filters_url . FILTER_PROPERTY_HIGHLIGHT_CHANGED;?>" id="highlight_changed_filter"<?php echo $t_dynamic_filter_expander_class ?>><?php echo lang_get( 'changed_label' )?></a>
</td>
<td class="small-caption" >
<a href="<?php echo $t_filters_url . FILTER_PROPERTY_FILTER_BY_DATE;?>" id="do_filter_by_date_filter"<?php echo $t_dynamic_filter_expander_class ?>><?php echo lang_get( 'use_date_filters_label' )?></a>
Expand Down Expand Up @@ -2895,11 +2894,7 @@ function filter_draw_selection_area2( $p_page_number, $p_for_screen = true, $p_e
echo FILTER_PROPERTY_STICKY; ?>" value="<?php
echo $t_sticky_filter_state ? 'on' : 'off'; ?>" />
</td>
<td class="small-caption" colspan="2" id="highlight_changed_filter_target">
<?php
echo $t_filter[FILTER_PROPERTY_HIGHLIGHT_CHANGED];
echo '<input type="hidden" name="', FILTER_PROPERTY_HIGHLIGHT_CHANGED, '" value="', string_attribute( $t_filter[FILTER_PROPERTY_HIGHLIGHT_CHANGED] ), '" />';
?>
<td class="small-caption" colspan="2">&#160;
</td>
<td class="small-caption" id="do_filter_by_date_filter_target">
<?php
Expand Down Expand Up @@ -3431,7 +3426,23 @@ function filter_draw_selection_area2( $p_page_number, $p_for_screen = true, $p_e
?>
<input type="hidden" name="match_type" value="<?php echo $t_filter[FILTER_PROPERTY_MATCH_TYPE] ?>"/>
</td>
<td colspan="6">&#160;</td>

<td class="small-caption category2">
<a id="highlight_changed_filter"
href="<?php echo $t_filters_url . FILTER_PROPERTY_HIGHLIGHT_CHANGED; ?>"
<?php #echo $t_dynamic_filter_expander_class; ?>>
<?php echo lang_get( 'changed_label' )?>
</a>
</td>
<td class="small-caption" valign="top" id="highlight_changed_filter_target">
<?php echo $t_filter[FILTER_PROPERTY_HIGHLIGHT_CHANGED]; ?>
<input type="hidden"
name="<?php echo FILTER_PROPERTY_HIGHLIGHT_CHANGED; ?>"
value="<?php echo string_attribute( $t_filter[FILTER_PROPERTY_HIGHLIGHT_CHANGED] ); ?>"
/>
</td>

<td colspan="4">&#160;</td>
</tr>
</table>
<?php
Expand Down
4 changes: 2 additions & 2 deletions lang/strings_english.txt
Expand Up @@ -1169,8 +1169,8 @@ $s_any = 'any';
$s_all = 'all';
$s_show = 'Show';
$s_show_label = 'Show:';
$s_changed = 'Changed(hrs)';
$s_changed_label = 'Changed(hrs):';
$s_changed = 'Highlight changed (hours)';
$s_changed_label = 'Highlight changed (hours):';
$s_viewing_bugs_title = 'Viewing Issues';
$s_updated = 'Updated';
$s_sticky = 'Show Sticky Issues';
Expand Down

0 comments on commit cbe44c0

Please sign in to comment.