OTRS 6: Move attachment display above article

Dont create your support topics here! No new topics with questions allowed!

Moderator: crythias

Post Reply
OTRS newbie
Posts: 9
Joined: 27 Feb 2017, 12:35
OTRS Version?: 5.0.12
Real Name: Stefan Seidel

OTRS 6: Move attachment display above article

Post by sseidel » 25 Sep 2018, 09:25

Since many of our users are confused about having the attachments underneath the article text, we decided to implement a very simple fix for it. Especially in a long list of longer articles, finding the attachments is very difficult. Here's a simple JavaScript solution that should survive at least minor OTRS updates:

Add a file in $OTRSDIR/var/httpd/htdocs/js/thirdparty/attmt.js with this content:

Code: Select all

for (let el of document.getElementsByClassName('ArticleAttachments')) {
  el.parentNode.insertBefore(el, el.previousSibling.previousSibling);
  el.style.marginTop = '-10px';
  el.style.marginBottom = '0px';
To use this JavaScript, in the SysConfig entry Loader::Agent::CommonJS, add a new entry 010-AttachmentDisplay with the content thirdparty/attmt.js.

That should be all. Only tested in Firefox, but should work in all modern browsers.


Post Reply