diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-09-01 06:49:20 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-09-01 06:49:20 +0000 |
commit | 9b072067dae21ed62e4a36799afe2d80e94f66b7 (patch) | |
tree | 270e0979ef70eb2a875902deb1dc874e30071ced | |
parent | de5795278d3f8a52112d0f42bcf7716a76ff11ac (diff) |
Updating pod for menu scripts, and adding pod coverage for my modifications to scripts/customer
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1483 4979c152-3d1c-0410-bac9-87ea11338e46
-rw-r--r-- | scripts/customer.pl | 12 | ||||
-rw-r--r-- | scripts/menu.pl | 89 |
2 files changed, 96 insertions, 5 deletions
diff --git a/scripts/customer.pl b/scripts/customer.pl index dfef02cd..c684c7e6 100644 --- a/scripts/customer.pl +++ b/scripts/customer.pl @@ -51,6 +51,18 @@ sub get { } +=pod + +=over + +=item add + +This method creates a blank screen for entering a customer's information. + +=back + +=cut + sub add { my ($request) = @_; my $customer = LedgerSMB::DBObject::Customer->new(base => $request, copy => 'all'); diff --git a/scripts/menu.pl b/scripts/menu.pl index ee88f08e..4e81b331 100644 --- a/scripts/menu.pl +++ b/scripts/menu.pl @@ -1,17 +1,43 @@ #!/usr/bin/perl -# This file is copyright (C) 2007the LedgerSMB core team and licensed under -# the GNU General Public License. For more information please see the included -# LICENSE and COPYRIGHT files + +=head1 NAME + +LedgerSMB::Scripts::menu - LedgerSMB controller script for menus + +=head1 SYOPSIS + +This script provides a controller class for generating menus. It can operate in +two modes: One creates a standard expanding menu which works with or without +javascript. The second creates drilldown menus for small-screen or text-only +devices. + +=head1 METHODS + +=cut package LedgerSMB::Scripts::menu; -our $VERSION = '0.1'; +our $VERSION = '1.0'; -$menufile = "menu.ini"; use LedgerSMB::DBObject::Menu; use LedgerSMB::Template; use strict; + +=pod + +=over + +=item __default + +This pseudomethod is used to trap menu clicks that come back through the file +and route to the appropriate function. If $request->{menubar} is set, it routes +to the drilldown_menu. Otherwise, it routes to expanding_menu. + +=back + +=cut + sub __default { my ($request) = @_; if ($request->{menubar}){ @@ -21,6 +47,20 @@ sub __default { } } +=pod + +=over + +=item root_doc + +If $request->{menubar} is set, this creates a drilldown menu. Otherwise, it +creates the root document (currently a frameset). + +=back + + +=cut + sub root_doc { my ($request) = @_; my $template; @@ -42,6 +82,20 @@ sub root_doc { $template->render($request); } +=pod + +=over + +=item expanding_menu + +This function generates an expanding menu. By default all nodes are closed, but +there nodes which are supposed to be open are marked. + + +=back + +=cut + sub expanding_menu { my ($request) = @_; if ($request->{'open'} !~ s/:$request->{id}:/:/){ @@ -71,6 +125,21 @@ sub expanding_menu { $template->render($menu); } +=pod + +=over + +=item drillown_menu + +This function creates a single cross section of the menu. Currently this is +most useful for generating menus for small screen devices or devices where a +limited number of options are necessary (screen readers, text-only browsers and +the like). + +=back + +=cut + sub drilldown_menu { my ($request) = @_; my $menu = LedgerSMB::DBObject::Menu->new({base => $request}); @@ -89,4 +158,14 @@ sub drilldown_menu { $template->render($menu); } +=pod + +=head1 Copyright (C) 2007 The LedgerSMB Core Team + +Licensed under the GNU General Public License version 2 or later (at your +option). For more information please see the included LICENSE and COPYRIGHT +files. + +=cut + 1; |