diff options
Diffstat (limited to 'rt/html/Ticket')
-rw-r--r-- | rt/html/Ticket/Elements/ShowMemberOf | 57 | ||||
-rw-r--r-- | rt/html/Ticket/Elements/ShowReferences | 72 | ||||
-rw-r--r-- | rt/html/Ticket/Elements/ShowSummary | 98 | ||||
-rw-r--r-- | rt/html/Ticket/Elements/Tabs | 94 |
4 files changed, 114 insertions, 207 deletions
diff --git a/rt/html/Ticket/Elements/ShowMemberOf b/rt/html/Ticket/Elements/ShowMemberOf deleted file mode 100644 index e443132bc..000000000 --- a/rt/html/Ticket/Elements/ShowMemberOf +++ /dev/null @@ -1,57 +0,0 @@ -%# BEGIN BPS TAGGED BLOCK {{{ -%# -%# COPYRIGHT: -%# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC -%# <jesse@bestpractical.com> -%# -%# (Except where explicitly superseded by other copyright notices) -%# -%# -%# LICENSE: -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# 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. -%# -%# -%# CONTRIBUTION SUBMISSION POLICY: -%# -%# (The following paragraph is not intended to limit the rights granted -%# to you to modify and distribute this software under the terms of -%# the GNU General Public License and is only of importance to you if -%# you choose to contribute your changes and enhancements to the -%# community by submitting them to Best Practical Solutions, LLC.) -%# -%# By intentionally submitting any modifications, corrections or -%# derivatives to this work, or any other work intended for use with -%# Request Tracker, to Best Practical Solutions, LLC, you confirm that -%# you are the copyright holder for those contributions and you grant -%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, -%# royalty-free, perpetual, license to use, copy, create derivative -%# works based on those contributions, and sublicense and distribute -%# those contributions and any derivatives thereof. -%# -%# END BPS TAGGED BLOCK }}} -<UL> -% my $memberof = $Ticket->MemberOf; -% while (my $member_of = $memberof->Next) { -<LI><a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member_of->Id%>"><%$member_of->Id%></a>: <%$member_of->Subject%> [<%$member_of->Status%>] -% } -</UL> - -<%INIT> -</%INIT> -<%ARGS> -$Ticket => undef -</%ARGS> diff --git a/rt/html/Ticket/Elements/ShowReferences b/rt/html/Ticket/Elements/ShowReferences deleted file mode 100644 index bb323f66c..000000000 --- a/rt/html/Ticket/Elements/ShowReferences +++ /dev/null @@ -1,72 +0,0 @@ -%# BEGIN BPS TAGGED BLOCK {{{ -%# -%# COPYRIGHT: -%# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC -%# <jesse@bestpractical.com> -%# -%# (Except where explicitly superseded by other copyright notices) -%# -%# -%# LICENSE: -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# 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. -%# -%# -%# CONTRIBUTION SUBMISSION POLICY: -%# -%# (The following paragraph is not intended to limit the rights granted -%# to you to modify and distribute this software under the terms of -%# the GNU General Public License and is only of importance to you if -%# you choose to contribute your changes and enhancements to the -%# community by submitting them to Best Practical Solutions, LLC.) -%# -%# By intentionally submitting any modifications, corrections or -%# derivatives to this work, or any other work intended for use with -%# Request Tracker, to Best Practical Solutions, LLC, you confirm that -%# you are the copyright holder for those contributions and you grant -%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, -%# royalty-free, perpetual, license to use, copy, create derivative -%# works based on those contributions, and sublicense and distribute -%# those contributions and any derivatives thereof. -%# -%# END BPS TAGGED BLOCK }}} -<UL> -% while (my $Link = $Ticket->RefersTo->Next) { -<LI> -% if ($Link->TargetURI->IsLocal) { -% my $member = $Link->TargetObj; - -<a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> [<%$member->Status%>]<br> -% } else { -<A HREF="<%$Link->TargetURI->HREF%>"><%$Link->Target%></A> -% } -%} - - - -% while (my $Link = $Ticket->ReferredToBy->Next) { -<LI> -% if ($Link->BaseURI->IsLocal) { -% my $member = $Link->BaseObj; -<a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> [<%$member->Status%>]<br> -% } else { -<A HREF="<%$Link->BaseURI->HREF%>"><%$Link->Base%></A> -%} -% } -</UL> -<%ARGS> -$Ticket => undef -</%ARGS> diff --git a/rt/html/Ticket/Elements/ShowSummary b/rt/html/Ticket/Elements/ShowSummary index 5a6e7e099..d171f408e 100644 --- a/rt/html/Ticket/Elements/ShowSummary +++ b/rt/html/Ticket/Elements/ShowSummary @@ -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,67 +45,71 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - <TABLE WIDTH="100%" class="ticketsummary" > - <TR> - <TD VALIGN=TOP WIDTH="50%" class="boxcontainer"> - <& /Elements/TitleBoxStart, title => loc('The Basics'), + <table width="100%" class="ticket-summary"> + <tr> + <td valign="top" width="50%" class="boxcontainer"> + <&| /Widgets/TitleBox, title => loc('The Basics'), title_href =>"$RT::WebPath/Ticket/Modify.html?id=".$Ticket->Id, - title_class=> 'inverse', - color => "#993333" &> + class => 'ticket-info-basics' &> <& /Ticket/Elements/ShowBasics, Ticket => $Ticket &> - <& /Elements/TitleBoxEnd &> - <br> + </&> + % if ($Ticket->QueueObj->TicketCustomFields->First) { - <& /Elements/TitleBoxStart, title => loc('Custom Fields'), + <&| /Widgets/TitleBox, title => loc('Custom Fields'), title_href =>"$RT::WebPath/Ticket/Modify.html?id=".$Ticket->Id, - title_class=> 'inverse', - color => "#993333" &> + class => 'ticket-info-cfs' &> <& /Ticket/Elements/ShowCustomFields, Ticket => $Ticket &> - <& /Elements/TitleBoxEnd &> - -<br> + </&> % } - <& /Elements/TitleBoxStart, title => loc('People'), + <&| /Widgets/TitleBox, title => loc('People'), title_href =>"$RT::WebPath/Ticket/ModifyPeople.html?id=".$Ticket->Id, - title_class=> 'inverse', - color => "#333399" &> - <& /Ticket/Elements/ShowPeople, Ticket => $Ticket &> - <& /Elements/TitleBoxEnd &> - <br> + class => 'ticket-info-people' &> + <& /Ticket/Elements/ShowPeople, Ticket => $Ticket &> + </&> - <& /Elements/TitleBoxStart, title => loc('Customers'), + <& /Widgets/TitleBoxStart, title => loc('Customers'), title_href =>"$RT::WebPath/Ticket/ModifyCustomers.html?id=".$Ticket->Id, - title_class=> 'inverse', - color => "#7f007b" &> + class=> 'ticket-info-customers' &> <& /Ticket/Elements/ShowCustomers, Ticket => $Ticket &> - <& /Elements/TitleBoxEnd &> + </&> - <BR> - </TD> - <TD VALIGN=TOP WIDTH="50%" class="boxcontainer"> + <& /Ticket/Elements/ShowAttachments, Ticket => $Ticket, Attachments => $Attachments &> + <br /> + <& /Ticket/Elements/ShowRequestor, Ticket => $Ticket &> - <& /Elements/TitleBoxStart, title => loc("Dates"), + <& /Elements/Callback, %ARGS, _CallbackName => 'LeftColumn' &> + </td> + <td valign="top" width="50%" class="boxcontainer"> + <&|/Widgets/TitleBox, title => loc("Reminders"), + title_href =>"$RT::WebPath/Ticket/Reminders.html?id=".$Ticket->Id, + class => 'ticket-info-reminders' &> + <table> + <tr> + <td> + <form action="<%$RT::WebPath%>/Ticket/Display.html" method="post"> + <& /Ticket/Elements/Reminders, Ticket => $Ticket, ShowCompleted => 0 &> + <div align="right"><input type="submit" class="button" value="Save" /></div> + </form> + </td> + </tr> + </table> + </&> + <&| /Widgets/TitleBox, title => loc("Dates"), title_href =>"$RT::WebPath/Ticket/ModifyDates.html?id=".$Ticket->Id, - title_class=> 'inverse', - color => "#663366" &> + class => 'ticket-info-dates' &> <& /Ticket/Elements/ShowDates, Ticket => $Ticket &> - <& /Elements/TitleBoxEnd &> - <BR> - <& /Elements/TitleBoxStart, title => loc('Links'), + </&> + + <&| /Widgets/TitleBox, title => loc('Links'), title_href => "$RT::WebPath/Ticket/ModifyLinks.html?id=".$Ticket->Id, - title_class=> 'inverse', - titleright => '', color=> "#336633" &> + class => 'ticket-info-links' &> <& /Elements/ShowLinks, Ticket => $Ticket &> - <& /Elements/TitleBoxEnd &> - <BR> - <& /Ticket/Elements/ShowAttachments, Ticket => $Ticket, Attachments => $Attachments &> - - <& /Ticket/Elements/ShowRequestor, Ticket => $Ticket &> - + </&> + <& /Elements/Callback, %ARGS, _CallbackName => 'RightColumn' &> - </TD> - </TR> - </TABLE> + </td> + </tr> + </table> <%ARGS> $Ticket => undef $Attachments => undef diff --git a/rt/html/Ticket/Elements/Tabs b/rt/html/Ticket/Elements/Tabs index 46e1d4a27..3dee8dff6 100644 --- a/rt/html/Ticket/Elements/Tabs +++ b/rt/html/Ticket/Elements/Tabs @@ -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: @@ -121,9 +123,11 @@ my $ticket_page_tabs = { path => "Ticket/ModifyLinks.html?id=" . $id, }, _Eb=> { title => loc('Customers'), path => "Ticket/ModifyCustomers.html?id=" . $id, }, - _F => { title => loc('Jumbo'), - path => "Ticket/ModifyAll.html?id=" . $id, - separator => 1 + _F => { title => loc('Reminders'), + path => "Ticket/Reminders.html?id=" . $id, + separator => 1, }, + _X => { title => loc('Jumbo'), + path => "Ticket/ModifyAll.html?id=" . $id, }, }; @@ -138,76 +142,102 @@ foreach my $tab ( sort keys %{$ticket_page_tabs} ) { $tabs->{'this'}->{"subtabs"} = $ticket_page_tabs; $current_tab = "Ticket/Display.html?id=" . $id; +my %can = ( + ModifyTicket => $Ticket->CurrentUserHasRight('ModifyTicket'), +); - - - -if ( $Ticket->CurrentUserHasRight('ModifyTicket') - or $Ticket->CurrentUserHasRight('ReplyToTicket') ) { - $actions->{'A'} = { title => loc('Reply'), - path => "Ticket/Update.html?Action=Respond&id=" . $id, +if ( $can{'ModifyTicket'} or $Ticket->CurrentUserHasRight('ReplyToTicket') ) { + $actions->{'F'} = { + title => loc('Reply'), + path => "Ticket/Update.html?Action=Respond&id=" . $id, }; } -if ( $Ticket->CurrentUserHasRight('ModifyTicket') ) { +if ( $can{'ModifyTicket'} ) { if ( $Ticket->Status ne 'resolved' ) { - $actions->{'B'} = { - + $actions->{'G'} = { path => "Ticket/Update.html?Action=Comment&DefaultStatus=resolved&id=" . $id, title => loc('Resolve') }; } if ( $Ticket->Status ne 'open' ) { - $actions->{'C'} = { path => "Ticket/Display.html?Status=open&id=" . $id, + $actions->{'A'} = { path => "Ticket/Display.html?Status=open&id=" . $id, title => loc('Open it') }; } } if ( $Ticket->CurrentUserHasRight('OwnTicket') ) { - if ( $Ticket->OwnerObj->id == $RT::Nobody->id ) { - $actions->{'D'} = { path => "Ticket/Display.html?Action=Take&id=" . $id, - title => loc('Take') }; + if ( $Ticket->OwnerObj->Id == $RT::Nobody->id + and ( $can{'ModifyTicket'} or $Ticket->CurrentUserHasRight('TakeTicket') ) ) + { + $actions->{'B'} = { + path => "Ticket/Display.html?Action=Take&id=" . $id, + title => loc('Take'), + }; } - elsif ( $Ticket->OwnerObj->id != $session{CurrentUser}->id ) { - $actions->{'E'} = {path => "Ticket/Display.html?Action=Steal&id=" . $id, - title => loc('Steal') }; + elsif ( $Ticket->OwnerObj->id != $session{CurrentUser}->id + and ( $can{'ModifyTicket'} or $Ticket->CurrentUserHasRight('StealTicket') ) ) + { + $actions->{'C'} = { + path => "Ticket/Display.html?Action=Steal&id=" . $id, + title => loc('Steal'), + }; } } -if ( $Ticket->CurrentUserHasRight('ModifyTicket') - or $Ticket->CurrentUserHasRight('CommentOnTicket') ) { - $actions->{'F'} = { title => loc('Comment'), - path => "Ticket/Update.html?Action=Comment&id=" . $id, +if ( $can{'ModifyTicket'} or $Ticket->CurrentUserHasRight('CommentOnTicket') ) { + $actions->{'E'} = { + title => loc('Comment'), + path => "Ticket/Update.html?Action=Comment&id=" . $id, }; } } -my $args = "?" . $m->comp( +if ( (defined $actions->{A} || defined $actions->{B} || defined $actions->{C}) + && (defined $actions->{E} || defined $actions->{F} || defined $actions->{G}) ) { + + if (defined $actions->{C}) { $actions->{C}->{separator} = 1 } + elsif (defined $actions->{B}) { $actions->{B}->{separator} = 1 } + elsif (defined $actions->{A}) { $actions->{A}->{separator} = 1 } +} + +my $args; +$args= "?" . $m->comp( '/Elements/QueryString', Query => $ARGS{'Query'} || $session{'CurrentSearchHash'}->{'Query'}, Format => $ARGS{'Format'} || $session{'CurrentSearchHash'}->{'Format'}, OrderBy => $ARGS{'OrderBy'} || $session{'CurrentSearchHash'}->{'OrderBy'}, Order => $ARGS{'Order'} || $session{'CurrentSearchHash'}->{'Order'}, + Page => $ARGS{'Page'} || $session{'CurrentSearchHash'}->{'Page'}, Rows => $ARGS{'Rows'}, ) if ($ARGS{'Query'} or $session{'CurrentSearchHash'}->{'Query'}); $args ||= ''; $tabs->{"f"} = { path => "Search/Build.html?NewQuery=1", - title => loc('New Query')}; + title => loc('New Search')}; $tabs->{"g"} = { path => "Search/Build.html$args", - title => loc('Query Builder')}; + title => loc('Edit Search')}; $tabs->{"h"} = { path => "Search/Edit.html$args", title => loc('Advanced'), separator => 1 }; -if (defined $session{'tickets'} and $session{'tickets'}->Count) { +if ($args) { $tabs->{"i"} = { path => "Search/Results.html$args", title => loc('Show Results'), - separator => 1, - subtabs => $searchtabs }; + }; if ($current_tab =~ "Search/Results.html") { $current_tab = "Search/Results.html$args"; } + $tabs->{"j"} = { path => "Search/Bulk.html$args", + title => loc('Bulk Update'), + }; + if ($current_tab =~ "Search/Bulk.html") { + $current_tab = "Search/Bulk.html$args"; + } + foreach my $searchtab (keys %{$searchtabs}) { + ($searchtab =~ /^_/) ? $tabs->{"s".$searchtab} = $searchtabs->{$searchtab} : $tabs->{"z_".$searchtab} = $searchtabs->{$searchtab}; + } } + </%INIT> |