# --
# AdminGenericAgent.dtl - provides HTML form for AdminGenericAgent.pm
# Copyright (C) 2001-2007 OTRS GmbH, http://otrs.org/
# --
# $Id: AdminGenericAgent.dtl,v 1.29 2007/02/12 11:43:00 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 form -->
<table border="0" width="100%" cellspacing="0" cellpadding="3">
  <tr>
    <td colspan="2" class="mainhead">
      $Env{"Box0"}$Text{"GenericAgent"}$Env{"Box1"}
    </td>
  </tr>
<!-- dtl:block:Overview -->
  <tr>
    <td width="30%" class="mainbody">
      <form action="$Env{"CGIHandle"}" method="post">
        <input type="hidden" name="Action" value="$Env{"Action"}">
        <input type="hidden" name="Subaction" value="Add">
        <table width="100%" cellspacing="0" cellpadding="4">
          <tr>
            <td class="contenthead">$Text{"Add"}:</td>
          </tr>
          <tr>
            <td class="contentbody">
              <table>
                <tr>
                  <td class="contentkey">$Text{"Name"}:</td>
                  <td class="contentvalue">
                    <input type="text" name="Profile" value="" size="20">
                  </td>
                </tr>
              </table>
            </td>
          </tr>
          <tr>
            <td class="contentfooter">
              <input class="button" type="submit" value="$Text{"Add"}">
            </td>
          </tr>
        </table>
      </form>
    </td>
    <td width="70%" class="mainbody">
      <table width="100%" cellspacing="0" cellpadding="4">
        <tr>
          <td class="contenthead">$Text{"Job-List"}:</td>
        </tr>
        <tr>
          <td class="contentbody">
            <table width="100%" border="0" cellspacing="0" cellpadding="3">
              <tr>
                <td class="contentkey" width="35%">$Text{"Name"}</td>
                <td class="contentkey">$Text{"Last run"}</td>
                <td align="center" class="contentkey">$Text{"valid"}/$Text{"invalid"}</td>
                <td align="center" class="contentkey">$Text{"Delete"}</td>
                <td align="center" class="contentkey">$Text{"Run Now!"}</td>
              </tr>
<!-- dtl:block:Row -->
              <tr class="$QData{"css"}">
                <td class="$QData{"cssValid"}">
                  <a href="$Env{"Baselink"}Action=$Env{"Action"}&Subaction=Update&Profile=$LQData{"Name"}" class="$QData{"cssValid"}">
                  $QData{"Name"}
                  </a>
                </td>
                <td class="$QData{"cssValid"}">
                  $TimeLong{"$QData{"ScheduleLastRun"}"}
                </td>
                <td align="center" class="$QData{"cssValid"}">
                  $Text{"$QData{"ShownValid"}"}
                </td>
                <td align="center" class="$QData{"cssValid"}">
                  <a href="$Env{"Baselink"}Action=$Env{"Action"}&&Subaction=Delete&Profile=$LQData{"Name"}">
                  $Text{"x"}
                  </a>
                </td>
                <td align="center" class="$QData{"cssValid"}">
                  <a href="$Env{"Baselink"}Action=$Env{"Action"}&Subaction=RunNow&Profile=$LQData{"Name"}">
                  $Text{"x"}
                  </a>
                </td>
              </tr>
<!-- dtl:block:Row -->
            </table>
          </td>
        </tr>
        <tr>
          <td class="contentfooter">&nbsp;</td>
        </tr>
      </table>
    </td>
  </tr>
<!-- dtl:block:Overview -->
<!-- dtl:block:Edit -->
  <tr>
    <td colspan="2" class="menu">
      <a href="$Env{"Baselink"}Action=$Env{"Action"}">$Text{"Job-List"}</a>
    </td>
  </tr>
  <tr>
    <td colspan="2" align="center" class="mainbody">
      <br>
      <form action="$Env{"CGIHandle"}" method="post" name="compose">
        <input type="hidden" name="Action" value="$Env{"Action"}">
        <input type="hidden" name="Subaction" value="UpdateAction">
        <input type="hidden" name="ScheduleLastRun" value="$QData{"ScheduleLastRun"}">
        <input type="hidden" name="OldProfile" value="$QData{"Profile"}">
        <table width="800" border="0" cellspacing="0" cellpadding="4">
