<span class="grid-meta" style="float:right;padding-left:3px;display: none">[l]Total Time Elapsed[/l]: {TICKET_TIMEELAPSED}</span>
<!-- BEGIN DYNAMIC BLOCK: collapsedticketlog -->
<div id="collapsedview" style="clear:both;">
    <div class="ticket-collapsed-divider"></div>
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
            <td width="8px"><img src="../templates/admin/images/ticket/collapse-left.png" width="8px" alt="" /></td>
            <td width="100%" onclick="location.href='index.php?fuse=support&view=Admin_ViewTicketMessage&ticketID={TICKET_ID}&amp;expand=1';"
                style="cursor: pointer;background:url('../templates/admin/images/ticket/collapse-bg.png') repeat-x scroll 0 0">
            <div style="text-align:center;"><span id="ticket-messages-count" style="background:white;color:#999999; padding: 2px 6px;">{TICKETTOTALMSGS} [l]Messages[/l]</span></div>
            </td>
            <td width="6px"><img src="../templates/admin/images/ticket/collapse-right.png" width="6px" alt="" /></td>
        </tr>
    </table>
</div>
<!-- END DYNAMIC BLOCK: collapsedticketlog -->

<!-- BEGIN DYNAMIC BLOCK: ticketlog -->
<div id="div_log_{LOG_ID}" style="clear:both;">
	<a name="message-{LOG_ID}"></a>
    <input type="hidden" id="log_id" value="{LOG_ID}" />

    <!-- BEGIN DYNAMIC BLOCK: ticketlog-header -->
    <div id="msgEntryHeader" style="background-color: #F7F7F7; font-weight : bold; color:black; padding:5px 5px 5px 0;border-bottom:1px solid #EBEBEB;border-top:1px solid #EBEBEB;"><!-- #F7F7F7 -->
        <div style="padding-left:5px;float:left;width:400px;font-weight:bold;">
            {LOG_OWNER}  <!-- BEGIN DYNAMIC BLOCK: viaEmail -->([l]via E-mail[/l])<!-- END DYNAMIC BLOCK: viaEmail -->
        </div>
        <div style="text-align:right;font-size:10px;">
            <!-- BEGIN DYNAMIC BLOCK: log_action -->
                <span class="{LOG_ACTIONSTYLE}">{LOG_ACTIONTEXT}&nbsp;&nbsp;</span>
			  <!-- END DYNAMIC BLOCK: log_action -->
			  <a href="#message-{LOG_ID}">[l]Submitted[/l]: {LOG_SUBMITTIME}</a>
        </div>
    </div>
    <table border='0' cellpadding='0' cellspacing='0' width="100%">
    <!-- END DYNAMIC BLOCK: ticketlog-header -->

    <!-- BEGIN DYNAMIC BLOCK: ticketlog-collapsed-header -->
    <table border="0" cellpadding="0" cellspacing="0" width="100%" style="position:relative;top:-4px;">
        <tr>
            <td width="6px"><img src="../templates/admin/images/ticket/collapse-bottom-left.png" width="6px" alt="" /></td>
            <td style="background:url('../templates/admin/images/ticket/collapse-bottom-bg.png') repeat-x scroll 0 0">
                <span style="font-weight:bold;position:relative;top:-5px;padding-left:5px;">{LOG_OWNER} <!-- BEGIN DYNAMIC BLOCK: viaEmail -->([l]via E-mail[/l])<!-- END DYNAMIC BLOCK: viaEmail --></span>
                <span style="float:right;font-size:10px;padding-right:3px;position:relative;top:-3px;">
                    <!-- BEGIN DYNAMIC BLOCK: log_action -->
                        <span style="{LOG_ACTIONSTYLE}">{LOG_ACTIONTEXT}&nbsp;&nbsp;</span>
                    <!-- END DYNAMIC BLOCK: log_action -->
                    <a href="#message-{LOG_ID}">[l]Submitted[/l]: {LOG_SUBMITTIME}</a>
                </span>
            </td>
            <td width="4px"><img src="../templates/admin/images/ticket/collapse-bottom-right.png" width="4px" alt="" /></td>
        </tr>
    </table>
    <table border='0' cellpadding='0' cellspacing='0' width="100%" style="position:relative;top:-9px;padding-left:2px;">
    <!-- END DYNAMIC BLOCK: ticketlog-collapsed-header -->

    <!-- header added as part of block above so that we can change position based on collapsed or not -->
        <tr>
            <td style="width:130px;" valign='top'>
                <div class="{LOG_LABELCOLOR}" style="width:100% !important;text-align:left; font-size:10px;"><span style="margin:5px;">{LOG_TIMEBETWEENPOSTS}</span></div>
                <div style="padding-top:10px;text-align:center;padding-bottom:20px;">
                    <img alt="" src="{profileurl}" width="60" height="60" style="border:3px solid #D9D9D9;" />
                    <!-- BEGIN DYNAMIC BLOCK: log_edit -->
                    <div id="editLinks_log_{LOG_ID}">
                        <a style="font-size:11px;" class='liveupdate' href="javascript:ShowEditBox('log_{LOG_ID}','support','EditTicketLog_Async','log');">[l]Edit[/l]</a>&nbsp;&nbsp;<a style="font-size:11px;" class='liveupdate' href="javascript:DeleteLog('log_{LOG_ID}','support','DeleteTicketLog_Async');">[l]Delete[/l]</a>
                    </div>
                </div>
                <!-- END DYNAMIC BLOCK: log_edit -->
            </td>
            <td rowspan=2 style="border-left:1px dotted #E2E2E2;padding-left:14px;padding-top:5px; background-color:rgb(255,255,255); font-size:11px;" valign=top id="log_{LOG_ID}">{LOG_MESSAGE}<br><br></td>
        </tr>
    </table>
