treebird/perl/account.pm
nekobit ae453835b4 Add content to Account page
FossilOrigin-Name: ddb93098b95a7e750d80156451580be8a59a8471985b93ad00cf43e05a6e49dd
2022-08-06 17:41:35 +00:00

39 lines
783 B
Perl

package account;
use strict;
use warnings;
use Exporter 'import';
our @EXPORT = qw( account content_statuses );
use template_helpers 'to_template';
use l10n 'lang';
sub generate_account
{
my ($ssn, $data, $acct, $relationship, $content) = @_;
my %vars = (
prefix => '',
ssn => $ssn,
lang => \&lang,
relationship => $relationship,
content => $content,
acct => $acct,
);
to_template(\%vars, \$data->{'account.tt'});
}
sub content_statuses
{
my ($ssn, $data, $acct, $relationship, $statuses) = @_;
my %vars = (
prefix => '',
ssn => $ssn,
acct => $acct,
);
generate_account($ssn, $data, $acct, $relationship, to_template(\%vars, \$data->{'account_statuses.tt'}));
}