<!-- $Id$ -->
<TABLE class="lmsbox lms-ui-tab-container lms-ui-sortable" id="rtticketchildren">
	<COLGROUP>
		<COL style="width: 99%;">
		<COL style="width: 1%;">
	</COLGROUP>
	<THEAD>
		<TR class="hand lmsbox-titlebar nobr" data-lmsbox-content="childpanel-{$layout.module}">
			<TD class="bold">
				{icon name="helpdesk" label="Secondary tickets" class="lms-ui-sortable-handle"}
			</TD>
			<TD>
				{if $ticket.state != $smarty.const.RT_RESOLVED}
					{button icon="add" label="Add"
						onclick="location.href='?m=rtticketadd&parentid={$ticket.ticketid}{if $ticket.customerid}&customerid={$ticket.customerid}{/if}';"}
				{/if}
			</TD>
		</TR>
	</THEAD>
	<TBODY>
		<TR id="childpanel-{$layout.module}">
			<TD colspan="2">
				<table class="lmsbox{if !$childtickets}-inner{/if} lms-ui-background-cycle">
					<COLGROUP>
					    <COL style="width: 1%;">
					    <COL style="width: 1%;">
					    <COL style="width: 1%;">
					    <COL style="width: 1%;">
					    <COL style="width: 50%;">
					    <COL style="width: 45%;">
					    <COL style="width: 1%;">
					    <COL style="width: 1%;">
					    <COL style="width: 1%;">
					    <COL style="width: 1%;">
					</COLGROUP>
					<THEAD>
						{include file="rt/rtheader.html"}
					</THEAD>
					<TBODY>
					{foreach $childticketscontent as $ticket}
						{$id = $ticket.ticketid}
						{include file="rt/rtqueueviewboxrow.html"}
					{foreachelse}
					<tr>
						<td colspan="11" class="empty-table">
							{trans("There are no secondary tickets")}
						</td>
					</tr>
					{/foreach}
					</TBODY>
				</table>
			</TD>
		</TR>
	</TBODY>
</TABLE>

<SCRIPT type="text/javascript">
	if (getCookie('childpanel-{$layout.module}') == '1')
		document.getElementById('childpanel-{$layout.module}').style.display = '';
</SCRIPT>
