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.
Stefan