Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace all instances of copy.png with font awesome #17280

Merged
merged 1 commit into from
May 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions CRM/Core/Smarty/plugins/function.copyIcon.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php
/*
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC. All rights reserved. |
| |
| This work is published under the GNU AGPLv3 license with some |
| permitted exceptions and without any warranty. For full license |
| and copyright information, see https://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/

/**
*
* @package CRM
* @author Andrew Hunt, AGH Strategies
* $Id$
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This $Id$ should not be added. We are leaning towards skipping the whole block where it is the same as the default (in this case it isn't due to the author tag)

*
*/

/**
* Display a copy icon that copies the first row's values down.
*
* @param $params
* - name: the field name
* - title: the field title
*
* @param $smarty
*
* @return string
*/
function smarty_function_copyIcon($params, &$smarty) {
$text = ts('Click to copy %1 from row one to all rows.', [1 => $params['title']]);
return <<<HEREDOC
<i class="crm-i fa-clone action-icon" fname="{$params['name']}" title="$text"><span class="sr-only">$text</span></i>
HEREDOC;
}
Binary file removed i/copy.png
Binary file not shown.
2 changes: 1 addition & 1 deletion templates/CRM/Activity/Form/Task/Batch.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
{/foreach}

{foreach from=$fields item=field key=fieldName}
<td><img src="{$config->resourceBase}i/copy.png" alt="{ts 1=$field.title}Click to copy %1 from row one to all rows.{/ts}" fname="{$field.name}" class="action-icon" title="{ts}Click here to copy the value in row one to ALL rows.{/ts}" />{$field.title}</td>
<td>{copyIcon name=$field.name title=$field.title}{$field.title}</td>
{/foreach}
</tr>
</thead>
Expand Down
5 changes: 1 addition & 4 deletions templates/CRM/Batch/Form/Entry.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,7 @@
{foreach from=$fields item=field key=fieldName}
<div class="crm-grid-cell">
{if $field.name|substr:0:11 ne 'soft_credit' and $field.name ne 'trxn_id'}
<img src="{$config->resourceBase}i/copy.png"
alt="{ts 1=$field.title}Click to copy %1 from row one to all rows.{/ts}"
fname="{$field.name}" class="action-icon"
title="{ts}Click here to copy the value in row one to ALL rows.{/ts}"/>
{copyIcon name=$field.name title=$field.title}
{/if}{$field.title}
</div>
{/foreach}
Expand Down
6 changes: 3 additions & 3 deletions templates/CRM/Campaign/Form/Task/Interview.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@
{if $field.skipDisplay}
{continue}
{/if}
<th><img src="{$config->resourceBase}i/copy.png" alt="{ts 1=$field.title}Click to copy %1 from row one to all rows.{/ts}" fname="{$field.name}" class="action-icon" title="{ts}Click here to copy the value in row one to ALL rows.{/ts}" />{$field.title}</th>
<th>{copyIcon name=$field.name title=$field.title}{$field.title}</th>
{/foreach}
{/if}

<th><img src="{$config->resourceBase}i/copy.png" alt="{ts 1=note}Click to copy %1 from row one to all rows.{/ts}" fname="note" class="action-icon" title="{ts}Click here to copy the value in row one to ALL rows.{/ts}" />{ts}Note{/ts}</th>
<th><img src="{$config->resourceBase}i/copy.png" alt="{ts 1=result}Click to copy %1 from row one to all rows.{/ts}" fname="result" class="action-icon" title="{ts}Click here to copy the value in row one to ALL rows.{/ts}" />{ts}Result{/ts}</th>
<th>{capture assign="tsNote"}{ts}Note{/ts}{/capture}{copyIcon name=note title=$tsNote}{$tsNote}</th>
<th>{capture assign="tsResult"}{ts}Result{/ts}{/capture}{copyIcon name=result title=$tsResult}{$tsResult}</th>
<th><a id="interview_voter_button" class='button' style="float:left;" href="#" title={ts}Vote{/ts} onclick="registerInterviewforall( ); return false;">{ts}Record Responses for All{/ts}</a></th>
</tr>
</thead>
Expand Down
3 changes: 1 addition & 2 deletions templates/CRM/Contact/Form/Task/Batch.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{if $field.skipDisplay}
{continue}
{/if}
<td><img src="{$config->resourceBase}i/copy.png" alt="{ts 1=$field.title}Click to copy %1 from row one to all rows.{/ts}" fname="{$field.name}" class="action-icon" title="{ts}Click here to copy the value in row one to ALL rows.{/ts}" />{$field.title}</td>
<td>{copyIcon name=$field.name title=$field.title}{$field.title}</td>
{/foreach}
</tr>
</thead>
Expand Down Expand Up @@ -78,4 +78,3 @@

{*include batch copy js js file*}
{include file="CRM/common/batchCopy.tpl"}

2 changes: 1 addition & 1 deletion templates/CRM/Contribute/Form/Task/Batch.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
{/foreach}

{foreach from=$fields item=field key=fieldName}
<td><img src="{$config->resourceBase}i/copy.png" alt="{ts 1=$field.title}Click to copy %1 from row one to all rows.{/ts}" fname="{$field.name}" class="action-icon" title="{ts}Click here to copy the value in row one to ALL rows.{/ts}" />{$field.title}</td>
<td>{copyIcon name=$field.name title=$field.title}{$field.title}</td>
{/foreach}
</tr>
</thead>
Expand Down
2 changes: 1 addition & 1 deletion templates/CRM/Core/Form/Task/Batch.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
{/foreach}

{foreach from=$fields item=field key=fieldName}
<td><img src="{$config->resourceBase}i/copy.png" alt="{ts 1=$field.title}Click to copy %1 from row one to all rows.{/ts}" fname="{$field.name}" class="action-icon" title="{ts}Click here to copy the value in row one to ALL rows.{/ts}" />{$field.title}</td>
<td>{copyIcon name=$field.name title=$field.title}{$field.title}</td>
{/foreach}
</tr>
</thead>
Expand Down
2 changes: 1 addition & 1 deletion templates/CRM/Event/Form/Task/Batch.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

<td>{ts}Event{/ts}</td>
{foreach from=$fields item=field key=fieldName}
<td><img src="{$config->resourceBase}i/copy.png" alt="{ts 1=$field.title}Click to copy %1 from row one to all rows.{/ts}" fname="{$field.name}" class="action-icon" title="{ts}Click here to copy the value in row one to ALL rows.{/ts}" />{$field.title}</td>
<td>{copyIcon name=$field.name title=$field.title}{$field.title}</td>
{/foreach}

</tr>
Expand Down
2 changes: 1 addition & 1 deletion templates/CRM/Member/Form/Task/Batch.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
{/foreach}

{foreach from=$fields item=field key=fieldName}
<td><img src="{$config->resourceBase}i/copy.png" alt="{ts 1=$field.title}Click to copy %1 from row one to all rows.{/ts}" fname="{$field.name}" class="action-icon" title="{ts}Click here to copy the value in row one to ALL rows.{/ts}" />{$field.title}</td>
<td>{copyIcon name=$field.name title=$field.title}{$field.title}</td>
{/foreach}
</tr>
</thead>
Expand Down