</div>
<!-- END DYNAMIC BLOCK: ticketlog -->

<!-- BEGIN DYNAMIC BLOCK: ticketreply -->
<div style="padding-top:10px;"></div>
    <form id="SupportForm" action="index.php?fuse=support&action=Admin_SaveNewTicketEntry" method="post" enctype="multipart/form-data">
        <input type="hidden" name="troubleticketid" value="{TICKET_ID}" />
        <input type="hidden" name="email" value="{GUEST_EMAIL}" />
        <input type="hidden" name="accesscode" value="{ACCESS_CODE}" />
        <input type="hidden" name="userid" value="{MYUSERID}" />
        <input type="hidden" name="usertype" value="{MYUSERTYPE}" />
        <input type="hidden" name="ticketSummary" value="" />
        <input type="hidden" name="sessionHash" value="{SESSIONHASH}" />
        <input type="hidden" name="private" id="private" value="0" />

        <div style="padding:5px 5px 5px 0;border-bottom:1px solid #EBEBEB;border-top:1px solid #EBEBEB;background:#EEF2F7 none repeat scroll 0 0;">
            <span style="padding-left:5px;font-weight:bold;">[l]Reply To Ticket[/l]</span>
        </div>

        <div style="padding-bottom:10px;padding-top:10px;padding-left:10px;background-color:#F7F7F7;">
                <span>[l]Type[/l]:</span>
                <span style="padding-left:5px;">
                    <select name="replytype" style="width:120px;" id="replytype" onchange="ToggleSecondOptionsPanel();">
                        <option id="0">[l]Reply[/l]</option>
                        <option id="1">[l]Internal Message[/l]</option>
                    </select>
                </span>
                <span id="secondOptionsPanel">
                    <!-- BEGIN DYNAMIC BLOCK: cannedResponseDropdown -->
                    <span style="padding-left:5px;">                        
                        <select name="cannedresponse" id="cannedresponse" onchange="AddCannedResponse();">
                            <option value=0 Selected>
                                -- [l]Select a Reply[/l] --&nbsp;&nbsp;
                            </option>
                            <!-- BEGIN DYNAMIC BLOCK: cannedResponse -->
                            <option value={CannedResponseId}>
                                {CannedResponseName}
                            </option>
                            <!-- END DYNAMIC BLOCK: cannedResponse -->
                        </select>
                    </span>
                    <!-- END DYNAMIC BLOCK: cannedResponseDropdown -->
                    <span style="padding-left:10px;">[l]Status[/l]:</span>
                    <span style="padding-left:5px;">
                        <select name="ticketstatus" id="ticketstatus" onchange="CheckForTicketResolution();">
                            <option value=3 Selected>
                                [l]Waiting on customer[/l]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            </option>
                            <option value=1>
                                [l]Open[/l]
                            </option>
                            <!-- BEGIN DYNAMIC BLOCK: closeTicketOption -->
                            <option value=-1>
                                [l]Closed[/l]
                            </option>
                            <!-- END DYNAMIC BLOCK: closeTicketOption -->
                        </select>
                    </span>
                    &nbsp;&nbsp;&nbsp;<input type="checkbox" name="notify" id="notify" value="1" checked="true" style="display:inline"/>&nbsp;[l]Send E-mail[/l]
                    <!-- BEGIN DYNAMIC BLOCK: ticketOwnership -->
                    &nbsp;&nbsp;<input type="checkbox" name="assigntome" id="assigntome" value="1" {TAKEOWNERSHIP_CHECKED} />&nbsp;[l]Take Ownership[/l]
                    <!-- END DYNAMIC BLOCK: ticketOwnership -->
                    <span id="divTicketResolution">&nbsp;&nbsp;<input type="checkbox" name="addticketresolution" id="addticketresolution" value="1" style="display:inline"/>&nbsp;[l]Add Ticket Summary[/l]</span>
                </span>
        </div>

        <textarea tabindex="100" name="message" id="message" rows="10" cols="*" style="clear:both;overflow: auto; width: 99%; color:#666666;">{ADMINSIG}</textarea>

        <div id="reopenticket" style="display:none;padding-bottom: 6px; padding-top: 6px; padding-left: 10px; background-color: rgb(247, 247, 247); position:relative; top:-2px">
                <input type="checkbox" name="reopen" id="reopen" value="0" style="display:inline"/>&nbsp;[l]Re-open at later date[/l]
        </div>

        <script type="text/javascript">CheckForTicketResolution();</script>


        <div id="replyfooter" style="padding-top:8px;">
            <!-- BEGIN DYNAMIC BLOCK: attachfiletoggle -->
            <div id="attachfileblocktoggle" style="float:left;margin-bottom:10px;padding-left:2px;">
                <a class="liveupdate" href="javascript:hideshow(document.getElementById('attachfileblocktoggle'));hideshow(document.getElementById('attachfileblock'));"><b>[l]Attach a file[/l]</b></a>
            </div>
            <!-- END DYNAMIC BLOCK: attachfiletoggle -->
            <div id="attachfileblock" style="display:{attachfileblock_display};float:left;margin-bottom:10px;">
                <!-- BEGIN DYNAMIC BLOCK: attachfile -->
                <b>[l]Attach a file[/l]:</b>
                <br/><div style="font-size:10px;padding-bottom: 10px;">[l]Max file size[/l]: {ADDLOG_FILEUPLOADSIZE}{ADDLOG_FILEUPLOADEXTENSIONS}</div>
                <div id="fileFieldsContainer" style="padding-bottom:10px;">
                    <div id="fileFields_0" style="margin:2px 0 2px 0">
                        <input type="file" value="" name="file" id="file" />
                        <a style="visibility:hidden; margin-left:10px;position:relative;" >
                            [l]Delete[/l]
                        </a>
                    </div>
                </div>
                <a class='liveupdate' href="javascript:Clon('fileFields_0');">
                    [l]Add a New File[/l]
                </a>
                <!-- END DYNAMIC BLOCK: attachfile -->

                <!-- BEGIN DYNAMIC BLOCK: ticketreply_cannot_attach -->
                <span style="color:red">
                    [l]Directory 'uploads/support' is not writable[/l]
                </span>
                <!-- END DYNAMIC BLOCK: ticketreply_cannot_attach -->
            </div>

            <div align='right' style="padding-top:5px;padding-right:3px;">
                <!-- since this is being loaded via json I need a way to use extjs button better than this -->
                <span id="ExtSubmitEntry"><table cellspacing="0" class="x-btn   x-btn-noicon" style="width: 100px;"><tbody class="x-btn-small x-btn-icon-small-left"><tr><td class="x-btn-tl"><i>&nbsp;</i></td><td class="x-btn-tc"></td><td class="x-btn-tr"><i>&nbsp;</i></td></tr><tr><td class="x-btn-ml"><i>&nbsp;</i></td><td class="x-btn-mc"><em unselectable="on" class=""><button tabIndex="2" onclick="return submitTicketLog(this.form, !document.getElementById('addticketresolution').checked);" class=" x-btn-text">[l]Submit Entry[/l]</button></em></td><td class="x-btn-mr"><i>&nbsp;</i></td></tr><tr><td class="x-btn-bl"><i>&nbsp;</i></td><td class="x-btn-bc"></td><td class="x-btn-br"><i>&nbsp;</i></td></tr></tbody></table></span>
            </div>
        </div>

    </form>
