diff options
Diffstat (limited to 'rt/share/html/Search/Elements')
23 files changed, 113 insertions, 171 deletions
diff --git a/rt/share/html/Search/Elements/BuildFormatString b/rt/share/html/Search/Elements/BuildFormatString index 57c767911..376997229 100644 --- a/rt/share/html/Search/Elements/BuildFormatString +++ b/rt/share/html/Search/Elements/BuildFormatString @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -104,6 +104,7 @@ my @fields = ( Bookmark NEWLINE + NBSP ) ); # loc_qw diff --git a/rt/share/html/Search/Elements/Chart b/rt/share/html/Search/Elements/Chart index e25a9efd0..01b78c712 100644 --- a/rt/share/html/Search/Elements/Chart +++ b/rt/share/html/Search/Elements/Chart @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -48,7 +48,6 @@ <%args> $Query => "id > 0" $PrimaryGroupBy => 'Queue' -$SecondaryGroupBy => undef $ChartStyle => 'bars' </%args> <%init> @@ -89,65 +88,66 @@ my %loc_keys; foreach my $key (@keys) { $data{$key} = shift @values; $loc_keys{$key} = loc($key); } my @sorted_keys = map { $loc_keys{$_}} sort { $loc_keys{$a} cmp $loc_keys{$b} } keys %loc_keys; my @sorted_values = map { $data{$_}} sort { $loc_keys{$a} cmp $loc_keys{$b} } keys %loc_keys; - - my $query_string = $m->comp('/Elements/QueryString', %ARGS); -</%init> - -<% loc('Query:') %> <% $Query %><br /> +my ($i,$total); +</%init> +<div class="chart-wrapper"> +<span class="chart image"> % if (RT->Config->Get('DisableGD')) { <% loc('Graphical charts are not available.') %><br /> % } else { -<img src="<%RT->Config->Get('WebPath')%>/Search/Chart?<%$query_string|n%>" /><br /> +<img src="<%RT->Config->Get('WebPath')%>/Search/Chart?<%$query_string|n%>" /> % } - -<table class="collection-as-table"> +</span> +<table class="collection-as-table chart"> <tr> <th class="collection-as-table"><% loc($tix->Label($PrimaryGroupBy)) %> </th> <th class="collection-as-table"><&|/l&>Tickets</&> </th> </tr> -% my ($i,$total); -% while (my $key = shift @sorted_keys) { -% $i++; -% my $value = shift @sorted_values; -% $total += $value; -<tr class="<%$i%2 ? 'evenline' : 'oddline' %>"> +<%perl> + while (my $key = shift @sorted_keys) { + $i++; + my $value = shift @sorted_values; + $total += $value; +</%perl> +<tr class="<% $i%2 ? 'evenline' : 'oddline' %>"> +<%perl> +# TODO sadly we don't have "creator.city is null" or alike support yet +# so no link if the key is undef for now + if ( $PrimaryGroupBy !~ /(Hourly|Daily|Monthly|Annually)$/ + && $key ne loc('(no value)') ) { + my $group = $PrimaryGroupBy; $group =~ s! !.!; + my %orig_keys = reverse %loc_keys; + my $QueryString = $m->comp('/Elements/QueryString', + Query => "$Query and $group = '$orig_keys{$key}'", + Format => $ARGS{Format}, + Rows => $ARGS{Rows}, + OrderBy => $ARGS{OrderBy}, + Order => $ARGS{Order}, + ); +</%perl> <td class="label collection-as-table"> -%# TODO sadly we don't have "creator.city is null" or alike support yet -%# so no link if the key is undef for now -% if ( $PrimaryGroupBy !~ /(Hourly|Daily|Monthly|Annually)$/ -% && $key ne loc('(no value)') ) { -% my $group = $PrimaryGroupBy; $group =~ s! !.!; -% my %orig_keys = reverse %loc_keys; -% my $QueryString = $m->comp('/Elements/QueryString', -% Query => "$Query and $group = '$orig_keys{$key}'", -% Format => $ARGS{Format}, -% Rows => $ARGS{Rows}, -% OrderBy => $ARGS{OrderBy}, -% Order => $ARGS{Order}, -% ); <a href=<% RT->Config->Get('WebURL') %>Search/Results.html?<%$QueryString%>><%$key%></a> -% } else { -<% $key %> -% } </td> <td class="value collection-as-table"> -<%$value%> +<a href=<% RT->Config->Get('WebURL') %>Search/Results.html?<%$QueryString%>><%$value%></a> </td> +% } else { +<td class="label collection-as-table"><% $key %></td> +<td class="value collection-as-table"><% $value %></td> +% } </tr> % } %$i++; -<tr class="<%$i%2 ? 'evenline' : 'oddline' %>"> -<td class="label collection-as-table"> -<%loc('Total')%> -</td> -<td class="value collection-as-table"> -<%$total||''%> -</td> +<tr class="<%$i%2 ? 'evenline' : 'oddline' %> total"> +<td class="label collection-as-table"><%loc('Total')%></td> +<td class="value collection-as-table"><%$total||'0'%></td> </tr> </table> +<div class="query"><span class="label"><% loc('Query') %>:</span><span class="value"><% $Query %></span></div> +</div> diff --git a/rt/share/html/Search/Elements/ConditionRow b/rt/share/html/Search/Elements/ConditionRow index 65e217639..9d68b0925 100644 --- a/rt/share/html/Search/Elements/ConditionRow +++ b/rt/share/html/Search/Elements/ConditionRow @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Search/Elements/DisplayOptions b/rt/share/html/Search/Elements/DisplayOptions index c83035884..fbd497eb8 100644 --- a/rt/share/html/Search/Elements/DisplayOptions +++ b/rt/share/html/Search/Elements/DisplayOptions @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -46,91 +46,8 @@ %# %# END BPS TAGGED BLOCK }}} <&| /Widgets/TitleBox, title => loc("Sorting"), id => 'sorting' &> -<table valign="top"> - -% for my $o (0..3) { -% $Order[$o] ||= ''; $OrderBy[$o] ||= ''; -<tr> -<td class="label"> -% if ($o == 0) { -<&|/l&>Order by</&>: -% } -</td> -<td class="value"> -<select name="OrderBy"> -% if ($o > 0) { -<option value=""><&|/l&>~[none~]</&></option> -% } -% foreach my $field (sort keys %fields) { -% next unless $field; -<option value="<%$field%>" -% if (defined $OrderBy[$o] and $field eq $OrderBy[$o]) { -selected="selected" -% } -><% loc($field) %></option> -% } -</select> -<select name="Order"> -<option value="ASC" -% unless ( ($Order[$o]||'') eq "DESC" ) { -selected="selected" -% } -><&|/l&>Asc</&></option> -<option value="DESC" -% if ( ($Order[$o]||'') eq "DESC" ) { -selected="selected" -% } -><&|/l&>Desc</&></option> -</select> -</td> -</tr> -% } -<tr> -<td class="label"> -<&|/l&>Rows per page</&>: -</td><td class="value"> -<& /Elements/SelectResultsPerPage, - Name => "RowsPerPage", - Default => $RowsPerPage &> -</td> -</tr> -</table> +<& EditSort, %ARGS &> </&> <&| /Widgets/TitleBox, title => loc("Display Columns"), id => 'columns' &> <& EditFormat, %ARGS &> </&> - -<%INIT> -my $tickets = new RT::Tickets($session{'CurrentUser'}); -my %fields = %{$tickets->FIELDS}; -map { $fields{$_}->[0] =~ /^(?:ENUM|INT|DATE|STRING|ID)$/ || delete $fields{$_} } keys %fields; -delete $fields{'EffectiveId'}; -$fields{'Owner'} = 1; -$fields{ $_ . '.EmailAddress' } = 1 foreach( qw(Requestor Cc AdminCc) ); - -# Add all available CustomFields to the list of sortable columns. -my @cfs = grep /^CustomField/, @{$ARGS{AvailableColumns}}; -$fields{$_}=1 for @cfs; - -# Add PAW sort -$fields{'Custom.Ownership'} = 1; - -$fields{"Customer.$_"} = 1 foreach qw( Number Name ); #Freeside - -my @Order = split /\|/, $Order; -my @OrderBy = split /\|/, $OrderBy; -if ($Order =~ /\|/) { - @Order = split /\|/, $Order; -} else { - @Order = ( $Order ); -} - -</%INIT> - -<%ARGS> -$Order => undef -$OrderBy => undef -$RowsPerPage => undef -$Format => undef -$GroupBy => 'id' -</%ARGS> diff --git a/rt/share/html/Search/Elements/EditFormat b/rt/share/html/Search/Elements/EditFormat index bb869fe66..3eb5a9100 100644 --- a/rt/share/html/Search/Elements/EditFormat +++ b/rt/share/html/Search/Elements/EditFormat @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -45,7 +45,7 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<table> +<table class="edit-columns"> <tr> <th><&|/l&>Add Columns</&>:</th> @@ -62,8 +62,10 @@ <option value="<% $field %>"><% loc($field) %></option> % } </select></td> - -<td><&|/l&>Link</&>: +<td> +<div class="row"> +<span class="label"><&|/l&>Link</&>:</span> +<span class="value"> <select name="Link"> <option value="None">-</option> <option value="Display"><&|/l&>Display</&></option> @@ -72,19 +74,30 @@ <option value="Comment"><&|/l&>Comment</&></option> <option value="Resolve"><&|/l&>Resolve</&></option> </select> -<br /><&|/l&>Title</&>: <input name="Title" size="10" /> -<br /><&|/l&>Size</&>: -<select name="Size"> +</span> +</div> +<div class="row"> +<span class="label"><&|/l&>Title</&>:</span> +<span class="value"><input name="Title" size="10" /></span> +</div> +<div class="row"> +<span class="label"><&|/l&>Size</&>:</span> +<span class="value"><select name="Size"> <option value="">-</option> <option value="Small"><&|/l&>Small</&></option> <option value="Large"><&|/l&>Large</&></option> </select> -<br /><&|/l&>Style</&>: -<select name="Face"> +</span> +</div> +<div class="row"> +<span class="label"><&|/l&>Style</&>:</span> +<span class="value"><select name="Face"> <option value="">-</option> <option value="Bold"><&|/l&>Bold</&></option> <option value="Italic"><&|/l&>Italic</&></option> </select> +</span> +</div> </td> <td><input type="submit" class="button" name="AddCol" value=" → " /></td> diff --git a/rt/share/html/Search/Elements/EditQuery b/rt/share/html/Search/Elements/EditQuery index e6f649ea8..cfa8e0d1b 100644 --- a/rt/share/html/Search/Elements/EditQuery +++ b/rt/share/html/Search/Elements/EditQuery @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Search/Elements/EditSearches b/rt/share/html/Search/Elements/EditSearches index 08f84c70c..64309cb00 100644 --- a/rt/share/html/Search/Elements/EditSearches +++ b/rt/share/html/Search/Elements/EditSearches @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -45,14 +45,15 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} +<div class="edit-saved-searches"> <&| /Widgets/TitleBox, title => loc($Title)&> %# Hide all the save functionality if the user shouldn't see it. % if ( $can_modify ) { -<&|/l&>Privacy:</&> +<span class="label"><&|/l&>Privacy</&>:</span> <& SelectSearchObject, Name => 'SavedSearchOwner', Objects => \@Objects, Object => ( $Object && $Object->id ) ? $Object->Object : '' &> <br /> -<&|/l&>Description</&>: +<span class="label"><&|/l&>Description</&>:</span> <input size="25" name="SavedSearchDescription" value="<% $Description || '' %>" /> % if ($Id ne 'new') { @@ -67,19 +68,19 @@ </nobr> % } % if ( $Object && $Object->Id ) { -<input type="submit" class="button" name="SavedSearchSave" value="<%loc('Update')%>" /> +<input type="submit" class="button" id="SavedSearchSave" name="SavedSearchSave" value="<%loc('Update')%>" /> % } else { -<input type="submit" class="button" name="SavedSearchSave" value="<%loc('Save')%>" /> +<input type="submit" class="button" id="SavedSearchSave" name="SavedSearchSave" value="<%loc('Save')%>" /> %} % } <br /> <hr /> -<&|/l&>Load saved search:</&> +<span class="label"><&|/l&>Load saved search</&>:</span> <& SelectSearchesForObjects, Name => 'SavedSearchLoad', Objects => \@Objects, SearchType => $Type &> -<input type="submit" value="<% loc('Load') %>" class="button" /> +<input type="submit" value="<% loc('Load') %>" id="SavedSearchLoadSubmit" name="SavedSearchLoadSubmit" class="button" /> </&> - +</div> <%INIT> return unless $session{'CurrentUser'}->HasRight( Right => 'LoadSavedSearch', @@ -91,8 +92,8 @@ my $can_modify = $session{'CurrentUser'}->HasRight( Object => $RT::System, ); -use RT::SavedSearches; -my @Objects = RT::SavedSearches->new($session{CurrentUser})->_PrivacyObjects; +use RT::SavedSearch; +my @Objects = RT::SavedSearch->new($session{CurrentUser})->_PrivacyObjects; push @Objects, RT::System->new( $session{'CurrentUser'} ) if $session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'SuperUser' ); diff --git a/rt/share/html/Search/Elements/Graph b/rt/share/html/Search/Elements/Graph index 1cf1f1baa..ba2f4dbb8 100644 --- a/rt/share/html/Search/Elements/Graph +++ b/rt/share/html/Search/Elements/Graph @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Search/Elements/NewListActions b/rt/share/html/Search/Elements/NewListActions index 8c7846a19..db185da3b 100644 --- a/rt/share/html/Search/Elements/NewListActions +++ b/rt/share/html/Search/Elements/NewListActions @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Search/Elements/PickBasics b/rt/share/html/Search/Elements/PickBasics index e9534237b..7223b75dc 100644 --- a/rt/share/html/Search/Elements/PickBasics +++ b/rt/share/html/Search/Elements/PickBasics @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Search/Elements/PickCFs b/rt/share/html/Search/Elements/PickCFs index 9abab4443..4b9a88b77 100644 --- a/rt/share/html/Search/Elements/PickCFs +++ b/rt/share/html/Search/Elements/PickCFs @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -80,12 +80,19 @@ while ( my $CustomField = $CustomFields->Next ) { $line{'Field'} = $CustomField->Name; # Op - if ($CustomField->Type eq 'Date') { + if ($CustomField->Type =~ /^Date(Time)?$/ ) { $line{'Op'} = { Type => 'component', Path => '/Elements/SelectDateRelation', Arguments => {}, }; + } + elsif ($CustomField->Type =~ /^IPAddress(Range)?$/ ) { + $line{'Op'} = { + Type => 'component', + Path => '/Elements/SelectIPRelation', + Arguments => {}, + }; } else { $line{'Op'} = { Type => 'component', @@ -99,11 +106,12 @@ while ( my $CustomField = $CustomFields->Next ) { } # Value - if ($CustomField->Type eq 'Date') { + if ($CustomField->Type =~ /^Date(Time)?$/) { + my $is_datetime = $1 ? 1 : 0; $line{'Value'} = { Type => 'component', Path => '/Elements/SelectDate', - Arguments => {}, + Arguments => { $is_datetime ? (ShowTime => 1) : (ShowTime => 0), }, }; } else { $line{'Value'} = { diff --git a/rt/share/html/Search/Elements/PickCriteria b/rt/share/html/Search/Elements/PickCriteria index 5eb112d17..5d0b8af5e 100644 --- a/rt/share/html/Search/Elements/PickCriteria +++ b/rt/share/html/Search/Elements/PickCriteria @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Search/Elements/ResultsRSSView b/rt/share/html/Search/Elements/ResultsRSSView index f3b416a4e..5033c8c64 100644 --- a/rt/share/html/Search/Elements/ResultsRSSView +++ b/rt/share/html/Search/Elements/ResultsRSSView @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -70,7 +70,7 @@ if ( $m->request_comp->path =~ RT->Config->Get('WebNoAuthRegex') ) { # convert to perl strings $name = Encode::decode_utf8($name); - my $user = RT::User->new($RT::SystemUser); + my $user = RT::User->new(RT->SystemUser); $user->Load($name); $notfound->("Invalid user: $user") unless $user->id; @@ -102,7 +102,7 @@ $r->content_type('application/rss+xml'); # create an RSS 1.0 file (http://purl.org/rss/1.0/) use XML::RSS; - my $rss = new XML::RSS (version => '1.0'); + my $rss = XML::RSS->new(version => '1.0'); $rss->channel( title => RT->Config->Get('rtname').": Search " . $ARGS{'Query'}, link => RT->Config->Get('WebURL'), diff --git a/rt/share/html/Search/Elements/SearchPrivacy b/rt/share/html/Search/Elements/SearchPrivacy index f943af143..f36c1c894 100644 --- a/rt/share/html/Search/Elements/SearchPrivacy +++ b/rt/share/html/Search/Elements/SearchPrivacy @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Search/Elements/SearchesForObject b/rt/share/html/Search/Elements/SearchesForObject index 35007bde5..efbf22078 100644 --- a/rt/share/html/Search/Elements/SearchesForObject +++ b/rt/share/html/Search/Elements/SearchesForObject @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Search/Elements/SelectAndOr b/rt/share/html/Search/Elements/SelectAndOr index a644a71d8..ec19271b2 100644 --- a/rt/share/html/Search/Elements/SelectAndOr +++ b/rt/share/html/Search/Elements/SelectAndOr @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Search/Elements/SelectChartType b/rt/share/html/Search/Elements/SelectChartType index 42cd4e4b2..aeee7cdbc 100644 --- a/rt/share/html/Search/Elements/SelectChartType +++ b/rt/share/html/Search/Elements/SelectChartType @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Search/Elements/SelectGroup b/rt/share/html/Search/Elements/SelectGroup index 2ed965d42..ff5fc0786 100644 --- a/rt/share/html/Search/Elements/SelectGroup +++ b/rt/share/html/Search/Elements/SelectGroup @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -55,7 +55,7 @@ </select> <%INIT> -my $groups = new RT::Groups($session{'CurrentUser'}); +my $groups = RT::Groups->new($session{'CurrentUser'}); $groups->Limit(FIELD => 'Domain', OPERATOR => '=', VALUE => $Domain); </%INIT> diff --git a/rt/share/html/Search/Elements/SelectGroupBy b/rt/share/html/Search/Elements/SelectGroupBy index fbf19addb..9a6951a82 100644 --- a/rt/share/html/Search/Elements/SelectGroupBy +++ b/rt/share/html/Search/Elements/SelectGroupBy @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Search/Elements/SelectLinks b/rt/share/html/Search/Elements/SelectLinks index 20c0dd311..0b7ce1251 100644 --- a/rt/share/html/Search/Elements/SelectLinks +++ b/rt/share/html/Search/Elements/SelectLinks @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Search/Elements/SelectPersonType b/rt/share/html/Search/Elements/SelectPersonType index 6454acff3..d07e49c22 100644 --- a/rt/share/html/Search/Elements/SelectPersonType +++ b/rt/share/html/Search/Elements/SelectPersonType @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Search/Elements/SelectSearchObject b/rt/share/html/Search/Elements/SelectSearchObject index d1b38abf0..6a511027e 100644 --- a/rt/share/html/Search/Elements/SelectSearchObject +++ b/rt/share/html/Search/Elements/SelectSearchObject @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Search/Elements/SelectSearchesForObjects b/rt/share/html/Search/Elements/SelectSearchesForObjects index eafe88843..5f3169bbd 100644 --- a/rt/share/html/Search/Elements/SelectSearchesForObjects +++ b/rt/share/html/Search/Elements/SelectSearchesForObjects @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -51,10 +51,11 @@ $Name => undef $SearchType => 'Ticket', </%args> <select id="<%$Name%>" name="<%$Name%>"> -<option value="" selected> </option> +<option value="">-</option> % foreach my $object (@Objects) { -<optgroup label="<& SearchPrivacy, Object => $object &>"> % my @searches = $object->Attributes->Named('SavedSearch'); +% if ( @searches ) { +<optgroup label="<& SearchPrivacy, Object => $object &>"> % foreach my $search (@searches) { % # Skip it if it is not of search type we want. % next if ($search->SubValue('SearchType') @@ -63,4 +64,5 @@ $SearchType => 'Ticket', % } </optgroup> % } +% } </select> |