# --
# CustomerTicketZoom.dtl - provides HTML TicketZoom for CustomerTicketZoom.pm
# Copyright (C) 2001-2007 OTRS GmbH, http://otrs.org/
# --
# $Id: CustomerTicketZoom.dtl,v 1.30 2007/03/15 08:24:11 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('$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="0">
<!-- dtl:block:TreeItem -->
        <tr class="$QData{"SenderType"}-$QData{"ArticleType"}">
          <td class="small">
            <div title="$QData{"From","50"}: $QData{"Subject","200"} - $TimeLong{"$QData{"Created"}"}">$Data{"Space"}$Data{"Start"} $QData{"Count"}. <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","16"}: $QData{"Subject","20"} - $TimeLong{"$QData{"Created"}"}$Data{"Stop"}
<!-- 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 -->
<!-- dtl:block:TreeItemAttachmentMore -->
            &nbsp;[..]
<!-- dtl:block:TreeItemAttachmentMore -->
            </div>
          </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"}
      <pre>
$Data{"Article::Text"}
      </pre>
<!-- 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 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{"TicketFreeText2"}">$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{"TicketFreeText3"}">$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{"TicketFreeText4"}">$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{"TicketFreeText5"}">$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{"TicketFreeText6"}">$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{"TicketFreeText7"}">$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{"TicketFreeText8"}">$QData{"TicketFreeText8","20"}</div></td></tr>"; }>
        <dtl if ($Data{"TicketFreeKey9"} ne "") { $Data{"TicketFreeString9"} = "<tr><td class="contentkey">$QData{"TicketFreeKey9","20"}:</td><td class="contentvalue"><div title="$QData{"TicketFreeText9"}">$QData{"TicketFreeText9","20"}</div></td></tr>"; }>
        <dtl if ($Data{"TicketFreeKey10"} ne "") { $Data{"TicketFreeString10"} = "<tr><td class="contentkey">$QData{"TicketFreeKey10","20"}:</td><td class="contentvalue"><div title="$QData{"TicketFreeText10"}">$QData{"TicketFreeText10","20"}</div></td></tr>"; }>
        <dtl if ($Data{"TicketFreeKey11"} ne "") { $Data{"TicketFreeString11"} = "<tr><td class="contentkey">$QData{"TicketFreeKey11","20"}:</td><td class="contentvalue"><div title="$QData{"TicketFreeText11"}">$QData{"TicketFreeText11","20"}</div></td></tr>"; }>
        <dtl if ($Data{"TicketFreeKey12"} ne "") { $Data{"TicketFreeString12"} = "<tr><td class="contentkey">$QData{"TicketFreeKey12","20"}:</td><td class="contentvalue"><div title="$QData{"TicketFreeText12"}">$QData{"TicketFreeText12","20"}</div></td></tr>"; }>
        <dtl if ($Data{"TicketFreeKey13"} ne "") { $Data{"TicketFreeString13"} = "<tr><td class="contentkey">$QData{"TicketFreeKey13","20"}:</td><td class="contentvalue"><div title="$QData{"TicketFreeText13"}">$QData{"TicketFreeText13","20"}</div></td></tr>"; }>
        <dtl if ($Data{"TicketFreeKey14"} ne "") { $Data{"TicketFreeString14"} = "<tr><td class="contentkey">$QData{"TicketFreeKey14","20"}:</td><td class="contentvalue"><div title="$QData{"TicketFreeText14"}">$QData{"TicketFreeText14","20"}</div></td></tr>"; }>
        <dtl if ($Data{"TicketFreeKey15"} ne "") { $Data{"TicketFreeString15"} = "<tr><td class="contentkey">$QData{"TicketFreeKey15","20"}:</td><td class="contentvalue"><div title="$QData{"TicketFreeText15"}">$QData{"TicketFreeText15","20"}</div></td></tr>"; }>
        <dtl if ($Data{"TicketFreeKey16"} ne "") { $Data{"TicketFreeString16"} = "<tr><td class="contentkey">$QData{"TicketFreeKey16","20"}:</td><td class="contentvalue"><div title="$QData{"TicketFreeText16"}">$QData{"TicketFreeText16","20"}</div></td></tr>"; }>
        <dtl if ($Data{"TicketFreeTime1"} ne "") { $Data{"TicketFreeString17"} = "<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{"TicketFreeString18"} = "<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"}
        $Data{"TicketFreeString11"}
        $Data{"TicketFreeString12"}
        $Data{"TicketFreeString13"}
        $Data{"TicketFreeString14"}
        $Data{"TicketFreeString15"}
        $Data{"TicketFreeString16"}
        $Data{"TicketFreeString17"}
        $Data{"TicketFreeString18"}
      </table>
    </td>
  </tr>
</table>
<!-- end ticket -->
