Skip to content

Commit

Permalink
Fixed #6511 - Document Attachment Subpanel link incorrect
Browse files Browse the repository at this point in the history
  • Loading branch information
janderson authored and janderson committed Dec 11, 2018
1 parent dc27355 commit 46e8d37
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/SugarFields/Fields/File/ListView.tpl
Expand Up @@ -50,6 +50,6 @@
{if strlen($imageURL)>1}{sugar_getimage name=$imageName alt=$imageName other_attributes='border="0" '}{/if}
{/if}
</a>&nbsp;
<a href="index.php?entryPoint=download&id={$parentFieldArray.ID}&type={if empty($vardef.displayParams.module)}{$displayParams.module}{else}{$vardef.displayParams.module}{/if}" class="tabDetailViewDFLink" target='_blank' style="border-bottom: 0px;">
<a href="index.php?preview=yes&entryPoint=download&id={$parentFieldArray.ID}&type={if empty($vardef.displayParams.module)}{$displayParams.module}{else}{$vardef.displayParams.module}{/if}" class="tabDetailViewDFLink" target='_blank' style="border-bottom: 0px;">
<i class="glyphicon glyphicon-eye-open"></i>
</a>
5 changes: 3 additions & 2 deletions include/SugarFields/Fields/File/SugarFieldFile.php
Expand Up @@ -206,8 +206,9 @@ public function save(&$bean, $params, $field, $vardef, $prefix = '')
public function getListViewSmarty($parentFieldArray, $vardef, $displayParams, $col)
{
global $currentModule;
$displayParams['module'] = $currentModule;

if(!isset($displayParams['module'])){
$displayParams['module'] = $currentModule;
}
return parent::getListViewSmarty($parentFieldArray, $vardef, $displayParams, $col);
}
}

0 comments on commit 46e8d37

Please sign in to comment.