3ac0145efc
FossilOrigin-Name: fa0971dfd73b18da2b62d02dcb1f3aa5ef301d17c21efab4ece79d5a6981a297
25 lines
460 B
Perl
25 lines
460 B
Perl
package attachments;
|
|
use strict;
|
|
use warnings;
|
|
use Exporter 'import';
|
|
|
|
our @EXPORT = qw( generate_attachment );
|
|
|
|
use template_helpers 'to_template';
|
|
use icons 'get_icon';
|
|
|
|
sub generate_attachment
|
|
{
|
|
my ($ssn, $data, $att, $sensitive) = @_;
|
|
|
|
my %vars = (
|
|
prefix => '',
|
|
ssn => $ssn,
|
|
attachment => $att,
|
|
sensitive => $sensitive,
|
|
icon => \&get_icon,
|
|
);
|
|
|
|
to_template(\%vars, \$data->{'attachment.tt'});
|
|
}
|
|
|