Display Queue Link in first paragraph


#1

Hi,

if I open a ticket I get the following selection in the first paragraph
"Comment | Reply | Take | Resolve". Which part of the code of webrt do I
need to change to also have a “Display Queue” link in this line? Thanks.

Ciao
Christian
Christian Kurz http://www.planNET.de
planNET Systems GmbH mailto:info@planNET.de
Schoenfeldstr. 8 Telefon: +49 721 66 36 0
D-76131 Karlsruhe Telefax: +49 721 66 36 199


#2

| Hi,
|
| if I open a ticket I get the following selection in the first paragraph
| “Comment | Reply | Take | Resolve”. Which part of the code of webrt do I
| need to change to also have a “Display Queue” link in this line? Thanks.
±–>8

sub do_bar in lib/rt/ui/web/manipulate.pm

brandon s. allbery [os/2][linux][solaris][japh] allbery@kf8nh.apk.net
system administrator [WAY too many hats] allbery@ece.cmu.edu
electrical and computer engineering KF8NH
carnegie mellon university [“better check the oblivious first” -ke6sls]


#3

Hi,

if I open a ticket I get the following selection in the first paragraph
"Comment | Reply | Take | Resolve". Which part of the code of webrt do I
need to change to also have a “Display Queue” link in this line? Thanks.

I think you can make your web related changes in the
/opt/rt/lib/rt/ui/web/manipulate.pm But there is a 'Display Queue’
link on that page alread,. but you could move it to the top.

Well, I already found this file, but I want to have the link at the top
and at the bottom. Also I don’t know in which part of the file I have
to do this change.

You could copy the code print “<A HREF=”$ScriptURL">Display Queue<TD ALIGN=CENTER VALIGN=“MIDDLE”>"; and add it to the ‘sub do_bar’ part, just before the
print “”; line.

succes Floor

floor.c@vvtp.nl Floor Plikaar

Linux is like a wigwam - no windows, no gates and apache inside.


#4

±----
| Hi,
|
| if I open a ticket I get the following selection in the first paragraph
| “Comment | Reply | Take | Resolve”. Which part of the code of webrt do I
| need to change to also have a “Display Queue” link in this line? Thanks.
±–>8

sub do_bar in lib/rt/ui/web/manipulate.pm

And what Code? I just tried to do solve this with " “<A
HREF=”$ScriptURL">Display Queue". " | " ." but then the line is
not center anymore. :frowning: So what would be the correct code for this?

Ciao
Christian
Christian Kurz http://www.planNET.de
planNET Systems GmbH mailto:info@planNET.de
Schoenfeldstr. 8 Telefon: +49 721 66 36 0
D-76131 Karlsruhe Telefax: +49 721 66 36 199


#5

| On 00-12-19 Brandon S. Allbery KF8NH wrote:
| > On Tuesday, December 19, 2000 03:43:36 PM +0100, Christian Kurz| > Christian.Kurz@planNET.de wrote:
| > ±----
| > | Hi,
| > |
| > | if I open a ticket I get the following selection in the first
| paragraph > | “Comment | Reply | Take | Resolve”. Which part of the code
| of webrt do I > | need to change to also have a “Display Queue” link in
| this line? Thanks. > ±–>8
|
| > sub do_bar in lib/rt/ui/web/manipulate.pm
|
| And what Code? I just tried to do solve this with " “<A
| HREF=”$ScriptURL">Display Queue". " | " ." but then the line is
| not center anymore. :frowning: So what would be the correct code for this?
±–>8

Where did you insert your code? It should go between the statement
printing “<DIV ALIGN=“CENTER”>” and the one printing “”.