<!-- job name -->
          <tr align="left">
            <td class="contenthead">$Text{"Save Job as?"}</td>
            <td class="contenthead">$Text{"Is Job Valid?"}</td>
          </tr>
          <tr>
            <td class="contentbody">
              $Text{"Name"}:
              <input type="text" name="Profile" size="20" value="$QData{"Profile"}">
            </td>
            <td class="contentbody">
              $Text{"Is Job Valid"}: $Data{"ValidOption"}
            </td>
          </tr>
<!-- job schedule -->
          <tr>
            <td colspan="2" class="contenthead">$Text{"Schedule"}</td>
          </tr>
          <tr>
            <td colspan="2" class="contentbody">
              $Text{"minutes"}: $Data{"ScheduleMinutes"} $Text{"hours"}: $Data{"ScheduleHours"}
              $Text{"days"}: $Data{"ScheduleDays"}
            </td>
          </tr>
          <tr>
            <td class="contenthead">$Config{"Ticket::Hook"} $Text{"and"} $Text{"CustomerID"}</td>
            <td class="contenthead">$Text{"Fulltext-Search in Article (e. g. "Mar*in" or "Baue*")"}</td>
          </tr>
          <tr>
            <td class="contentbody">
              <table width="100%" border="0" cellspacing="1" cellpadding="1">
                <tr align="left">
                  <td width="50%">$Config{"Ticket::Hook"} $Text{"(e. g. 10*5155 or 105658*)"}</td>
                  <td width="50%">
                    <input type="text" name="TicketNumber" size="20" value="$QData{"TicketNumber"}">
                  </td>
                </tr>
                <tr align="left">
                  <td>$Text{"CustomerID"} $Text{"(e. g. 234321)"}</td>
                  <td>
                    <input type="text" name="CustomerID" size="20" value="$QData{"CustomerID"}">
                  </td>
                </tr>
                <tr align="left">
                  <td>$Text{"Customer User Login"} $Text{"(e. g. U5150)"}</td>
                  <td>
                    <input type="text" name="CustomerUserLogin" size="20" value="$QData{"CustomerUserLogin"}">
                  </td>
                </tr>
              </table>
            </td>
            <td class="contentbody">
              <table width="100%" border="0" cellspacing="1" cellpadding="1">
                <tr align="left">
                  <td>$Text{"From"}</td>
                  <td>
                    <input type="text" name="From" size="30" value="$QData{"From"}">
                  </td>
                </tr>
                <tr align="left">
                  <td>$Text{"To"}</td>
                  <td>
                    <input type="text" name="To" size="30" value="$QData{"To"}">
                  </td>
                </tr>
                <tr align="left">
                  <td>$Text{"Cc"}</td>
                  <td>
                    <input type="text" name="Cc" size="30" value="$QData{"Cc"}">
                  </td>
                </tr>
                <tr align="left">
                  <td>$Text{"Subject"}</td>
                  <td>
                    <input type="text" name="Subject" size="30" value="$QData{"Subject"}">
                  </td>
                </tr>
                <tr align="left">
                  <td>$Text{"Text"}</td>
                  <td>
                    <input type="text" name="Body" size="30" value="$QData{"Body"}">
                  </td>
                </tr>
              </table>
            </td>
          </tr>
          <tr>
            <td class="contenthead" width="50%">$Text{"Priority"}</td>
            <td class="contenthead" width="50%">$Text{"Queue"}</td>
          </tr>
          <tr>
            <td class="contentbody">$Data{"PriotitiesStrg"}</td>
            <td class="contentbody">$Data{"QueuesStrg"}</td>
          </tr>
          <tr>
            <td class="contenthead">$Text{"State"}</td>
            <td class="contenthead">$Text{"Agent"}/$Text{"Owner"}</td>
          </tr>
          <tr>
            <td class="contentbody">$Data{"StatesStrg"}</td>
            <td class="contentbody">$Data{"OwnerStrg"}</td>
          </tr>
          <tr>
            <td colspan="2" class="contenthead">$Text{"Ticket Lock"}</td>
          </tr>
          <tr>
            <td class="contentbody" colspan="2">$Data{"LockOption"}</td>
          </tr>
