From ded0451e9582df33cae6099a2fb72b4ea25076cf Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 15 Jul 2003 13:30:43 +0000 Subject: reverting to vendor branch rt 3.0.4, hopefully --- rt/webrt/Ticket/Elements/Tabs | 126 ------------------------------------------ 1 file changed, 126 deletions(-) delete mode 100755 rt/webrt/Ticket/Elements/Tabs (limited to 'rt/webrt/Ticket/Elements/Tabs') diff --git a/rt/webrt/Ticket/Elements/Tabs b/rt/webrt/Ticket/Elements/Tabs deleted file mode 100755 index 8cce197de..000000000 --- a/rt/webrt/Ticket/Elements/Tabs +++ /dev/null @@ -1,126 +0,0 @@ -<& /Elements/Tabs, tabs => $tabs, actions => $actions, current_tab => $current_tab, tabs_scalar => $tabs_scalar &> -<%INIT> - - my $id = $Ticket->id(); - my $tabs_scalar = ''; - my $tabs = { - A => { title => 'Display', - path => "Ticket/Display.html?id=".$id, - }, - - Ab => { title => 'History', - path => "Ticket/History.html?id=".$id, - }, - B => { title => 'Basics', - path => "Ticket/Modify.html?id=".$id, - }, - - C => { title => 'Dates', - path => "Ticket/ModifyDates.html?id=".$id, - }, - - D => { title => 'People', - path => "Ticket/ModifyPeople.html?id=".$id, - }, - E => { title => 'Links', - path => "Ticket/ModifyLinks.html?id=".$id, - }, - F => { title => 'Jumbo', - path => "Ticket/ModifyAll.html?id=".$id, - }, - - }; - -my $actions; -if ($Ticket->CurrentUserHasRight('ModifyTicket') or - $Ticket->CurrentUserHasRight('CommentOnTicket')) { - $actions->{'Comment'} = - { - title => 'Comment', - path => "Ticket/Update.html?Action=Comment&id=".$id, - } - }; - -if ($Ticket->CurrentUserHasRight('ModifyTicket') or - $Ticket->CurrentUserHasRight('ReplyToTicket')) { - $actions->{'Reply'} = - { - title => 'Reply', - path => "Ticket/Update.html?Action=Respond&id=".$id, - } - }; - -if ($Ticket->CurrentUserHasRight('OwnTicket')) { - if ($Ticket->OwnerObj->id == $RT::Nobody->id) { - $actions->{'Take'} = - { - path => "Ticket/Display.html?Action=Take&id=".$id, - title => 'Take' - }; - } - elsif ( $Ticket->OwnerObj->id != $session{CurrentUser}->id) { - $actions->{'Steal'} = - { - path => "Ticket/Display.html?Action=Steal&id=".$id, - title => 'Steal' - }; - } -} - -if ($Ticket->CurrentUserHasRight('ModifyTicket')) { - if ($Ticket->Status ne 'resolved') { - $actions->{'Resolve'} = - { - - path => "Ticket/Update.html?Action=Comment&DefaultStatus=resolved&id=".$id, - title => 'Resolve' - }; - } - if ($Ticket->Status ne 'open') { - $actions->{'Open'} = - { - path => "Ticket/Display.html?Status=open&id=". $id, - title => 'Open' - }; - } -} - - - - -if (defined $session{'tickets'}) { - my $items = $session{'tickets'}->ItemsArrayRef(); - my @indexs = grep(($items->[$_]->id == $Ticket->Id), 0 .. $#{$items}); - - if ($items->[0]) { - - if ($items->[$indexs[0]]->id == $Ticket->Id) { - # Don't display prev links if we're on the first ticket - if ( $items->[0]->id != $Ticket->id ) { - $tabs_scalar .= '[<< First] '; - $tabs_scalar .= '[< Prev] '; - } - # Don't display next links if we're on the last ticket - if ( $Ticket->id != $items->[-1]->id ) { - $tabs_scalar .= '[Next >] '; - $tabs_scalar .= '[Last >>]'; - } - $tabs_scalar .= "

"; - } - } -} - - - -<%ARGS> -$Ticket => undef -$current_tab => undef - -- cgit v1.2.1