Fix number of tests in Utility.t

Add help for dashboard and fix labels.
Remove startDate, endDate from Asset help.
Update Help template to show UI levels as data rather than content.
This commit is contained in:
Colin Kuskie 2006-03-03 05:28:53 +00:00
parent 9aac37ac91
commit c323789d64
6 changed files with 59 additions and 46 deletions

View file

@ -36,6 +36,7 @@ addDisabletoRichEditor();
addNavigationMimeType();
addIndexes();
addDatabaseCache();
updateHelpTemplate();
finish($session); # this line required
@ -567,6 +568,30 @@ sub ip2cidr {
}
#-------------------------------------------------
sub updateHelpTemplate {
print "\tUpdating Help template.\n" unless ($quiet);
my $template = <<EOT;
<p><tmpl_var body></p>
<tmpl_if fields>
<dl>
<tmpl_loop fields>
<dt><tmpl_var title></dt>
<dd><tmpl_var description>
<tmpl_if uiLevel>
<br /><i><tmpl_var uiLevelLabel>:</i><tmpl_var uiLevel>
</tmpl_if>
</dd>
</tmpl_loop>
</dl>
</tmpl_if>
EOT
my $asset = WebGUI::Asset->new($session,"PBtmplHelp000000000001","WebGUI::Asset::Template");
$asset->addRevision({template=>$template})->commit;
}
# ---- DO NOT EDIT BELOW THIS LINE ----
#-------------------------------------------------

View file

@ -126,8 +126,8 @@ sub getEditForm {
-name=>"assetsToHide",
-value=>\@assetsToHide,
-options=>\%childIds,
-label=>$i18n->get('assets to hide', 'Asset_Layout'),
-hoverHelp=>$i18n->get('assets to hide description', 'Asset_Layout'),
-label=>$i18n->get('assets to hide'),
-hoverHelp=>$i18n->get('assets to hide description'),
-vertical=>1,
-uiLevel=>9
);

View file

@ -47,16 +47,6 @@ our $HELP = {
description => 'encrypt page description',
namespace => 'Asset',
},
{
title => '497',
description => '497 description',
namespace => 'Asset',
},
{
title => '498',
description => '498 description',
namespace => 'Asset',
},
{
title => '108',
description => '108 description',

View file

@ -5,6 +5,27 @@ our $HELP = {
title => 'dashboard add/edit title',
body => 'dashboard add/edit body',
fields => [
{
title => 'dashboard template field label',
description => 'dashboard template description',
namespace => 'Asset_Dashboard',
},
{
title => 'dashboard adminsGroupId field label',
description => 'dashboard adminsGroupId description',
namespace => 'Asset_Dashboard',
},
{
title => 'dashboard usersGroupId field label',
description => 'dashboard usersGroupId description',
namespace => 'Asset_Dashboard',
},
{
title => 'assets to hide',
description => 'assets to hide description',
namespace => 'Asset_Dashboard',
uiLevel => 9,
},
],
related => [
{

View file

@ -33,36 +33,6 @@ our $I18N = {
message => q|Dashboard Template|,
lastUpdated => 1133619940
},
'dashboard template field label' => {
message => q|Dashboard Template|,
lastUpdated => 1133619940
},
'dashboard template field label' => {
message => q|Dashboard Template|,
lastUpdated => 1133619940
},
'dashboard template field label' => {
message => q|Dashboard Template|,
lastUpdated => 1133619940
},
'dashboard template field label' => {
message => q|Dashboard Template|,
lastUpdated => 1133619940
},
'dashboard template field label' => {
message => q|Dashboard Template|,
lastUpdated => 1133619940
},
'dashboard template field label' => {
message => q|Dashboard Template|,
lastUpdated => 1133619940
},
'dashboard template field label' => {
message => q|Dashboard Template|,
lastUpdated => 1133619940
},
'dashboard add/edit title' => {
message => q|Dashboard Add/Edit|,
@ -76,11 +46,18 @@ our $I18N = {
message => q|Dashboard Template|,
lastUpdated => 1133619940
},
'dashboard template field label' => {
message => q|Dashboard Template|,
lastUpdated => 1133619940
'assets to hide' => {
message => q|Assets To Hide.|,
lastUpdated => 1118942468
},
'assets to hide description' => {
message => q|This list contains one checkbox for each child Asset of the Page Layout. Select the
checkbox for any Asset that you do not want displayed in the Page Layout Asset.
<p/>|,
lastUpdated => 1119410080,
},
};

View file

@ -16,7 +16,7 @@ use lib "$FindBin::Bin/lib";
use WebGUI::Test;
use WebGUI::Session;
use Test::More tests => 22; # increment this value for each test you create
use Test::More tests => 21; # increment this value for each test you create
my $session = WebGUI::Test->session;