Commit | Line | Data |
---|---|---|
611910c7 AH |
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 | |
611910c7 AH |
16 | */ |
17 | ||
18 | /** | |
19 | * Display a copy icon that copies the first row's values down. | |
20 | * | |
21 | * @param $params | |
22 | * - name: the field name | |
23 | * - title: the field title | |
24 | * | |
25 | * @param $smarty | |
26 | * | |
27 | * @return string | |
28 | */ | |
29 | function smarty_function_copyIcon($params, &$smarty) { | |
30 | $text = ts('Click to copy %1 from row one to all rows.', [1 => $params['title']]); | |
31 | return <<<HEREDOC | |
32 | <i class="crm-i fa-clone action-icon" fname="{$params['name']}" title="$text"><span class="sr-only">$text</span></i> | |
33 | HEREDOC; | |
34 | } |