[Rt-commit] [svn] r1394 - in rtir/branches/1.1/html/RTIR: Elements Incident

leira at pallas.eruditorum.org leira at pallas.eruditorum.org
Wed Sep 1 16:15:57 EDT 2004


Author: leira
Date: Wed Sep  1 16:15:57 2004
New Revision: 1394

Modified:
   rtir/branches/1.1/html/RTIR/Elements/NewReports
   rtir/branches/1.1/html/RTIR/Elements/QueueTabs
   rtir/branches/1.1/html/RTIR/Elements/ShowIncidents
   rtir/branches/1.1/html/RTIR/Incident/LinkToIncident.html
Log:
Move "Link to Incident" in the menu.

It used to appear under the menu of the child, with the text "Link to
Incident".  Now it can only be accessed through a link on the child's
display page, when the user has done so, a link appears under
Incidents menu, with the text "Link Investigation #37" or the like.

This leaves less depth in the menu, so we can put a "Refine" option
underneath it.



Modified: rtir/branches/1.1/html/RTIR/Elements/NewReports
==============================================================================
--- rtir/branches/1.1/html/RTIR/Elements/NewReports	(original)
+++ rtir/branches/1.1/html/RTIR/Elements/NewReports	Wed Sep  1 16:15:57 2004
@@ -62,7 +62,7 @@
 </TD>
 <TD ALIGN=RIGHT>
 % if ($Ticket->Owner == $session{CurrentUser}->id) {
-[<A HREF="<% $RT::WebPath %>/RTIR/Incident/LinkToIncident.html?ClearRestrictions=1&id=<%$Ticket->Id%>"><&|/l&>Link</&></A>]
+[<A HREF="<% $RT::WebPath %>/RTIR/Incident/LinkToIncident.html?ClearRestrictions=1&child=<%$Ticket->Id%>"><&|/l&>Link</&></A>]
 [<A HREF="<% $RT::WebPath %>/RTIR/Update.html?id=<%$Ticket->Id%>"><&|/l&>Update</&></A>]
 % } elsif ($Ticket->Owner == $RT::Nobody->Id) {
 [<A HREF="<% $RT::WebPath %>/RTIR/Display.html?Action=Take&id=<%$Ticket->Id%>"><&|/l&>Take</&></A>]

Modified: rtir/branches/1.1/html/RTIR/Elements/QueueTabs
==============================================================================
--- rtir/branches/1.1/html/RTIR/Elements/QueueTabs	(original)
+++ rtir/branches/1.1/html/RTIR/Elements/QueueTabs	Wed Sep  1 16:15:57 2004
@@ -109,13 +109,9 @@
             path  => "RTIR/Split.html?Ticket=" . $id, };
 
     $ticket_page_tabs->{'_G'} = { title => loc('Merge'),
-            path  => "RTIR/Merge.html?NewSearch=1&id=$id" };
+            path  => "RTIR/Merge.html?NewSearch=1&id=$id",
+	    separator => 1  };
 
-    if ($Type ne 'Incident') {
-	$ticket_page_tabs->{'_H'} = { title => loc('Link to Incident'),
-				      path  => "RTIR/Incident/LinkToIncident.html?id=$id",
-				      separator => 1 };
-    }
 }
 
 foreach my $tab ( sort keys %{$ticket_page_tabs} ) {
@@ -226,10 +222,22 @@
                  title     => loc('Bulk Reject'),
                  separator => 1 };
 }
+
+if ($Type eq 'Incident' && $ChildObj) {
+    my $childq = $ChildObj->QueueObj->Name;
+    next if $childq eq 'Incidents';
+    my ($childtype, undef) = $m->comp('/RTIR/Elements/Type', Queue => $childq);
+    
+    $tabs->{'h'} = { title => loc('Link [_1] #[_2]', $childtype, $ChildObj->Id),
+				  path  => "RTIR/Incident/LinkToIncident.html?child=" . $ChildObj->Id,
+				  separator => 1 };
+}
+
 </%INIT>
 
   
 <%ARGS>
