Signed-off-by: Francois Gouget fgouget@codeweavers.com --- This will make the titles nicer for the future FailureBlacklist pages. --- testbot/lib/ObjectModel/CGI/CollectionPage.pm | 4 +++- testbot/lib/ObjectModel/CGI/ItemPage.pm | 7 +++++-- 2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/testbot/lib/ObjectModel/CGI/CollectionPage.pm b/testbot/lib/ObjectModel/CGI/CollectionPage.pm index d59310be5..ddbbd663e 100644 --- a/testbot/lib/ObjectModel/CGI/CollectionPage.pm +++ b/testbot/lib/ObjectModel/CGI/CollectionPage.pm @@ -137,7 +137,9 @@ sub GetTitle($) { my ($self) = @_;
- return ucfirst($self->{Collection}->GetCollectionName()); + my $Title = ucfirst($self->{Collection}->GetCollectionName()); + $Title =~ s/([a-z])([A-Z])/$1 $2/g; + return $Title; }
sub GenerateTitle($) diff --git a/testbot/lib/ObjectModel/CGI/ItemPage.pm b/testbot/lib/ObjectModel/CGI/ItemPage.pm index 66fcab755..567a489fc 100644 --- a/testbot/lib/ObjectModel/CGI/ItemPage.pm +++ b/testbot/lib/ObjectModel/CGI/ItemPage.pm @@ -94,8 +94,11 @@ sub GetTitle($) { my ($self) = @_;
- return $self->GetParam("Key") ? $self->GetParam("Key") : - "Add " . $self->{Collection}->GetItemName(); + return $self->GetParam("Key") if ($self->GetParam("Key")); + + my $Title = $self->{Collection}->GetItemName(); + $Title =~ s/([a-z])([A-Z])/$1 $2/g; + return "Add $Title"; }
sub GenerateFormStart($)