summaryrefslogtreecommitdiff
path: root/rt/webrt/Ticket/Elements
diff options
context:
space:
mode:
Diffstat (limited to 'rt/webrt/Ticket/Elements')
-rwxr-xr-xrt/webrt/Ticket/Elements/AddWatchers54
-rwxr-xr-xrt/webrt/Ticket/Elements/EditBasics62
-rwxr-xr-xrt/webrt/Ticket/Elements/EditDates46
-rw-r--r--rt/webrt/Ticket/Elements/EditKeywordSelects45
-rwxr-xr-xrt/webrt/Ticket/Elements/EditLinks109
-rwxr-xr-xrt/webrt/Ticket/Elements/EditPeople37
-rwxr-xr-xrt/webrt/Ticket/Elements/EditWatchers46
-rwxr-xr-xrt/webrt/Ticket/Elements/ShowBasics29
-rwxr-xr-xrt/webrt/Ticket/Elements/ShowDates54
-rwxr-xr-xrt/webrt/Ticket/Elements/ShowDependencies18
-rwxr-xr-xrt/webrt/Ticket/Elements/ShowHistory43
-rw-r--r--rt/webrt/Ticket/Elements/ShowKeywordSelects26
-rwxr-xr-xrt/webrt/Ticket/Elements/ShowLinks61
-rwxr-xr-xrt/webrt/Ticket/Elements/ShowMemberOf12
-rwxr-xr-xrt/webrt/Ticket/Elements/ShowMembers22
-rwxr-xr-xrt/webrt/Ticket/Elements/ShowPeople12
-rwxr-xr-xrt/webrt/Ticket/Elements/ShowReferences27
-rw-r--r--rt/webrt/Ticket/Elements/ShowRequestor35
-rwxr-xr-xrt/webrt/Ticket/Elements/ShowSummary61
-rwxr-xr-xrt/webrt/Ticket/Elements/ShowTransaction162
-rwxr-xr-xrt/webrt/Ticket/Elements/Tabs126
-rwxr-xr-xrt/webrt/Ticket/Elements/ToolBar3
22 files changed, 1090 insertions, 0 deletions
diff --git a/rt/webrt/Ticket/Elements/AddWatchers b/rt/webrt/Ticket/Elements/AddWatchers
new file mode 100755
index 000000000..053cff122
--- /dev/null
+++ b/rt/webrt/Ticket/Elements/AddWatchers
@@ -0,0 +1,54 @@
+<BR>
+<%$msg%><br>
+
+Add new watchers:<br>
+
+<table>
+% if ($Users) {
+<tr><td>
+Type
+</td><td>
+Username
+</td></tr>
+% while (my $u = $Users->Next ) {
+<tr><td><&/Elements/SelectWatcherType, Name => "WatcherTypeUser".$u->Id &></td><td><%$u->Name%> (<%$u->RealName%>)</td></tr>
+% }
+% }
+
+<tr><td>
+Type
+</td><td>
+Email
+</td></tr>
+<tr><td>
+<&/Elements/SelectWatcherType, Name => "WatcherTypeEmail1" &>
+</td><td>
+<input name="WatcherAddressEmail1" size=15>
+</td></tr>
+<tr><td>
+<&/Elements/SelectWatcherType, Name => "WatcherTypeEmail2" &>
+</td><td>
+<input name="WatcherAddressEmail2" size=15>
+</td></tr>
+<tr><td>
+<&/Elements/SelectWatcherType, Name => "WatcherTypeEmail3" &>
+</td><td>
+<input name="WatcherAddressEmail3" size=15>
+</td></tr>
+</table>
+
+<%INIT>
+my ($msg, $Users);
+if ($UserString) {
+ $Users = new RT::Users($session{'CurrentUser'});
+ $Users->Limit(FIELD => $UserField,
+ VALUE => $UserString,
+ OPERATOR => $UserOp);
+ }
+</%INIT>
+
+<%ARGS>
+$UserField => 'Name'
+$UserOp => '='
+$UserString => undef
+</%ARGS>
diff --git a/rt/webrt/Ticket/Elements/EditBasics b/rt/webrt/Ticket/Elements/EditBasics
new file mode 100755
index 000000000..12142879e
--- /dev/null
+++ b/rt/webrt/Ticket/Elements/EditBasics
@@ -0,0 +1,62 @@
+<TABLE>
+<TR>
+<TD COLSPAN=6>
+ Subject<BR>
+ <input name=Subject value="<%$TicketObj->Subject|h%>" SIZE=50>
+</TD>
+</TR>
+<TR>
+<TD>
+<& /Elements/ShadedBox,
+ title => 'Status',
+ content => $SelectStatus
+&>
+</TD>
+<TD>
+
+<& /Elements/ShadedBox,
+ title => 'Time Worked',
+ content => "<input name=TimeWorked value=\"".$TicketObj->TimeWorked."\" SIZE=5>"
+&>
+
+</TD>
+<TD>
+<& /Elements/ShadedBox,
+ title => 'Time Left',
+ content => "<input name=TimeLeft value=\"".$TicketObj->TimeLeft."\" SIZE=5>"
+&>
+</TD>
+<TD>
+<& /Elements/ShadedBox,
+ title => 'Priority',
+ content => "<input name=Priority value=\"".$TicketObj->Priority."\" SIZE=3>"
+&>
+
+</TD>
+<TD>
+<& /Elements/ShadedBox,
+ title => 'Final Priority',
+ content => "<input name=FinalPriority value=\"".$TicketObj->FinalPriority."\" SIZE=3>"
+&>
+
+
+</TD>
+<TD>
+<& /Elements/ShadedBox,
+ title => 'Queue',
+ content => "$SelectQueue"
+ &>
+</TD>
+</TR>
+</TABLE>
+
+<%INIT>
+#It's hard to do this inline, so we'll preload the html of the selectstatus in here.
+my $SelectStatus = $m->scomp("/Elements/SelectStatus", Name => 'Status', Default=> $TicketObj->Status);
+my $SelectQueue = $m->scomp("/Elements/SelectQueue", Name => 'Queue', Default =>$TicketObj->QueueObj->Id);
+
+</%INIT>
+<%ARGS>
+
+$TicketObj => undef
+</%ARGS>
diff --git a/rt/webrt/Ticket/Elements/EditDates b/rt/webrt/Ticket/Elements/EditDates
new file mode 100755
index 000000000..f04130bde
--- /dev/null
+++ b/rt/webrt/Ticket/Elements/EditDates
@@ -0,0 +1,46 @@
+<TABLE>
+<TR>
+<TD>
+Starts:
+</TD>
+<TD>
+<& /Elements/SelectDate, menu_prefix => 'Starts', current => 0 &>
+ (<% $TicketObj->StartsObj->AsString %>)
+</TD>
+</TR>
+<TR>
+<TD>
+Started:
+</TD>
+<TD>
+<& /Elements/SelectDate, menu_prefix => 'Started', current => 0 &> (<%$TicketObj->StartedObj->AsString %>)
+
+
+
+</TD>
+</TR>
+
+<TR>
+<TD>
+Last Contact:
+</TD>
+<TD>
+<& /Elements/SelectDate, menu_prefix => 'Told', current => 0 &> (<% $TicketObj->ToldObj->AsString %>)
+
+</TD>
+</TR>
+<TR>
+<TD>
+Due:
+</TD>
+<TD>
+
+<& /Elements/SelectDate, menu_prefix => 'Due', current => 0 &> (<% $TicketObj->DueObj->AsString %>)
+</TD>
+</TR>
+
+</TABLE>
+<%ARGS>
+$TicketObj => undef
+</%ARGS>
+
diff --git a/rt/webrt/Ticket/Elements/EditKeywordSelects b/rt/webrt/Ticket/Elements/EditKeywordSelects
new file mode 100644
index 000000000..34ade9f25
--- /dev/null
+++ b/rt/webrt/Ticket/Elements/EditKeywordSelects
@@ -0,0 +1,45 @@
+
+<TABLE>
+ <TR>
+% while ( my $KeywordSelect = $KeywordSelects->Next ) {
+% my $CurrentKeywords = $TicketObj->KeywordsObj($KeywordSelect->id);
+% my $Descendents = $KeywordSelect->KeywordObj->Descendents;
+ <TD VALIGN=TOP>
+ <% $KeywordSelect->Name %>
+ <BR>
+ <INPUT TYPE="hidden" NAME="KeywordSelectMagic<% $KeywordSelect->id %>" VALUE="1">
+ <SELECT NAME="KeywordSelect<% $KeywordSelect->id %>"
+ <% $KeywordSelect->Single ? "" : " MULTIPLE " %> SIZE=5>
+%#
+%#
+%# All of this cruft is so we have a 'no keyword' selector for single
+%# keywords that's only selected when there's no value.
+%
+% my $selected_keywords = 0;
+% foreach my $kid ( keys %{$Descendents} ) {
+% my $selected = 0;
+% if ($CurrentKeywords->HasEntry($kid)) { $selected_keywords++; $selected=1;}
+ <OPTION VALUE="<% $kid %>"
+ <% $selected && 'SELECTED'%>>
+ <% $Descendents->{$kid} %>
+ </OPTION>
+% }
+% if ( $KeywordSelect->Single) {
+<OPTION VALUE="" <% ($selected_keywords == 0) && 'SELECTED' %> >(empty)</OPTION>
+% }
+ </SELECT>
+ </TD>
+% }
+ </TR>
+
+</TABLE>
+
+
+<%INIT>
+my $KeywordSelects = $TicketObj->QueueObj->KeywordSelects;
+</%INIT>
+
+<%ARGS>
+$TicketObj => undef
+</%ARGS>
+
diff --git a/rt/webrt/Ticket/Elements/EditLinks b/rt/webrt/Ticket/Elements/EditLinks
new file mode 100755
index 000000000..b0296fce1
--- /dev/null
+++ b/rt/webrt/Ticket/Elements/EditLinks
@@ -0,0 +1,109 @@
+%# $Header: /home/cvs/cvsroot/freeside/rt/webrt/Ticket/Elements/Attic/EditLinks,v 1.1 2002-08-12 06:17:09 ivan Exp $
+%# Copyright 1996-2000 Jesse Vincent <jesse@fsck.com>
+
+
+<TABLE>
+<TR>
+<TD VALIGN=TOP>
+<h3>New Relationships</h3>
+<i>Enter tickets or URIs to link tickets to. Seperate multiple entries with spaces.</i><br>
+<TABLE>
+<TR><TD>Merge into:</TD><TD><input name="<%$Ticket->Id%>-MergeInto"> <i>(only one ticket)</i></TD></TR>
+<TR><TD>Depends on:</TD><TD><input name="<%$Ticket->Id%>-DependsOn"></TD></TR>
+<TR><TD>Depended on by:</TD><TD><input name="DependsOn-<%$Ticket->Id%>"></TD></TR>
+<TR><TD>Parents:</TD><TD><input name="<%$Ticket->Id%>-MemberOf"></TD></TR>
+<TR><TD>Children:</TD><TD> <input name="MemberOf-<%$Ticket->Id%>"></TD></TR>
+<TR><TD>Refers to:</TD><TD><input name="<%$Ticket->Id%>-RefersTo"></TD></TR>
+<TR><TD>Referred to by:</TD><TD> <input name="RefersTo-<%$Ticket->Id%>"></TD></TR>
+</TABLE>
+</TD>
+<TD VALIGN=TOP WIDTH=50%>
+<h3>Current Relationships</h3>
+<i>(Check boxes to delete)</i><br>
+
+Depends on:<BR>
+<UL>
+% while (my $link = $Ticket->DependsOn->Next) {
+% my $member = $link->TargetObj;
+<LI>
+<INPUT TYPE=CHECKBOX NAME="DeleteLink--<%$link->Type%>-<%$link->Target%>">
+<a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: (<%$member->OwnerObj->Name%>) <%$member->Subject%>
+[<%$member->Status%>]
+
+% }
+</UL>
+
+Depended on by:<BR>
+<UL>
+% while (my $link = $Ticket->DependedOnBy->Next) {
+% my $member = $link->BaseObj;
+<LI>
+<INPUT TYPE=CHECKBOX NAME="DeleteLink-<%$link->Base%>-<%$link->Type%>-">
+<a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: (<%$member->OwnerObj->Name%>) <%$member->Subject%>
+[<%$member->Status%>]
+% }
+</UL>
+
+Parents:<BR>
+<UL>
+% while (my $link = $Ticket->MemberOf->Next) {
+% my $member = $link->TargetObj;
+<LI>
+<INPUT TYPE=CHECKBOX NAME="DeleteLink--<%$link->Type%>-<%$link->Target%>">
+<a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: (<%$member->OwnerObj->Name%>) <%$member->Subject%>
+[<%$member->Status%>]
+
+% }
+</UL>
+
+Children:<BR>
+<UL>
+% while (my $link = $Ticket->Members->Next) {
+<LI>
+<INPUT TYPE=CHECKBOX NAME="DeleteLink-<%$link->Base%>-<%$link->Type%>-">
+% my $member = $link->BaseObj;
+<a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: (<%$member->OwnerObj->Name%>) <%$member->Subject%>
+[<%$member->Status%>]
+% }
+</UL>
+
+
+Refers to:<BR>
+<UL>
+% while (my $link = $Ticket->RefersTo->Next) {
+<LI>
+<INPUT TYPE=CHECKBOX NAME="DeleteLink--<%$link->Type%>-<%$link->Target%>">
+% if ($link->TargetIsLocal) {
+% 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->TargetAsHREF%>"><%$link->Target%></A>
+% }
+%}
+</UL>
+
+Referred to by:<BR>
+<UL>
+% while (my $link = $Ticket->ReferredToBy->Next) {
+<LI>
+<INPUT TYPE=CHECKBOX NAME="DeleteLink-<%$link->Base%>-<%$link->Type%>-">
+% if ($link->BaseIsLocal) {
+% 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->BaseAsHREF%>"><%$link->Base%></A>
+%}
+% }
+</UL>
+
+
+</TD>
+</TR>
+</TABLE>
+
+
+
+<%ARGS>
+$Ticket => undef
+</%ARGS>
diff --git a/rt/webrt/Ticket/Elements/EditPeople b/rt/webrt/Ticket/Elements/EditPeople
new file mode 100755
index 000000000..4f69af970
--- /dev/null
+++ b/rt/webrt/Ticket/Elements/EditPeople
@@ -0,0 +1,37 @@
+
+<TABLE>
+<TR>
+<TD VALIGN=TOP>
+
+<h3>New watchers</h3>
+Find people whose<BR>
+<& /Elements/SelectUsers &>
+<input type=submit name="OnlySearchForPeople" value="Go!">
+
+<& AddWatchers, Ticket => $Ticket, UserString => $UserString,
+ UserOp => $UserOp, UserField => $UserField &>
+</TD><TD VALIGN=TOP>
+<h3>Owner</h3>
+Owner: <& /Elements/SelectOwner, Name => 'Owner', QueueObj => $Ticket->QueueObj, TicketObj => $Ticket, Default => $Ticket->OwnerObj->Id &>
+<h3>Current watchers</h3>
+(Check box to delete)<br>
+
+Requestors:
+<& EditWatchers, TicketObj => $Ticket, Type => 'requestors' &>
+
+Cc:
+<& EditWatchers, TicketObj => $Ticket, Type => 'cc' &>
+
+Administrative Cc:
+<& EditWatchers, TicketObj => $Ticket, Type => 'admincc' &>
+
+</TD>
+</TR>
+</TABLE>
+
+<%ARGS>
+$UserField => undef
+$UserOp => undef
+$UserString => undef
+$Ticket => undef
+</%ARGS>
diff --git a/rt/webrt/Ticket/Elements/EditWatchers b/rt/webrt/Ticket/Elements/EditWatchers
new file mode 100755
index 000000000..00185e8f9
--- /dev/null
+++ b/rt/webrt/Ticket/Elements/EditWatchers
@@ -0,0 +1,46 @@
+%# $Header: /home/cvs/cvsroot/freeside/rt/webrt/Ticket/Elements/Attic/EditWatchers,v 1.1 2002-08-12 06:17:09 ivan Exp $
+%# Copyright 1996-2000 Jesse Vincent <jesse@fsck.com>
+
+<ul>
+
+%# Print out a placeholder if there are none.
+%if ($watchers->Count == 0 ) {
+<li><i>none</i>
+% }
+
+
+%while (my $watcher=$watchers->Next) {
+<li>
+<INPUT TYPE=CHECKBOX NAME="DelWatcher<%$watcher->id%>" UNCHECKED>
+%#If there's a principal backing this user, lets give a link to their
+%# account
+%if ($watcher->IsUser) {
+<a href="<%$RT::WebPath%>/Admin/Users/Modify.html?id=<%$watcher->OwnerObj->id%>">
+<%$watcher->OwnerObj->RealName%></a>:
+%} else {
+Email address:
+%}
+<i><%$watcher->Email%></i>
+%}
+</ul>
+<%INIT>
+my ($watchers, $watcher, $set);
+if ($Type =~ /^request/i) {
+ $watchers = $TicketObj->Requestors;
+ }
+elsif ($Type =~ /^admin/i) {
+ $watchers = $TicketObj->AdminCc;
+ }
+elsif ($Type =~ /^cc/i) {
+ $watchers = $TicketObj->Cc;
+ }
+else { $watchers = $TicketObj->Watchers;
+ }
+</%INIT>
+<%ARGS>
+$TicketObj => undef
+$Type => undef
+</%ARGS>
+
+
+
diff --git a/rt/webrt/Ticket/Elements/ShowBasics b/rt/webrt/Ticket/Elements/ShowBasics
new file mode 100755
index 000000000..97c84c9d0
--- /dev/null
+++ b/rt/webrt/Ticket/Elements/ShowBasics
@@ -0,0 +1,29 @@
+ <TABLE WIDTH="100%">
+ <TR>
+ <TD VALIGN=TOP WIDTH="20%">
+ <& /Elements/ShadedBox, title => 'Id' , content => $Ticket->Id &>
+ </TD>
+ <TD VALIGN=TOP WIDTH="20%"> <& /Elements/ShadedBox, title => 'Status' , content => $Ticket->Status &>
+ </TD>
+ <TD VALIGN=TOP WIDTH="20%">
+ <& /Elements/ShadedBox, title => 'Worked' , content => $TimeWorked ." min" &>
+ </TD>
+ <TD VALIGN=TOP WIDTH="20%">
+ <& /Elements/ShadedBox, title => 'Priority', content=> $Ticket->Priority."/".$Ticket->FinalPriority &>
+ </TD>
+ <TD VALIGN=TOP WIDTH="20%">
+ <& /Elements/ShadedBox, title => 'Queue', content=> $Ticket->QueueObj->Name &>
+ </TD>
+
+
+ </TR>
+ </TABLE>
+<%INIT>
+my $TimeWorked = $Ticket->TimeWorked;
+if ($Ticket->TimeLeft > 0 ) {
+ $TimeWorked = $Ticket->TimeWorked."/".$Ticket->TimeLeft;
+}
+</%INIT>
+<%ARGS>
+$Ticket => undef
+</%ARGS>
diff --git a/rt/webrt/Ticket/Elements/ShowDates b/rt/webrt/Ticket/Elements/ShowDates
new file mode 100755
index 000000000..e17e31355
--- /dev/null
+++ b/rt/webrt/Ticket/Elements/ShowDates
@@ -0,0 +1,54 @@
+<TABLE>
+<TR>
+<TD>
+Created:
+</TD>
+<TD>
+<% $Ticket->CreatedObj->AsString %>
+</TD>
+</TR>
+<TR>
+<TD>
+Starts:
+</TD>
+<TD>
+<% $Ticket->StartsObj->AsString %> <BR>
+</TD>
+</TR>
+<TR>
+<TD>
+Started:
+</TD>
+<TD>
+<% $Ticket->StartedObj->AsString %>
+</TD>
+</TR>
+
+<TR>
+<TD>
+<a href="Display.html?id=<%$Ticket->id%>&Action=SetTold">Last Contact</a>:
+</TD>
+<TD>
+<% $Ticket->ToldObj->AsString %>
+</TD>
+</TR>
+<TR>
+<TD>
+Due:
+</TD>
+<TD><% $Ticket->DueObj->AsString %>
+</TD>
+</TR>
+<TR>
+<TD>
+Updated:
+</TD>
+<TD>
+<A HREF="#lasttrans">
+<% $Ticket->LastUpdated ? ($Ticket->LastUpdatedAsString ." by ".$Ticket->LastUpdatedByObj->Name) : "Never" | h %></a>
+</TD>
+</TR>
+</TABLE>
+<%ARGS>
+$Ticket => undef
+</%ARGS>
diff --git a/rt/webrt/Ticket/Elements/ShowDependencies b/rt/webrt/Ticket/Elements/ShowDependencies
new file mode 100755
index 000000000..488652f83
--- /dev/null
+++ b/rt/webrt/Ticket/Elements/ShowDependencies
@@ -0,0 +1,18 @@
+Depends on:<BR>
+% while (my $Link = $Ticket->DependsOn->Next) {
+% 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>
+% }
+Depended on by:<BR>
+% while (my $Link = $Ticket->DependedOnBy->Next) {
+% 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>
+% }
+
+<%ARGS>
+$Ticket => undef
+</%ARGS>
diff --git a/rt/webrt/Ticket/Elements/ShowHistory b/rt/webrt/Ticket/Elements/ShowHistory
new file mode 100755
index 000000000..155eaaabd
--- /dev/null
+++ b/rt/webrt/Ticket/Elements/ShowHistory
@@ -0,0 +1,43 @@
+<TABLE BORDER=0 width="100%">
+<TR>
+<TD ALIGN=LEFT>
+% if ($ShowTitle) {
+<font size=+3>History</font>
+% }
+&nbsp;</TD>
+<TD align=right><font size=-1>Display mode:
+% if ($ShowHeaders == $Ticket->Id) {
+[<A HREF="<%$URIFile%>?id=<%$Ticket->id%>">Brief headers</a>]
+<b>[Full headers]</b>
+% } else {
+<b>[Brief headers]</b>
+[<A HREF="<%$URIFile%>?ShowHeaders=<%$Ticket->Id%>&id=<%$Ticket->id%>">Full headers</a>]
+% }
+</font>
+</TD>
+</TR>
+</TABLE>
+
+<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=2 BORDER=0>
+% while (my $Transaction = $Transactions->Next) {
+% $i++;
+% if ($Transactions->IsLast) {
+ <a name="lasttrans"></a>
+% }
+ <& ShowTransaction, Ticket => $Ticket, Transaction => $Transaction, ShowHeaders => $ShowHeaders, Collapsed => $Collapsed, RowNum => $i &>
+% }
+</TABLE>
+<%INIT>
+
+my $Transactions = $Ticket->Transactions;
+my $i;
+
+
+</%INIT>
+<%ARGS>
+$URIFile => 'Display.html'
+$Ticket => undef
+$ShowHeaders => undef
+$Collapsed => undef
+$ShowTitle => 1
+</%ARGS>
diff --git a/rt/webrt/Ticket/Elements/ShowKeywordSelects b/rt/webrt/Ticket/Elements/ShowKeywordSelects
new file mode 100644
index 000000000..4f8a1786b
--- /dev/null
+++ b/rt/webrt/Ticket/Elements/ShowKeywordSelects
@@ -0,0 +1,26 @@
+<TABLE>
+% while ( my $KeywordSelect = $KeywordSelects->Next ) {
+ <TR>
+ <TD VALIGN=TOP>
+ <% $KeywordSelect->Name %><BR>
+ </TD>
+ <TD VALIGN=TOP>
+ <UL>
+% my $Keywords = $Ticket->KeywordsObj($KeywordSelect->Id);
+% while (my $Keyword = $Keywords->Next) {
+ <li><% $Keyword->KeywordObj->RelativePath($KeywordSelect->KeywordObj) |n %></li>
+
+% }
+ </ul>
+ </TD>
+ </TR>
+% }
+</TABLE>
+
+<%INIT>
+my $KeywordSelects = $Ticket->QueueObj->KeywordSelects;
+</%INIT>
+
+<%ARGS>
+$Ticket => undef
+</%ARGS>
diff --git a/rt/webrt/Ticket/Elements/ShowLinks b/rt/webrt/Ticket/Elements/ShowLinks
new file mode 100755
index 000000000..49795959e
--- /dev/null
+++ b/rt/webrt/Ticket/Elements/ShowLinks
@@ -0,0 +1,61 @@
+Depends on:<BR>
+<UL>
+% while (my $Link = $Ticket->DependsOn->Next) {
+% my $member = $Link->TargetObj;
+<LI><a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: (<%$member->OwnerObj->Name%>) <%$member->Subject%>
+[<%$member->Status%>]
+
+% }
+</UL>
+
+Depended on by:<BR>
+<UL>
+% while (my $Link = $Ticket->DependedOnBy->Next) {
+% my $member = $Link->BaseObj;
+<LI><a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: (<%$member->OwnerObj->Name%>) <%$member->Subject%>
+[<%$member->Status%>]
+% }
+</UL>
+Parents:<BR>
+<UL>
+% while (my $Link = $Ticket->MemberOf->Next) {
+% my $member = $Link->TargetObj;
+<LI><a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: (<%$member->OwnerObj->Name%>) <%$member->Subject%>
+[<%$member->Status%>]
+
+% }
+</UL>
+
+Children:<BR>
+<& /Ticket/Elements/ShowMembers, Ticket => $Ticket &>
+<BR>
+Refers to:<BR>
+<UL>
+% while (my $Link = $Ticket->RefersTo->Next) {
+<LI>
+% if ($Link->TargetIsLocal) {
+% 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->TargetAsHREF%>"><%$Link->Target%></A>
+% }
+%}
+</UL>
+
+Referred to by:<BR>
+<UL>
+% while (my $Link = $Ticket->ReferredToBy->Next) {
+<LI>
+% if ($Link->BaseIsLocal) {
+% 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->BaseAsHREF%>"><%$Link->Base%></A>
+%}
+% }
+</UL>
+
+<%ARGS>
+$Ticket => undef
+</%ARGS>
diff --git a/rt/webrt/Ticket/Elements/ShowMemberOf b/rt/webrt/Ticket/Elements/ShowMemberOf
new file mode 100755
index 000000000..df5dc92b0
--- /dev/null
+++ b/rt/webrt/Ticket/Elements/ShowMemberOf
@@ -0,0 +1,12 @@
+<UL>
+% my $memberof = $Ticket->MemberOf;
+% while (my $member_of = $memberof->Next) {
+<LI><a href="/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/webrt/Ticket/Elements/ShowMembers b/rt/webrt/Ticket/Elements/ShowMembers
new file mode 100755
index 000000000..0a6f12377
--- /dev/null
+++ b/rt/webrt/Ticket/Elements/ShowMembers
@@ -0,0 +1,22 @@
+% if ($members->Count) {
+<UL>
+% while (my $link = $members->Next) {
+% my $member= $link->BaseObj;
+<LI><a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: <%$member->Subject%> [<%$member->Status%>]<br>
+% if ($depth < 8) {
+<&/Ticket/Elements/ShowMembers, Ticket => $member, depth => ($depth+1) &>
+% }
+% }
+</UL>
+% }
+
+<%INIT>
+
+my $members = $Ticket->Members;
+
+</%INIT>
+
+<%ARGS>
+$Ticket => undef
+$depth => 1
+</%ARGS>
diff --git a/rt/webrt/Ticket/Elements/ShowPeople b/rt/webrt/Ticket/Elements/ShowPeople
new file mode 100755
index 000000000..ff35f484d
--- /dev/null
+++ b/rt/webrt/Ticket/Elements/ShowPeople
@@ -0,0 +1,12 @@
+Owner<BR>
+&nbsp;<B><%$Ticket->OwnerObj->Name%></B><BR>
+Requestors<BR>
+&nbsp;<B><%$Ticket->RequestorsAsString%></B><BR>
+Cc<BR>
+&nbsp;<B><%$Ticket->CcAsString%></B><BR>
+AdminCc<BR>
+&nbsp;<B><%$Ticket->AdminCcAsString%></B>
+<%ARGS>
+$Ticket => undef
+</%ARGS>
+
diff --git a/rt/webrt/Ticket/Elements/ShowReferences b/rt/webrt/Ticket/Elements/ShowReferences
new file mode 100755
index 000000000..37e2fdece
--- /dev/null
+++ b/rt/webrt/Ticket/Elements/ShowReferences
@@ -0,0 +1,27 @@
+<UL>
+% while (my $Link = $Ticket->RefersTo->Next) {
+<LI>
+% if ($Link->TargetIsLocal) {
+% my $member = $Link->TargetObj;
+
+<a href="/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> [<%$member->Status%>]<br>
+% } else {
+<A HREF="<%$Link->TargetAsHREF%>"><%$Link->Target%></A>
+% }
+%}
+
+
+
+% while (my $Link = $Ticket->ReferredToBy->Next) {
+<LI>
+% if ($Link->BaseIsLocal) {
+% my $member = $Link->BaseObj;
+<a href="/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> [<%$member->Status%>]<br>
+% } else {
+<A HREF="<%$Link->BaseAsHREF%>"><%$Link->Base%></A>
+%}
+% }
+</UL>
+<%ARGS>
+$Ticket => undef
+</%ARGS>
diff --git a/rt/webrt/Ticket/Elements/ShowRequestor b/rt/webrt/Ticket/Elements/ShowRequestor
new file mode 100644
index 000000000..fcbe71df1
--- /dev/null
+++ b/rt/webrt/Ticket/Elements/ShowRequestor
@@ -0,0 +1,35 @@
+<%PERL>
+my $people = $Ticket->Requestors;
+while (my $requestor=$people->Next) {
+if (($requestor->Owner ) && (my $user=$requestor->OwnerObj)) {
+my $name=$user->RealName || $user->EmailAddress;
+my $tickets = new RT::Tickets($session{'CurrentUser'});
+$tickets->LimitRequestor(VALUE => $user->EmailAddress);
+$tickets->LimitStatus( VALUE => 'open');
+$tickets->LimitStatus( VALUE => 'new');
+$tickets->RowsPerPage(25);
+$tickets->OrderBy(FIELD => 'Priority',
+ ORDER => 'DESC');
+</%PERL>
+
+% unless ($user->Privileged) {
+<& /Elements/TitleBoxStart,
+ title => "<a class='inverse' href=\"$RT::WebPath/Admin/Users/Modify.html?id=".$user->id."\">More about $name</a>" &>
+
+Comments about this user:<BR>
+<B><% ($user->Comments || "No comment entered about this user") %></B><BR>
+
+This user's 25 highest priority tickets:<BR>
+<UL>
+%while (my $w=$tickets->Next) {
+<LI><%$w->Id%>: <a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$w->id%>"><%$w->Subject%></a> (<%$w->Status%>)
+%}
+</UL>
+<& /Elements/TitleBoxEnd &>
+
+% }
+% }
+%}
+<%ARGS>
+$Ticket=>undef
+</%ARGS>
diff --git a/rt/webrt/Ticket/Elements/ShowSummary b/rt/webrt/Ticket/Elements/ShowSummary
new file mode 100755
index 000000000..b80ceb4fd
--- /dev/null
+++ b/rt/webrt/Ticket/Elements/ShowSummary
@@ -0,0 +1,61 @@
+ <TABLE WIDTH="100%" >
+ <TR>
+ <TD VALIGN=TOP >
+ <& /Elements/TitleBoxStart, title => 'The Basics',
+ title_href =>"$RT::WebPath/Ticket/Modify.html?id=".$Ticket->Id,
+ title_class=> 'inverse',
+ color => "#993333" &>
+ <& /Ticket/Elements/ShowBasics, Ticket => $Ticket &>
+ <& /Elements/TitleBoxEnd &>
+
+ <BR>
+
+ <& /Elements/TitleBoxStart,
+ title_href =>"$RT::WebPath/Ticket/Modify.html?id=".$Ticket->Id,
+ title_class=> 'inverse',
+ title => "Keyword Selections", color => "#993300"
+ &>
+ <& /Ticket/Elements/ShowKeywordSelects, Ticket => $Ticket &>
+ <& /Elements/TitleBoxEnd &>
+
+
+
+ <BR>
+ <& /Elements/TitleBoxStart, title => 'Relationships',
+ title_href => "$RT::WebPath/Ticket/ModifyLinks.html?id=".$Ticket->Id,
+ title_class=> 'inverse',
+ titleright => '', color=> "#336633" &>
+ <& /Ticket/Elements/ShowLinks, Ticket => $Ticket &>
+ <& /Elements/TitleBoxEnd &>
+ </TD>
+ <BR>
+ <TD VALIGN=TOP >
+
+ <& /Elements/TitleBoxStart, title => "Dates",
+ title_href =>"$RT::WebPath/Ticket/ModifyDates.html?id=".$Ticket->Id,
+ title_class=> 'inverse',
+ color => "#663366" &>
+ <& /Ticket/Elements/ShowDates, Ticket => $Ticket &>
+ <& /Elements/TitleBoxEnd &>
+ <BR>
+ <& /Elements/TitleBoxStart, title => 'People',
+ title_href =>"$RT::WebPath/Ticket/ModifyPeople.html?id=".$Ticket->Id,
+ title_class=> 'inverse',
+ color => "#333399" &>
+ <& /Ticket/Elements/ShowPeople, Ticket => $Ticket &>
+ <& /Elements/TitleBoxEnd &>
+ <BR>
+
+ <& /Ticket/Elements/ShowRequestor, Ticket => $Ticket &>
+
+
+ </TD>
+ </TR>
+ </TABLE>
+<%ARGS>
+$Ticket => undef
+</%ARGS>
+
+
+
+
diff --git a/rt/webrt/Ticket/Elements/ShowTransaction b/rt/webrt/Ticket/Elements/ShowTransaction
new file mode 100755
index 000000000..a0da008b3
--- /dev/null
+++ b/rt/webrt/Ticket/Elements/ShowTransaction
@@ -0,0 +1,162 @@
+<TR bgcolor="<%$rowbgcolor%>">
+<TD bgcolor="<%$bgcolor%>"><A NAME="#<%$Transaction->Id%>"></A>&nbsp&nbsp;</TD>
+<TD>&nbsp&nbsp;</TD>
+<TD><font size=-2><% $transdate|n %></font>&nbsp;</TD>
+<TD ALIGN="LEFT"><b><%$Transaction->CreatorObj->Name%> - <%$TicketString%> <%$Transaction->BriefDescription%>
+
+</b></TD>
+<TD><%$TimeTaken%>&nbsp;</TD>
+<TD ALIGN="RIGHT"><font size=-1><%$titlebar_commands|n%></font></TD>
+</TR>
+<%PERL>
+
+unless ($Collapsed) {
+ $attachments->GotoFirstItem;
+ while (my $message=$attachments->Next) {
+ #we don't want to show any empty transactions, unless they have kids
+ next unless (length $message->Content || $message->Children->Count);
+ my ($headers, $content);
+
+ </%PERL>
+
+
+<%PERL>
+ if ($message->Parent == 0) {
+ if ($ShowHeaders == $Ticket->Id) {
+ $headers = $message->Headers;
+ } else {
+ $headers = $message->NiceHeaders;
+ }
+ chomp $headers;
+ $headers .= "\n\n" if ($headers);
+ }
+ # 13456 is a random # of about the biggest size we want to see inline text
+ my $MAX_INLINE_BODY = 13456;
+ if ($message->ContentType =~ m{^(text/plain|message|text$)}i &&
+ length($message->Content)< $MAX_INLINE_BODY ) {
+
+ $content = $message->Content;
+
+ my $wrapper = new Text::Wrapper (columns=>85);
+ $content = $wrapper->wrap($content);
+ $content =~ s/&/&amp;/g;
+ $content =~ s/</&lt;/g;
+ $content =~ s/>/&gt;/g;
+ $content =~ s!((?:http|https|ftp|mailto):\S*?)([\s"']|&gt;|\.[\n])!<A HREF=\"$1\" TARGET=new>$1</A>$2!g;
+
+
+ }
+ else {
+ $content = "&nbsp;";
+ }
+
+</%PERL>
+<TR BGCOLOR="<%$rowbgcolor%>">
+ <TD BGCOLOR="<%$bgcolor%>">&nbsp;&nbsp;</TD>
+ <TD>&nbsp&nbsp;</TD>
+ <TD COLSPAN=3 VALIGN=TOP>
+ <PRE>
+<%$headers%><%$content|n%>
+</PRE>
+ </TD>
+ <TD VALIGN=TOP ALIGN=RIGHT>
+
+% if ($message->Parent == 0 ) {
+<BR>
+% }
+<%PERL>
+my $size = length($message->Content());
+
+if ($size) {
+ if ($size > 1024) {
+ $size = int($size/102.4)/10 . "k";
+ }
+ else {
+ $size = $size ."b";
+ }
+</%PERL>
+<font size=-1><A HREF="Attachment/<%$Transaction->Id%>/<%$message->Id%>/<%$message->Filename%>">Download <%$message->Filename|| '(untitled)'%></a> <% $size %></font>
+% }
+</TD>
+</TR>
+% }
+% }
+
+
+
+<%ARGS>
+$Ticket => undef
+$Transaction => undef
+$ShowHeaders => undef
+$Collapsed => undef
+$ShowTitleBarCommands => 1
+$RowNum => 1
+</%ARGS>
+
+<%INIT>
+
+
+my ($TimeTaken, $TicketString, $bgcolor, $rowbgcolor);
+
+my $transdate = $Transaction->CreatedAsString();
+$transdate =~ s/\s/&nbsp;/g;
+
+if ($RowNum % 2) {
+ $rowbgcolor="#cccccc";
+} else {
+ $rowbgcolor="#ffffff";
+}
+
+if ($Transaction->Type =~ /^(Create|Correspond|Comment$)/) {
+ if ($Transaction->IsInbound) {
+ $bgcolor="#336699";
+ }
+ else {
+ $bgcolor="#339999";
+ }
+} elsif (($Transaction->Field =~ /^Owner$/) or
+ ($Transaction->Type =~ /^(AddWatcher|DelWatcher)$/)) {
+ $bgcolor="#333399";
+
+} elsif ($Transaction->Type =~ /^(AddLink|DeleteLink)$/) {
+ $bgcolor="#336633";
+} elsif ($Transaction->Type =~ /^(Status|Set|Keyword|Told)$/) {
+ if ($Transaction->Field =~ /^(Told|Starts|Started|Due)$/) {
+ $bgcolor="#663366";
+ }
+ else {
+ $bgcolor="#993333";
+ }
+}
+else {
+ $bgcolor="#cccccc";
+}
+
+if ($Ticket->Id != $Transaction->Ticket) {
+ $TicketString = "Ticket ".$Transaction->Ticket .": ";
+}
+
+if ($Transaction->TimeTaken > 0) {
+ $TimeTaken = $Transaction->TimeTaken." min"
+}
+my $attachments = $Transaction->Attachments;
+
+my $titlebar_commands='&nbsp;';
+
+# If the transaction has anything attached to it at all
+if ($Transaction->Message->First && $ShowTitleBarCommands) {
+ if ($Transaction->TicketObj->CurrentUserHasRight('ReplyToTicket')) {
+ $titlebar_commands .=
+ "[<a href=\"Update.html?id=".
+ $Transaction->Ticket . "&QuoteTransaction=".$Transaction->Id.
+ "&Action=Respond\">Reply</a>]&nbsp;";
+ }
+ if ($Transaction->TicketObj->CurrentUserHasRight('CommentOnTicket')) {
+ $titlebar_commands .=
+ "[<a href=\"Update.html?id=".$Transaction->Ticket.
+ "&QuoteTransaction=".$Transaction->Id.
+ "&Action=Comment\">Comment</a>]";
+ }
+}
+
+</%INIT>
diff --git a/rt/webrt/Ticket/Elements/Tabs b/rt/webrt/Ticket/Elements/Tabs
new file mode 100755
index 000000000..8cce197de
--- /dev/null
+++ b/rt/webrt/Ticket/Elements/Tabs
@@ -0,0 +1,126 @@
+<& /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 .= '[<A HREF="Display.html?id='.
+ $items->[0]->id.
+ '">&lt;&lt; First</a>] ';
+ $tabs_scalar .= '[<A HREF="Display.html?id='.
+ $items->[$indexs[0]-1]->id.
+ '">&lt; Prev</a>] ';
+ }
+ # 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='.
+ $items->[$indexs[0]+1]->id.
+ '">Next &gt;</a>] ';
+ $tabs_scalar .= '[<A HREF="Display.html?id='.
+ $items->[-1]->id.
+ '">Last &gt;&gt</a>]';
+ }
+ $tabs_scalar .= "<BR><BR>";
+ }
+ }
+}
+</%INIT>
+
+
+<%ARGS>
+$Ticket => undef
+$current_tab => undef
+</%ARGS>
diff --git a/rt/webrt/Ticket/Elements/ToolBar b/rt/webrt/Ticket/Elements/ToolBar
new file mode 100755
index 000000000..108e2f784
--- /dev/null
+++ b/rt/webrt/Ticket/Elements/ToolBar
@@ -0,0 +1,3 @@
+<%ARGS>
+$Ticket => undef
+</%ARGS>