# --
# AdminNotificationEvent.dtl - provides HTML form for AdminNotificationEvent
# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
# --
# $Id: AdminNotificationEvent.dtl,v 1.35 2012/11/20 15:10:28 mh 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.
# --
<!-- dtl:block:Overview -->
<div class="MainBox ARIARoleMain LayoutFixedSidebar SidebarFirst">
    <h1>$Text{"Notification Management"}</h1>

    <div class="SidebarColumn">
<!-- dtl:block:ActionList -->
        <div class="WidgetSimple">
            <div class="Header">
                <h2>$Text{"Actions"}</h2>
            </div>
            <div class="Content">
                <ul class="ActionList">
<!-- dtl:block:ActionOverview -->
                    <li>
                        <a href="$Env{"Baselink"}Action=$Env{"Action"}" class="CallForAction"><span>$Text{"Go to overview"}</span></a>
                    </li>
<!-- dtl:block:ActionOverview -->
<!-- dtl:block:ActionAdd -->
                    <li>
                        <a href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=Add" class="CallForAction Plus"><span>$Text{"Add notification"}</span></a>
                    </li>
<!-- dtl:block:ActionAdd -->
                </ul>
            </div>
        </div>
<!-- dtl:block:ActionList -->
    </div>


    <div class="ContentColumn">
<!-- dtl:block:OverviewResult -->
        <div class="WidgetSimple">
            <div class="Header">
                <h2>$Text{"List"}</h2>
            </div>
            <div class="Content">
                <table class="DataTable">
                    <thead>
                        <tr>
                            <th class="W20pc">$Text{"Name"}</th>
                            <th>$Text{"Comment"}</th>
                            <th>$Text{"Validity"}</th>
                            <th>$Text{"Changed"}</th>
                            <th>$Text{"Created"}</th>
                            <th>$Text{"Delete"}</th>
                        </tr>
                    </thead>
                    <tbody>
<!-- dtl:block:NoDataFoundMsg -->
                        <tr>
                            <td colspan="6">
                                $Text{"No data found."}
                            </td>
                        </tr>
<!-- dtl:block:NoDataFoundMsg -->
<!-- dtl:block:OverviewResultRow -->
                        <tr>
                            <td><a href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=Change;ID=$LQData{"ID"}">$QData{"Name"}</a></td>
                            <td title="$QData{"Comment"}">$QData{"Comment","26"}</td>
                            <td>$Text{"$Data{"Valid"}"}</td>
                            <td>$TimeShort{"$QData{"ChangeTime"}"}</td>
                            <td>$TimeShort{"$QData{"CreateTime"}"}</td>
                            <td class="Center">
                                <a class="TrashCan"href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=Delete;ID=$LQData{"ID"};$QEnv{"ChallengeTokenParam"}" title="$Text{"Delete this notification"}">$Text{"Delete this notification"}</a>
                            </td>
                        </tr>
<!-- dtl:block:OverviewResultRow -->
                    </tbody>
                </table>
            </div>
        </div>
<!-- dtl:block:OverviewResult -->

<!-- dtl:block:OverviewUpdate -->
        <div class="WidgetSimple">
            <div class="Header">
<!-- dtl:block:HeaderAdd -->
                <h2>$Text{"Add Notification"}</h2>
<!-- dtl:block:HeaderAdd -->
<!-- dtl:block:HeaderEdit -->
                <h2>$Text{"Edit Notification"}</h2>
