[freeside-commits] freeside/httemplate/edit/elements edit.html, 1.23, 1.24

Jeff Finucane,420,, jeff at wavetail.420.am
Sat Aug 23 14:59:48 PDT 2008


Update of /home/cvs/cvsroot/freeside/httemplate/edit/elements
In directory wavetail.420.am:/tmp/cvs-serv1980/httemplate/edit/elements

Modified Files:
	edit.html 
Log Message:
add usage classes to rate details

Index: edit.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/elements/edit.html,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- edit.html	28 Jun 2008 19:25:24 -0000	1.23
+++ edit.html	23 Aug 2008 21:59:45 -0000	1.24
@@ -3,8 +3,12 @@
 Example:
 
   include( 'elements/edit.html',  
-    'name'  =>
-    'table' =>
+    'name_singular' =>  #singular name for the record
+                        # (preferred, will be pluralized automatically)
+    'name'          =>  #name for the record
+                        # (deprecated, will be pluralized simplistically)
+    'table'         =>
+
     #? 'primary_key' => #required when the dbdef doesn't know...???
     'labels' => {
                   'column' => 'Label',
@@ -616,9 +620,9 @@
 if ( $opt{'menubar'} ) {
   @menubar = @{ $opt{'menubar'} };
 } else {
+  my $items = $opt{'name'} ? $opt{'name'}.'s' : PL($opt{'name_singular'});
   @menubar = (
-    #eventually use Lingua::bs to pluralize
-    "View all $opt{'name'}s" => $viewall_url,
+    "View all $items" => $viewall_url,
   );
 }
 



More information about the freeside-commits mailing list