<!-- dtl:block:TicketFreeField -->
          <tr>
            <td colspan="2" class="contenthead">$Text{"TicketFreeFields"}</td>
          </tr>
<!-- dtl:block:TicketFreeFieldElement -->
          <tr>
            <td class="contentbody">$Data{"TicketFreeKey"}</td>
            <td class="contentbody">$Data{"TicketFreeText"}</td>
          </tr>
<!-- dtl:block:TicketFreeFieldElement -->
<!-- dtl:block:TicketFreeField -->
          <tr>
            <td colspan="2" class="contenthead">$Text{"Create Times"}</td>
          </tr>
          <tr>
            <td colspan="2" class="contentbody">
              <input type="radio" name="TimeSearchType" value="" $Data{"TimeSearchType::None"}>
              $Text{"No create time settings."}
            </td>
          </tr>
          <tr>
            <td colspan="2" class="contentbody">
              <input type="radio" name="TimeSearchType" value="TimePoint" $Data{"TimeSearchType::TimePoint"}>
              $Text{"Ticket created"} $Data{"TicketCreateTimePointStart"} $Data{"TicketCreateTimePoint"} $Data{"TicketCreateTimePointFormat"}.
            </td>
          </tr>
          <tr>
            <td colspan="2" class="contentbody">
              <input type="radio" name="TimeSearchType" value="TimeSlot" $Data{"TimeSearchType::TimeSlot"}>
              $Text{"Ticket created between"} $Data{"TicketCreateTimeStart"} $Text{"and"} $Data{"TicketCreateTimeStop"}.
            </td>
          </tr>
          <tr>
            <td colspan="2" class="contenthead">$Text{"Pending Times"}</td>
          </tr>
          <tr>
            <td colspan="2" class="contentbody">
              <input type="radio" name="TimePendingSearchType" value="" $Data{"TimePendingSearchType::None"}>
              $Text{"No pending time settings."}
            </td>
          </tr>
          <tr>
            <td colspan="2" class="contentbody">
              <input type="radio" name="TimePendingSearchType" value="TimePoint" $Data{"TimePendingSearchType::TimePoint"}>
              $Text{"Ticket pending time reached"} $Data{"TicketPendingTimePointStart"} $Data{"TicketPendingTimePoint"} $Data{"TicketPendingTimePointFormat"}.
            </td>
          </tr>
          <tr>
            <td colspan="2" class="contentbody">
              <input type="radio" name="TimePendingSearchType" value="TimeSlot" $Data{"TimePendingSearchType::TimeSlot"}>
              $Text{"Ticket pending time reached between"} $Data{"TicketPendingTimeStart"} $Text{"and"} $Data{"TicketPendingTimeStop"}.
            </td>
          </tr>
<!-- new options -->
          <tr>
            <td class="mainhead" width="50%">$Text{"New Priority"}</td>
            <td class="mainhead" width="50%">$Text{"New Queue"}</td>
          </tr>
          <tr>
            <td class="contentbody">$Data{"NewPriotitiesStrg"}</td>
            <td class="contentbody">$Data{"NewQueuesStrg"}</td>
          </tr>
          <tr>
            <td class="mainhead">$Text{"New State"}</td>
            <td class="mainhead">$Text{"New Agent"}/$Text{"New Owner"}</td>
          </tr>
          <tr>
            <td class="contentbody">$Data{"NewStatesStrg"}</td>
            <td class="contentbody">$Data{"NewOwnerStrg"}</td>
          </tr>
          <tr>
            <td class="mainhead" width="50%">$Text{"New Customer"}</td>
            <td class="mainhead" width="50%">$Text{"New Ticket Lock"}</td>
          </tr>
          <tr>
            <td class="contentbody">
              <table>
                <tr>
                  <td>$Text{"CustomerUser"}:</td>
                  <td>
                    <input type="text" name="NewCustomerUserLogin" value="$QData{"NewCustomerUserLogin"}" size="30">
                  </td>
                </tr>
                <tr>
                  <td>$Text{"CustomerID"}:</td>
                  <td>
                    <input type="text" name="NewCustomerID" value="$QData{"NewCustomerID"}" size="30">
                  </td>
                </tr>
              </table>
            </td>
            <td class="contentbody">$Data{"NewLockOption"}</td>
          </tr>