+$ChildObj => undef
 $Ticket => undef
 $subtabs => undef
 $current_tab => undef

Modified: rtir/branches/1.1/html/RTIR/Elements/ShowIncidents
==============================================================================
--- rtir/branches/1.1/html/RTIR/Elements/ShowIncidents	(original)
+++ rtir/branches/1.1/html/RTIR/Elements/ShowIncidents	Wed Sep  1 16:15:57 2004
@@ -39,7 +39,7 @@
 
 % if ($depth == 1) {
 %   if ($Ticket->Owner == $session{'CurrentUser'}->id) {
-<a href="<%$RT::WebPath%>/RTIR/Incident/LinkToIncident.html?id=<%$Ticket->Id%>&ClearRestrictions=1">
+<a href="<%$RT::WebPath%>/RTIR/Incident/LinkToIncident.html?child=<%$Ticket->Id%>&ClearRestrictions=1">
 <b>[Link]</b></a>
 <a href="<%$RT::WebPath%>/RTIR/Create.html?child=<%$Ticket->Id%>&Queue=Incidents">
 <b>[New]</b></a> 

Modified: rtir/branches/1.1/html/RTIR/Incident/LinkToIncident.html
==============================================================================
--- rtir/branches/1.1/html/RTIR/Incident/LinkToIncident.html	(original)
+++ rtir/branches/1.1/html/RTIR/Incident/LinkToIncident.html	Wed Sep  1 16:15:57 2004
@@ -25,14 +25,15 @@
 <& /RTIR/Elements/Header, 
     Title => $title, 
     Refresh => $session{'tickets_refresh_interval'} &>
-<& '/RTIR/'.$Type.'/Elements/Tabs', 
-    Ticket => $ChildObj, 
-    current_tab => "RTIR/Incident/LinkToIncident.html?id=$id",
-    current_subtab => "RTIR/Incident/LinkToIncident.html?id=$id",
+
+<& '/RTIR/Incident/Elements/Tabs', 
+    ChildObj => $ChildObj, 
+    current_tab => "RTIR/Incident/LinkToIncident.html?child=$child",
+    current_subtab => "RTIR/Incident/LinkToIncident.html?child=$child",
     Title => $title &>
 
 <form action='Display.html' method=get>
-<input type=hidden name=child value=<%$id%>>
+<input type=hidden name=child value=<%$child%>>
 
 <& /RTIR/Search/Elements/ShowResults, 
     Queue => $Queue,
@@ -49,9 +50,9 @@
 <%INIT>
 $Format = $RT::RTIRLinkIncidentSearchResultFormat;
 
-my ($Type, undef) = $m->comp('/RTIR/Elements/Type', Ticket => $id);
+my ($Type, undef) = $m->comp('/RTIR/Elements/Type', Ticket => $child);
 
-my $ChildObj = LoadTicket($id);
+my $ChildObj = LoadTicket($child);
 my $Queue = $ChildObj->QueueObj->Name;
 
 my $SubmitCaption = loc("Link #[_1] with selected Incident", $ChildObj->id);
@@ -94,7 +95,7 @@
 
 Abort(loc("No search to operate on.")) unless ($session{'tickets'});
 
-$title = loc("Link [_1] #[_2] to selected Incident", $Type, $id);
+$title = loc("Link [_1] #[_2] to selected Incident", $Type, $child);
 
 $session{'i'}++;
 $session{'tickets'} = RT::Tickets->new($session{'CurrentUser'})  unless ($session{'tickets'});
@@ -131,7 +132,7 @@
 </%INIT>
 
 <%ARGS>
-$id => undef
+$child => undef
 $BaseURL => "/RTIR/Incident/LinkToIncident.html"
 $BaseQuery => undef
 $Query => undef


More information about the Rt-commit mailing list