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

117 lines
6.5 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.
# --
<li class="[% Data.SenderType | html %]-[% Data.IsVisibleForCustomer | html %] [% Data.Class | html %]">
<div class="MessageHeader">
<h3>
<a href="[% Env("Baselink") %]Action=[% Env("Action") %];TicketNumber=[% Data.TicketNumber | uri %];TicketID=[% Data.TicketID | uri %];ArticleID=[% Data.ArticleID | uri %]">
[% Data.FromRealname | html %] &ndash;
[% IF Data.ArticleExpanded %]
<span title="[% Data.ArticleFields.Subject.Value | html %]">
[% Data.ArticleFields.Subject.Value | html %]
</span>
[% ELSE %]
<span title="[% Translate("Expand article") | html %]...">
[% Data.ArticleFields.Subject.Value | html %]
</span>
[% END %]
</a>
</h3>
<span class="Age" title="[% Data.CreateTime | Localize("TimeLong") | html %]">[% Data.Age %]</span>
<div class="Clear"></div>
</div>
<input type="hidden" name="ArticleState" />
<div class="MessageBody">
<div class="Details SeperatorRow">
[% FOREACH ArticleField IN Data.ArticleFields.values.nsort("Prio") %]
[% IF ArticleField.Label == "From" || ArticleField.Label == "To" || ArticleField.Label == "Cc" %]
<div>
<div class="Label">[% Translate(ArticleField.Label) | html %]:</div>
<span title="[% ArticleField.Realname | html %]">[% ArticleField.Realname | html %]</span>
<div class="Clear"></div>
</div>
[% ELSIF ArticleField.Label == "Subject" %]
<div>
<div class="Label">[% Translate("Subject") | html %]:</div>
<span title="[% ArticleField.Value | html %]">[% ArticleField.Value | html %]</span>
<div class="Clear"></div>
</div>
[% END %]
[% END %]
[% FOREACH ArticleField IN Data.ArticleMetaFields %]
<div>
<!-- show accounted time and dynamic fields -->
<div class="Label">[% Translate(ArticleField.value.Label) | html %]:</div>
[% IF ArticleField.value.Link %]
<span class="Value" title="[% ArticleField.value.Title %]">
<a href="[% ArticleField.value.Link | Interpolate %]"
[% IF ArticleField.value.LinkPreview %] data-trigger="floater" data-floater-url="[% ArticleField.value.LinkPreview | Interpolate %]"[% END %]
target="_blank" class="DynamicFieldLink">
[% ArticleField.value.Value %]
</a>
</span>
[% ELSE %]
<span class="Value" title="[% ArticleField.value.Title %]">[% ArticleField.value.Value %]</span>
[% END %]
<div class="Clear"></div>
</div>
[% END %]
[% IF Data.Attachments && Data.Attachments.size %]
<div class="Attachments">
<div class="Label">[% Translate("Attachments") | html %]:</div>
[% FOREACH Attachment IN Data.Attachments %]
<div>
<i class="fa fa-paperclip"></i>
<span class="DownloadAttachment" title="[% Attachment.Filename | html %][% IF Attachment.FilesizeRaw %] - [% Attachment.FilesizeRaw | Localize('Filesize') | html %][% END %]">
<a href="[% Attachment.Link %]" [% Attachment.Target %] title="[% Translate(Attachment.Action) | html %]">[% Attachment.Filename | html %]</a>
[% IF Attachment.FilesizeRaw %]
([% Attachment.FilesizeRaw | Localize('Filesize') | html %])
[% END %]
</span>
</div>
<div class="Clear"></div>
[% END %]
</div>
[% END %]
</div>
<div class="MessageContent">
[% IF Data.HTML %]
[% IF Data.BodyHTMLLoad %]
[% IF Data.BrowserLinkMessage %]
# Show info, that links within the iframe must be clicked with strg/cmd/shift (depending on the used browser and os)
# to open the links in a new window without the security permissions given to the iframe
<div class="MessageBrowser">
<p>
[% Translate("To open links in the following article, you might need to press Ctrl or Cmd or Shift key while clicking the link (depending on your browser and OS).") | html %]
</p>
<a class="Close" title="[% Translate("Close this message") | html %]" href="#"><i class="fa fa-times"></i></a>
</div>
[% END %]
# Use the HTML5 sandbox attribute to prevent plugins and scripts from being executed in the browser.
# Append session info to URL because IE will not send cookies.
# Set 'allow-popups' to allow IE10+ to open links. ref: http://www.w3.org/html/wg/wiki/ChangeProposals/sandbox_allow_popups
<iframe sandbox="allow-same-origin allow-popups ms-allow-popups allow-popups-to-escape-sandbox" title="about:blank" frameborder="0" id="VisibleFrame" class="VisibleFrame" src="[% Env("Baselink") %]Action=CustomerTicketArticleContent;TicketID=[% Data.TicketID | html %];ArticleID=[% Data.ArticleID | html %];[% IF !Config("SessionUseCookie") %][% Env("SessionName") | html %]=[% Env("SessionID") | html %][% END %]"></iframe>
[% ELSE %]
# <!-- Here we need to append the session info if cookies are disabled, because the layout object cannot automatically do that here, like in the other iframe (only for src attribute). -->
<iframe sandbox="allow-same-origin allow-popups ms-allow-popups allow-popups-to-escape-sandbox" src="about:blank" frameborder="0" title="[% Env("Baselink") %]Action=CustomerTicketArticleContent;TicketID=[% Data.TicketID | html %];ArticleID=[% Data.ArticleID | html %];[% Data.SessionInformation | html %];[% IF !Config("SessionUseCookie") %][% Env("SessionName") | html %]=[% Env("SessionID") | html %][% END %]"></iframe>
[% END %]
[% ELSE %]
[% Data.BodyNote %]
<div class="ArticleBody">
[% Data.Body %]
</div>
[% END %]
</div>
</div>
</li>