From 1a033848671cad2cbe7687b37fc718b3b2a68b83 Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 22 Apr 2006 00:58:40 +0000 Subject: start of package class web UI (add/edit package classes, package class selection in package def edit) --- httemplate/elements/tr-select-pkg_class.html | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 httemplate/elements/tr-select-pkg_class.html (limited to 'httemplate/elements/tr-select-pkg_class.html') diff --git a/httemplate/elements/tr-select-pkg_class.html b/httemplate/elements/tr-select-pkg_class.html new file mode 100644 index 000000000..de10885c8 --- /dev/null +++ b/httemplate/elements/tr-select-pkg_class.html @@ -0,0 +1,29 @@ +<% + my( $classnum, %opt ) = @_; + + my @pkg_class; + if ( $opt{'pkg_class'} ) { + @pkg_class = @{ $opt{'pkg_class'} }; + } else { + @pkg_class = qsearch( 'pkg_class', {} ); # { disabled=>'' } ); + } + +%> + +<% if ( scalar(@pkg_class) == 0 ) { %> + + + +<% } else { %> + + + <%= $opt{'label'} || 'Package class' %> + + <%= include( '/elements/select-pkg_class.html', $classnum, + 'pkg_class' => \@pkg_class, + ) + %> + + + +<% } %> -- cgit v1.2.1 From e65c6a26ca778166aec2b2d1dd3012ab84fa611a Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 7 May 2006 20:27:21 +0000 Subject: first pass at sales reports per agent and package class --- httemplate/elements/tr-select-pkg_class.html | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'httemplate/elements/tr-select-pkg_class.html') diff --git a/httemplate/elements/tr-select-pkg_class.html b/httemplate/elements/tr-select-pkg_class.html index de10885c8..fbab0db14 100644 --- a/httemplate/elements/tr-select-pkg_class.html +++ b/httemplate/elements/tr-select-pkg_class.html @@ -1,16 +1,12 @@ <% my( $classnum, %opt ) = @_; - my @pkg_class; - if ( $opt{'pkg_class'} ) { - @pkg_class = @{ $opt{'pkg_class'} }; - } else { - @pkg_class = qsearch( 'pkg_class', {} ); # { disabled=>'' } ); - } + $opt{'pkg_class'} ||= [ qsearch( 'pkg_class', {} ) ]; # { disabled=>'' } ) + #warn "***** tr-select-pkg-class: \n". Dumper(%opt); %> -<% if ( scalar(@pkg_class) == 0 ) { %> +<% if ( scalar(@{ $opt{'pkg_class'} }) == 0 ) { %> @@ -19,10 +15,7 @@ <%= $opt{'label'} || 'Package class' %> - <%= include( '/elements/select-pkg_class.html', $classnum, - 'pkg_class' => \@pkg_class, - ) - %> + <%= include( '/elements/select-pkg_class.html', $classnum, %opt ) %> -- cgit v1.2.1 From 3ce7691203a7737406bf2d4442f7fd84b81f847e Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 23 Aug 2006 22:25:39 +0000 Subject: Will things ever be the same again? It's the final masonize --- httemplate/elements/tr-select-pkg_class.html | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'httemplate/elements/tr-select-pkg_class.html') diff --git a/httemplate/elements/tr-select-pkg_class.html b/httemplate/elements/tr-select-pkg_class.html index fbab0db14..7f37e816e 100644 --- a/httemplate/elements/tr-select-pkg_class.html +++ b/httemplate/elements/tr-select-pkg_class.html @@ -1,22 +1,22 @@ -<% - my( $classnum, %opt ) = @_; +% +% my( $classnum, %opt ) = @_; +% +% $opt{'pkg_class'} ||= [ qsearch( 'pkg_class', {} ) ]; # { disabled=>'' } ) +% +% #warn "***** tr-select-pkg-class: \n". Dumper(%opt); +% +% if ( scalar(@{ $opt{'pkg_class'} }) == 0 ) { - $opt{'pkg_class'} ||= [ qsearch( 'pkg_class', {} ) ]; # { disabled=>'' } ) - - #warn "***** tr-select-pkg-class: \n". Dumper(%opt); -%> - -<% if ( scalar(@{ $opt{'pkg_class'} }) == 0 ) { %> +% } else { -<% } else { %> - <%= $opt{'label'} || 'Package class' %> + <% $opt{'label'} || 'Package class' %> - <%= include( '/elements/select-pkg_class.html', $classnum, %opt ) %> + <% include( '/elements/select-pkg_class.html', $classnum, %opt ) %> +% } -<% } %> -- cgit v1.2.1 From 7002af78bc3e683ff8ce18b39de6d7de484422bf Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 20 Dec 2006 09:49:08 +0000 Subject: add ability to disable package classes --- httemplate/elements/tr-select-pkg_class.html | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'httemplate/elements/tr-select-pkg_class.html') diff --git a/httemplate/elements/tr-select-pkg_class.html b/httemplate/elements/tr-select-pkg_class.html index 7f37e816e..542142466 100644 --- a/httemplate/elements/tr-select-pkg_class.html +++ b/httemplate/elements/tr-select-pkg_class.html @@ -1,16 +1,14 @@ -% % my( $classnum, %opt ) = @_; % -% $opt{'pkg_class'} ||= [ qsearch( 'pkg_class', {} ) ]; # { disabled=>'' } ) +% $opt{'pkg_class'} ||= [ qsearch( 'pkg_class', { disabled=>'' } ) ]; % % #warn "***** tr-select-pkg-class: \n". Dumper(%opt); % % if ( scalar(@{ $opt{'pkg_class'} }) == 0 ) { - -% } else { +% } else { <% $opt{'label'} || 'Package class' %> @@ -18,5 +16,5 @@ <% include( '/elements/select-pkg_class.html', $classnum, %opt ) %> -% } +% } -- cgit v1.2.1