diff options
Diffstat (limited to 'rt/html/Search/Elements')
-rw-r--r-- | rt/html/Search/Elements/BuildFormatString | 27 | ||||
-rw-r--r-- | rt/html/Search/Elements/DisplayOptions | 73 | ||||
-rw-r--r-- | rt/html/Search/Elements/EditFormat | 30 | ||||
-rw-r--r-- | rt/html/Search/Elements/EditQuery | 24 | ||||
-rw-r--r-- | rt/html/Search/Elements/EditSearches | 59 | ||||
-rw-r--r-- | rt/html/Search/Elements/NewListActions | 14 | ||||
-rw-r--r-- | rt/html/Search/Elements/PickBasics | 65 | ||||
-rw-r--r-- | rt/html/Search/Elements/PickCFs | 6 | ||||
-rw-r--r-- | rt/html/Search/Elements/PickCriteria | 20 | ||||
-rw-r--r-- | rt/html/Search/Elements/SearchPrivacy | 6 | ||||
-rw-r--r-- | rt/html/Search/Elements/SelectAndOr | 10 | ||||
-rw-r--r-- | rt/html/Search/Elements/SelectGroup | 14 | ||||
-rw-r--r-- | rt/html/Search/Elements/SelectLinks | 12 | ||||
-rw-r--r-- | rt/html/Search/Elements/SelectPersonType | 16 | ||||
-rw-r--r-- | rt/html/Search/Elements/SelectSearchObject | 6 | ||||
-rw-r--r-- | rt/html/Search/Elements/SelectSearchesForObjects | 11 |
16 files changed, 222 insertions, 171 deletions
diff --git a/rt/html/Search/Elements/BuildFormatString b/rt/html/Search/Elements/BuildFormatString index cffb81a48..3bd39b5c2 100644 --- a/rt/html/Search/Elements/BuildFormatString +++ b/rt/html/Search/Elements/BuildFormatString @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -171,12 +173,12 @@ elsif ( $AddCol ) { $column{Column} = $col; if ( $Face eq "Bold" ) { - $column{Prefix} .= "<B>"; - $column{Suffix} .= "</B>"; + $column{Prefix} .= "<b>"; + $column{Suffix} .= "</b>"; } if ( $Face eq "Italic" ) { - $column{Prefix} .= "<I>"; - $column{Suffix} .= "</I>"; + $column{Prefix} .= "<i>"; + $column{Suffix} .= "</i>"; } if ($Size) { $column{Prefix} .= "<" . $m->interp->apply_escapes( $Size, 'h' ) . ">"; @@ -184,11 +186,11 @@ elsif ( $AddCol ) { } if ( $Link eq "Display" ) { $column{Prefix} .= - "<A HREF=\"" . $RT::WebPath . "/Ticket/Display.html?id=__id__\">"; + "<a HREF=\"" . $RT::WebPath . "/Ticket/Display.html?id=__id__\">"; $column{Suffix} .= "</a>"; } elsif ( $Link eq "Take" ) { - $column{Prefix} .= "<A HREF=\"" . $RT::WebPath + $column{Prefix} .= "<a HREF=\"" . $RT::WebPath . "/Ticket/Display.html?Action=Take&id=__id__\">"; $column{Suffix} .= "</a>"; } @@ -223,10 +225,13 @@ elsif ( $ColDown ) { my @format_string; foreach my $field (@seen) { next unless $field; - my $row = "'" . $field->{Prefix}; - $row .= "__" . $m->interp->apply_escapes( $field->{Column}, 'h' ) . "__" + my $row = "'"; + $row .= $field->{Prefix} if $field->{Prefix}; + $row .= "__" . ($field->{Column} =~ m/\(/ ? $field->{Column} # func, don't escape + : $m->interp->apply_escapes( $field->{Column}, 'h' )) . "__" unless ( $field->{Column} eq "<blank>" ); - $row .= $field->{Suffix} . "'"; + $row .= $field->{Suffix} if $field->{Suffix}; + $row .= "'"; push( @format_string, $row ); } diff --git a/rt/html/Search/Elements/DisplayOptions b/rt/html/Search/Elements/DisplayOptions index 43a9d9998..cc57f96dc 100644 --- a/rt/html/Search/Elements/DisplayOptions +++ b/rt/html/Search/Elements/DisplayOptions @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,43 +45,53 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<& /Elements/TitleBoxStart, title => loc("Display Columns") &> -<table> +<&| /Widgets/TitleBox, title => loc("Display Columns") &> +<table width="100%"> <tr> <td> <& EditFormat, %ARGS &> </td> -<td valign=top> -<table valign=top> +<td valign="top"> +<table valign="top"> + +% for my $o (0..3) { <tr> -<td class=label> +<td class="label"> +% if ($o == 0) { <&|/l&>Order by</&>: -</td><td class=value> +% } +</td> +<td class="value"> <select name="OrderBy"> -% foreach my $field (keys %fields) { +% if ($o > 0) { +<option value=""><&|/l&>~[none~]</&></option> +% } +% foreach my $field (sort keys %fields) { % next unless $field; -<option value=<%$field%> -% if ($field =~ /^$OrderBy$/i) { -SELECTED +<option value="<%$field%>" +% if (defined $OrderBy[$o] and $field eq $OrderBy[$o]) { +selected % } ><&|/l&><%$field%></&></option> % } </select> <select name="Order"> <option value="ASC" -% if ($Order eq "ASC") { -SELECTED +% unless ( ($Order[$o]||'') eq "DESC" ) { +selected % } -><&|/l&>Ascending</&></option> +><&|/l&>Asc</&></option> <option value="DESC" -% if ($Order eq "DESC") { -SELECTED +% if ( ($Order[$o]||'') eq "DESC" ) { +selected % } -><&|/l&>Descending</&></option> +><&|/l&>Desc</&></option> </select> </td> </tr> -<td class=label> +% } +<tr> +<td class="label"> <&|/l&>Rows per page</&>: </td><td class="value"> <& /Elements/SelectResultsPerPage, @@ -91,14 +103,34 @@ SELECTED </td> </tr> </table> -<& /Elements/TitleBoxEnd &> +</&> <%INIT> my $tickets = new RT::Tickets($session{'CurrentUser'}); my %fields = %{$tickets->FIELDS}; map { $fields{$_}->[0] =~ /^(?:ENUM|INT|DATE|STRING)$/ || delete $fields{$_} } keys %fields; delete $fields{'EffectiveId'}; +$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; +my @Order; +my @OrderBy; +if ($OrderBy =~ /\|/) { + @OrderBy = split /\|/, $OrderBy; +} else { + @OrderBy = ( $OrderBy ); +} +if ($Order =~ /\|/) { + @Order = split /\|/, $Order; +} else { + @Order = ( $Order ); +} </%INIT> @@ -107,4 +139,5 @@ $Order => undef $OrderBy => undef $RowsPerPage => undef $Format => undef +$GroupBy => 'id' </%ARGS> diff --git a/rt/html/Search/Elements/EditFormat b/rt/html/Search/Elements/EditFormat index dc8720f26..fa0ac96e0 100644 --- a/rt/html/Search/Elements/EditFormat +++ b/rt/html/Search/Elements/EditFormat @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -56,7 +58,7 @@ <&|/l&>Show Columns</&>: </td> <tr> -<td valign=top> +<td valign="top"> <select size="6" name="SelectDisplayColumns" multiple> % foreach my $field ( @$AvailableColumns) { <option value="<%$field%>"><% loc( $field) %></option> @@ -71,14 +73,14 @@ <option value="Display"><&|/l&>Display</&></option> <option value="Take"><&|/l&>Take</&></option> </select> -<br><&|/l&>Title</&>: <input name="Title" size=10> -<br><&|/l&>Size</&>: +<br /><&|/l&>Title</&>: <input name="Title" size="10" /> +<br /><&|/l&>Size</&>: <select name="Size"> <option value="">-</option> <option value="Small"><&|/l&>Small</&></option> <option value="Large"><&|/l&>Large</&></option> </select> -<br><&|/l&>Style</&>: +<br /><&|/l&>Style</&>: <select name="Face"> <option value="">-</option> <option value="Bold"><&|/l&>Bold</&></option> @@ -86,24 +88,24 @@ </select> </td> <td> -<input type=submit name="AddCol" value="->"> +<input type="submit" class="button" name="AddCol" value=" → " /> </td> -<td valign=top> -<select size=4 name="CurrentDisplayColumns"> +<td valign="top"> +<select size="4" name="CurrentDisplayColumns"> % my $i=0; % foreach my $field (@$CurrentFormat) { <option value="<%$i++%>><%$field->{Column}%>"> <%loc( $field->{Column}) %></option> % } </select> -<br> +<br /> <center> -<input type="submit" name="ColUp" value="^"> -<input type="submit" name="ColDown" value="v"> -<input type="submit" name="RemoveCol" value="<%loc('Delete')%>"> +<input type="submit" class="button" name="ColUp" value=" ↑ " /> +<input type="submit" class="button" name="ColDown" value=" ↓ " /> +<input type="submit" class="button" name="RemoveCol" value="<%loc('Delete')%>" /> </center> </td> -<td colspan=3 align=center> +<td colspan="3" align="center"> </td> </tr> </table> diff --git a/rt/html/Search/Elements/EditQuery b/rt/html/Search/Elements/EditQuery index 783541a64..5c40c2573 100644 --- a/rt/html/Search/Elements/EditQuery +++ b/rt/html/Search/Elements/EditQuery @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -44,20 +46,20 @@ %# %# END BPS TAGGED BLOCK }}} <& NewListActions, actions => $actions &> -<& /Elements/TitleBoxStart, title => join(': ', grep defined, loc("Query"), $Description) &> +<&|/Widgets/TitleBox, title => join(': ', grep defined, loc("Current search"), $Description) &> <select size="10" name="clauses" style="width: 100%" multiple> % $m->out($optionlist); </select> <p align="center"> -<input type=submit name="Up" value="^"> -<input type=submit name="Down" value="v"> -<input type=submit name="Left" value="<"> -<input type=submit name="Right" value=">"> -<input type=submit name="Toggle" value="<&|/l&>And/Or</&>"> -<input type=submit name="DeleteClause" value="<&|/l&>Delete</&>"> -%#<input type=submit name="EditQuery" value="Advanced"> +<input type="submit" class="button" name="Up" value=" ↑ " /> +<input type="submit" class="button" name="Down" value=" ↓ " /> +<input type="submit" class="button" name="Left" value=" ← " /> +<input type="submit" class="button" name="Right" value=" → " /> +<input type="submit" class="button" name="Toggle" value="<&|/l&>And/Or</&>" /> +<input type="submit" class="button" name="DeleteClause" value="<&|/l&>Delete</&>" /> +%#<input type="submit" class="button" name="EditQuery" value="Advanced" /> </p> -<& /Elements/TitleBoxEnd &> +</&> <%ARGS> $Description $optionlist diff --git a/rt/html/Search/Elements/EditSearches b/rt/html/Search/Elements/EditSearches index bc6b80e6f..3978ea320 100644 --- a/rt/html/Search/Elements/EditSearches +++ b/rt/html/Search/Elements/EditSearches @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,62 +45,59 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<& /Elements/TitleBoxStart, title => loc('Saved searches') &> +<&| /Widgets/TitleBox, title => loc($Title)&> %# Hide all the save functionality if the user shouldn't see it. % if ($session{'CurrentUser'}->HasRight( Right => 'CreateSavedSearch', % Object=> $RT::System )) { <&|/l&>Privacy:</&> % if ($CurrentSearch->{'Object'} && $CurrentSearch->{'Object'}->id) { -<& SearchPrivacy, Object => $CurrentSearch->{'Object'}->Object &><br> +<& SearchPrivacy, Object => $CurrentSearch->{'Object'}->Object &><br /> % } else { -<& SelectSearchObject, Name => 'Owner', Objects => \@Objects &><br> +<& SelectSearchObject, Name => 'Owner', Objects => \@Objects &><br /> % } <&|/l&>Description</&>:<br> -<font size="-1"><input size="25" name="Description" value="<%$CurrentSearch->{'Description'}%>"></font> -<nobr> +<font size="-1"><input size="25" name="Description" value="<%$CurrentSearch->{'Description'} || ''%>" /></font> % if ($SearchId ne 'new') { +<nobr> % if ($Dirty) { -<input type="submit" name="Revert" value="<%loc('Revert')%>"> +<input type="submit" class="button" name="Revert" value="<%loc('Revert')%>" /> % } -<input type="submit" name="Delete" value="<%loc('Delete')%>"> -<input type="submit" name="CopySearch" value="<%loc('Copy')%>"> -</nobr> - +<input type="submit" class="button" name="Delete" value="<%loc('Delete')%>" /> +% if ($AllowCopy) { +<input type="submit" class="button" name="CopySearch" value="<%loc('Copy')%>" /> % } +</nobr> -% if ($Dirty or $SearchId eq 'new') { -<input type="submit" name="Save" value="<%loc('Save')%>"> % } -<hr> +<input type="submit" name="Save" value="<%loc('Save')%>" class="button" /> +<hr /> % } -<&|/l&>Load saved search:</&><br> -<& SelectSearchesForObjects, Name => 'LoadSavedSearch', Objects => \@Objects&> -<input value="<%loc('Load')%>" type="submit"> -<& /Elements/TitleBoxEnd &> +<&|/l&>Load saved search:</&><br /> +<& SelectSearchesForObjects, Name => 'LoadSavedSearch', Objects => \@Objects, SearchType => $SearchType &> +<input value="<%loc('Load')%>" type="submit" class="button" /> +</&> <%init> - unless ($session{'CurrentUser'}->HasRight( Right => 'LoadSavedSearch', - Object=> $RT::System )) { + Object=> $RT::System )) { return; } -my @Objects; - -push @Objects, $session{CurrentUser}->UserObj; - -my $groups = RT::Groups->new($session{'CurrentUser'}); -$groups->LimitToUserDefinedGroups; -$groups->WithMember(PrincipalId => $session{'CurrentUser'}->Id, - Recursively => 1); +use RT::SavedSearches; +my @Objects = RT::SavedSearches->new($session{CurrentUser})->_PrivacyObjects; +push @Objects, RT::System->new($session{'CurrentUser'}) + if $session{'CurrentUser'}->HasRight( Object=> $RT::System, + Right => 'SuperUser'); - push (@Objects, @{$groups->ItemsArrayRef()}); </%INIT> <%ARGS> +$SearchType => 'Ticket' $SearchId => undef $CurrentSearch => undef $Description => undef $HideResults => 0 $Dirty => 0 +$AllowCopy => 1 +$Title => 'Saved searches' </%ARGS> diff --git a/rt/html/Search/Elements/NewListActions b/rt/html/Search/Elements/NewListActions index eb82544f3..535ac8cb9 100644 --- a/rt/html/Search/Elements/NewListActions +++ b/rt/html/Search/Elements/NewListActions @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -44,19 +46,19 @@ %# %# END BPS TAGGED BLOCK }}} % if ($actions[0] ) { -<b><%loc('Results')%></b><br> +<b><%loc('Results')%></b><br /> % foreach my $action (@actions) { % next unless ($action); % my @item = @$action; % if ($item[1] < 0) { -<font color=red> +<font color="red"> % } - <%$item[0]%><BR> + <%$item[0]%><br /> % if ($item[1] < 0) { </font> % } % } -<BR> +<br /> % } <%init> @actions = grep (/./,@actions); diff --git a/rt/html/Search/Elements/PickBasics b/rt/html/Search/Elements/PickBasics index 8a48f6b18..44a378c14 100644 --- a/rt/html/Search/Elements/PickBasics +++ b/rt/html/Search/Elements/PickBasics @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -49,11 +51,11 @@ </td><td> <& /Elements/SelectEqualityOperator, Name => "idOp" &> </td><td> -<INPUT Name="ValueOfid" SIZE=5> +<input name="ValueOfid" size="5" /> </td> </tr> -<tr><td align=right> +<tr><td> <& /Elements/SelectAttachmentField, Name => 'AttachmentField' &> </td><td> <& /Elements/SelectBoolean, Name => "AttachmentOp", @@ -63,7 +65,7 @@ FalseVal => 'NOT LIKE' &> </td><td> -<Input Name="ValueOfAttachment" Size=20> +<input name="ValueOfAttachment" size="20" /> </td> </tr> <tr> @@ -97,11 +99,11 @@ </td> </tr> <tr><td class="label"> -<SELECT NAME="ActorField"> -<OPTION VALUE="Owner"><&|/l&>Owner</&></OPTION> -<OPTION VALUE="Creator"><&|/l&>Creator</&></OPTION> -<OPTION VALUE="LastUpdatedBy"><&|/l&>LastUpdatedBy</&></OPTION> -</SELECT> +<select name="ActorField"> +<option value="Owner"><&|/l&>Owner</&></option> +<option value="Creator"><&|/l&>Creator</&></option> +<option value="LastUpdatedBy"><&|/l&>LastUpdatedBy</&></option> +</select> </td><td> <& /Elements/SelectBoolean, Name => "ActorOp", TrueVal=> '=', @@ -117,21 +119,7 @@ </td><td> <& /Elements/SelectMatch, Name => "WatcherOp" &> </td><td> -<Input Name="ValueOfWatcher" Size=20> -</tr> -<tr> -<td class="label"> -<& SelectPersonType, Name => 'WatcherGroupField', Default => 'RequestorGroup', Suffix => 'Group' &> -</td><td> -<& /Elements/SelectBoolean, Name => "WatcherGroupOp", - True=> loc('belongs to'), - False=> loc('does not belong to'), - TrueVal=> '=', - FalseVal => '!=' -&> -</td><td> -<& SelectGroup, Name => 'ValueOfWatcherGroup' &> -</td> +<input name="ValueOfWatcher" size="20" /> </tr> <tr> <td class="label"> @@ -143,28 +131,29 @@ </td></tr> <tr> <td class="label"> -<SELECT NAME="TimeField"> -<OPTION VALUE="TimeWorked"><&|/l&>Time Worked</&></OPTION> -<OPTION VALUE="TimeEstimated"><&|/l&>Time Estimated</&></OPTION> -<OPTION VALUE="TimeLeft"><&|/l&>Time Left</&></OPTION> -</SELECT> +<select name="TimeField"> +<option value="TimeWorked"><&|/l&>Time Worked</&></option> +<option value="TimeEstimated"><&|/l&>Time Estimated</&></option> +<option value="TimeLeft"><&|/l&>Time Left</&></option> +</select> </td><td> <& /Elements/SelectEqualityOperator, Name => "TimeOp" &> </td><td> -<INPUT Name="ValueOfTime" SIZE=5> +<input name="ValueOfTime" size="5" /> +<& /Elements/SelectTimeUnits, Name =>'ValueOfTime' &> </td> </tr> <tr> <td class="label"> -<SELECT NAME="PriorityField"> -<OPTION VALUE="Priority"><&|/l&>Priority</&></OPTION> -<OPTION VALUE="InitialPriority"><&|/l&>Initial Priority</&></OPTION> -<OPTION VALUE="FinalPriority"><&|/l&>Final Priority</&></OPTION> -</SELECT> +<select name="PriorityField"> +<option value="Priority"><&|/l&>Priority</&></option> +<option value="InitialPriority"><&|/l&>Initial Priority</&></option> +<option value="FinalPriority"><&|/l&>Final Priority</&></option> +</select> </td><td> <& /Elements/SelectEqualityOperator, Name => "PriorityOp" &> </td><td> -<INPUT Name="ValueOfPriority" SIZE=5> +<input name="ValueOfPriority" size="5" /> </td> </tr> <tr> @@ -177,7 +166,7 @@ TrueVal=> '=', FalseVal => '!=' &> </td><td> -<INPUT Name="ValueOfLinks" value="" SIZE=5> +<input name="ValueOfLinks" value="" size="5" /> </td></tr> <%INIT> my @people = ('Actor', diff --git a/rt/html/Search/Elements/PickCFs b/rt/html/Search/Elements/PickCFs index 435a07ad3..734f5f871 100644 --- a/rt/html/Search/Elements/PickCFs +++ b/rt/html/Search/Elements/PickCFs @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/Search/Elements/PickCriteria b/rt/html/Search/Elements/PickCriteria index 129344443..58b29fb57 100644 --- a/rt/html/Search/Elements/PickCriteria +++ b/rt/html/Search/Elements/PickCriteria @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,12 +45,12 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<& /Elements/TitleBoxStart, title => loc('Add Criteria')&> -<table width=100% cellspacing=0 cellpadding=0 border=0> +<&| /Widgets/TitleBox, title => loc('Add Criteria')&> +<table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td> - <table cellspacing=0 border=0> - <tr><td class=label> + <table cellspacing="0" border="0"> + <tr><td class="label"> <&|/l&>Aggregator</&>: </td> <td><& SelectAndOr, Name => "AndOr" &> @@ -61,8 +63,8 @@ </td> </tr> <tr> - <td valign=top> - <table cellspacing=0 border=0> + <td valign="top"> + <table cellspacing="0" border="0"> <& PickBasics &> <& PickCFs, cfqueues => \%cfqueues &> </table> @@ -71,7 +73,7 @@ <tr><td> </td></tr> </table> -<& /Elements/TitleBoxEnd &> +</&> <%ARGS> $addquery => 0 diff --git a/rt/html/Search/Elements/SearchPrivacy b/rt/html/Search/Elements/SearchPrivacy index 270e1baa3..745ba62ac 100644 --- a/rt/html/Search/Elements/SearchPrivacy +++ b/rt/html/Search/Elements/SearchPrivacy @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/Search/Elements/SelectAndOr b/rt/html/Search/Elements/SelectAndOr index 2f3c70477..c8122660a 100644 --- a/rt/html/Search/Elements/SelectAndOr +++ b/rt/html/Search/Elements/SelectAndOr @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,8 +45,8 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<input type=radio NAME="<%$Name%>" CHECKED VALUE="AND"><&|/l&>AND</&></input> -<input type=radio NAME="<%$Name%>" VALUE="OR"><&|/l&>OR</&></input> +<input type="radio" class="radio" name="<%$Name%>" checked value="AND" /><&|/l&>AND</&></input> +<input type="radio" class="radio" name="<%$Name%>" value="OR" /><&|/l&>OR</&></input> <%ARGS> $Name => "Operator" diff --git a/rt/html/Search/Elements/SelectGroup b/rt/html/Search/Elements/SelectGroup index edd53713f..3f78d3964 100644 --- a/rt/html/Search/Elements/SelectGroup +++ b/rt/html/Search/Elements/SelectGroup @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,14 +45,14 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<SELECT NAME="<%$Name%>"> +<select name="<%$Name%>"> % if ($AllowNull) { -<OPTION VALUE="">-</OPTION> +<option value="">-</option> % } %while (my $group = $groups->Next) { -<OPTION VALUE="<%$group->id%>" <%$group->id eq $Default && "SELECTED"%>><%$group->Name%></OPTION> +<option value="<%$group->id%>" <%$group->id eq $Default && "SELECTED"%>><%$group->Name%></option> %} -</SELECT> +</select> <%INIT> my $groups = new RT::Groups($session{'CurrentUser'}); diff --git a/rt/html/Search/Elements/SelectLinks b/rt/html/Search/Elements/SelectLinks index 00ec80bd3..f3586528d 100644 --- a/rt/html/Search/Elements/SelectLinks +++ b/rt/html/Search/Elements/SelectLinks @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,11 +45,11 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<SELECT NAME="<%$Name%>"> +<select name="<%$Name%>"> % foreach (@fields) { -<OPTION VALUE="<%$_%>"><&|/l&><%$_%></&></OPTION> +<option value="<%$_%>"><&|/l&><%$_%></&></option> % } -</SELECT> +</select> <%ARGS> $Name => 'LinksField' </%ARGS> diff --git a/rt/html/Search/Elements/SelectPersonType b/rt/html/Search/Elements/SelectPersonType index d4127c97b..bc631dbb0 100644 --- a/rt/html/Search/Elements/SelectPersonType +++ b/rt/html/Search/Elements/SelectPersonType @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,20 +45,20 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<SELECT NAME ="<%$Name%>"> +<select NAME ="<%$Name%>"> % if ($AllowNull) { -<OPTION VALUE="">-</OPTION> +<option value="">-</option> % } % for my $option (@types) { % if ($Suffix) { -<OPTION VALUE="<% $option %><% $Suffix %>" <%$option eq $Default && "SELECTED"%> ><%loc($option)%></OPTION> +<option value="<% $option %><% $Suffix %>" <%$option eq $Default && "SELECTED"%> ><%loc($option)%></option> % next; % } % foreach my $subtype (@subtypes) { -<OPTION VALUE="<%"$option.$subtype"%>" <%$option eq $Default && $subtype eq 'EmailAddress' && "SELECTED"%> ><% loc($option) %> <% loc($subtype) %></OPTION> +<option value="<%"$option.$subtype"%>" <%$option eq $Default && $subtype eq 'EmailAddress' && "SELECTED"%> ><% loc($option) %> <% loc($subtype) %></option> % } % } -</SELECT> +</select> <%INIT> my @types; diff --git a/rt/html/Search/Elements/SelectSearchObject b/rt/html/Search/Elements/SelectSearchObject index e9df5179f..f52a83372 100644 --- a/rt/html/Search/Elements/SelectSearchObject +++ b/rt/html/Search/Elements/SelectSearchObject @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/Search/Elements/SelectSearchesForObjects b/rt/html/Search/Elements/SelectSearchesForObjects index e6be66a58..dc8368577 100644 --- a/rt/html/Search/Elements/SelectSearchesForObjects +++ b/rt/html/Search/Elements/SelectSearchesForObjects @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -46,6 +48,7 @@ <%args> @Objects => undef $Name => undef +$SearchType => 'Ticket', </%args> <select name="<%$Name%>"> % foreach my $object (@Objects) { @@ -57,9 +60,9 @@ $Name => undef % } % my @searches = $object->Attributes->Named('SavedSearch'); % foreach my $search (@searches) { -% # Skip it if it is not a ticket search. +% # Skip it if it is not of search type we want. % next if ($search->SubValue('SearchType') -% && $search->SubValue('SearchType') ne 'Ticket'); +% && $search->SubValue('SearchType') ne $SearchType); <option value="<%ref($object)%>-<%$object->id%>-SavedSearch-<%$search->Id%>"> -<%$search->Description||loc('Unnamed search')%></option> % } % } |