Skip to content

Commit

Permalink
Extract out the section header bits into a mason component
Browse files Browse the repository at this point in the history
  • Loading branch information
obra committed Dec 14, 2010
1 parent 6a431a5 commit f0012df
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 53 deletions.
60 changes: 60 additions & 0 deletions html/RTIR/Tools/Elements/LookupRelatedTickets
@@ -0,0 +1,60 @@
<table width="100%" border="0" cellpadding="2" cellspacing="0">
<tr><td valign="top" width="50%">

<&| /Widgets/TitleBox, title => loc('Incidents: [_1]', $q), class => 'tickets-list-incident' &>
<& /RTIR/Elements/IncidentSummary,
Type => $TicketType,
ticket => $TicketObj->id,
lookuptype => $LookupType,
q => $q,
&>
</&>

</td><td valign="top" width="50%">

<&| /Widgets/TitleBox, title => loc('Investigations: [_1]', $q), class => 'tickets-list-investigation' &>
<& /RTIR/Elements/ChildSummary,
Queue => 'Investigations',
Type => $TicketType,
ticket => $TicketObj->id,
lookuptype => $LookupType,
q => $q,
&>
</&>

</td></tr><tr><td valign="top" width="50%">

<&| /Widgets/TitleBox, title => loc('Incident Reports: [_1]', $q), class => 'tickets-list-report' &>
<& /RTIR/Elements/ChildSummary,
Queue => 'Incident Reports',
Type => $TicketType,
ticket => $TicketObj->id,
lookuptype => $LookupType,
q => $q,
&>
</&>

</td><td width="50%" valign="top">

% unless ( RT->Config->Get('RTIR_DisableBlocksQueue') ) {
<&| /Widgets/TitleBox, title => loc('Blocks: [_1]', $q), class => 'tickets-list-block' &>
<& /RTIR/Elements/ChildSummary,
Queue => 'Blocks',
Type => $TicketType,
ticket => $TicketObj->id,
lookuptype => $LookupType,
q => $q,
&>
</&>
</td></tr>

</table>
% }
<%args>
$TicketObj
$LookupType => undef
$q => undef
</%args>
<%init>
my $TicketType = RT::IR::TicketType( Ticket => $TicketObj );
</%init>
54 changes: 1 addition & 53 deletions html/RTIR/Tools/Lookup.html
Expand Up @@ -37,60 +37,9 @@
% }

% unless ( $HideResults ) {
<table width="100%" border="0" cellpadding="2" cellspacing="0">
<tr><td valign="top" width="50%">

<&| /Widgets/TitleBox, title => loc('Incidents: [_1]', $q), class => 'tickets-list-incident' &>
<& /RTIR/Elements/IncidentSummary,
Type => $TicketType,
ticket => $ticket,
lookuptype => $type,
q => $q,
&>
</&>

</td><td valign="top" width="50%">

<&| /Widgets/TitleBox, title => loc('Investigations: [_1]', $q), class => 'tickets-list-investigation' &>
<& /RTIR/Elements/ChildSummary,
Queue => 'Investigations',
Type => $TicketType,
ticket => $ticket,
lookuptype => $type,
q => $q,
&>
</&>

</td></tr><tr><td valign="top" width="50%">

<&| /Widgets/TitleBox, title => loc('Incident Reports: [_1]', $q), class => 'tickets-list-report' &>
<& /RTIR/Elements/ChildSummary,
Queue => 'Incident Reports',
Type => $TicketType,
ticket => $ticket,
lookuptype => $type,
q => $q,
&>
</&>

</td><td width="50%" valign="top">

% unless ( RT->Config->Get('RTIR_DisableBlocksQueue') ) {
<&| /Widgets/TitleBox, title => loc('Blocks: [_1]', $q), class => 'tickets-list-block' &>
<& /RTIR/Elements/ChildSummary,
Queue => 'Blocks',
Type => $TicketType,
ticket => $ticket,
lookuptype => $type,
q => $q,
&>
</&>
<& Elements/LookupRelatedTickets, TicketObj => $TicketObj, LookupType => $type, q => $q &>
% }

</td></tr>

</table>
% }

<hr>

Expand Down Expand Up @@ -167,7 +116,6 @@ <h2><&|/l&>Look Up Information</&></h2>
if ( $ticket ) {
$TicketObj = LoadTicket( $ticket );
$ticket = $ARGS{'ticket'} = $TicketObj->id;
$TicketType = RT::IR::TicketType( Ticket => $TicketObj );
}

my $Format = RT->Config->Get('RTIRSearchResultFormats')->{$TicketType . 'Default'};
Expand Down

0 comments on commit f0012df

Please sign in to comment.