<!-- dtl:block:HeaderEdit -->
            </div>
            <div class="Content">

                <form action="$Env{"CGIHandle"}" method="post"  class="Validate" name="compose">
                    <input type="hidden" name="Action" value="$Env{"Action"}"/>
                    <input type="hidden" name="Subaction" value="$LQData{"Action"}Action"/>
                    <input type="hidden" name="ID" value="$QData{"ID"}"/>
                    <fieldset class="TableLike">

                        <label for="Name" class="Mandatory">
                            <span class="Marker">*</span>
                            $Text{"Name"}:
                        </label>
                        <div class="Field">
                            <input type="text" name="Name" id="Name" value="$QData{"Name"}" class="W50pc Validate_Required $Data{"NameServerError"}" maxlength="200"/>
                            <div id="NameError" class="TooltipErrorMessage">
                                <p>$Text{"This field is required."}</p>
                            </div>
                            <div id="NameServerError" class="TooltipErrorMessage">
                                <p>$Text{"This field is required."}</p>
                            </div>
                        </div>
                        <div class="Clear"></div>

                        <label for="Recipients">$Text{"Recipient groups"}: </label>
                        <div class="Field">
                            $Data{"RecipientsStrg"}
                        </div>
                        <div class="Clear"></div>

                        <label for="RecipientAgents">$Text{"Recipient agents"}: </label>
                        <div class="Field">
                            $Data{"RecipientAgentsStrg"}
                        </div>
                        <div class="Clear"></div>

                        <label for="RecipientGroups">$Text{"Recipient groups"}: </label>
                        <div class="Field">
                            $Data{"RecipientGroupsStrg"}
                        </div>
                        <div class="Clear"></div>

                        <label for="RecipientRoles">$Text{"Recipient roles"}: </label>
                        <div class="Field">
                            $Data{"RecipientRolesStrg"}
                        </div>
                        <div class="Clear"></div>

                        <label for="RecipientEmail">$Text{"Recipient email addresses"}: </label>
                        <div class="Field">
                            <input type="text" name="RecipientEmail" id="RecipientEmail" class="W50pc" value="$QData{"RecipientEmail"}"/>
                        </div>
                        <div class="Clear"></div>

                        <label for="Events" class="Mandatory">
                            <span class="Marker">*</span>
                            $Text{"Event"}:
                        </label>
                        <div class="Field">
                            $Data{"EventsStrg"}
                            <div id="EventsError" class="TooltipErrorMessage">
                                <p>$Text{"This field is required."}</p>
                            </div>
                            <div id="EventsServerError" class="TooltipErrorMessage">
                                <p>$Text{"This field is required."}</p>
                            </div>
                        </div>
                        <div class="Clear"></div>

<!-- dtl:block:OverviewUpdateType -->
                        <label for="TypeID">$Text{"Type"}: </label>
                        <div class="Field">
                            $Data{"TypesStrg"}
                        </div>
                        <div class="Clear"></div>
<!-- dtl:block:OverviewUpdateType -->
                        <label for="StateID">$Text{"State"}: </label>
                        <div class="Field">
                            $Data{"StatesStrg"}
                        </div>
                        <div class="Clear"></div>

                        <label for="PriorityID">$Text{"Priority"}: </label>
                        <div class="Field">
                            $Data{"PrioritiesStrg"}
                        </div>
                        <div class="Clear"></div>

                        <label for="QueueID">$Text{"Queue"}: </label>
                        <div class="Field">
                            $Data{"QueuesStrg"}
                        </div>
                        <div class="Clear"></div>

                        <label for="LockID">$Text{"Lock"}: </label>
                        <div class="Field">
                            $Data{"LocksStrg"}
                        </div>
                        <div class="Clear"></div>

<!-- dtl:block:OverviewUpdateService -->

                        <label for="ServiceID">$Text{"Service"}: </label>
                        <div class="Field">
                            $Data{"ServicesStrg"}
                        </div>
                        <div class="Clear"></div>

                        <label for="SLAID">$Text{"SLA"}: </label>
                        <div class="Field">
                            $Data{"SLAsStrg"}
                        </div>
                        <div class="Clear"></div>
