# --
# CustomerTicketZoom.dtl - provides HTML TicketZoom for CustomerTicketZoom.pm
# Copyright (C) 2001-2005 Martin Edenhofer <martin+code@otrs.org>
# --
# $Id: CustomerTicketZoom.dtl,v 1.20 2005/09/18 13:52:26 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.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('$Text{"A message should have a subject!"}');
        document.compose.Subject.focus();
        return false;
    }
    else if (document.compose.Body.value == "") {
        alert('$Text{"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" cols="2">
<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" cols="1">
<tr>
  <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" cols="2">
<tr>
  <td valign="top" width="75%" class="small">
  $Data{"ArticleStrg"}
  <hr>
  <table border="0" width="100%" cellspacing="0" cellpadding="1">
    <tr>
      <td width="15%" class="contentkey">$Text{"From"}:</td>
      <td width="85%" class="contentvalue"> $QData{"From","200"}</td>
    </tr>
    <tr>
      <td class="contentkey">$Text{"To"}:</td>
      <td class="contentvalue"> $QData{"To","200"}</td>
    </tr>
# --
# check if Cc exists
# --
    <dtl if ($Data{"Cc"} ne "") { $Data{"ArticleCcString"} = "<tr><td class="contentkey">$Text{"$Data{"Cc"}"}:</td><td class="contentvalue"> $QData{"Cc","200"}</td></tr>"; }>
    $Data{"Article::Cc"}
    <tr>
      <td class="contentkey">$Text{"Subject"}:</td>
      <td class="contentvalue"> $QData{"Subject","200"}</td>
    </tr>
# --
# show the Article::FreeKey1-3 and Article::FreeValue1-3
# --
<dtl if ($Data{"Article::FreeKey1"} ne "") { $Data{"ArticleFreeString1"} = "<tr><td class="contentkey">$QData{"FreeKey1"}:</td><td class="contentvalue"> $QData{"FreeValue1"}</td></tr>"; }>
<dtl if ($Data{"Article::FreeKey2"} ne "") { $Data{"ArticleFreeString2"} = "<tr><td class="contentkey">$QData{"FreeKey2"}:</td><td class="contentvalue"> $QData{"FreeValue2"}</td></tr>"; }>
<dtl if ($Data{"Article::FreeKey3"} ne "") { $Data{"ArticleFreeString3"} = "<tr><td class="contentkey">$QData{"FreeKey3"}:</td><td class="contentvalue"> $QData{"FreeValue3"}</td></tr>"; }>
     $Data{"ArticleFreeString1"}
     $Data{"ArticleFreeString2"}
     $Data{"ArticleFreeString3"}
# --
    <tr>
      <td class="contentkey">$Text{"Attachment"}:</td>
      <td class="contentvalue"> $Data{"Article::ATM"}</td>
    </tr>
  </table>
$Data{"Article::TextNote"}
  <pre>
$Data{"Article::Text"}
  </pre>

<hr>

<form action="$Env{"CGIHandle"}" method="post" enctype="multipart/form-data" name="compose">
<input type="hidden" name="Action" value="CustomerTicketMessage">
<input type="hidden" name="Subaction" value="Store">
<input type="hidden" name="TicketID" value="$QData{"TicketID"}">
  <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="60"></td>
  </tr>
  <tr>
    <td class="contentkey">$Text{"Text"}:</td>
    <td class="contentvalue">
#<textarea name="Body" rows="15" cols="60" wrap="$Env{"BrowserWrap"}">$QData{"Body"}</textarea>
     <textarea name="Body" rows="15" cols="60" wrap="$Env{"BrowserWrap"}"></textarea>
    </td>
  </tr>
  <tr>
    <td class="contentkey">$Text{"Attachment"}:</td>
    <td><input name="file_upload" type="file" size="40" class="fixed">&nbsp;<a name="attachment"></td>
  </tr>
# should the customer user change the ticket state!
<dtl if ($Config{"CustomerPanelNextComposeState"} ne "0") { $Data{"NextStateString"} = "<tr><td class="contentkey">$Text{"Next state"}:</td><td class="contentvalue"> $Data{"NextStatesStrg"}</td></tr>"; }>
  $Data{"NextStateString"}
#
  </table>
<br>
<input class="button" type="submit" value="$Text{"submit"}" onclick="return submit_compose();">
</form>

  </td>
  <td width="25%" align="center" class="menu">
    <table border="0" cellspacing="0" cellpadding="1" width="95%">
    <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>
    <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-2 and TicketFreeValue1-2
# --
<dtl if ($Data{"TicketFreeKey1"} ne "") { $Data{"TicketFreeString1"} = "<tr><td class="contentkey">$QData{"TicketFreeKey1","20"}:</td><td class="contentvalue"><div title="$QData{"TicketFreeText1"}">$QData{"TicketFreeText1","20"}</div></td></tr>"; }>
<dtl if ($Data{"TicketFreeKey2"} ne "") { $Data{"TicketFreeString2"} = "<tr><td class="contentkey">$QData{"TicketFreeKey2","20"}:</td><td class="contentvalue"><div title="$QData{"TicketFreeText1"}">$QData{"TicketFreeText2","20"}</div></td></tr>"; }>
<dtl if ($Data{"TicketFreeKey3"} ne "") { $Data{"TicketFreeString3"} = "<tr><td class="contentkey">$QData{"TicketFreeKey3","20"}:</td><td class="contentvalue"><div title="$QData{"TicketFreeText1"}">$QData{"TicketFreeText3","20"}</div></td></tr>"; }>
<dtl if ($Data{"TicketFreeKey4"} ne "") { $Data{"TicketFreeString4"} = "<tr><td class="contentkey">$QData{"TicketFreeKey4","20"}:</td><td class="contentvalue"><div title="$QData{"TicketFreeText1"}">$QData{"TicketFreeText4","20"}</div></td></tr>"; }>
<dtl if ($Data{"TicketFreeKey5"} ne "") { $Data{"TicketFreeString5"} = "<tr><td class="contentkey">$QData{"TicketFreeKey5","20"}:</td><td class="contentvalue"><div title="$QData{"TicketFreeText1"}">$QData{"TicketFreeText5","20"}</div></td></tr>"; }>
<dtl if ($Data{"TicketFreeKey6"} ne "") { $Data{"TicketFreeString6"} = "<tr><td class="contentkey">$QData{"TicketFreeKey6","20"}:</td><td class="contentvalue"><div title="$QData{"TicketFreeText1"}">$QData{"TicketFreeText6","20"}</div></td></tr>"; }>
<dtl if ($Data{"TicketFreeKey7"} ne "") { $Data{"TicketFreeString7"} = "<tr><td class="contentkey">$QData{"TicketFreeKey7","20"}:</td><td class="contentvalue"><div title="$QData{"TicketFreeText1"}">$QData{"TicketFreeText7","20"}</div></td></tr>"; }>
<dtl if ($Data{"TicketFreeKey8"} ne "") { $Data{"TicketFreeString8"} = "<tr><td class="contentkey">$QData{"TicketFreeKey8","20"}:</td><td class="contentvalue"><div title="$QData{"TicketFreeText1"}">$QData{"TicketFreeText8","20"}</div></td></tr>"; }>
<dtl if ($Data{"TicketFreeTime1"} ne "") { $Data{"TicketFreeString9"} = "<tr><td class="contentkey">$Text{"$Config{"TicketFreeTimeKey1"}"}:</td><td class="contentvalue"><div title="$TimeShort{"$QData{"TicketFreeTime1"}"}">$TimeShort{"$QData{"TicketFreeTime1"}"}</div></td></tr>"; }>
<dtl if ($Data{"TicketFreeTime2"} ne "") { $Data{"TicketFreeString10"} = "<tr><td class="contentkey">$Text{"$Config{"TicketFreeTimeKey2"}"}:</td><td class="contentvalue"><div title="$TimeShort{"$QData{"TicketFreeTime2"}"}">$TimeShort{"$QData{"TicketFreeTime2"}"}</div></td></tr>"; }>
    $Data{"TicketFreeString1"}
    $Data{"TicketFreeString2"}
    $Data{"TicketFreeString3"}
    $Data{"TicketFreeString4"}
    $Data{"TicketFreeString5"}
    $Data{"TicketFreeString6"}
    $Data{"TicketFreeString7"}
    $Data{"TicketFreeString8"}
    $Data{"TicketFreeString9"}
    $Data{"TicketFreeString10"}
    </table>

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