Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/lib/ObjectModel/CGI/CollectionBlock.pm | 17 +++++++++++++++-- .../ObjectModel/CGI/CollectionBlockForPage.pm | 7 +++++++ testbot/lib/ObjectModel/CGI/CollectionPage.pm | 7 +++++++ 3 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/testbot/lib/ObjectModel/CGI/CollectionBlock.pm b/testbot/lib/ObjectModel/CGI/CollectionBlock.pm index f675e6b260..105280e30e 100644 --- a/testbot/lib/ObjectModel/CGI/CollectionBlock.pm +++ b/testbot/lib/ObjectModel/CGI/CollectionBlock.pm @@ -238,14 +238,27 @@ sub GenerateHeaderRow($$$) { if ($self->CallDisplayProperty($PropertyDescriptor)) { - print "<th>", $self->escapeHTML($PropertyDescriptor->GetDisplayName()), - "</th>\n"; + $self->CallGenerateHeaderCell($PropertyDescriptor); } }
print "</tr>\n"; }
+sub CallGenerateHeaderCell($$) +{ + my ($self, $PropertyDescriptor) = @_; + + return $self->GenerateHeaderCell($PropertyDescriptor); +} + +sub GenerateHeaderCell($$) +{ + my ($self, $PropertyDescriptor) = @_; + print "<th>", $self->escapeHTML($PropertyDescriptor->GetDisplayName()), + "</th>\n"; +} + sub CallGenerateDataRow($$$$$$) { my ($self, $Item, $PropertyDescriptors, $DetailsPage, $Class, $Actions) = @_; diff --git a/testbot/lib/ObjectModel/CGI/CollectionBlockForPage.pm b/testbot/lib/ObjectModel/CGI/CollectionBlockForPage.pm index ff8247ec92..03a45082f0 100644 --- a/testbot/lib/ObjectModel/CGI/CollectionBlockForPage.pm +++ b/testbot/lib/ObjectModel/CGI/CollectionBlockForPage.pm @@ -45,6 +45,13 @@ sub CallGenerateFormEnd($) $self->{EnclosingPage}->GenerateFormEnd($self); }
+sub CallGenerateHeaderCell($$) +{ + my ($self, $PropertyDescriptor) = @_; + + return $self->{EnclosingPage}->GenerateHeaderCell($self, $PropertyDescriptor); +} + sub CallGenerateHeaderRow($$$) { my ($self, $PropertyDescriptors, $Actions) = @_; diff --git a/testbot/lib/ObjectModel/CGI/CollectionPage.pm b/testbot/lib/ObjectModel/CGI/CollectionPage.pm index 194379f406..5c48954c68 100644 --- a/testbot/lib/ObjectModel/CGI/CollectionPage.pm +++ b/testbot/lib/ObjectModel/CGI/CollectionPage.pm @@ -94,6 +94,13 @@ sub GenerateFormEnd($$) $CollectionBlock->GenerateFormEnd(); }
+sub GenerateHeaderCell($$$) +{ + my ($self, $CollectionBlock, $PropertyDescriptor) = @_; + + $CollectionBlock->GenerateHeaderCell($PropertyDescriptor); +} + sub GenerateHeaderRow($$$$) { my ($self, $CollectionBlock, $PropertyDescriptors, $Actions) = @_;