# --
# CustomerTicketZoom.dtl - provides HTML TicketZoom for CustomerTicketZoom.pm
# Copyright (C) 2001-2011 OTRS AG, http://otrs.org/
# --
# $Id: CustomerTicketZoom.dtl,v 1.106 2011/01/12 10:29:16 martin Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --
<div id="MainBox" class="TicketZoom ARIARoleMain">
<!-- dtl:block:Back -->
    <div class="ActionRow">
        <ul class="Tabs">
            <li><a href="$Env{"Baselink"}$Env{"LastScreenOverview"}">&larr; $Text{"Back"}</a></li>
        </ul>
        <div class="Clear"></div>
    </div>
<!-- dtl:block:Back -->
    <div class="Content">
        <div class="TicketHeader">
            <h2 title="$QData{"Title"}">
                <span title="$Text{"$Data{"StateTypeGeneric"}"}" id="Flag" class="$QData{"StateTypeGeneric"}"><span>$Text{"$Data{"StateTypeGeneric"}"}</span></span>
                $QData{"Title","65"}
                <span class="TicketHook">$QData{"TicketNumber"}</span>
            </h2>
            <ul id="Metadata">
<!-- dtl:block:Type -->
                <li><span class="Key">$Text{"Type"}:</span> <span title="$QData{"Type"}">$QData{"Type","18"}</span></li>
<!-- dtl:block:Type -->
<!-- dtl:block:Service -->
                <li><span class="Key">$Text{"Service"}:</span> <span title="$Text{"$Data{"Service"}"}">$Quote{"$Text{"$Data{"Service"}"}","18"}</span></li>
<!-- dtl:block:Service -->
<!-- dtl:block:SLA -->
                <li><span class="Key">$Text{"SLA"}:</span> <span title="$Text{"$Data{"SLA"}"}">$Quote{"$Text{"$Data{"SLA"}"}","18"}</span></li>
<!-- dtl:block:SLA -->
<!-- dtl:block:State -->
                <li><span class="Key">$Text{"State"}:</span> <span title="$Text{"$Data{"State"}"}">$Quote{"$Text{"$Data{"State"}"}","18"}</span></li>
<!-- dtl:block:State -->
<!-- dtl:block:Priority -->
                <li><span class="Key">$Text{"Priority"}:</span> <span title="$Text{"$Data{"Priority"}"}">$Quote{"$Text{"$Data{"Priority"}"}","18"}</span></li>
<!-- dtl:block:Priority -->
<!-- dtl:block:Queue -->
                <li><span class="Key">$Text{"Queue"}:</span> <span title="$QData{"Queue"}">$QData{"Queue","18"}</span></li>
<!-- dtl:block:Queue -->
# use this if you want to show TicketFreeKey1-16 and TicketFreeText1-16
<!-- dtl:block:TicketFreeText -->
                <li><span class="Key">$QData{"TicketFreeKey","20"}:</span> <span title="$QData{"TicketFreeText"}">$QData{"TicketFreeText","20"}</span></li>
<!-- dtl:block:TicketFreeText -->
#<!-- dtl:block:TicketFreeText1 -->
#                    <li><span class="Key">$QData{"TicketFreeKey1","20"}:</span> <span title="$QData{"TicketFreeText1"}">$QData{"TicketFreeText1","20"}</span></li>
#<!-- dtl:block:TicketFreeText1 -->
#<!-- dtl:block:TicketFreeText2 -->
#                    <li><span class="Key">$QData{"TicketFreeKey2","20"}:</span> <span title="$QData{"TicketFreeText2"}">$QData{"TicketFreeText2","20"}</span></li>
#<!-- dtl:block:TicketFreeText2 -->
# use this if you want to show TicketFreeTime1-6
<!-- dtl:block:TicketFreeTime -->
                <li><span class="Key">$Text{"$Data{"TicketFreeTimeKey"}"}:</span> <span title="$TimeShort{"$QData{"TicketFreeTime"}"}">$TimeShort{"$QData{"TicketFreeTime"}"}</span></li>
<!-- dtl:block:TicketFreeTime -->
#<!-- dtl:block:TicketFreeTime1 -->
#                    <li><span class="Key">$Text{"$Data{"TicketFreeTimeKey1"}"}:</span> <span title="$TimeShort{"$QData{"TicketFreeTime1"}"}">$TimeShort{"$QData{"TicketFreeTime1"}"}</span></li>
#<!-- dtl:block:TicketFreeTime1 -->
#<!-- dtl:block:TicketFreeTime2 -->
#                    <li><span class="Key">$Text{"$Data{"TicketFreeTimeKey2"}"}:</span> <span title="$TimeShort{"$QData{"TicketFreeTime2"}"}">$TimeShort{"$QData{"TicketFreeTime2"}"}</span></li>
#<!-- dtl:block:TicketFreeTime2 -->
<!-- dtl:block:Print -->
                <li><a href="$Env{"Baselink"}Action=CustomerTicketPrint;TicketID=$LQData{"TicketID"}" class="Print AsPopup" title="$Text{"Print"}">$Text{"Print"}</a></li>
