[Rt-commit] r4487 - in rtir/branches/1.9-EXPERIMENTAL:
html/RTIR/Incident
ruz at bestpractical.com
ruz at bestpractical.com
Fri Feb 3 18:41:38 EST 2006
Author: ruz
Date: Fri Feb 3 18:41:35 2006
New Revision: 4487
Modified:
rtir/branches/1.9-EXPERIMENTAL/ (props changed)
rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Incident/LinkToIncident.html
Log:
r620 at cubic-pc: cubic | 2006-01-27 23:50:17 +0300
* get rid of unused code
Modified: rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Incident/LinkToIncident.html
==============================================================================
--- rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Incident/LinkToIncident.html (original)
+++ rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Incident/LinkToIncident.html Fri Feb 3 18:41:35 2006
@@ -41,39 +41,37 @@
&>
<form action="<%RT->Config->Get('WebPath')%>/RTIR/Incident/Display.html" method="post">
-<input type="hidden" name="Child" value="<%$id%>" />
+<input type="hidden" name="Child" value="<% $id %>" />
<& /RTIR/Search/Elements/ShowResults,
- Queue => $Queue,
- Query => $Query,
- QueryString => $QueryString,
- BaseURL => $BaseURL,
- Format => $Format,
- &>
+ Queue => $Queue,
+ BaseQuery => $BaseQuery,
+ Query => $Query,
+ BaseURL => $BaseURL,
+ Format => $Format,
+ Rows => $Rows,
+ Page => $Page,
+ OrderBy => $OrderBy,
+ Order => $Order,
+&>
-<& /Elements/Submit, Name => "SubmitTicket", Caption => $SubmitCaption, Label => loc("Link") &>
+<& /Elements/Submit,
+ Name => "LinkChild",
+ Caption => $title,
+ Label => loc("Link"),
+&>
</form>
-<hr>
-
<%INIT>
-$Format = RT->Config->Get('RTIRSearchResultFormats')->{'LinkIncident'};
-
-my ($Type) = $m->comp('/RTIR/Elements/Type', Queue => 'Incidents');
-
my $ChildObj = LoadTicket($id);
-my $Queue = $ChildObj->QueueObj->Name;
-
-my $SubmitCaption = loc("Link #[_1] with selected Incident", $ChildObj->id);
-my $QueueObj = new RT::Queue($session{'CurrentUser'});
-$QueueObj->Load('Incidents') || Abort(loc("Queue could not be loaded."));
+my ($Type) = $m->comp( '/RTIR/Elements/Type', TicketObj => $ChildObj );
+my $title = loc( "Link [_1] #[_2] to selected Incident", $Type, $id );
-my $title = loc("Link [_1] #[_2] to selected Incident", $Type, $id);
+my $BaseQuery = $m->comp( '/RTIR/Elements/BaseQuery', Queue => $Queue );
-if (!$Query) {
- $Query = $m->comp('/RTIR/Elements/NewQuery', Queue => 'Incidents');
-}
+my $current_tab = "RTIR/Incident/LinkToIncident.html?id=9"; #XXX: WTF id=9 does here?
+my $tab = $m->interp->apply_escapes($current_tab,'u');
my $QueryString = "&".$m->comp('/Elements/QueryString',
Query => $Query,
@@ -83,28 +81,23 @@
Order => $Order,
Page => $Page);
-if (!$BaseQuery) {
- $BaseQuery = $m->comp('/RTIR/Elements/BaseQuery', Queue => 'Incidents');
-}
-
-$Query = "$BaseQuery AND ( $Query )";
-
-my $current_tab = "RTIR/Incident/LinkToIncident.html?id=9";
-my $tab = $m->interp->apply_escapes($current_tab,'u');
-
-my $path = "RTIR/Search/Refine.html?ResultPage=$BaseURL&Queue=Incidents&id=$id¤t_tab=$tab$QueryString",
+my $path = "RTIR/Search/Refine.html?"
+ . $m->comp( '/Elements/QueryString',
+ ResultPage => $BaseURL,
+ Queue => $Queue,
+ id => $id,
+ current_tab => $tab,
+ ) ."&$QueryString";
</%INIT>
-
<%ARGS>
-$id => undef
+$id => undef
+$Queue => 'Incidents'
$BaseURL => RT->Config->Get('WebPath') . "/RTIR/Incident/LinkToIncident.html"
-$BaseQuery => undef
-$Query => undef
-$Format => undef
-$HideResults => 0
-$Rows => 50
-$Page => 1
+$Query => $m->comp( '/RTIR/Elements/NewQuery', Queue => $Queue )
+$Format => RT->Config->Get('RTIRSearchResultFormats')->{'LinkIncident'}
+$Rows => 50
+$Page => 1
$OrderBy => 'id'
-$Order => 'ASC'
+$Order => 'ASC'
</%ARGS>
More information about the Rt-commit
mailing list