From 8e0d50d43afb77675f39bb30a4355048e6aae57e Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Wed, 19 Mar 2014 20:04:26 +0200 Subject: [PATCH] Add title to job entries --- lib/Gruntmaster/Page/Generic.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Gruntmaster/Page/Generic.pm b/lib/Gruntmaster/Page/Generic.pm index 10ed556..fe9525d 100644 --- a/lib/Gruntmaster/Page/Generic.pm +++ b/lib/Gruntmaster/Page/Generic.pm @@ -73,7 +73,7 @@ sub create_thing { my $pkg = "Gruntmaster::Page::$ucid"; putsym "${pkg}::_generate", sub { $_[1]->param(list \%thing, @_[2..$#_]) } if makepkg $pkg, @thing{qw/id title/}; - putsym "${pkg}::Entry::_generate", sub { $_[1]->param(entry \%thing, @_[2..$#_]) } if makepkg "${pkg}::Entry", "$thing{id}_entry", ''; + putsym "${pkg}::Entry::_generate", sub { $_[1]->param(entry \%thing, @_[2..$#_]) } if makepkg "${pkg}::Entry", "$thing{id}_entry", $thing{entry_title} // ''; putsym "${pkg}::Read::generate", sub { [200, headers shift, [encode_json list \%thing, @_]] } if makepkg "${pkg}::Read"; putsym "${pkg}::Entry::Read::generate", sub { [200, headers shift, [encode_json entry \%thing, @_]] } if makepkg "${pkg}::Entry::Read"; } @@ -89,7 +89,7 @@ sub prefetch; sub thing (&){ my %thing; no strict 'refs'; - local *{"params"} = sub { @thing{qw/id rsname title/} = @_ }; + local *{"params"} = sub { @thing{qw/id rsname title entry_title/} = @_ }; local *{"choose"} = sub { $thing{choose} = shift }; local *{"sortby"} = sub { $thing{sortby} = shift }; local *{"mangle"} = sub { $thing{mangle} = shift }; @@ -145,7 +145,7 @@ thing { }; thing { - params qw/log Job/, 'Job log'; + params qw/log Job/, 'Job log', 'Job '; prefetch 'owner', 'problem'; makers { my $env = $_[0]; -- 2.39.2