My code (which probably has little relation to stock RT1.x any more :slight_smile: is:
(modulo line wrapping…)

print "<A 

HREF="$ScriptURL?${cookie}display=History&serial_num=$prev">Previous"
if defined $prev;
print " | " if defined $prev && (defined $next ||
$rt::req[$serial_num]{‘status’} ne ‘dead’);
if ($rt::req[$serial_num]{‘status’} ne ‘dead’) {
print
&fdro_murl("${cookie}display=SetComment",“history”,“Comment”). " | " .
&fdro_murl("${cookie}display=SetReply",“history”,“Reply”);

  if ($rt::req[$serial_num]{'owner'} eq '') {
    print " | ".

&fdro_murl("${cookie}do_req_give=true&do_req_give_to=$current_user&display=
History",“summary”,“Take”) ;
}
if ($rt::users{$current_user}{admin_rt} &&
$rt::req[$serial_num]{status} ne ‘resolved’) {
print " | " . &fdro_murl("${cookie}display=SetKill", “summary”,
“Kill”);
if ($rt::users{$current_user}{admin_rt} &&
$rt::req[$serial_num]{status} ne ‘resolved’) {
print " | " . &fdro_murl("${cookie}display=SetKill", “summary”,
“Kill”); }
if ($rt::req[$serial_num]{‘status’} ne ‘resolved’) {

    print " | ".

&fdro_murl("${cookie}do_req_resolve=true&display=History",“summary”,“Resolv
e”);
}
if ($rt::req[$serial_num]{‘status’} ne ‘open’) {

    print " | " .

&fdro_murl("${cookie}do_req_open=true&display=History",“summary”,“Open”);
}
}
print " | " if $rt::req[$serial_num]{status} ne ‘dead’ && defined $next;
print “<A
HREF=”$ScriptURL?${cookie}display=History&serial_num=$next">Next" if
defined $next;

brandon s. allbery [os/2][linux][solaris][japh] allbery@kf8nh.apk.net
system administrator [WAY too many hats] allbery@ece.cmu.edu
electrical and computer engineering KF8NH
carnegie mellon university [“better check the oblivious first” -ke6sls]


#6

±----
| On 00-12-19 Brandon S. Allbery KF8NH wrote:
| > On Tuesday, December 19, 2000 03:43:36 PM +0100, Christian Kurz

| > ±----
| > | Hi,
| > |
| > | if I open a ticket I get the following selection in the first
| paragraph > | “Comment | Reply | Take | Resolve”. Which part of the code
| of webrt do I > | need to change to also have a “Display Queue” link in
| this line? Thanks. > ±–>8
|
| > sub do_bar in lib/rt/ui/web/manipulate.pm
|
| And what Code? I just tried to do solve this with " “<A
| HREF=”$ScriptURL">Display Queue". " | " ." but then the line is
| not center anymore. :frowning: So what would be the correct code for this?
±–>8

Where did you insert your code? It should go between the statement
printing “<DIV ALIGN=“CENTER”>” and the one printing “”.

I had the following code in do_bar"

|sub do_bar {
| my $serial_num = shift;
| my $temp;

| print "
| <DIV ALIGN=“CENTER”> ".
|&fdro_murl(“display=SetComment”,“history”,“Comment”,0). " | " .
|&fdro_murl(“display=SetReply”,“history”,“Reply”,0);

And now I changed it to the following:

|sub do_bar {
| my $serial_num = shift;
| my $temp;

| print "
| <DIV ALIGN=“CENTER”> “.
| print “
| <A HREF=”$ScriptURL”>Display Queue ". " | " .
|&fdro_murl(“display=SetComment”,“history”,“Comment”,0). " | " .
|&fdro_murl(“display=SetReply”,“history”,“Reply”,0);

And now the whole bar containing "Display Queue | Comment | Reply " is
moved to the left instead of being centered and in the center I have the
following strings “1 | Take | Resolve”. So, what is wrong my
modification?

Ciao
Christian
Christian Kurz http://www.planNET.de
planNET Systems GmbH mailto:info@planNET.de
Schoenfeldstr. 8 Telefon: +49 721 66 36 0
D-76131 Karlsruhe Telefax: +49 721 66 36 199


#7

| And now the whole bar containing "Display Queue | Comment | Reply " is
| moved to the left instead of being centered and in the center I have the
| following strings “1 | Take | Resolve”. So, what is wrong my
| modification?
±–>8

What do the next few lines of the script look like?

brandon s. allbery [os/2][linux][solaris][japh] allbery@kf8nh.apk.net
system administrator [WAY too many hats] allbery@ece.cmu.edu
electrical and computer engineering KF8NH
carnegie mellon university [“better check the oblivious first” -ke6sls]


#8

±----
| And now the whole bar containing "Display Queue | Comment | Reply " is
| moved to the left instead of being centered and in the center I have the
| following strings “1 | Take | Resolve”. So, what is wrong my
| modification?
±–>8

What do the next few lines of the script look like?

|sub do_bar {
| my $serial_num = shift;
| my $temp;

| print "
| <DIV ALIGN=“CENTER”> “.
| print “
| <A HREF=”$ScriptURL”>Display Queue ". " | " .
|&fdro_murl(“display=SetComment”,“history”,“Comment”,0). " | " .
|&fdro_murl(“display=SetReply”,“history”,“Reply”,0);

|&fdro_murl(“display=SetComment”,“history”,“Comment”,0). " | " .
|&fdro_murl(“display=SetReply”,“history”,“Reply”,0);

| if ($rt::req[$serial_num]{‘owner’} eq ‘’) {
| print " | ".
|&fdro_murl(“do_req_give=true&do_req_give_to=$current_user”,“summary”,“Take”,0) ;
| }
| if ($rt::req[$serial_num]{‘status’} ne ‘resolved’) {

| print " | ".
|&fdro_murl(“do_req_resolve=true”,“summary”,“Resolve”,0);
| }
| if ($rt::req[$serial_num]{‘status’} ne ‘open’) {

| print " | " .
|&fdro_murl(“do_req_open=true”,“summary”,“Open”,0);
| }

| print “”;
| }

That’s the whole sub that I modified with the second print statement
above.

Ciao
Christian
Christian Kurz http://www.planNET.de
planNET Systems GmbH mailto:info@planNET.de
Schoenfeldstr. 8 Telefon: +49 721 66 36 0
D-76131 Karlsruhe Telefax: +49 721 66 36 199


#9

| | <DIV ALIGN=“CENTER”> ".
| | print "
±–>8

Oops. This executes the second print, and then feeds its return value (0)
to the first print.

| | <A HREF="$ScriptURL">Display Queue ". " | " .
| |&fdro_murl(“display=SetComment”,“history”,“Comment”,0). " | " .
| |&fdro_murl(“display=SetReply”,“history”,“Reply”,0);
|
| |&fdro_murl(“display=SetComment”,“history”,“Comment”,0). " | " .
| |&fdro_murl(“display=SetReply”,“history”,“Reply”,0);
±–>8

And this looks like it’s the result of a cut-and-paste gone awry.

brandon s. allbery [os/2][linux][solaris][japh] allbery@kf8nh.apk.net
system administrator [WAY too many hats] allbery@ece.cmu.edu
electrical and computer engineering KF8NH
carnegie mellon university [“better check the oblivious first” -ke6sls]