diff --git a/CRM/Core/Smarty/plugins/function.copyIcon.php b/CRM/Core/Smarty/plugins/function.copyIcon.php new file mode 100644 index 000000000000..0adaf0e59303 --- /dev/null +++ b/CRM/Core/Smarty/plugins/function.copyIcon.php @@ -0,0 +1,36 @@ + $params['title']]); + return <<$text +HEREDOC; +} diff --git a/i/copy.png b/i/copy.png deleted file mode 100644 index cd918ab1970c..000000000000 Binary files a/i/copy.png and /dev/null differ diff --git a/templates/CRM/Activity/Form/Task/Batch.tpl b/templates/CRM/Activity/Form/Task/Batch.tpl index fc002b787932..992de310c27d 100644 --- a/templates/CRM/Activity/Form/Task/Batch.tpl +++ b/templates/CRM/Activity/Form/Task/Batch.tpl @@ -21,7 +21,7 @@ {/foreach} {foreach from=$fields item=field key=fieldName} - {ts 1=$field.title}Click to copy %1 from row one to all rows.{/ts}{$field.title} + {copyIcon name=$field.name title=$field.title}{$field.title} {/foreach} diff --git a/templates/CRM/Batch/Form/Entry.tpl b/templates/CRM/Batch/Form/Entry.tpl index 31c3e6963e74..e7f30436973b 100644 --- a/templates/CRM/Batch/Form/Entry.tpl +++ b/templates/CRM/Batch/Form/Entry.tpl @@ -55,10 +55,7 @@ {foreach from=$fields item=field key=fieldName}
{if $field.name|substr:0:11 ne 'soft_credit' and $field.name ne 'trxn_id'} - {ts 1=$field.title}Click to copy %1 from row one to all rows.{/ts} + {copyIcon name=$field.name title=$field.title} {/if}{$field.title}
{/foreach} diff --git a/templates/CRM/Campaign/Form/Task/Interview.tpl b/templates/CRM/Campaign/Form/Task/Interview.tpl index 7da55ab1e4a3..f723097862d8 100644 --- a/templates/CRM/Campaign/Form/Task/Interview.tpl +++ b/templates/CRM/Campaign/Form/Task/Interview.tpl @@ -116,12 +116,12 @@ {if $field.skipDisplay} {continue} {/if} - {ts 1=$field.title}Click to copy %1 from row one to all rows.{/ts}{$field.title} + {copyIcon name=$field.name title=$field.title}{$field.title} {/foreach} {/if} - {ts 1=note}Click to copy %1 from row one to all rows.{/ts}{ts}Note{/ts} - {ts 1=result}Click to copy %1 from row one to all rows.{/ts}{ts}Result{/ts} + {capture assign="tsNote"}{ts}Note{/ts}{/capture}{copyIcon name=note title=$tsNote}{$tsNote} + {capture assign="tsResult"}{ts}Result{/ts}{/capture}{copyIcon name=result title=$tsResult}{$tsResult} {ts}Record Responses for All{/ts} diff --git a/templates/CRM/Contact/Form/Task/Batch.tpl b/templates/CRM/Contact/Form/Task/Batch.tpl index 8c62574ea57b..2cd61d93b1a1 100644 --- a/templates/CRM/Contact/Form/Task/Batch.tpl +++ b/templates/CRM/Contact/Form/Task/Batch.tpl @@ -19,7 +19,7 @@ {if $field.skipDisplay} {continue} {/if} - {ts 1=$field.title}Click to copy %1 from row one to all rows.{/ts}{$field.title} + {copyIcon name=$field.name title=$field.title}{$field.title} {/foreach} @@ -78,4 +78,3 @@ {*include batch copy js js file*} {include file="CRM/common/batchCopy.tpl"} - diff --git a/templates/CRM/Contribute/Form/Task/Batch.tpl b/templates/CRM/Contribute/Form/Task/Batch.tpl index 2a5c48cb2ca1..23effd2f50d4 100644 --- a/templates/CRM/Contribute/Form/Task/Batch.tpl +++ b/templates/CRM/Contribute/Form/Task/Batch.tpl @@ -20,7 +20,7 @@ {/foreach} {foreach from=$fields item=field key=fieldName} - {ts 1=$field.title}Click to copy %1 from row one to all rows.{/ts}{$field.title} + {copyIcon name=$field.name title=$field.title}{$field.title} {/foreach} diff --git a/templates/CRM/Core/Form/Task/Batch.tpl b/templates/CRM/Core/Form/Task/Batch.tpl index 5be7cbb1abef..ed23171394ab 100644 --- a/templates/CRM/Core/Form/Task/Batch.tpl +++ b/templates/CRM/Core/Form/Task/Batch.tpl @@ -22,7 +22,7 @@ {/foreach} {foreach from=$fields item=field key=fieldName} - {ts 1=$field.title}Click to copy %1 from row one to all rows.{/ts}{$field.title} + {copyIcon name=$field.name title=$field.title}{$field.title} {/foreach} diff --git a/templates/CRM/Event/Form/Task/Batch.tpl b/templates/CRM/Event/Form/Task/Batch.tpl index eef206692417..895ec862e66f 100644 --- a/templates/CRM/Event/Form/Task/Batch.tpl +++ b/templates/CRM/Event/Form/Task/Batch.tpl @@ -42,7 +42,7 @@ {ts}Event{/ts} {foreach from=$fields item=field key=fieldName} - {ts 1=$field.title}Click to copy %1 from row one to all rows.{/ts}{$field.title} + {copyIcon name=$field.name title=$field.title}{$field.title} {/foreach} diff --git a/templates/CRM/Member/Form/Task/Batch.tpl b/templates/CRM/Member/Form/Task/Batch.tpl index b9ddfefe7eab..28ed5aa2438a 100644 --- a/templates/CRM/Member/Form/Task/Batch.tpl +++ b/templates/CRM/Member/Form/Task/Batch.tpl @@ -22,7 +22,7 @@ {/foreach} {foreach from=$fields item=field key=fieldName} - {ts 1=$field.title}Click to copy %1 from row one to all rows.{/ts}{$field.title} + {copyIcon name=$field.name title=$field.title}{$field.title} {/foreach}