i18n and docs for the template Style Wizard
This commit is contained in:
parent
8bace2e619
commit
a88c9b93c5
3 changed files with 288 additions and 23 deletions
|
|
@ -368,16 +368,66 @@ sub www_styleWizard {
|
|||
$f->hidden(name=>"proceed", value=>"manageAssets") if ($form->get("proceed"));
|
||||
$f->hidden(name=>"step", value=>3);
|
||||
$f->hidden(name=>"layout", value=>$form->get("layout"));
|
||||
$f->text(name=>"heading", value=>"My Site", label=>"Site Name");
|
||||
$f->file(name=>"logo", label=>"Logo", subtext=>"<br />JPEG, GIF, or PNG thats less than 200 pixels wide and 100 pixels tall");
|
||||
$f->color(name=>"pageBackgroundColor", value=>"#ccccdd", label=>"Page Background Color");
|
||||
$f->color(name=>"headingBackgroundColor", value=>"#ffffff", label=>"Header Background Color");
|
||||
$f->color(name=>"headingForegroundColor", value=>"#000000", label=>"Header Text Color");
|
||||
$f->color(name=>"bodyBackgroundColor", value=>"#ffffff", label=>"Body Background Color");
|
||||
$f->color(name=>"bodyForegroundColor", value=>"#000000", label=>"Body Text Color");
|
||||
$f->color(name=>"menuBackgroundColor", value=>"#eeeeee", label=>"Menu Background Color");
|
||||
$f->color(name=>"linkColor", value=>"#0000ff", label=>"Link Color");
|
||||
$f->color(name=>"visitedLinkColor", value=>"#ff00ff", label=>"Visited Link Color");
|
||||
$f->text(
|
||||
name=>"heading",
|
||||
value=>"My Site",
|
||||
label=>$i18n->get("site name"),
|
||||
hoverHelp=>$i18n->get("site name description")
|
||||
);
|
||||
$f->file(
|
||||
name=>"logo",
|
||||
label=>$i18n->get("logo"),
|
||||
hoverHelp=>$i18n->get("logo description"),
|
||||
subtext=>$i18n->get("logo subtext")
|
||||
);
|
||||
$f->color(
|
||||
name=>"pageBackgroundColor",
|
||||
value=>"#ccccdd",
|
||||
label=>$i18n->get("page background color"),
|
||||
hoverHelp=>$i18n->get("page background color description"),
|
||||
);
|
||||
$f->color(
|
||||
name=>"headingBackgroundColor",
|
||||
value=>"#ffffff",
|
||||
label=>$i18n->get("header background color"),
|
||||
hoverHelp=>$i18n->get("header background color description"),
|
||||
);
|
||||
$f->color(
|
||||
name=>"headingForegroundColor",
|
||||
value=>"#000000",
|
||||
label=>$i18n->get("header text color"),
|
||||
hoverHelp=>$i18n->get("header text color description"),
|
||||
);
|
||||
$f->color(
|
||||
name=>"bodyBackgroundColor",
|
||||
value=>"#ffffff",
|
||||
label=>$i18n->get("body background color"),
|
||||
hoverHelp=>$i18n->get("body background color description"),
|
||||
);
|
||||
$f->color(
|
||||
name=>"bodyForegroundColor",
|
||||
value=>"#000000",
|
||||
label=>$i18n->get("body text color"),
|
||||
hoverHelp=>$i18n->get("body text color description"),
|
||||
);
|
||||
$f->color(
|
||||
name=>"menuBackgroundColor",
|
||||
value=>"#eeeeee",
|
||||
label=>$i18n->get("menu background color"),
|
||||
hoverHelp=>$i18n->get("menu background color description"),
|
||||
);
|
||||
$f->color(
|
||||
name=>"linkColor",
|
||||
value=>"#0000ff",
|
||||
label=>$i18n->get("link color"),
|
||||
hoverHelp=>$i18n->get("link color description"),
|
||||
);
|
||||
$f->color(
|
||||
name=>"visitedLinkColor",
|
||||
value=>"#ff00ff",
|
||||
label=>$i18n->get("visited link color"),
|
||||
hoverHelp=>$i18n->get("visited link color description"),
|
||||
);
|
||||
$f->submit;
|
||||
$output = $f->print;
|
||||
} elsif ($form->get("step") == 3) {
|
||||
|
|
@ -387,9 +437,9 @@ sub www_styleWizard {
|
|||
my $storage = WebGUI::Storage::Image->get($self->session,$storageId);
|
||||
$logo = $self->addChild({
|
||||
className=>"WebGUI::Asset::File::Image",
|
||||
title=>$form->get("heading")." Logo",
|
||||
menuTitle=>$form->get("heading")." Logo",
|
||||
url=>$form->get("heading")." Logo",
|
||||
title=>join(' ', $form->get("heading"), $i18n->get('logo')),
|
||||
menuTitle=>join(' ', $form->get("heading"), $i18n->get('logo')),
|
||||
url=>join(' ', $form->get("heading"), $i18n->get('logo')),
|
||||
storageId=>$storage->getId,
|
||||
filename=>@{$storage->getFiles}[0],
|
||||
templateId=>"PBtmpl0000000000000088"
|
||||
|
|
@ -524,17 +574,27 @@ $style .= '
|
|||
.representation, .representation td { font-size: 12px; width: 120px; border: 1px solid black; }
|
||||
.representation { height: 130px; }
|
||||
</style>';
|
||||
$output .= "<p>Choose a layout for this style:</p>";
|
||||
$output .= $i18n->get('choose a layout');
|
||||
$output .= WebGUI::Form::hidden($self->session,{name=>"step", value=>2});
|
||||
$output .= '<div class="chooser">'.WebGUI::Form::radio($self->session,{name=>"layout", value=>1, checked=>1}).q|<table class="representation"><tbody>
|
||||
<tr><td>Logo</td><td>Heading</td></tr>
|
||||
<tr><td>Menu</td><td>Body content goes here.</td></tr>
|
||||
</tbody></table></div>|;
|
||||
$output .= '<div class="chooser">'.WebGUI::Form::radio($self->session,{name=>"layout", value=>2}).q|<table class="representation"><tbody>
|
||||
<tr><td>Logo</td><td>Heading</td></tr>
|
||||
<tr><td style="text-align: center;" colspan="2">Menu</td></tr>
|
||||
<tr><td colspan="2">Body content goes here.</td></tr>
|
||||
</tbody></table></div>|;
|
||||
$output .= '<div class="chooser">'.WebGUI::Form::radio($self->session,{name=>"layout", value=>1, checked=>1}).sprintf(q|<table class="representation"><tbody>
|
||||
<tr><td>%s</td><td>%s</td></tr>
|
||||
<tr><td>%s</td><td>%s</td></tr>
|
||||
</tbody></table></div>|,
|
||||
$i18n->get('logo'),
|
||||
$i18n->get('heading'),
|
||||
$i18n->get('menu'),
|
||||
$i18n->get('body content'),
|
||||
);
|
||||
$output .= '<div class="chooser">'.WebGUI::Form::radio($self->session,{name=>"layout", value=>2}).sprintf(q|<table class="representation"><tbody>
|
||||
<tr><td>%s</td><td>%s</td></tr>
|
||||
<tr><td style="text-align: center;" colspan="2">%s</td></tr>
|
||||
<tr><td colspan="2">%s</td></tr>
|
||||
</tbody></table></div>|,
|
||||
$i18n->get('logo'),
|
||||
$i18n->get('heading'),
|
||||
$i18n->get('menu'),
|
||||
$i18n->get('body content'),
|
||||
);
|
||||
$output .= WebGUI::Form::submit($self->session);
|
||||
$output .= WebGUI::Form::formFooter($self->session);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,6 +58,65 @@ our $HELP = {
|
|||
]
|
||||
},
|
||||
|
||||
'style wizard' => {
|
||||
title => 'style wizard',
|
||||
body => 'style wizard help',
|
||||
fields => [
|
||||
{
|
||||
title => 'site name',
|
||||
description => 'site name description',
|
||||
namespace => 'Asset_Template',
|
||||
},
|
||||
{
|
||||
title => 'logo',
|
||||
description => 'logo description',
|
||||
namespace => 'Asset_Template',
|
||||
},
|
||||
{
|
||||
title => 'page background color',
|
||||
description => 'page background color description',
|
||||
namespace => 'Asset_Template',
|
||||
},
|
||||
{
|
||||
title => 'header background color',
|
||||
description => 'header background color description',
|
||||
namespace => 'Asset_Template',
|
||||
},
|
||||
{
|
||||
title => 'header text color',
|
||||
description => 'header text color description',
|
||||
namespace => 'Asset_Template',
|
||||
},
|
||||
{
|
||||
title => 'body background color',
|
||||
description => 'body background color description',
|
||||
namespace => 'Asset_Template',
|
||||
},
|
||||
{
|
||||
title => 'body text color',
|
||||
description => 'body text color description',
|
||||
namespace => 'Asset_Template',
|
||||
},
|
||||
{
|
||||
title => 'menu background color',
|
||||
description => 'menu background color description',
|
||||
namespace => 'Asset_Template',
|
||||
},
|
||||
{
|
||||
title => 'link color',
|
||||
description => 'link color description',
|
||||
namespace => 'Asset_Template',
|
||||
},
|
||||
{
|
||||
title => 'visited link color',
|
||||
description => 'visited link color description',
|
||||
namespace => 'Asset_Template',
|
||||
},
|
||||
],
|
||||
related => [
|
||||
]
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -276,6 +276,152 @@ has been set to some other language you will need to consult the documentation f
|
|||
lastUpdated => 1146243514,
|
||||
},
|
||||
|
||||
'site name' => {
|
||||
message => q|Site Name|,
|
||||
lastUpdated => 1146244474,
|
||||
context => q|Label for the field to enter in the name of a web site in the Style Wizard|,
|
||||
},
|
||||
|
||||
'site name description' => {
|
||||
message => q|The name of your website|,
|
||||
lastUpdated => 1146244474,
|
||||
},
|
||||
|
||||
'heading' => {
|
||||
message => q|Heading|,
|
||||
lastUpdated => 1146244520,
|
||||
context => q|Label for the top part of a page|,
|
||||
},
|
||||
|
||||
'menu' => {
|
||||
message => q|Menu|,
|
||||
lastUpdated => 1146244520,
|
||||
context => q|Label for part of a page where a navigation menu will be displayed.|,
|
||||
},
|
||||
|
||||
'body content' => {
|
||||
message => q|Body content goes here.|,
|
||||
lastUpdated => 1146244520,
|
||||
context => q|Label for the part of a page that holds the content.|,
|
||||
},
|
||||
|
||||
'logo' => {
|
||||
message => q|Logo|,
|
||||
lastUpdated => 1146244520,
|
||||
context => q|Label for the field to upload a graphical logo in the Style Wizard|,
|
||||
},
|
||||
|
||||
'logo description' => {
|
||||
message => q|You can use this field to upload a graphical logo in your style. The logo should be less than 200 pixels wide and 100 pixels tall.|,
|
||||
lastUpdated => 1146244520,
|
||||
},
|
||||
|
||||
'logo subtext' => {
|
||||
message => q|<br />The logo should be less than 200 pixels wide and 100 pixels tall.|,
|
||||
context => q|subtext for the field to upload a graphical logo in the Style Wizard|,
|
||||
lastUpdated => 1146244520,
|
||||
},
|
||||
|
||||
'page background color' => {
|
||||
message => q|Page Background Color|,
|
||||
lastUpdated => 1146244520,
|
||||
},
|
||||
|
||||
'page background color description' => {
|
||||
message => q|The background color for the entire page.|,
|
||||
lastUpdated => 1146244520,
|
||||
},
|
||||
|
||||
'header background color' => {
|
||||
message => q|Header Background Color|,
|
||||
lastUpdated => 1146244520,
|
||||
},
|
||||
|
||||
'header background color description' => {
|
||||
message => q|The background color for the header or banner part of the page.|,
|
||||
lastUpdated => 1146244520,
|
||||
},
|
||||
|
||||
'header text color' => {
|
||||
message => q|Header Text Color|,
|
||||
lastUpdated => 1146244520,
|
||||
},
|
||||
|
||||
'header text color description' => {
|
||||
message => q|Color for text in the header.|,
|
||||
lastUpdated => 1146244520,
|
||||
},
|
||||
|
||||
'body background color' => {
|
||||
message => q|Body Background Color|,
|
||||
lastUpdated => 1146244520,
|
||||
},
|
||||
|
||||
'body background color description' => {
|
||||
message => q|The background color for the body of the page.|,
|
||||
lastUpdated => 1146244520,
|
||||
},
|
||||
|
||||
'body text color' => {
|
||||
message => q|Body Text Color|,
|
||||
lastUpdated => 1146244520,
|
||||
},
|
||||
|
||||
'body text color description' => {
|
||||
message => q|The color of text in the body.|,
|
||||
lastUpdated => 1146244520,
|
||||
},
|
||||
|
||||
'menu background color' => {
|
||||
message => q|Menu Background Color|,
|
||||
lastUpdated => 1146244520,
|
||||
},
|
||||
|
||||
'menu background color description' => {
|
||||
message => q|The background color for the menu part of the page.|,
|
||||
lastUpdated => 1146244520,
|
||||
},
|
||||
|
||||
'link color' => {
|
||||
message => q|Link Color|,
|
||||
lastUpdated => 1146244520,
|
||||
},
|
||||
|
||||
'link color description' => {
|
||||
message => q|The color of links on the page. The default is blue.|,
|
||||
lastUpdated => 1146244520,
|
||||
},
|
||||
|
||||
'visited link color' => {
|
||||
message => q|Visited Link Color|,
|
||||
lastUpdated => 1146244520,
|
||||
},
|
||||
|
||||
'visited link color description' => {
|
||||
message => q|The color of visited links on the page. The default is purple.|,
|
||||
lastUpdated => 1146244520,
|
||||
},
|
||||
|
||||
'choose a layout' => {
|
||||
message => q|"<p>Choose a layout for this style:</p>"|,
|
||||
lastUpdated => 1146244520,
|
||||
},
|
||||
|
||||
'style wizard help' => {
|
||||
message => q|<p>The Style Wizard can help you create simple CSS based page style templates for your website
|
||||
with your choice of two layouts and navigation styles, and configurable colors. To access the Style
|
||||
Wizard edit a template in the "style" namespace. A link to open the Style Wizard will
|
||||
be on the right side of the page.</p>
|
||||
<p>Creating a style template is a three step process:
|
||||
<ol>
|
||||
<li>Select one of the layouts.</li>
|
||||
<li>Enter your site name, upload a logo and configure the colors.</li>
|
||||
<li>Make customizations to the generated template.</li>
|
||||
</p>
|
||||
|,
|
||||
lastUpdated => 1146244520,
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue