# --
# AdminNotification.dtl - provides HTML form for AdminNotification
# Copyright (C) 2001-2010 OTRS AG, http://otrs.org/
# --
# $Id: AdminNotification.dtl,v 1.23 2010/11/23 00:10:36 en 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.
# --

<div class="MainBox ARIARoleMain LayoutFixedSidebar SidebarFirst">
    <h1>$Text{"Notification Management"}</h1>
<!-- dtl:block:RichText -->
$Include{"RichTextEditor"}
<!-- dtl:block:RichText -->
<!-- start form -->
    <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 -->
                </ul>
            </div>
        </div>
<!-- dtl:block:ActionList -->

<!-- dtl:block:LanguageFilter -->
        <div class="WidgetSimple">
            <div class="Header">
                <h2><label for="FilterLanguage">$Text{"Filter for Language"}</label></h2>
            </div>
            <div class="Content">
                <ul>
                    <li>
                        <form action="">
                            <fieldset>
                                <input type="text" id="FilterLanguage" class="W50pc" name="FilterLanguage" value="" title="$Text{"Filter for Language"}" />
                            </fieldset>
                        </form>
                    </li>
                </ul>
            </div>
        </div>
<!-- dtl:block:LanguageFilter -->
<!-- dtl:block:NotificationFilter -->
        <div class="WidgetSimple">
            <div class="Header">
                <h2><label for="FilterNotification">$Text{"Filter for Notification"}</label></h2>
            </div>
            <div class="Content">
                <ul>
                    <li>
                        <form action="">
                            <fieldset>
                                <input type="text" id="FilterNotification" class="W50pc" name="FilterNotification" value="" title="$Text{"Filter for Notification"}" />
                            </fieldset>
                        </form>
                    </li>
                </ul>
            </div>
        </div>
<!-- dtl:block:NotificationFilter -->

        <div class="WidgetSimple">
            <div class="Header">
                <h2>$Text{"Hint"}</h2>
            </div>
            <div class="Content">
                <p class="FieldExplanation">
                    $Text{"Notifications are sent to an agent or a customer."}
                </p>
            </div>
        </div>
    </div>
    <div class="ContentColumn">
        <div class="WidgetSimple">
<!-- dtl:block:OverviewResult -->
            <div class="Header">
                <h2>$Text{"List"}</h2>
            </div>
            <div class="Content">
                <table class="DataTable" id="Notifications">
                    <thead>
                        <tr>
                            <th>$Text{"Language"}</th>
                            <th>$Text{"Notification"}</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr class="FilterMessage Hidden">
                            <td colspan="2">$Text{"No matches found."}</td>
                        </tr>
<!-- dtl:block:OverviewResultRow -->
                        <tr>
                            <td>$Data{"Language"}</td>
                            <td>
                                <a class="AsBlock" href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=Change;Name=$LQData{"Name"}">
                                    $QData{"Type"}
                                </a>
                            </td>
                        </tr>
<!-- dtl:block:OverviewResultRow -->
                    </tbody>
                </table>
            </div>
<!-- dtl:block:OverviewResult -->

<!-- dtl:block:OverviewUpdate -->
            <div class="Header">
                <h2>$Text{"Edit Notification"}</h2>
            </div>
            <div class="Content">
                <form action="$Env{"CGIHandle"}" method="post" class="Validate PreventMultipleSubmits">
                    <input type="hidden" name="Action" value="$Env{"Action"}"/>
                    <input type="hidden" name="Subaction" value="$Env{"Subaction"}Action"/>
                    <input type="hidden" name="ID" value="$QData{"ID"}"/>
                    <input type="hidden" name="Charset" value="$Env{"Charset"}"/>
                    <input type="hidden" name="Language" value="$QData{"Language"}"/>
                    <input type="hidden" name="Type" value="$QData{"Type"}"/>
                    <fieldset class="TableLike">
                        <label>$Text{"Type"}: </label>
                        <div class="Field">
                            $Data{"Language"}::$QData{"Type"}
                        </div>
                        <div class="Clear"></div>

                        <label class="Mandatory" for="Subject"><span class="Marker">*</span> $Text{"Subject"}:</label>
                        <div class="Field">
                            <input type="text" id="Subject" name="Subject" value="$QData{"Subject"}" class="W75pc Validate_Required $QData{"SubjectInvalid"}" maxlength="120"/>
                        </div>
                        <div class="Clear"></div>

                        <label class="Mandatory" for="RichText"><span class="Marker">*</span> $Text{"Text"}:</label>
                        <div class="RichTextField">
                            <textarea id="RichText" class="RichText Validate_RequiredRichText $QData{"RichTextInvalid"}" rows="12" cols="75" name="Body">$QData{"Body"}</textarea>
                        </div>
                        <div class="Clear"></div>
                        <div class="Field">
                            <button class="Primary" id="submitRichText" type="submit" value="$Text{"Update"}">$Text{"Update"}</button>
                            $Text{"or"}
                            <a href="$Env{"Baselink"}Action=$Env{"Action"}">$Text{"Cancel"}</a>
                        </div>
                        <div class="Clear"></div>
                    </fieldset>
                </form>
            </div>
        </div>
<!-- end form -->
<!-- start note -->
        <div class="WidgetSimple SpacingTop">
            <div class="Header">
                <h2>$Text{"Reference"}</h2>
            </div>
            <div class="Content">
                <p>$Text{"You can use the following tags"}:</p>
                <dl>
                    <dt><code>&lt;OTRS_CUSTOMER_SUBJECT[20]&gt;</code></dt>
                    <dd>
                        $Text{"To get the first 20 character of the subject."}
                    </dd>

                    <dt><code>&lt;OTRS_CUSTOMER_EMAIL[5]&gt;</code></dt>
                    <dd>
                        $Text{"To get the first 5 lines of the email."}
                    </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>,
                        &lt;OTRS_CUSTOMER_To>, &lt;OTRS_CUSTOMER_Cc>, &lt;OTRS_CUSTOMER_Subject> and
                        &lt;OTRS_CUSTOMER_Body&gt;</code>).
                    </dd>
                    <dt><code>&lt;OTRS_CUSTOMER_DATA_*&gt;</code></dt>
                    <dd>
                        $Text{"Options of the current customer 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>, &lt;OTRS_TICKET_TicketID>,
                        &lt;OTRS_TICKET_Queue>, &lt;OTRS_TICKET_State&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"}:
                </p>
                <fieldset class="TableLike">
                    <label for="ExampleSubject">$Text{"Subject"}:</label>
                    <div class="Field">
                        <input id="ExampleSubject" type="text" name="Subject" value="New ticket notification! (&lt;OTRS_CUSTOMER_SUBJECT[18]&gt;)" class="W75pc" maxlength="80"/>
                    </div>
                    <label for="ExampleNotification">$Text{"Text"}:</label>
                    <div class="Field">
                        <textarea rows="5" cols="60" name="ExampleNotification" id="ExampleNotification">
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>
                </fieldset>
            </div>
<!-- dtl:block:OverviewUpdate -->
        </div>
<!-- dtl:js_on_document_complete -->
<script type="text/javascript">//<![CDATA[
    Core.UI.Table.InitTableFilter($('#FilterLanguage'), $('#Notifications'), 0);
    Core.UI.Table.InitTableFilter($('#FilterNotification'), $('#Notifications'), 1);
//]]></script>
<!-- dtl:js_on_document_complete -->
    </div>
    <div class="Clear"></div>
</div>
<!-- end note -->
