# --
# CustomerTicketZoom.dtl - provides HTML TicketZoom for CustomerTicketZoom.pm
# Copyright (C) 2001-2008 OTRS AG, http://otrs.org/
# --
# $Id: CustomerTicketZoom.dtl,v 1.34 2008/07/09 12:32:06 martin Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (GPL). If you
# did not receive this file, see http://www.gnu.org/licenses/gpl-2.0.txt.
# --

<!-- start ticket $Data{"TicketNumber"} -->
<!-- This java script is just for nice to have funktions! -->
<script language="JavaScript" type="text/javascript">
<!--
function submit_compose() {
    if (document.compose.Subject.value == "") {
        alert('$JSText{"A message should have a subject!"}');
        document.compose.Subject.focus();
        return false;
    }
    else if (document.compose.Body.value == "") {
        alert('$JSText{"A message should have a body!"}');
        document.compose.Body.focus();
        return false;
    }
    else {
        return true;
    }
}
//-->
</script>

<table border="0" width="100%" cellspacing="0" cellpadding="3">
  <tr>
    <td width="50%" class="mainhead">
      $Env{"Box0"}$Text{"Zoom"} $Config{"Ticket::Hook"}: $Data{"TicketNumber"}$Env{"Box1"}
    </td>
    <td align="right" width="50%" class="mainhead">
      $Env{"Box0"}$Text{"Age"}: $Data{"Age"}$Env{"Box1"}
    </td>
  </tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="3">
  <tr>
    <td width="70%" class="menu">
      <a href="$Env{"Baselink"}Action=CustomerTicketPrint&TicketID=$QData{"TicketID"}" onmouseover="window.status='$JSText{"Print Ticket"}'; return true;" onmouseout="window.status='';" target="_blank">$Text{"Print"}</a>
    </td>
    <td align="right" width="30%" class="menu">
      <b>$Text{"Created"}:</b> $TimeLong{"$Data{"Created"}"}
    </td>
  </tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="3">
  <tr>
    <td valign="top" width="75%" class="small">
<!-- dtl:block:Tree -->
      <table border="0" width="100%" cellspacing="0" cellpadding="1">
<!-- dtl:block:TreeItem -->
        <tr class="$QData{"SenderType"}-$QData{"ArticleType"}" onmouseover="this.className='highlight';" onmouseout="this.className='$QData{"SenderType"}-$QData{"ArticleType"}';">
          <td class="small">
            <div title="$QData{"From","50"}: $QData{"Subject","200"} - $TimeLong{"$QData{"Created"}"}">
            $Data{"Start2"}$Data{"Space"}$Data{"Stop2"}$Data{"Start"}$Data{"Start2"}&nbsp;$QData{"Count"}.&nbsp;$Data{"Stop2"}&nbsp;<a href="$Env{"Baselink"}Action=CustomerTicketZoom&TicketID=$QData{"TicketID"}&ArticleID=$QData{"ArticleID"}#$QData{"ArticleID"}" onmouseover="window.status='$JSText{"$QData{"SenderType"}"} ($Text{"$QData{"ArticleType"}"})'; return true;" onmouseout="window.status='';">$Text{"$QData{"SenderType"}"} ($Text{"$QData{"ArticleType"}"})</a>
            $QData{"From","24"}: $QData{"Subject","30"}$Data{"Stop"}
            </div>
          </td>
          <td class="small" align="right">
            <nobr>
<!-- dtl:block:TreeItemAttachmentMore -->
            [..]
<!-- dtl:block:TreeItemAttachmentMore -->
<!-- dtl:block:TreeItemAttachment -->
            &nbsp;<a href="$Env{"Baselink"}Action=CustomerTicketAttachment&ArticleID=$QData{"ArticleID"}&FileID=$QData{"FileID"}" title="$QData{"Filename"} - $QData{"Filesize"}" $Data{"Target"}><img border="0" src="$Env{"Images"}attach-small.png"></a>
<!-- dtl:block:TreeItemAttachment -->
            </nobr>
          </td>
          <td class="small" align="right">
            <nobr>$Data{"Start"}$TimeLong{"$QData{"Created"}"}$Data{"Stop"}</nobr>
          </td>
        </tr>
<!-- dtl:block:TreeItem -->
      </table>
<!-- dtl:block:Tree -->
      <hr>
      <table border="0" width="100%" cellspacing="0" cellpadding="1">
<!-- dtl:block:Row -->
        <tr>
          <td class="contentkey" width="15%">$Text{"$Data{"Key"}"}:</td>
          <td class="contentvalue" width="85%"> <div title="$QData{"Value"}">$QData{"Value","200"}</div></td>
        </tr>