<!-- dtl:block:Print -->
            </ul>
            <div class="Clear"></div>
        </div>
        <form action="$Env{"CGIHandle"}#FollowUp" method="post" enctype="multipart/form-data" name="compose" class="Validate PreventMultipleSubmits">
            <input type="hidden" name="Action" value="CustomerTicketZoom" />
            <input type="hidden" name="Subaction" value="Store" />
            <input type="hidden" name="TicketID" value="$QData{"TicketID"}" />
            <input type="hidden" name="ArticleID" value="$QData{"ArticleID"}" />
            <input type="hidden" name="FormID" value="$QData{"FormID"}" />
            <ul id="Messages">
<!-- dtl:block:Article -->
                <li class="$QData{"SenderType"} $QData{"ArticleType"} $QData{"Class"}">
                    <div class="MessageHeader">

<!-- dtl:block:ArticleContracted -->
                        <h3><a href="$Env{"Baselink"}Action=$Env{"Action"};TicketID=$LQData{"TicketID"};ArticleID=$LQData{"ArticleID"}">$QData{"FromRealname","60"} &ndash; <span title="$Text{"Expand article"}...">$QData{"Subject","120"}</span></a></h3>
<!-- dtl:block:ArticleContracted -->

<!-- dtl:block:ArticleExpanded -->
                        <h3><a href="$Env{"Baselink"}Action=$Env{"Action"};TicketID=$LQData{"TicketID"};ArticleID=$LQData{"ArticleID"}">$QData{"FromRealname","60"} &ndash; <span title="$QData{"Subject"}">$QData{"Subject","120"}</span></a></h3>
<!-- dtl:block:ArticleExpanded -->

                        <span class="Age" title="$TimeLong{"$QData{"Created"}"}">$Data{"Age"}</span>
                        <div class="Clear"></div>
                    </div>
                    <input type="hidden" name="ArticleState" value="untouched" />
                    <div class="MessageBody">
                        <div class="Details SeperatorRow">
<!-- dtl:block:ArticleRow -->
                            <div>
                                <div class="Label">$Text{"$Data{"Key"}"}:</div> <span title="$QData{"Value"}">$QData{"Realname","100"}</span>
                                <div class="Clear"></div>
                            </div>
<!-- dtl:block:ArticleRow -->
                            <div>
                                <div class="Label">$Text{"Subject"}:</div> <span title="$QData{"Subject"}">$QData{"Subject","150"}</span>
                                <div class="Clear"></div>
                            </div>

# show the ArticleFreeKey1-3 and ArticleFreeText1-3
<!-- dtl:block:ArticleFreeText -->
                            <div>
                                <div class="Label" title="$QData{"Key"}">$QData{"Key", "11"}:</div> <span title="$QData{"Value"}">$QData{"Value","160"}</span>
                                <div class="Clear"></div>
                            </div>
<!-- dtl:block:ArticleFreeText -->

<!-- dtl:block:ArticleAttachment -->
                            <div class="Attachments">
                                <div class="Label">$Text{"$Data{"Key"}"}:</div>
                                <div>
<!-- dtl:block:ArticleAttachmentRow -->
                                    <span class="DownloadAttachment" title="$QData{"Filename"} - $QData{"Filesize"}">
<!-- dtl:block:ArticleAttachmentRowLink -->
                                        <a href="$Data{"Link"}" $Data{"Target"} title="$Text{"$Data{"Action"}"}">$QData{"Filename"}</a>, $QData{"Filesize"}
<!-- dtl:block:ArticleAttachmentRowLink -->
<!-- dtl:block:ArticleAttachmentRowNoLink -->
                                        $QData{"Filename"}, $QData{"Filesize"}
<!-- dtl:block:ArticleAttachmentRowNoLink -->
                                    </span>
<!-- dtl:block:ArticleAttachmentRow -->
                                </div>
                                <div class="Clear"></div>
                            </div>
<!-- dtl:block:ArticleAttachment -->
                        </div>
                        <div class="MessageContent">
<!-- dtl:block:BodyPlain -->
                            $Data{"BodyNote"}
                            <div class="ArticleBody">
                                $Data{"Body"}
                            </div>