<!-- dtl:block:NewTicketFreeField -->
          <tr>
            <td colspan="2" class="mainhead">$Text{"New TicketFreeFields"}</td>
          </tr>
<!-- dtl:block:NewTicketFreeFieldElement -->
          <tr>
            <td class="contentbody">$Data{"NewTicketFreeKey"}</td>
            <td class="contentbody">$Data{"NewTicketFreeText"}</td>
          </tr>
<!-- dtl:block:NewTicketFreeFieldElement -->
<!-- dtl:block:NewTicketFreeField -->
          <tr>
            <td colspan="2" class="mainhead" width="50%">$Text{"Add Note"}</td>
          </tr>
          <tr>
            <td colspan="2" class="contentbody">
              <table>
                <tr>
                  <td valign="top">$Text{"From"}:</td>
                  <td>
                    <input type="text" name="NewNoteFrom" value="$QData{"NewNoteFrom"}" size="60">
                  </td>
                </tr>
                <tr>
                  <td valign="top">$Text{"Subject"}:</td>
                  <td>
                    <input type="text" name="NewNoteSubject" value="$QData{"NewNoteSubject"}" size="60">
                  </td>
                </tr>
                <tr>
                  <td valign="top">$Text{"Text"}:</td>
                  <td>
                    <textarea name="NewNoteBody" rows="7" cols="60" wrap="hard">$QData{"NewNoteBody"}</textarea>
                  </td>
                </tr>
              </table>
            </td>
          </tr>
          <tr>
            <td class="mainhead" width="50%">$Text{"CMD"}</td>
            <td class="mainhead" width="50%">$Text{"Delete"}</td>
          </tr>
          <tr>
            <td class="contentbody">
              <input type="text" name="NewCMD" value="$QData{"NewCMD"}" size="40">
              <br>
              ($Text{"This command will be executed. ARG[0] will be the ticket number. ARG[1] the ticket id."})
            </td>
            <td class="contentbody">
              $Text{"Delete tickets"}: $Data{"DeleteOption"}
              <br>
              <font color="red">
              <b>($Text{"Warning! This tickets will be removed from the database! This tickets are lost!"})</b>
              </font>
            </td>
          </tr>
          <tr>
            <td class="mainhead" width="50%">$Text{"Module"}</td>
            <td class="mainhead" width="50%">$Text{"Send Notification"}</td>
          </tr>
          <tr>
            <td class="contentbody">
              <table>
                <tr>
                  <td valign="top">$Text{"Module"}:</td>
                  <td><input type="text" name="NewModule" value="$QData{"NewModule"}" size="45"></td>
                </tr>
                <tr>
                  <td valign="top">$Text{"Param 1"}:</td>
                  <td>
                    <input type="text" name="NewParamKey1" value="$QData{"NewParamKey1"}" size="12">=&gt;
                    <input type="text" name="NewParamValue1" value="$QData{"NewParamValue1"}" size="20">
                  </td>
                </tr>
                <tr>
                  <td valign="top">$Text{"Param 2"}:</td>
                  <td>
                    <input type="text" name="NewParamKey2" value="$QData{"NewParamKey2"}" size="12">=&gt;
                    <input type="text" name="NewParamValue2" value="$QData{"NewParamValue2"}" size="20">
                  </td>
                </tr>
                <tr>
                  <td valign="top">$Text{"Param 3"}:</td>
                  <td>
                    <input type="text" name="NewParamKey3" value="$QData{"NewParamKey3"}" size="12">=&gt;
                    <input type="text" name="NewParamValue3" value="$QData{"NewParamValue3"}" size="20">
                  </td>
                </tr>
                <tr>
                  <td valign="top">$Text{"Param 4"}:</td>
                  <td>
                    <input type="text" name="NewParamKey4" value="$QData{"NewParamKey4"}" size="12">=&gt;
                    <input type="text" name="NewParamValue4" value="$QData{"NewParamValue4"}" size="20">
                  </td>
                </tr>
                <tr>
                  <td valign="top">$Text{"Param 5"}:</td>
                  <td>
                    <input type="text" name="NewParamKey5" value="$QData{"NewParamKey5"}" size="12">=&gt;
                    <input type="text" name="NewParamValue5" value="$QData{"NewParamValue5"}" size="20">
                  </td>
                </tr>
                <tr>
                  <td valign="top">$Text{"Param 6"}:</td>
                  <td>
                    <input type="text" name="NewParamKey6" value="$QData{"NewParamKey6"}" size="12">=&gt;
                    <input type="text" name="NewParamValue6" value="$QData{"NewParamValue6"}" size="20">
                  </td>
                </tr>
              </table>
            </td>
            <td class="contentbody">
              $Text{"Send no notifications"}: $Data{"SendNoNotificationOption"}
              <br>
              $Text{"Yes means, send no agent and customer notifications on changes."}
              $Text{"No means, send agent and customer notifications on changes."}
            </td>
          </tr>
          <tr>
            <td colspan="2" class="contentfooter">
              <input class="button" type="submit" value="$Text{"Save"}">
            </td>
          </tr>
        </table>
      </form>
    </td>
  </tr>