<!-- dtl:block:OverviewUpdateService -->

                        <label for="CustomerID">$Text{"CustomerID"}: </label>
                        <div class="Field">
                            <input type="text" name="CustomerID" id="CustomerID" class="W50pc" value="$QData{"CustomerID"}"/>
                        </div>
                        <div class="Clear"></div>

                        <label for="CustomerUserID">$Text{"Customer"}: </label>
                        <div class="Field">
                            <input type="text" name="CustomerUserID" id="CustomerUserID" class="W50pc" value="$QData{"CustomerUserID"}"/>
                        </div>
                        <div class="Clear"></div>

<!-- dtl:block:DynamicField -->
                        <div class="SpacingTop"></div>
                        <label>$Text{"Dynamic Fields"}</label>
                        <div class="Clear"></div>
                        <div class="SpacingTop"></div>
<!-- dtl:block:DynamicFieldElement -->
                        $Data{"Label"}
                        <div class="Field">
                            $Data{"Field"}
                        </div>
                        <div class="Clear"></div>
<!-- dtl:block:DynamicFieldElement -->
                        <div class="SpacingTop"></div>
<!-- dtl:block:DynamicField -->

                        <label for="ArticleTypeID">$Text{"Article type"}: </label>
                        <div class="Field">
                            $Data{"ArticleTypesStrg"}
                            <p class="FieldExplanation">($Text{"Only for ArticleCreate event"})</p>
                        </div>
                        <div class="Clear"></div>

                        <label for="ArticleSenderTypeID">$Text{"Article sender type"}: </label>
                        <div class="Field">
                            $Data{"ArticleSenderTypesStrg"}
                            <p class="FieldExplanation">($Text{"Only for ArticleCreate event"})</p>
                        </div>
                        <div class="Clear"></div>

                        <label for="ArticleSubjectMatch">$Text{"Subject match"}: </label>
                        <div class="Field">
                            <input type="text" name="ArticleSubjectMatch" id="ArticleSubjectMatch" class="W50pc" value="$QData{"ArticleSubjectMatch"}"/>
                            <p class="FieldExplanation">($Text{"Only for ArticleCreate event"})</p>
                        </div>
                        <div class="Clear"></div>

                        <label for="ArticleBodyMatch">
                            $Text{"Body match"}:
                        </label>
                        <div class="Field">
                            <input type="text" name="ArticleBodyMatch" id="ArticleBodyMatch" class="W50pc" value="$QData{"ArticleBodyMatch"}"/>
                            <p class="FieldExplanation">($Text{"Only for ArticleCreate event"})</p>
                        </div>
                        <div class="Clear"></div>

                        <label for="ArticleAttachmentInclude">$Text{"Include attachments to notification"}: </label>
                        <div class="Field">
                            $Data{"ArticleAttachmentIncludeStrg"}
                            <p class="FieldExplanation">($Text{"Only for ArticleCreate event"})</p>
                        </div>
                        <div class="Clear"></div>

                        <h3>$Text{"Notification"}:</h3>
                        <div class="Clear"></div>

                        <label for="Subject" class="Mandatory">
                            <span class="Marker">*</span>
                            $Text{"Subject"}:
                        </label>
                        <div class="Field">
                            <input type="text" name="Subject" id="Subject" value="$QData{"Subject"}" class="W50pc Validate_Required $Data{"SubjectServerError"}" maxlength="200"/>
                            <div id="SubjectError" class="TooltipErrorMessage">
                                <p>$Text{"This field is required."}</p>
                            </div>
                            <div id="SubjectServerError" class="TooltipErrorMessage">
                                <p>$Text{"This field is required."}</p>
                            </div>
                        </div>
                        <div class="Clear"></div>

                        <label for="Body" class="Mandatory">
                            <span class="Marker">*</span>
                            $Text{"Text"}:
                        </label>
                        <div class="RichTextField">
                            <textarea rows="12" cols="75" name="Body" id="Body" class="Validate_Required $Data{"BodyServerError"}">$QData{"Body"}</textarea>
                            <div id="BodyError" class="TooltipErrorMessage">
                                <p>$Text{"This field is required."}</p>
                            </div>
                            <div id="BodyServerError" class="TooltipErrorMessage">
                                <p>$Text{"This field is required."}</p>
                            </div>
                        </div>
                        <div class="Clear"></div>

                        <label for="NotificationArticleTypeID">$Text{"Notification article type"}: </label>
                        <div class="Field">
                            $Data{"NotificationArticleTypesStrg"}
                            <p class="FieldExplanation">($Text{"Only for notifications to specified email addresses"})</p>
                        </div>
                        <div class="Clear"></div>

                        <label for="ValidID">$Text{"Validity"}: </label>
                        <div class="Field">
                            $Data{"ValidOption"}
                        </div>
                        <div class="Clear"></div>

                        <label for="Comment">$Text{"Comment"}: </label>
                        <div class="Field">
                            <input type="text" name="Comment" id="Comment" value="$QData{"Comment"}" class="W50pc" maxlength="250"/>
                        </div>
                        <div class="Clear"></div>

                        <div class="Field SpacingTop">
                            <button class="Primary" type="submit" value="$Text{"Submit"}">$Text{"Submit"}</button>
                            $Text{"or"}
                            <a href="$Env{"Baselink"}Action=$Env{"Action"}">$Text{"Cancel"}</a>
                        </div>
                        <div class="Clear"></div>
                    </fieldset>

                </form>
            </div>
        </div>


        <div class="WidgetSimple SpacingTop">
            <div class="Header">
                <h2>$Text{"Reference"}</h2>
            </div>

            <div class="Content">

                <p>$Text{"Notifications are sent to an agent or a customer."}</p>

                <p>$Text{"You can use the following tags"}:</p>
                <dl>

                    <dt><code>&lt;OTRS_AGENT_SUBJECT[20]&gt;</code></dt>
                    <dd>
                        $Text{"To get the first 20 character of the subject (of the latest agent article)."}
                    </dd>

                    <dt><code>&lt;OTRS_AGENT_BODY[5]&gt;</code></dt>
                    <dd>
                        $Text{"To get the first 5 lines of the body (of the latest agent article)."}
                    </dd>

                    <dt><code>&lt;OTRS_AGENT_*&gt;</code></dt>
                    <dd>
                        $Text{"To get the article attribute"}
                        ($Text{" e. g."} <code>&lt;OTRS_AGENT_From&gt;, &lt;OTRS_AGENT_To&gt;, &lt;OTRS_AGENT_Cc&gt;,
                        &lt;OTRS_AGENT_Subject&gt;, &lt;OTRS_AGENT_Body&gt;</code>).
                    </dd>

                    <dt><code>&lt;OTRS_CUSTOMER_SUBJECT[20]&gt;</code></dt>
                    <dd>
                        $Text{"To get the first 20 character of the subject (of the latest customer article)."}
                    </dd>

                    <dt><code>&lt;OTRS_CUSTOMER_BODY[5]&gt;</code></dt>
                    <dd>
                        $Text{"To get the first 5 lines of the body (of the latest customer article)."}
                    </dd>

                    <dt><code>&lt;OTRS_CUSTOMER_REALNAME&gt;</code></dt>
                    <dd>
                        $Text{"To get the realname of the sender (if given)."}
                    </dd>

                    <dt><code>&lt;OTRS_CUSTOMER_*&gt;</code></dt>
                    <dd>
                        $Text{"To get the article attribute"}
                        ($Text{" e. g."} <code>&lt;OTRS_CUSTOMER_From&gt;, &lt;OTRS_CUSTOMER_To&gt;,
                        &lt;OTRS_CUSTOMER_Cc&gt;, &lt;OTRS_CUSTOMER_Subject&gt; and &lt;OTRS_CUSTOMER_Body&gt;</code>).
                    </dd>

                    <dt><code>&lt;OTRS_CUSTOMER_DATA_*&gt;</code></dt>
                    <dd>
                        $Text{"Options of the current customer user data"}
                        ($Text{" e. g."} <code>&lt;OTRS_CUSTOMER_DATA_UserFirstname&gt;</code>).
                    </dd>

                    <dt><code>&lt;OTRS_OWNER_*&gt;</code></dt>
                    <dd>
                        $Text{"Ticket owner options"}
                        ($Text{" e. g."} <code>&lt;OTRS_OWNER_UserFirstname&gt;</code>).
                    </dd>

                    <dt><code>&lt;OTRS_RESPONSIBLE_*&gt;</code></dt>
                    <dd>
                        $Text{"Ticket responsible options"}
                        ($Text{" e. g."} <code>&lt;OTRS_RESPONSIBLE_UserFirstname&gt;</code>).
                    </dd>

                    <dt><code>&lt;OTRS_CURRENT_*&gt;</code></dt>
                    <dd>
                        $Text{"Options of the current user who requested this action"}
                        ($Text{" e. g."} <code>&lt;OTRS_CURRENT_UserFirstname&gt;</code>).
                    </dd>

                    <dt><code>&lt;OTRS_TICKET_*&gt;</code></dt>
                    <dd>
                        $Text{"Options of the ticket data"}
                        ($Text{" e. g."} <code>&lt;OTRS_TICKET_TicketNumber&gt;, &lt;OTRS_TICKET_TicketID&gt;,
                        &lt;OTRS_TICKET_Queue&gt;, &lt;OTRS_TICKET_State&gt;</code>).
                    </dd>

                    <dt><code>&lt;OTRS_TICKET_DynamicField_*&gt;</code></dt>
                    <dd>
                        $Text{"Options of ticket dynamic fields internal key values"}
                        ($Text{" e. g."} <code>&lt;OTRS_TICKET_DynamicField_TestField&gt;,
                        &lt;OTRS_TICKET_DynamicField_TicketFreeText1&gt;</code>).
                    </dd>

                    <dt><code>&lt;OTRS_TICKET_DynamicField_*_Value&gt;</code></dt>
                    <dd>
                        $Text{"Options of ticket dynamic fields display values, useful for Dropdown and Multiselect fields"}
                        ($Text{" e. g."} <code>&lt;OTRS_TICKET_DynamicField_TestField_Value&gt;,
                        &lt;OTRS_TICKET_DynamicField_TicketFreeText1_Value&gt;</code>).
                    </dd>

                    <dt><code>&lt;OTRS_CONFIG_*&gt;</code></dt>
                    <dd>
                        $Text{"Config options"}
                        ($Text{" e. g."} <code>&lt;OTRS_CONFIG_HttpType&gt;</code>).
                    </dd>


                </dl>


                <p class="SpacingTop">
                    $Text{"Example response"}:
                </p>
                $Text{"Subject"}:
                <input type="text" name="Subject" value="New ticket notification! (&lt;OTRS_CUSTOMER_SUBJECT[18]&gt;)" size="80" maxlength="80"/>
                <br/>
                $Text{"Text"}:
                <br/>
                <textarea rows="12" cols="70" name="Response">

Hi &lt;OTRS_CURRENT_UserFirstname&gt;,

there is a new ticket in "&lt;OTRS_TICKET_Queue&gt;"!

&lt;OTRS_CUSTOMER_FROM&gt; wrote:
&lt;snip&gt;
&lt;OTRS_CUSTOMER_EMAIL[16]&gt;
&lt;snip&gt;

&lt;OTRS_CONFIG_HttpType&gt;://&lt;OTRS_CONFIG_FQDN&gt;/&lt;OTRS_CONFIG_ScriptAlias&gt;index.pl?Action=AgentTicketZoom;TicketID=&lt;OTRS_TICKET_ID&gt;

Your OTRS Notification Master
                </textarea>
            </div>
        </div>
<!-- dtl:block:OverviewUpdate -->

    </div>
    <div class="Clear"></div>
</div>
<!-- dtl:block:Overview -->
