0adaf0e593034e8da9c9be1e19c96ea0e0a531e9
[civicrm-core.git] / CRM / Core / Smarty / plugins / function.copyIcon.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
5 | |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
10 */
11
12 /**
13 *
14 * @package CRM
15 * @author Andrew Hunt, AGH Strategies
16 * $Id$
17 *
18 */
19
20 /**
21 * Display a copy icon that copies the first row's values down.
22 *
23 * @param $params
24 * - name: the field name
25 * - title: the field title
26 *
27 * @param $smarty
28 *
29 * @return string
30 */
31 function smarty_function_copyIcon($params, &$smarty) {
32 $text = ts('Click to copy %1 from row one to all rows.', [1 => $params['title']]);
33 return <<<HEREDOC
34 <i class="crm-i fa-clone action-icon" fname="{$params['name']}" title="$text"><span class="sr-only">$text</span></i>
35 HEREDOC;
36 }