[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[6346] trunk/LedgerSMB/Scripts/template.pm
- Subject: SF.net SVN: ledger-smb:[6346] trunk/LedgerSMB/Scripts/template.pm
- From: ..hidden..
- Date: Thu, 2 Jan 2014 11:46:08 +0000
Revision: 6346
http://sourceforge.net/p/ledger-smb/code/6346
Author: einhverfr
Date: 2014-01-02 11:46:07 +0000 (Thu, 02 Jan 2014)
Log Message:
-----------
Adding omitted workflow script
Added Paths:
-----------
trunk/LedgerSMB/Scripts/template.pm
Added: trunk/LedgerSMB/Scripts/template.pm
===================================================================
--- trunk/LedgerSMB/Scripts/template.pm (rev 0)
+++ trunk/LedgerSMB/Scripts/template.pm 2014-01-02 11:46:07 UTC (rev 6346)
@@ -0,0 +1,94 @@
+=head1 NAME
+
+LedgerSMB::Scripts::template - Template editing workflows for LedgerSMB
+
+=cut
+
+package LedgerSMB::Scripts::template;
+use LedgerSMB::Template::DB;
+use LedgerSMB::Report::Listings::Templates;
+use LedgerSMB::Template;
+
+=head1 SYNPOSIS
+
+To display the edit screen
+
+ LedgerSMB::Scripts::template::display($request)
+
+To edit:
+
+ LedgerSMB::Scripts::template::edit($request)
+
+=head1 FUNCTIONS
+
+=head2 list($request)
+
+Lists the templates.
+
+=cut
+
+sub list {
+ my ($request) = @_;
+ LedgerSMB::Report::Listing::Templates->new(%$request)->render($request);
+}
+
+=head2 display($request)
+
+Displays a template for review
+
+=cut
+
+sub display {
+ my ($request) = @_;
+ my $dbtemp = LedgerSMB::Template::DB->get(%$request);
+ LedgerSMB::Template->new(
+ user => $request->{_user},
+ locale => $request->{_locale},
+ path => 'UI/templates',
+ template => 'review',
+ format => 'HTML'
+ )->render($dbtemp);
+}
+
+=head2 edit($request)
+
+Displays a screen for editing the template
+
+=cut
+
+sub edit {
+ my ($request) = @_;
+ my $dbtemp = LedgerSMB::Template::DB->get(%$request);
+ LedgerSMB::Template->new(
+ user => $request->{_user},
+ locale => $request->{_locale},
+ path => 'UI/templates',
+ template => 'edit',
+ format => 'HTML'
+ )->render($dbtemp);
+}
+
+=head2 save($request)
+
+Saves the template.
+
+=cut
+
+sub save {
+ my ($request) = @_;
+ my $dbtemp = LedgerSMB::Template::DB->get(%$request);
+ $dbtemp->save();
+ display($request);
+}
+
+=head1 COPYRIGHT
+
+Copyright (C) 2014 The LedgerSMB Core Team.
+
+This file may be re-used under the terms of the GNU General Public License
+version 2 or at your option any later version. Please see the included
+LICENSE.txt for details.
+
+=cut
+
+1;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits