Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2014-02-05-17-16-30
[civicrm-core.git] / templates / CRM / Custom / Page / CustomDataView.tpl
index 81cd70ede89541f7b5b3552aaf30e805024596ed..24a2afac7dd0a99c8c23bc3377c3960390d50c49 100644 (file)
@@ -1,6 +1,6 @@
 {*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.3                                                |
+ | CiviCRM version 4.4                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2013                                |
  +--------------------------------------------------------------------+
@@ -29,7 +29,7 @@
   {foreach from=$customValues item=cd_edit key=cvID}
     <table class="no-border">
       {assign var='index' value=$groupId|cat:"_$cvID"}
-      {if $editOwnCustomData or ($showEdit and $editCustomData and $groupId)}
+      {if ($editOwnCustomData and $showEdit) or ($showEdit and $editCustomData and $groupId)}
         <tr>
           <td>
             <a
                       <td class="label">{$element.field_title}</td>
                       {if $element.field_type == 'File'}
                         {if $element.field_value.displayURL}
-                          <td class="html-adjust"><a href="#"
-                                                     onclick="imagePopUp('{$element.field_value.imageURL}'); return false;"><img
-                                src="{$element.field_value.displayURL}" height="100" width="100"></a></td>
+                          <td class="html-adjust">
+                            <a href="{$element.field_value.displayURL}" class='crm-image-popup'>
+                              <img src="{$element.field_value.displayURL}" height="100" width="100">
+                            </a>
+                          </td>
                         {else}
-                          <td class="html-adjust"><a
-                              href="{$element.field_value.fileURL}">{$element.field_value.fileName}</a></td>
+                          <td class="html-adjust">
+                            <a href="{$element.field_value.fileURL}">{$element.field_value.fileName}</a>
+                          </td>
                         {/if}
                       {else}
                         {if $element.field_data_type == 'Money'}