Files
scripts/Perl OTRS/Kernel/Output/HTML/Templates/Standard/AgentTicketOverviewPreview.tt.save
2024-10-14 00:08:40 +02:00

397 lines
20 KiB
Plaintext

# --
# Copyright (C) 2001-2016 OTRS AG, http://otrs.com/
# --
# 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.
# --
[% RenderBlockStart("DocumentActionRow") %]
<ul class="Actions">
[% RenderBlockStart("DocumentActionRowBulk") %]
<li class="AlwaysPresent">
<span>
<input type="checkbox" title="[% Translate("Select all") | html %]" id="SelectAllTickets" autocomplete="off" />
<label class="InvisibleText" for="SelectAllTickets">[% Translate("Select all") | html %]</label>
</span>
</li>
<li id="BulkAction" class="AlwaysPresent Inactive [% Data.CSS | html %]">
<a href="#">[% Translate(Data.Name) | html %]</a>
</li>
[% RenderBlockEnd("DocumentActionRowBulk") %]
[% RenderBlockStart("DocumentActionRowItem") %]
<li><a class="[% Data.Class | html %]" href="[% Data.Link | html %]" title="[% Data.Description | html %]">[% Data.Name | html %]</a></li>
[% RenderBlockEnd("DocumentActionRowItem") %]
[% RenderBlockStart("DocumentActionRowHTML") %]
[% Data.HTML %]
[% RenderBlockEnd("DocumentActionRowHTML") %]
</ul>
[% RenderBlockEnd("DocumentActionRow") %]
[% RenderBlockStart("DocumentHeader") %]
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
Core.UI.ActionRow.Init();
$('a.AsPopup').bind('click', function (Event) {
var Matches,
PopupType = 'TicketAction';
Matches = $(this).attr('class').match(/PopupType_(\w+)/);
if (Matches) {
PopupType = Matches[1];
}
Core.UI.Popup.OpenPopup($(this).attr('href'), PopupType);
return false;
});
//]]></script>
[% END %]
<ul id="TicketOverviewLarge" class="Overview OverviewLarge [% Data.Class | html %]">
[% RenderBlockEnd("DocumentHeader") %]
[% RenderBlockStart("NoTicketFound") %]
<li id="EmptyMessageLarge">
[% Translate("No ticket data found.") | html %]
</li>
[% RenderBlockEnd("NoTicketFound") %]
[% RenderBlockStart("DocumentContent") %]
<li id="TicketID_[% Data.TicketID | html %]" class="MasterAction">
<div class="Content [% Data.AdditionalClasses | html %]">
[% RenderBlockStart("InlineActionRow") %]
<ul class="Actions InlineActions">
<li class="ResponsiveActionMenu"><a href="#" id="ResponsiveActionMenu[% Data.TicketID | html %]" title="[% Translate("Open / Close ticket action menu") | html %]"><i class="fa fa-bars"></i></a></li>
[% RenderBlockStart("InlineActionRowItem") %]
<li><a id="[% Data.ID | html %][% Data.TicketID | html %]" class="[% Data.Class | html %]" href="[% Data.Link | Interpolate | html %]" title="[% Translate(Data.Description) | html %]">[% Translate(Data.Name) | html %]</a></li>
[% RenderBlockEnd("InlineActionRowItem") %]
[% RenderBlockStart("InlineActionRowItemHTML") %]
[% Data.HTML %]
[% RenderBlockEnd("InlineActionRowItemHTML") %]
</ul>
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
// Stop propagation on click on a part of the InlienActionRow without a link
// Otherwise that would trigger the li-wide link to the ticketzoom
$('ul.InlineActions').click(function (Event) {
Event.cancelBubble = true;
if (Event.stopPropagation) {
Event.stopPropagation();
}
});
//]]></script>
[% END %]
[% RenderBlockEnd("InlineActionRow") %]
[% RenderBlockStart("Bulk") %]
<div class="Checkbox">
<input class="Checkbox" type="checkbox" name="TicketID" title="[% Translate("Select this ticket") | html %]" value="[% Data.TicketID | html %]" autocomplete="off" />
</div>
[% RenderBlockEnd("Bulk") %]
[% RenderBlockStart("Meta") %]
[% RenderBlockStart("MetaIcon") %]
<div class="[% Data.Class | html %]" title="[% Translate(Data.Title) | html %]">
<span class="[% Data.ClassSpan | html %]">
<i class="fa fa-star"></i>
<i class="fa fa-star"></i>
<em>[% Translate(Data.Title) | html %]</em>
</span>
</div>
[% RenderBlockEnd("MetaIcon") %]
[% RenderBlockEnd("Meta") %]
<div class="Infos">
<h2>
<a href="[% Env("Baselink") %]Action=AgentTicketZoom;TicketID=[% Data.TicketID | uri %]" title="[% Data.Title | html %]" class="MasterActionLink">[% Config("Ticket::Hook") %]: [% Data.TicketNumber %] &ndash; [% Data.Title | html %]</a>
</h2>
[% RenderBlockStart("MenuItem") %]
<a href="[% Env("Baselink") %][% Data.Link %]" [% Data.LinkParam %] class="menuitem" title="[% Translate(Data.Description) | html %]">[% Translate(Data.Name) | html %]</a>
[% RenderBlockEnd("MenuItem") %]
<table>
<tbody>
<tr>
<td>
<label>[% Translate("Age") | html %]</label>[% Data.Age | html %]
</td>
<td>
<label>[% Translate("Queue") | html %]</label><div title="[% Data.Queue | html %]">[% Data.Queue | truncate(26) | html %]</div>
</td>
</tr>
<tr>
<td>
<label>[% Translate("Created") | html %]</label>[% Data.Created | Localize("TimeLong") %]
</td>
<td>
<label>[% Translate("State") | html %]</label><div title="[% Translate(Data.State) | html %]">[% Translate(Data.State) | html %]</div>
</td>
</tr>
[% RenderBlockStart("Service") %]
<tr>
<td>
<label>[% Translate("Service") | html %]</label><div title="[% Data.Service | html %]">[% Data.Service | truncate(26) | html %]</div>
</td>
<td>
[% RenderBlockStart("SLA") %]
<label>[% Translate("Service Level Agreement") | html %]</label><div title="[% Data.SLA | html %]">[% Data.SLA | truncate(26) | html %]</div>
[% RenderBlockEnd("SLA") %]
</td>
</tr>
[% RenderBlockEnd("Service") %]
<tr>
<td>
<label>[% Translate("Owner") | html %]</label><div title="[% Data.UserFirstname | html %] [% Data.UserLastname | html %] ([% Data.Owner | html %])">[% Data.UserFirstname | truncate(15) | html %] [% Data.UserLastname | truncate(15) | html %]</div>
</td>
<td>
<label>[% Translate("Lock") | html %]</label><div title="[% Translate(Data.Lock) | html %]">[% Translate(Data.Lock) | html %]</div>
</td>
</tr>
<tr class="Middle">
<td>
[% RenderBlockStart("CustomerID") %]
<label>[% Translate("CustomerID") | html %]</label>
[% RenderBlockStart("CustomerIDRW") %]
<div title="[% Data.CustomerID | html %]"><a href="[% Config("CustomerDBLink") | Interpolate %]" class="AsPopup PopupType_TicketAction" [% Config("CustomerDBLinkTarget") %]>[% Data.CustomerID | html %]</a></div>
[% RenderBlockEnd("CustomerIDRW") %]
[% RenderBlockStart("CustomerIDRO") %]
<div title="[% Data.CustomerID | html %]">[% Data.CustomerID | html %]</div>
[% RenderBlockEnd("CustomerIDRO") %]
[% RenderBlockStart("CustomerName") %]
<div title="[% Data.CustomerName | html %]">[% Data.CustomerName | html %]</div>
[% RenderBlockEnd("CustomerName") %]
[% RenderBlockEnd("CustomerID") %]
</td>
<td>
[% RenderBlockStart("FirstResponseTime") %]
<label>[% Translate("First Response Time") | html %]</label>
<div title="[% Translate("Service Time") | html %]: [% Data.FirstResponseTimeWorkingTime | html %]" class="[% Data.FirstResponseTimeClass | html %]">[% Data.FirstResponseTimeHuman | html %] / [% Data.FirstResponseTimeDestinationDate | Localize("TimeShort") %]</div>
[% RenderBlockEnd("FirstResponseTime") %]
</td>
</tr>
<tr>
<td>
[% RenderBlockStart("Type") %]
<label>[% Translate("Type") | html %]</label><div title="[% Data.Type | html %]">[% Data.Type | html %]</div>
[% RenderBlockEnd("Type") %]
</td>
<td>
[% RenderBlockStart("UpdateTime") %]
<label>[% Translate("Update Time") | html %]</label>
<div title="[% Translate("Service Time") | html %]: [% Data.UpdateTimeWorkingTime | html %]" class="[% Data.UpdateTimeClass | html %]">[% Data.UpdateTimeHuman | html %] / [% Data.UpdateTimeDestinationDate | Localize("TimeShort") %]</div>
[% RenderBlockEnd("UpdateTime") %]
</td>
</tr>
<tr>
<td></td>
<td>
[% RenderBlockStart("SolutionTime") %]
<label>[% Translate("Solution Time") | html %]</label>
<div title="[% Translate("Service Time") | html %]: [% Data.SolutionTimeWorkingTime | html %]" class="[% Data.SolutionTimeClass | html %]">[% Data.SolutionTimeHuman | html %] / [% Data.SolutionTimeDestinationDate | Localize("TimeShort") %]</div>
[% RenderBlockEnd("SolutionTime") %]
</td>
</tr>
[% RenderBlockStart("DynamicFieldTableRow") %]
<tr class="[% Data.Class %]">
[% RenderBlockStart("DynamicFieldTableRowRecord") %]
<td>
<label>[% Translate(Data.Label) | html %]</label>
[% RenderBlockStart("DynamicFieldTableRowRecordLink") %]
<div title="[% Data.Title | html %]"><a href="[% Data.Link | Interpolate %]" target="_blank" class="DynamicFieldLink">[% Data.Value %]</a></div>
[% RenderBlockEnd("DynamicFieldTableRowRecordLink") %]
[% RenderBlockStart("DynamicFieldTableRowRecordPlain") %]
<div title="[% Data.Title | html %]"><span>[% Data.Value %]</span></div>
[% RenderBlockEnd("DynamicFieldTableRowRecordPlain") %]
</td>
[% RenderBlockEnd("DynamicFieldTableRowRecord") %]
</tr>
[% RenderBlockEnd("DynamicFieldTableRow") %]
# example of how to use fixed dynamic field blocks for customizations
# Note: Field1 and Field2 are the names of the fields and had to be replaced with the actual
# field names
# <tr>
#[% RenderBlockStart("DynamicField_Field1_TableRowRecord") %]
# <td>
# <label>[% Translate(Data.Label) | html %]</label>
#[% RenderBlockStart("DynamicField_Field1_TableRowRecordLink") %]
# <div title="[% Data.Title | html %]"><a href="[% Data.Link | Interpolate %]" target="_blank" class="DynamicFieldLink">[% Data.Value %]</a></div>
#[% RenderBlockEnd("DynamicField_Field1_TableRowRecordLink") %]
#[% RenderBlockStart("DynamicField_Field1_TableRowRecordPlain") %]
# <div title="[% Data.Title | html %]"><span>[% Data.Value %]</span></div>
#[% RenderBlockEnd("DynamicField_Field1_TableRowRecordPlain") %]
# </td>
#[% RenderBlockEnd("DynamicField_Field1_TableRowRecord") %]
# </tr>
# <tr>
#[% RenderBlockStart("DynamicField_Field2_TableRowRecord") %]
# <td>
# <label>[% Translate(Data.Label) | html %]</label>
#[% RenderBlockStart("DynamicField_Field2_TableRowRecordLink") %]
# <div title="[% Data.Title | html %]"><a href="[% Data.Link | Interpolate %]" target="_blank" class="DynamicFieldLink">[% Data.Value %]</a></div>
#[% RenderBlockEnd("DynamicField_Field2_TableRowRecordLink") %]
#[% RenderBlockStart("DynamicField_Field2_TableRowRecordPlain") %]
# <div title="[% Data.Title | html %]"><span>[% Data.Value %]</span></div>
#[% RenderBlockEnd("DynamicField_Field2_TableRowRecordPlain") %]
# </td>
#[% RenderBlockEnd("DynamicField_Field2_TableRowRecord") %]
# </tr>
</tbody>
</table>
</div>
[% RenderBlockStart("ArticlesPreviewArea") %]
<div class="Preview">
<ul class="[% Data.Class | html %]">
[% RenderBlockStart("ArticlePreview") %]
<li class="[% Data.Class | html %]">
<h3>
<a href="#" title="[% Data.From | html %] &ndash; [% Data.Subject | html %] &ndash; [% Data.Created | Localize("TimeShort") %]">
<span class="Headline">
[% Data.FromRealname | truncate(50) | html %] &ndash;
<span class="Subject">[% Data.Subject | truncate(70) | html %]</span>
</span>
<span class="DateTime">[% Data.Created | Localize("TimeShort") %]</span>
<span class="Clear"></span>
</a>
</h3>
<div class="HiddenBlock">
[% RenderBlockStart("ArticlePreviewActionRow") %]
<div class="ActionRow">
<ul class="Actions">
[% RenderBlockStart("ArticlePreviewActionRowItem") %]
<li class="[% Data.Class | html %]">
<form title="[% Translate(Data.Name) | html %]" action="[% Env("CGIHandle") %]" method="post" id="[% Data.FormID | html %]">
<input type="hidden" name="Action" value="[% Data.Action | html %]"/>
<input type="hidden" name="TicketID" value="[% Data.TicketID | html %]"/>
<input type="hidden" name="ArticleID" value="[% Data.ArticleID | html %]"/>
<input type="hidden" name="ReplyAll" value="[% Data.ReplyAll | html %]"/>
<label for="ResponseID[% Data.ArticleID | html %]" class="InvisibleText">[% Translate(Data.Name) | html %]:</label>
[% Data.StandardResponsesStrg %]
</form>
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
$('#[% Data.FormID | html %] select[name=ResponseID]').bind('change', function (Event) {
var URL;
if ($(this).val() > 0) {
var URL = Core.Config.Get('Baselink') + $(this).parents().serialize();
Core.UI.Popup.OpenPopup(URL, 'TicketAction');
// reset the select box so that it can be used again from the same window
$(this).val('0');
}
});
// make sure this click event does not bubble up to the table row and execute its click handler
$('#[% Data.FormID | html %] select[name=ResponseID]').bind('click', function (Event) {
Event.stopPropagation();
return false;
});
//]]></script>
[% END %]
</li>
[% RenderBlockEnd("ArticlePreviewActionRowItem") %]
</ul>
<div class="ClearLeft"></div>
</div>
[% RenderBlockEnd("ArticlePreviewActionRow") %]
<div class="Content ArticleBody">
[% Data.BodyNote %]
[% Data.Body %]
</div>
</div>
</li>
[% RenderBlockEnd("ArticlePreview") %]
</ul>
</div>
[% RenderBlockEnd("ArticlesPreviewArea") %]
<div class="Clear"></div>
</div>
</li>
[% RenderBlockEnd("DocumentContent") %]
[% RenderBlockStart("DocumentFooter") %]
</ul>
<form name="bulk" action="">
<input type="hidden" name="TicketID" value=""/>
</form>
<form action="[% Env("CGIHandle") %]" method="post" enctype="multipart/form-data" name="matrix">
<input type="hidden" name="Action" value="AgentTicketBulk"/>
[% RenderBlockStart("DocumentFooterBulkItem") %]
<input type="hidden" name="TicketID" value=""/>
[% RenderBlockEnd("DocumentFooterBulkItem") %]
<input type="hidden" name="TicketID" value=""/>
</form>
[% RenderBlockEnd("DocumentFooter") %]
[% RenderBlockStart("DocumentMenuItemMoveForm") %]
<li class="[% Data.Class | html %]">
<form title="[% Translate("Move ticket to a different queue") | html %]" action="[% Env("CGIHandle") %]" method="get">
<input type="hidden" name="Action" value="AgentTicketMove"/>
<input type="hidden" name="QueueID" value="[% Data.QueueID | html %]"/>
<input type="hidden" name="TicketID" value="[% Data.TicketID | html %]"/>
<label for="DestQueueID" class="InvisibleText">[% Translate("Change queue") | html %]:</label>
[% Data.MoveQueuesStrg %]
</form>
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
$('.InlineActions, .OverviewActions').on('change', 'select[name=DestQueueID]', function (Event) {
$(this).closest('form').submit();
});
//]]></script>
[% END %]
</li>
[% RenderBlockEnd("DocumentMenuItemMoveForm") %]
[% WRAPPER JSOnDocumentComplete %]
[% RenderBlockStart("DocumentReadyActionRowAdd") %]
[% FOREACH MenuElement IN Data.Data %]
[% MenuElement.Name = Interpolate(MenuElement.Name) %]
[% MenuElement.Link = Interpolate(MenuElement.Link) %]
[% MenuElement.Description = Interpolate(MenuElement.Description) %]
[% END %]
<script type="text/javascript">//<![CDATA[
Core.UI.ActionRow.AddActions($('#TicketID_[% Data.TicketID | html %]'), [% JSON(Data.Data) %]);
//]]></script>
[% RenderBlockEnd("DocumentReadyActionRowAdd") %]
[% RenderBlockStart("DocumentReadyStart") %]
<script type="text/javascript">//<![CDATA[
Core.UI.InitCheckboxSelection($('div.Checkbox'));
$('.MasterAction').bind('click', function (Event) {
var $MasterActionLink = $(this).find('.MasterActionLink');
// if the user is trying to select text from an article, MasterAction should not be executed
if (typeof Event.target === 'object' && ($(Event.target).hasClass('ArticleBody') || $(Event.target).hasClass('ActionRow'))) {
return false;
}
// prevent MasterAction on Dynamic Fields links
if ($(Event.target).hasClass('DynamicFieldLink')) {
return true;
}
// only act if the link was not clicked directly
if (Event.target !== $MasterActionLink.get(0)) {
if (Event.ctrlKey || Event.metaKey) {
window.open($MasterActionLink.attr('href'));
}
else {
window.location = $MasterActionLink.attr('href');
}
return false;
}
});
Core.UI.Accordion.Init($('.Preview > ul'), 'li h3 a', '.HiddenBlock');
if ($('body').hasClass('TouchDevice')) {
$('ul.InlineActions li:not(.ResponsiveActionMenu)').hide();
}
$('li.ResponsiveActionMenu').on('click.ToggleResponsiveActionMenu', function () {
$(this).siblings().toggle();
$(this).toggleClass('Opened')
return false;
});
//]]></script>
[% RenderBlockEnd("DocumentReadyStart") %]
[% END %]