<!-- dtl:block:BodyPlain -->
<!-- dtl:block:BodyHTMLLoad -->
                            <iframe title="about:blank" frameborder="0" id="VisibleFrame" src="$Env{"Baselink"}Action=CustomerTicketAttachment;Subaction=HTMLView;ArticleID=$QData{"ArticleID"};FileID=$QData{"AttachmentIDOfHTMLBody"}"></iframe>
<!-- dtl:block:BodyHTMLLoad -->
<!-- dtl:block:BodyHTMLPlaceholder -->
                            <iframe src="about:blank" frameborder="0" title="$Env{"Baselink"}Action=CustomerTicketAttachment;Subaction=HTMLView;ArticleID=$QData{"ArticleID"};FileID=$QData{"AttachmentIDOfHTMLBody"}"></iframe>
<!-- dtl:block:BodyHTMLPlaceholder -->
                        </div>
                    </div>
                </li>
<!-- dtl:block:Article -->
            </ul> <!-- /Messages -->
<!-- dtl:block:FollowUp -->
            <div id="FollowUp" class="$QData{"FollowUpVisible"}">
                <div id="Messenger">
                    <input class="DontPrint" type="text" name="Subject" id="Subject" value="$QData{"Subject"}" />
<!-- dtl:block:RichText-->
                    $Include{"CustomerRichTextEditor"}
<!-- dtl:block:RichText-->
                    <textarea title="$Text{"Reply"}" id="RichText" class="RichText DontPrint Validate_RequiredRichText $QData{"RichTextInvalid"}" name="Body" rows="15" cols="$Config{"Ticket::Frontend::TextAreaNote"}">$QData{"Body"}</textarea>
                    <div id="RichTextError" class="TooltipErrorMessage">
                        <p>$Text{"This field is required."}</p>
                    </div>
                    <div id="RichTextServerError" class="TooltipErrorMessage NoJavaScriptMessage$QData{"RichTextInvalid"}">
                        <p>$Text{"This field is required."}</p>
                    </div>
                    <fieldset class="DontPrint">
                        <div id="AttachmentHolder">
                            <label for="Attachment">$Text{"Attachment"}:</label>
                            <input name="file_upload" title="Attachment" id="Attachment" type="file" size="30" />
                            <input type="hidden" id="AttachmentUpload" name="AttachmentUpload" value="0" />
<!--dtl:js_on_document_complete-->
<script type="text/javascript">//<![CDATA[
    $('#Attachment').bind('change', function (Event) {
        var $Form = $('#Attachment').closest('form');
        Core.Form.Validate.DisableValidation($Form);
        $Form.find('#AttachmentUpload').val('1').end().submit();
    });
//]]></script>
<!--dtl:js_on_document_complete-->

<!-- dtl:block:FollowUpAttachment -->
                            <div class="Attachment" title="$QData{"Filename"} - $QData{"Filesize"}">
                                $QData{"Filename"}
                                <button type="submit" title="$Text{"Delete"} $QData{"Filename"}" id="AttachmentDelete$QData{"FileID"}" name="AttachmentDelete$QData{"FileID"}" value="$Text{"Delete"}">$Text{"Delete"}</button>
<!--dtl:js_on_document_complete-->
<script type="text/javascript">//<![CDATA[
    $('#AttachmentDelete$QData{"FileID"}').bind('click', function () {
        Core.Form.Validate.DisableValidation($('#AttachmentDelete$QData{"FileID"}').closest('form'));
    });
//]]></script>
<!--dtl:js_on_document_complete-->
                            </div>
<!-- dtl:block:FollowUpAttachment -->
                        </div>
<!-- dtl:block:FollowUpState -->
                        <div>
                            <label for="StateID">$Text{"Next state"}:</label> $Data{"NextStatesStrg"}
                        </div>
<!-- dtl:block:FollowUpState -->
<!-- dtl:block:FollowUpPriority -->
                        <div>
                            <label for="PriorityID">$Text{"Priority"}:</label> $Data{"PriorityStrg"}
                        </div>
<!-- dtl:block:FollowUpPriority -->
                    </fieldset>
                    <div class="ActionRow">
                        <button type="submit" value="$Text{"Submit"}">$Text{"Submit"}</button> $Text{"or"} <a id="CloseButton" href="">$Text{"Cancel"}</a>
                    </div>
                </div>
                <a id="ReplyButton" class="DontPrint" href="">$Text{"Reply"}</a>
            </div>
<!-- dtl:block:FollowUp -->
        </form>
    </div>
</div>
<!-- dtl:js_on_document_complete -->
<script type="text/javascript">
    Core.Customer.TicketZoom.Init();
    $('a.AsPopup').bind('click', function (Event) {
        Core.UI.Popup.OpenPopup($(this).attr('href'), 'TicketAction');
        return false;
    });
</script>
<!-- dtl:js_on_document_complete -->
