diff options
Diffstat (limited to 'httemplate/edit/elements/edit.html')
-rw-r--r-- | httemplate/edit/elements/edit.html | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/httemplate/edit/elements/edit.html b/httemplate/edit/elements/edit.html index 47b246477..3896f1712 100644 --- a/httemplate/edit/elements/edit.html +++ b/httemplate/edit/elements/edit.html @@ -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 @@ my @menubar = (); 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, ); } |