[Jifty-commit] jifty branch, master, updated. 92c94c643bab190b8c0831640f87bdc0a226dae5
Jifty commits
jifty-commit at lists.jifty.org
Tue Dec 29 06:46:06 EST 2009
The branch, master has been updated
via 92c94c643bab190b8c0831640f87bdc0a226dae5 (commit)
from c3b01b244647493bec83aa2c3d8054715b683e6a (commit)
Summary of changes:
lib/Jifty/View/Declare/CRUD.pm | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
- Log -----------------------------------------------------------------
commit 92c94c643bab190b8c0831640f87bdc0a226dae5
Author: sunnavy <sunnavy at bestpractical.com>
Date: Tue Dec 29 19:42:56 2009 +0800
consider the situation that a field maybe not a column in db when show column header
diff --git a/lib/Jifty/View/Declare/CRUD.pm b/lib/Jifty/View/Declare/CRUD.pm
index a6421ef..d7c48e5 100644
--- a/lib/Jifty/View/Declare/CRUD.pm
+++ b/lib/Jifty/View/Declare/CRUD.pm
@@ -645,6 +645,17 @@ template 'sort_header' => sub {
div {
{ class is "crud-column-headers" };
for my $argument ($self->display_columns($update)) {
+ my $column = $record_class->column($argument);
+ unless ($column) {
+
+ # in case we want to show a field but it's not a real column
+ div {
+ { class is 'crud-column-header' };
+ $argument;
+ };
+ next;
+ }
+
div {
{ class is 'crud-column-header' };
ul { attr { class => 'crud-sort-menu', style => 'display:none;' };
-----------------------------------------------------------------------
More information about the Jifty-commit
mailing list