Help cleanup moves into the Macros. Macro help title will be

Macro Template Variables.
Body tags in the help are now optional.  To skip the body tag, put
in an empty string.  Updated the Help and the tests to cover that.
Updated the Account Macro according to those rules.
This commit is contained in:
Colin Kuskie 2007-07-16 22:59:15 +00:00
parent 14180620ca
commit 7c6ba21048
4 changed files with 4 additions and 27 deletions

View file

@ -4,7 +4,7 @@ our $HELP = {
'account' => {
title => 'account title',
body => 'account body',
body => '',
fields => [
],
variables => [

View file

@ -313,7 +313,7 @@ sub www_viewHelp {
$vars{body} = $help->{body}->($session);
}
else {
$vars{body} = $i18n->get($help->{body});
$vars{body} = $i18n->get($help->{body}) if $help->{body}; ##Body entry is optional
}
my $userUiLevel = $session->user->profileField("uiLevel");
my $uiOverride = $session->form->process("uiOverride");

View file

@ -3,7 +3,7 @@ package WebGUI::i18n::English::Macro_a_account;
our $I18N = {
'account title' => {
message => q|Account Macro|,
message => q|Account Macro Template Variables|,
lastUpdated => 1112466408,
},
@ -17,29 +17,6 @@ our $I18N = {
lastUpdated => 1149177662,
},
'account body' => {
message => q|
<p><b>&#94;a();</b><br />
<b>&#94;a([<i>link text</i>], [<i>template name</i>]);</b><br />
This macro creates a link to the current user's account information. The
Macro takes two optional arguments, the text that is displayed with the
link and a template from the Macro/a_account namespace to be used to
display the link and text. If the <i>link text</i> is set to the word
"linkonly" then only the URL will be returned.</p>
<p><b>NOTES:</b><br />
<ul>
<li>The .myAccountLink style sheet class is tied to this macro.</li>
<li>This Macro may only be nested inside other Macros if the "linkonly" option is used.</li>
</p>
<p>The following is a list of variables available in the template:</p>
|,
lastUpdated => 1168558260,
},
'46' => {
message => q|My Account|,
lastUpdated => 1031514049

View file

@ -91,7 +91,7 @@ sub getHelpLabels {
tag=>'body',
namespace=>$topic, ##default
label=>$helpTable{$topic}{$entry}{'body'},
};
} if $helpTable{$topic}{$entry}{'body'};
}
##Add all labels in the fields array