312 lines
16 KiB
Plaintext
312 lines
16 KiB
Plaintext
# --
|
|
# Copyright (C) 2001-2019 OTRS AG, https://otrs.com/
|
|
# --
|
|
# 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 https://www.gnu.org/licenses/gpl-3.0.txt.
|
|
# --
|
|
|
|
[% RenderBlockStart("Overview") %]
|
|
<div class="MainBox ARIARoleMain LayoutFixedSidebar SidebarFirst">
|
|
<h1 class="InvisibleText">[% Translate("Template Management") | html %]</h1>
|
|
|
|
[% BreadcrumbPath = [
|
|
{
|
|
Name => Translate('Template Management'),
|
|
Link => Env("Action"),
|
|
},
|
|
]
|
|
%]
|
|
|
|
[% SWITCH Data.Action %]
|
|
[% CASE 'Add' %]
|
|
[% BreadcrumbPath.push({ Name => Translate("Add Template"),}) %]
|
|
[% CASE 'Change' %]
|
|
[% USE EditTitle = String(Translate("Edit Template")) %]
|
|
[% BreadcrumbPath.push({ Name => EditTitle.append( ': ', Data.Name ) }) %]
|
|
[% END %]
|
|
|
|
[% INCLUDE "Breadcrumb.tt" Path = BreadcrumbPath %]
|
|
|
|
<div class="SidebarColumn">
|
|
[% RenderBlockStart("ActionList") %]
|
|
<div class="WidgetSimple">
|
|
<div class="Header"><h2>[% Translate("Actions") | html %]</h2></div>
|
|
<div class="Content">
|
|
<ul class="ActionList">
|
|
[% RenderBlockStart("ActionOverview") %]
|
|
<li>
|
|
<a href="[% Env("Baselink") %]Action=[% Env("Action") %]" class="CallForAction Fullsize Center"><span><i class="fa fa-caret-left"></i>[% Translate("Go to overview") | html %]</span></a>
|
|
</li>
|
|
[% RenderBlockEnd("ActionOverview") %]
|
|
[% RenderBlockStart("ActionAdd") %]
|
|
<li>
|
|
<a href="[% Env("Baselink") %]Action=[% Env("Action") %];Subaction=Add" class="CallForAction Fullsize Center"><span><i class="fa fa-plus-square"></i>[% Translate("Add Template") | html %]</span></a>
|
|
</li>
|
|
[% RenderBlockEnd("ActionAdd") %]
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
[% RenderBlockStart("Filter") %]
|
|
<div class="WidgetSimple">
|
|
<div class="Header">
|
|
<h2><label for="Filter">[% Translate("Filter for Templates") | html %]</label></h2>
|
|
</div>
|
|
<div class="Content">
|
|
<input type="text" id="Filter" class="FilterBox" placeholder="[% Translate("Just start typing to filter...") | html %]" name="Filter" value="" title="[% Translate("Filter for templates") | html %]" />
|
|
</div>
|
|
</div>
|
|
[% RenderBlockEnd("Filter") %]
|
|
[% RenderBlockEnd("ActionList") %]
|
|
|
|
<div class="WidgetSimple">
|
|
<div class="Header">
|
|
<h2>[% Translate("Hint") | html %]</h2>
|
|
</div>
|
|
<div class="Content">
|
|
|
|
<p class="FieldExplanation">
|
|
[% Translate("A template is a default text which helps your agents to write faster tickets, answers or forwards.") | html %]
|
|
</p>
|
|
<p>
|
|
[% Translate("Attention") | html %]:
|
|
<a href="[% Env("Baselink") %]Action=AdminQueueTemplates">[% Translate("Don't forget to add new templates to queues.") | html %]</a>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="ContentColumn">
|
|
|
|
[% RenderBlockStart("OverviewResult") %]
|
|
<div class="WidgetSimple">
|
|
<div class="Header">
|
|
<h2>[% Translate("List") | html %]</h2>
|
|
</div>
|
|
<div class="Content">
|
|
<table class="DataTable" id="Templates">
|
|
<thead>
|
|
<tr>
|
|
<th>[% Translate("Type") | html %]</th>
|
|
<th>[% Translate("Name") | html %]</th>
|
|
<th>[% Translate("Attachments") | html %]</th>
|
|
<th>[% Translate("Comment") | html %]</th>
|
|
<th>[% Translate("Validity") | html %]</th>
|
|
<th>[% Translate("Changed") | html %]</th>
|
|
<th>[% Translate("Created") | html %]</th>
|
|
<th>[% Translate("Delete") | html %]</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="FilterMessage Hidden">
|
|
<td colspan="7">[% Translate("No matches found.") | html %]</td>
|
|
</tr>
|
|
[% RenderBlockStart("NoDataFoundMsg") %]
|
|
<tr>
|
|
<td colspan="7">
|
|
[% Translate("No data found.") | html %]
|
|
</td>
|
|
</tr>
|
|
[% RenderBlockEnd("NoDataFoundMsg") %]
|
|
[% RenderBlockStart("OverviewResultRow") %]
|
|
<tr [% IF Data.ValidID != 1 %]class="Invalid"[% END %]>
|
|
<td>[% Translate(Data.TemplateType) | html %]</td>
|
|
<td>
|
|
<a class="AsBlock" href="[% Env("Baselink") %]Action=[% Env("Action") %];Subaction=Change;ID=[% Data.ID | uri %];Type=[% Data.TemplateType | uri %]">[% Data.Name | html %]</a>
|
|
</td>
|
|
<td>[% Data.Attachments | html %]</td>
|
|
<td title="[% Data.Comment | html %]">[% Data.Comment | truncate(26) | html %]</td>
|
|
<td>[% Translate(Data.Valid) | html %]</td>
|
|
<td>[% Data.ChangeTime | Localize("TimeShort") %]</td>
|
|
<td>[% Data.CreateTime | Localize("TimeShort") %]</td>
|
|
<td class="Center">
|
|
<a class="TrashCan TemplateDelete" href="#" data-query-string="Action=[% Env("Action") %];Subaction=Delete;ID=[% Data.ID | uri %];[% Env("ChallengeTokenParam") | html %]" title="[% Translate("Delete this entry") | html %]">
|
|
[% Translate("Delete this entry") | html %]
|
|
<i class="fa fa-trash-o"></i>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
[% RenderBlockEnd("OverviewResultRow") %]
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="Hidden" id="DeleteTemplateDialogContainer">
|
|
<div id ="DeleteTemplateDialog" class="InnerContent GenericInterfaceDialog">
|
|
<p class="Center Spacing">[% Translate("Do you really want to delete this template?") | html %]</p>
|
|
<div class="SpacingTop"></div>
|
|
</div>
|
|
</div>
|
|
[% RenderBlockEnd("OverviewResult") %]
|
|
[% RenderBlockStart("OverviewUpdate") %]
|
|
|
|
<div class="WidgetSimple">
|
|
<div class="Header">
|
|
[% IF Data.Action == 'Add' %]
|
|
<h2>[% Translate("Add Template") | html %]</h2>
|
|
[% ELSE %]
|
|
<h2>[% Translate("Edit Template") | html %]</h2>
|
|
[% END %]
|
|
</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="[% Data.Action | uri %]Action"/>
|
|
<input type="hidden" name="ID" value="[% Data.ID | html %]"/>
|
|
[% IF Data.Action == 'Change' %]
|
|
<input type="hidden" name="ContinueAfterSave" id="ContinueAfterSave" value=""/>
|
|
[% END %]
|
|
<fieldset class="TableLike">
|
|
<label class="Mandatory" for="TemplateType"><span class="Marker">*</span> [% Translate("Type") | html %]:</label>
|
|
<div class="Field">
|
|
[% Data.TemplateTypeString %]
|
|
<div id="TemplateTypeError" class="TooltipErrorMessage">
|
|
<p>[% Translate("This field is required.") | html %]</p>
|
|
</div>
|
|
<div id="TemplateTypeServerError" class="TooltipErrorMessage">
|
|
<p>[% Translate("This field is required.") | html %]</p>
|
|
</div>
|
|
</div>
|
|
<div class="Clear"></div>
|
|
<label class="Mandatory" for="Name"><span class="Marker">*</span> [% Translate("Name") | html %]:</label>
|
|
<div class="Field">
|
|
<input type="text" name="Name" id="Name" value="[% Data.Name | html %]" class="W50pc Validate_Required [% Data.NameInvalid | html %]" maxlength="200"/>
|
|
<div id="NameError" class="TooltipErrorMessage">
|
|
<p>[% Translate("This field is required.") | html %]</p>
|
|
</div>
|
|
<div id="NameServerError" class="TooltipErrorMessage">
|
|
[% RenderBlockStart("NameServerError") %]
|
|
<p>[% Translate("This field is required.") | html %]</p>
|
|
[% RenderBlockEnd("NameServerError") %]
|
|
[% RenderBlockStart("ExistNameServerError") %]
|
|
<p>[% Translate("A standard template with this name already exists!") | html %]</p>
|
|
[% RenderBlockEnd("NameServerError") %]
|
|
</div>
|
|
</div>
|
|
<div class="Clear"></div>
|
|
<label for="RichText">[% Translate("Template") | html %]:</label>
|
|
<div class="RichTextField">
|
|
<textarea id="RichText" class="RichText" rows="10" cols="60" name="Template">[% Data.Template | html %]</textarea>
|
|
</div>
|
|
<div class="Clear"></div>
|
|
|
|
<label for="IDs">[% Translate("Attachments") | html %]:</label>
|
|
<div class="Field">
|
|
[% Data.AttachmentOption %]
|
|
</div>
|
|
<div class="Clear"></div>
|
|
|
|
<label class="Mandatory" for="ValidID"><span class="Marker">*</span> [% Translate("Validity") | html %]:</label>
|
|
<div class="Field">
|
|
[% Data.ValidOption %]
|
|
<div id="ValidIDError" class="TooltipErrorMessage">
|
|
<p>[% Translate("This field is required.") | html %]</p>
|
|
</div>
|
|
<div id="ValidIDServerError" class="TooltipErrorMessage">
|
|
<p>[% Translate("This field is required.") | html %]</p>
|
|
</div>
|
|
</div>
|
|
<div class="Clear"></div>
|
|
|
|
<label for="Comment">[% Translate("Comment") | html %]:</label>
|
|
<div class="Field">
|
|
<input type="text" name="Comment" id="Comment" value="[% Data.Comment | html %]" class="W50pc" maxlength="250"/>
|
|
</div>
|
|
<div class="Clear"></div>
|
|
|
|
<div class="Field">
|
|
[% IF Data.Action == 'Change' %]
|
|
<button class="CallForAction Primary" id="SubmitAndContinue" type="button" value="[% Translate("Save") | html %]"><span>[% Translate("Save") | html %]</span></button>
|
|
[% Translate("or") | html %]
|
|
<button class="CallForAction Primary" id="Submit" type="submit" value="[% Translate("Save") | html %]"><span>[% Translate("Save and finish") | html %]</span></button>
|
|
[% ELSE %]
|
|
<button class="CallForAction Primary" id="Submit" type="submit" value="[% Translate("Save") | html %]"><span>[% Translate("Save") | html %]</span></button>
|
|
[% END %]
|
|
[% Translate("or") | html %]
|
|
<a href="[% Env("Baselink") %]Action=[% Env("Action") %]">[% Translate("Cancel") | html %]</a>
|
|
</div>
|
|
<div class="Clear"></div>
|
|
</fieldset>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<div class="WidgetSimple SpacingTop">
|
|
<div class="Header">
|
|
<h2>[% Translate("Reference") | html %]</h2>
|
|
</div>
|
|
<div class="Content">
|
|
|
|
<p>[% Translate("You can use the following tags") | html %]:</p>
|
|
<dl>
|
|
<dt><code><OTRS_OWNER_*></code></dt>
|
|
<dd>
|
|
[% Translate("Ticket owner options") | html %] ([% Translate("e. g.") | html %]
|
|
<code><OTRS_OWNER_UserFirstname></code>).
|
|
</dd>
|
|
|
|
<dt><code><OTRS_RESPONSIBLE_*></code></dt>
|
|
<dd>
|
|
[% Translate("Ticket responsible options") | html %] ([% Translate("e. g.") | html %]
|
|
<code><OTRS_RESPONSIBLE_UserFirstname></code>).
|
|
</dd>
|
|
|
|
<dt><code><OTRS_CURRENT_*></code></dt>
|
|
<dd>
|
|
[% Translate("Options of the current user who requested this action") | html %] ([% Translate("e. g.") | html %]
|
|
<code><OTRS_CURRENT_UserFirstname></code>).
|
|
</dd>
|
|
|
|
<dt><code><OTRS_TICKET_*></code></dt>
|
|
<dd>
|
|
[% Translate("Options of the ticket data") | html %] ([% Translate("e. g.") | html %]
|
|
<code><OTRS_TICKET_TicketNumber>, <OTRS_TICKET_TicketID>, <OTRS_TICKET_Queue>, <OTRS_TICKET_State></code>).
|
|
</dd>
|
|
|
|
<dt><code><OTRS_TICKET_DynamicField_*></code></dt>
|
|
<dd>
|
|
[% Translate("Options of ticket dynamic fields internal key values") | html %]
|
|
([% Translate(" e. g.") | html %] <code><OTRS_TICKET_DynamicField_TestField>,
|
|
<OTRS_TICKET_DynamicField_TicketFreeText1></code>).
|
|
</dd>
|
|
|
|
<dt><code><OTRS_TICKET_DynamicField_*_Value></code></dt>
|
|
<dd>
|
|
[% Translate("Options of ticket dynamic fields display values, useful for Dropdown and Multiselect fields") | html %]
|
|
([% Translate(" e. g.") | html %] <code><OTRS_TICKET_DynamicField_TestField_Value>,
|
|
<OTRS_TICKET_DynamicField_TicketFreeText1_Value></code>).
|
|
</dd>
|
|
|
|
<dt><code><OTRS_CUSTOMER_DATA_*></code></dt>
|
|
<dd>
|
|
[% Translate("Options of the current customer user data") | html %] ([% Translate("e. g.") | html %]
|
|
<code><OTRS_CUSTOMER_DATA_UserFirstname></code>).
|
|
</dd>
|
|
|
|
<dt><code><OTRS_CONFIG_*></code></dt>
|
|
<dd>
|
|
[% Translate("Config options") | html %] ([% Translate("e. g.") | html %] <code><OTRS_CONFIG_HttpType></code>).
|
|
</dd>
|
|
</dl>
|
|
|
|
<div class="SpacingTop"></div>
|
|
<p>
|
|
<strong>[% Translate("Note") | html %]:</strong>
|
|
[% Translate("Create type templates only supports this smart tags") | html %]:
|
|
<code><strong> <OTRS_CURRENT_*></strong></code> [% Translate("and") | html %] <code><strong> <OTRS_CONFIG_*></strong></code>
|
|
</p>
|
|
|
|
<p class="SpacingTop">
|
|
[% Translate("Example template") | html %]:
|
|
</p>
|
|
<textarea rows="5" cols="60" name="Templatee">
|
|
[% Translate("The current ticket state is") | html %]: "<OTRS_TICKET_State>"
|
|
|
|
[% Translate("Your email address is") | html %]: "<OTRS_CUSTOMER_UserEmail>"
|
|
</textarea>
|
|
</div>
|
|
</div>
|
|
[% RenderBlockEnd("OverviewUpdate") %]
|
|
</div>
|
|
<div class="Clear"></div>
|
|
</div>
|
|
[% RenderBlockEnd("Overview") %]
|