<!-- dtl:block:Row -->
# show the Article::FreeKey1-3 and Article::FreeValue1-3
        <dtl if ($Data{"ArticleFreeKey1"} ne "") { $Data{"ArticleFreeString1"} = "<tr><td class="contentkey">$QData{"ArticleFreeKey1"}:</td><td class="contentvalue"> $QData{"ArticleFreeText1"}</td></tr>"; }>
        <dtl if ($Data{"ArticleFreeKey2"} ne "") { $Data{"ArticleFreeString2"} = "<tr><td class="contentkey">$QData{"ArticleFreeKey2"}:</td><td class="contentvalue"> $QData{"ArticleFreeText2"}</td></tr>"; }>
        <dtl if ($Data{"ArticleFreeKey3"} ne "") { $Data{"ArticleFreeString3"} = "<tr><td class="contentkey">$QData{"ArticleFreeKey3"}:</td><td class="contentvalue"> $QData{"ArticleFreeText3"}</td></tr>"; }>
        $Data{"ArticleFreeString1"}
        $Data{"ArticleFreeString2"}
        $Data{"ArticleFreeString3"}
# show attachments
<!-- dtl:block:ArticleAttachment -->
        <tr>
          <td class="contentkey" width="15%">$Text{"$Data{"Key"}"}:</td>
          <td class="contentvalue" width="85%">
            <table border="0" cellspacing="0" cellpadding="1">
<!-- dtl:block:ArticleAttachmentRow -->
              <tr>
                <td>$QData{"Filename"}</td>
                <td>
<!-- dtl:block:ArticleAttachmentRowLink -->
                  <a href="$Data{"Link"}" $Data{"Target"} onmouseover="window.status='$JSText{"$QData{"Action"}"}: $QData{"Filename"}';return true;" onmouseout="window.status='';"><img src="$Env{"Images"}$QData{"Image"}" border="0" alt="$Text{"$QData{"Action"}"}" title="$Text{"$QData{"Action"}"}"></a>
<!-- dtl:block:ArticleAttachmentRowLink -->
<!-- dtl:block:ArticleAttachmentRowNoLink -->
                  <img src="$Env{"Images"}$QData{"Image"}" border="0" alt="$Text{"$QData{"Action"}"}" title="$Text{"$QData{"Action"}"}">
<!-- dtl:block:ArticleAttachmentRowNoLink -->
                </td>
                <td align="right">$QData{"Filesize"}</td>
              </tr>
<!-- dtl:block:ArticleAttachmentRow -->
            </table>
          </td>
        </tr>
<!-- dtl:block:ArticleAttachment -->
      </table>
$Data{"Article::TextNote"}
      <div class="message">
$Data{"Article::Text"}
      </div>
<!-- dtl:block:FollowUp -->
      <hr>
      <form action="$Env{"CGIHandle"}" method="post" enctype="multipart/form-data" name="compose">
        <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{"Article::ArticleID"}"/>
        <input type="hidden" name="FormID" value="$QData{"FormID"}"/>
        <table border="0" width="100%">
          <tr>
            <td class="contentkey" width="15%">$Text{"Subject"}:</td>
            <td class="contentvalue" width="85%">
              <input type="text" name="Subject" value="$QData{"Subject"}" size="70"/>
            </td>
          </tr>
          <tr>
            <td class="contentkey">$Text{"Text"}:</td>
            <td class="contentvalue">
              <textarea name="Body" rows="15" cols="$Config{"Ticket::Frontend::TextAreaNote"}" wrap="$Env{"BrowserWrap"}">$QData{"Body"}</textarea>
            </td>
          </tr>
          <tr>
            <td class="contentkey">$Text{"Attachment"}:</td>
            <td class="contentvalue">
              <table cellspacing="0" cellpadding="0" width="400">
<!-- dtl:block:Attachment -->
                <tr>
                  <td>$QData{"Filename"}</td>
                  <td>$QData{"Filesize"}</td>
                  <td align="right">
                    <input class="button" type="submit" name="AttachmentDelete$QData{"FileID"}" value="$Text{"Delete"}"/>
                  </td>
                </tr>
<!-- dtl:block:Attachment -->
                <tr>
                  <td colspan="2"><input name="file_upload" type="file" size="40" class="fixed"/></td>
                  <td align="right">
                    <input class="button" type="submit" name="AttachmentUpload" value="$Text{"Attach"}"/>
                    <a name="attachment"></a>
                  </td>
                </tr>
              </table>
            </td>
          </tr>
<!-- dtl:block:State -->
          <tr>
            <td class="contentkey">$Text{"Next state"}:</td>
            <td class="contentvalue"> $Data{"NextStatesStrg"}</td>
          </tr>
<!-- dtl:block:State -->
<!-- dtl:block:Priority -->
          <tr>
            <td class="contentkey">$Text{"Priority"}:</td>
            <td class="contentvalue"> $Data{"PriorityStrg"}</td>
          </tr>
<!-- dtl:block:Priority -->
        </table>
        <br/>
        <input class="button" type="submit" value="$Text{"Submit"}" onclick="return submit_compose();"/>
      </form>
<!-- dtl:block:FollowUp -->
    </td>
    <td width="25%" align="center" class="menu">
      <table border="0" cellspacing="0" cellpadding="1" width="95%">
