[freeside-commits] freeside/torrus/perllib/Torrus/Renderer HTML.pm, 1.1.1.1, 1.2 Frontpage.pm, 1.1.1.1, 1.2 Freeside.pm, NONE, 1.1
Ivan,,,
ivan at wavetail.420.am
Mon Dec 27 00:40:21 PST 2010
Update of /home/cvs/cvsroot/freeside/torrus/perllib/Torrus/Renderer
In directory wavetail.420.am:/tmp/cvs-serv16912/torrus/perllib/Torrus/Renderer
Modified Files:
HTML.pm Frontpage.pm
Added Files:
Freeside.pm
Log Message:
torrus, RT#10574
Index: HTML.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/torrus/perllib/Torrus/Renderer/HTML.pm,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -w -d -r1.1.1.1 -r1.2
--- HTML.pm 27 Dec 2010 00:03:44 -0000 1.1.1.1
+++ HTML.pm 27 Dec 2010 08:40:19 -0000 1.2
@@ -112,7 +112,11 @@
'verifyDate' => sub { return verifyDate($_[0]); },
'markup' => sub{ return $self->translateMarkup( @_ ); },
'searchEnabled' => $Torrus::Renderer::searchEnabled,
- 'searchResults' => sub { return $self->doSearch($config_tree, $_[0]); }
+ 'searchResults' => sub { return $self->doSearch($config_tree, $_[0]); },
+
+ #Freeside
+ 'FreesideHeader' => sub { return $self->FreesideHeader(@_); },
+ 'freesideFooter' => sub { return $self->freesideFooter(); },
};
Index: Frontpage.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/torrus/perllib/Torrus/Renderer/Frontpage.pm,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -w -d -r1.1.1.1 -r1.2
--- Frontpage.pm 27 Dec 2010 00:03:44 -0000 1.1.1.1
+++ Frontpage.pm 27 Dec 2010 08:40:19 -0000 1.2
@@ -208,7 +208,11 @@
hasPrivilege( $_[0], 'DisplayTree' ) }
,
'mayGlobalSearch' => sub { return $self->mayGlobalSearch(); },
- 'searchResults' => sub { return $self->doGlobalSearch($_[0]); }
+ 'searchResults' => sub { return $self->doGlobalSearch($_[0]); },
+
+ #Freeside
+ 'freesideHeader' => sub { return $self->freesideHeader(@_); },
+ 'freesideFooter' => sub { return $self->freesideFooter(); },
};
--- NEW FILE: Freeside.pm ---
package Torrus::Renderer::Freeside;
use strict;
#Freeside
use FS::Mason qw( mason_interps );
use FS::UID qw(cgisuidsetup);
use FS::TicketSystem;
my $outbuf;
my( $fs_interp, $rt_interp ) = mason_interps('standalone', 'outbuf'=>\$outbuf);
sub freesideHeader {
my($self, $title, $stylesheet, $c) = (shift, shift);
#from html-incblocks.txt
my $head =
# <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
# [% IF expires %]<META HTTP-EQUIV="Refresh" CONTENT="[% expires %]"/>[% END %]
'<STYLE type="text/css" media="all">
@import url( '. $Torrus::Renderer::plainURL. $stylesheet. ' );
</STYLE>
';
$self->freesideComponent('/elements/header.html',
{
'title' => $title,
'head' => $head,
#'etc' => $etc,
'nobr' => 1,
#'nocss' => 1,
}
);
}
sub freesideFooter {
my $self = shift;
$self->FreesideComponent('/elements/footer.html');
}
our $FSURL;
sub freesideComponent {
my($self, $comp) = (shift, shift);
# my $conf = new FS::Conf;
$FS::Mason::Request::FSURL = $FSURL;
$FS::Mason::Request::FSURL .= '/' unless $FS::Mason::Request::FSURL =~ /\/$/;
# $FS::Mason::Request::QUERY_STRING = $packet->{'query_string'} || '';
cgisuidsetup($Torrus::CGI::q);
FS::TicketSystem->init();
$outbuf = '';
#$fs_interp->exec($comp, @args); #only FS for now alas...
$fs_interp->exec($comp, @_); #only FS for now alas...
#errors? (turn off in-line error reporting?)
return $outbuf;
}
1;
More information about the freeside-commits
mailing list