Download icon next to filename in document detail view

When i click on the filename it download the file,
I also want to add a download button next to it, so that clicking on it also downloads the file,

I tried doing it like this

  array (
            'name' => 'filename',
            'displayParams' => 
            array (
              'link' => 'filename',
              'id' => 'document_revision_id',

            'customCode' => '<a href="index.php?entryPoint=download&id={$fields.document_revision_id.value}&type=Documents">{$fields.filename.value}<img src="./themes/suite8/images/view_inline.png" alt="View Inline"></a>',

but it doesnt work

Does it at least showing a download button with your code?

What if you set Documents record view to classic mode, does it work?

I’m not sure about that

yes it does, but it doesn’t download any file

$file_url = "<a href='" . $this->doc_url . "' target='_blank'>" . SugarThemeRegistry::current()->getImage(
                    $this->doc_type . '_image_inline',
                ) . "</a>";

Doucmet.php code line 288