[freeside-commits] freeside/FS/FS Conf.pm, 1.289, 1.290 access_user.pm, 1.23, 1.24

Ivan,,, ivan at wavetail.420.am
Tue Jun 16 19:39:11 PDT 2009


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv9378/FS/FS

Modified Files:
	Conf.pm access_user.pm 
Log Message:
finish up initial work on customer view tabs (ensure links back to customer view call include show=packages if default view isn't jumbo or packages already), RT#5586

Index: access_user.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/access_user.pm,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- access_user.pm	20 Feb 2009 02:55:41 -0000	1.23
+++ access_user.pm	17 Jun 2009 02:39:08 -0000	1.24
@@ -1,7 +1,7 @@
 package FS::access_user;
 
 use strict;
-use vars qw( @ISA $DEBUG $me $htpasswd_file );
+use vars qw( @ISA $DEBUG $me $conf $htpasswd_file );
 use FS::UID;
 use FS::Conf;
 use FS::Record qw( qsearch qsearchs dbh );
@@ -19,7 +19,7 @@
 
 #kludge htpasswd for now (i hope this bootstraps okay)
 FS::UID->install_callback( sub {
-  my $conf = new FS::Conf;
+  $conf = new FS::Conf;
   $htpasswd_file = $conf->base_dir. '/htpasswd';
 } );
 
@@ -44,8 +44,8 @@
 
 =head1 DESCRIPTION
 
-An FS::access_user object represents an internal access user.  FS::access_user inherits from
-FS::Record.  The following fields are currently supported:
+An FS::access_user object represents an internal access user.  FS::access_user
+inherits from FS::Record.  The following fields are currently supported:
 
 =over 4
 
@@ -274,6 +274,9 @@
 
 =item access_usergroup
 
+Returns links to the the groups this user is a part of, as FS::access_usergroup
+objects (see L<FS::access_usergroup).
+
 =cut
 
 sub access_usergroup {
@@ -467,6 +470,23 @@
 
 }
 
+=item default_customer_view
+
+Returns the default customer view for this user, from the 
+"default_customer_view" user preference, the "cust_main-default_view" config,
+or the hardcoded default, "jumbo" (may change to "basics" in the near future).
+
+=cut
+
+sub default_customer_view {
+  my $self = shift;
+
+  $self->option('default_customer_view')
+    || $conf->config('cust_main-default_view')
+    || 'jumbo'; #'basics' in 1.9.1?
+
+}
+
 =back
 
 =head1 BUGS

Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.289
retrieving revision 1.290
diff -u -d -r1.289 -r1.290
--- Conf.pm	30 May 2009 02:31:39 -0000	1.289
+++ Conf.pm	17 Jun 2009 02:39:08 -0000	1.290
@@ -2827,6 +2827,23 @@
     'type'        => 'textarea',
   },
 
+  {
+    'key'         => 'cust_main-default_view',
+    'section'     => 'UI',
+    'description' => 'Default customer view, for users who have not selected a default view in their preferences.',
+    'type'        => 'select',
+    'select_hash' => [
+      #false laziness w/view/cust_main.cgi and pref/pref.html
+      'basics'          => 'Basics',
+      'notes'           => 'Notes',
+      'tickets'         => 'Tickets',
+      'packages'        => 'Packages',
+      'payment_history' => 'Payment History',
+      #''                => 'Change History',
+      'jumbo'           => 'Jumbo',
+    ],
+  },
+
 );
 
 1;



More information about the freeside-commits mailing list