<!-- END DYNAMIC BLOCK: ticketreply -->

<!-- BEGIN DYNAMIC BLOCK: ticket_attachments -->
<div id="attachedfileblock" style="clear:both;">
     <span style="font-weight:bold;">Attachments</span>:<br/>
    <!-- BEGIN DYNAMIC BLOCK: ticket_attachment -->
    <div style="font-size:10px !important;padding:2px;">
        <span>
            <span class="ticket-attachment">{ATTACHMENT_DATEADDED}</span> &nbsp;by:{ATTACHMENT_ADDEDBY} &nbsp;{ATTACHMENT_URL}
            <!-- BEGIN DYNAMIC BLOCK: ticket_attachment_remove -->            
            &nbsp;&nbsp;[<span style="color:red">&nbsp;{ATTACHMENT_REMOVEURL}&nbsp;</span>]&nbsp;
            <!-- END DYNAMIC BLOCK: ticket_attachment_remove -->
        </span>
    </div>
    <!-- END DYNAMIC BLOCK: ticket_attachment -->
</div>
<!-- END DYNAMIC BLOCK: ticket_attachments -->

<!-- BEGIN DYNAMIC BLOCK: updatesidebar -->
<script type="text/javascript">
    callTicketSummaries();
</script>
<!-- END DYNAMIC BLOCK: updatesidebar -->