<!-- dtl:block:Edit -->
<!-- dtl:block:Result -->
  <tr>
    <td colspan="2" class="menu">
      <a href="$Env{"Baselink"}Action=$Env{"Action"}">$Text{"Job-List"}</a> -
      <a href="$Env{"Baselink"}Action=$Env{"Action"}&Subaction=Update&Profile=$LQData{"Name"}">
      $Text{"Edit"}
      </a> -
      <a href="$Env{"Baselink"}Action=$Env{"Action"}&Subaction=RunNow&Profile=$LQData{"Name"}">$Text{"Run Now!"}</a>
    </td>
  </tr>
  <tr>
    <td class="mainbody">
      <p>
        $Text{"%s Tickets affected! Do you really want to use this job?", "$QData{"AffectedIDs"}"}<br>
        $Text{"$QData{"DeleteMessage"}"}
      </p>
    </td>
  </tr>
<!-- dtl:block:ResultBlock -->
  <tr>
    <td class="mainbody">
      <br>
      <table border="0" width="100%" cellpadding="3" cellspacing="0">
        <tr class="contenthead">
          <td>$Config{"Ticket::Hook"}</td>
          <td>$Text{"Age"}</td>
          <td>$Text{"From"}/$Text{"Subject"}</td>
          <td>$Text{"State"}</td>
          <td>$Text{"Queue"}</td>
          <td>$Text{"Owner"}</td>
          <td>$Text{"CustomerID"}</td>
        </tr>
<!-- dtl:block:Ticket -->
        <tr class="$QData{"css"}">
          <td class="$Data{"TextCss"}">
            <a href="$Env{"Baselink"}&Action=AgentTicketZoom&TicketID=$QData{"TicketID"}">$QData{"TicketNumber"}</a>
          </td>
          <td class="contentvalue">$QData{"Age"}</td>
          <td class="contentvalue">
            $QData{"From","30"}<br>$QData{"Subject","30"}
          </td>
          <td class="contentvalue">$Quote{"$Text{"$Data{"State"}"}","30"}</td>
          <td class="contentvalue">$QData{"Queue","30"}</td>
          <td class="contentvalue">$QData{"Owner","30"}<br>($QData{"UserFirstname"} $QData{"UserLastname"})</td>
          <td class="contentvalue">
            <a href="$Env{"Baselink"}Action=AgentTicketCustomer&TicketID=$QData{"TicketID"}">
            $Quote{"$Data{"CustomerID"}","15"}
            </a>
          </td>
        </tr>
<!-- dtl:block:Ticket -->
        <tr>
          <td colspan="7" class="contentfooter">&nbsp;</td>
        </tr>
      </table>
      <br>
    </td>
  </tr>
<!-- dtl:block:ResultBlock -->
<!-- dtl:block:Result -->
</table>
<!-- end form -->
