[rt-users] Next and Prev "buttons" when killing tickets?

Peter Eriksson peter at ifm.liu.se
Fri Dec 13 17:28:48 EST 2002


I just recently upgraded an RT installation from 2.0.<old> to 2.0.15
and I just noticed that I'm now missing a feature that I used quite
a bit (sadly) before - we receive a bit of spam into our RT system
which we Kill manually - and then it is quite useful to be able
to do a Search, and then when stepping thru the tickets use a
"Kill" action (that I've added among the "Open", "Resolve" etc
actions) on the spams. However - now when I do that the Prev
and Next buttons disappear so after I've killed one spam I
have to return to the Search view and then select another spam
etc...

I've had a quick look at the HTML::Mason code in order to try to
figure out what governs when the prev/next buttons are displayed
but it seems not 100% simple (not as simple as adding a Kill
button is atleast) - has anyone else seen this and added a
workaround for it?

Attached is a patch that will make sure that the Prev/Next buttons
almost always are available - as simple text when not clickable -
so that the screen position of the prev/next buttons doesn't move
around (makes it easier to find with the mouse that way :-)

(It also adds the "Kill" action)

-- 
Peter Eriksson <peter at ifm.liu.se>            Phone:    +46 13  28 2786
Computer Systems Manager/BOFH                Cell/GSM: +46 705 18 2786
Physics Department, Linköping University     Room:     Building F, F203
SE-581 83 Linköping, Sweden                  http://www.ifm.liu.se/~peter
-------------- next part --------------
*** /ifm/src/rt/rt-2-0-15/webrt/Ticket/Elements/Tabs	Wed Nov  7 00:07:10 2001
--- WebRT/html/Ticket/Elements/Tabs	Fri Dec 13 10:33:00 2002
***************
*** 76,81 ****
--- 76,82 ----
  	   title => 'Resolve'
  	  };
      }	
+ 	
      if ($Ticket->Status ne 'open') {	
  	$actions->{'Open'} = 
  	  { 
***************
*** 83,88 ****
--- 84,96 ----
  	   title => 'Open'
  	  };
      }
+     if ($Ticket->Status ne 'dead') {	
+ 	$actions->{'Kill'} = 
+ 	  { 
+ 	   path => "Ticket/Display.html?Status=dead&id=". $id,
+ 	   title => 'Kill'
+ 	  };
+     }
  }
  
  
***************
*** 104,109 ****
--- 112,121 ----
  	      $items->[$indexs[0]-1]->id.
  		'">< Prev</a>] ';
  	}
+ 	else {
+ 		$tabs_scalar .= '[<< First] [< Prev] ';
+ 	}
+ 
  	# Don't display next links if we're on the last ticket
  	if ( $Ticket->id != $items->[-1]->id ) {
  	    $tabs_scalar .= '[<A HREF="Display.html?id='.
***************
*** 113,118 ****
--- 125,133 ----
  	      $items->[-1]->id.
  		'">Last >&gt</a>]';
  	}
+ 	else {
+ 		$tabs_scalar .= '[Next >] [Last >>] ';
+ 	}
  	$tabs_scalar .= "<BR><BR>";
      }
      }


More information about the rt-users mailing list