<!-- dtl:block:Type -->
        <tr>
          <td class="contentkey">$Text{"Type"}:</td>
          <td class="contentvalue"><font color="red"><div title="$Quote{"$Text{"$Data{"Type"}"}"}">$Quote{"$Text{"$Data{"Type"}"}","18"}</div></font></td>
        </tr>
<!-- dtl:block:Type -->
        <tr>
          <td class="contentkey">$Text{"State"}:</td>
          <td class="contentvalue"><font color="red"><div title="$Quote{"$Text{"$Data{"State"}"}"}">$Quote{"$Text{"$Data{"State"}"}","18"}</div></font></td>
        </tr>
        <tr>
          <td class="contentkey">$Text{"Priority"}:</td>
          <td class="contentvalue"><font color="red"><div title="$Quote{"$Text{"$Data{"Priority"}"}"}">$Quote{"$Text{"$Data{"Priority"}"}","18"}</div></font></td>
        </tr>
        <tr>
          <td class="contentkey">$Text{"Queue"}:</td>
          <td class="contentvalue"><font color="red"><div title="$QData{"Queue"}">$QData{"Queue","18"}</div></font></td>
        </tr>
<!-- dtl:block:Service -->
        <tr>
          <td class="contentkey">$Text{"Service"}:</td>
          <td class="contentvalue"><font color="red"><div title="$QData{"Service"}">$QData{"Service","18"}</div></font></td>
        </tr>
<!-- dtl:block:Service -->
<!-- dtl:block:SLA -->
        <tr>
          <td class="contentkey">$Text{"SLA"}:</td>
          <td class="contentvalue"><font color="red"><div title="$QData{"SLA"}">$QData{"SLA","18"}</div></font></td>
        </tr>
<!-- dtl:block:SLA -->
        <tr>
          <td class="contentkey">$Text{"CustomerID"}:</td>
          <td class="contentvalue"><div title="$QData{"CustomerID"}">$QData{"CustomerID","18"}</div></td>
        </tr>
#      <tr>
#        <td class="contentkey">$Text{"Accounted time"}:</td>
#        <td class="contentvalue">$Data{"TicketTimeUnits"}</td>
#      </tr>
#      <tr>
#        <td class="contentkey">$Text{"Owner"}:</td>
#        <td class="contentvalue"><div title="$QData{"Owner"}">$QData{"Owner","18"}</div></td>
#      </tr>

# use this if you want to show TicketFreeKey1-16 and TicketFreeText1-16
<!-- dtl:block:TicketFreeText -->
        <tr>
          <td class="contentkey">$QData{"TicketFreeKey","20"}:</td>
          <td class="contentvalue">
            <div title="$QData{"TicketFreeText"}">$QData{"TicketFreeText","20"}</div>
          </td>
        </tr>
<!-- dtl:block:TicketFreeText -->
#<!-- dtl:block:TicketFreeText1 -->
#        <tr>
#          <td class="contentkey">$QData{"TicketFreeKey1","20"}:</td>
#          <td class="contentvalue">
#            <div title="$QData{"TicketFreeText"}">$QData{"TicketFreeText1","20"}</div>
#          </td>
#        </tr>
#<!-- dtl:block:TicketFreeText1 -->
#<!-- dtl:block:TicketFreeText2 -->
#        <tr>
#          <td class="contentkey">$QData{"TicketFreeKey2","20"}:</td>
#          <td class="contentvalue">
#            <div title="$QData{"TicketFreeText"}">$QData{"TicketFreeText2","20"}</div>
#          </td>
#        </tr>
#<!-- dtl:block:TicketFreeText2 -->

# use this if you want to show TicketFreeTime1-6
<!-- dtl:block:TicketFreeTime -->
        <tr>
          <td class="contentkey">$Text{"$QData{"TicketFreeTimeKey"}"}:</td>
          <td class="contentvalue"><div title="$TimeShort{"$QData{"TicketFreeTime"}"}">$TimeShort{"$QData{"TicketFreeTime"}"}</div></td>
        </tr>
<!-- dtl:block:TicketFreeTime -->
#<!-- dtl:block:TicketFreeTime1 -->
#          <tr>
#            <td class="contentkey">$Text{"$Config{"TicketFreeTimeKey1"}"}:</td>
#            <td class="contentvalue"><div title="$TimeShort{"$QData{"TicketFreeTime1"}"}">$TimeShort{"$QData{"TicketFreeTime1"}"}</div></td>
#          </tr>
#<!-- dtl:block:TicketFreeTime1 -->
#<!-- dtl:block:TicketFreeTime2 -->
#          <tr>
#            <td class="contentkey">$Text{"$Config{"TicketFreeTimeKey2"}"}:</td>
#            <td class="contentvalue"><div title="$TimeShort{"$QData{"TicketFreeTime2"}"}">$TimeShort{"$QData{"TicketFreeTime2"}"}</div></td>
#          </tr>
#<!-- dtl:block:TicketFreeTime2 -->

      </table>
    </td>
  </tr>
</table>
<!-- end ticket -->
