From ffa4aa4d088614c7fb2d187713ecdf27db3484b0 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Mon, 4 Apr 2005 04:24:36 +0000 Subject: [PATCH] stub documentation for Thumbnail Macro, fixed an ordering problem in List of Macros, cleaned up Macro help "A". --- lib/WebGUI/Help/AOIHits.pm | 4 ++++ lib/WebGUI/Help/AOIRank.pm | 4 ++++ lib/WebGUI/Help/AdminBar.pm | 4 ++++ lib/WebGUI/Help/AdminToggle.pm | 4 ++++ lib/WebGUI/Help/AssetProxy.pm | 4 ++++ lib/WebGUI/Help/Macros.pm | 6 ++++-- lib/WebGUI/Help/Thumbnail.pm | 18 ++++++++++++++++++ lib/WebGUI/i18n/English/AOIHits.pm | 1 + lib/WebGUI/i18n/English/AdminBar.pm | 4 ++-- lib/WebGUI/i18n/English/AdminText.pm | 4 ++-- lib/WebGUI/i18n/English/AdminToggle.pm | 5 +++-- lib/WebGUI/i18n/English/AssetProxy.pm | 13 ++++++++----- lib/WebGUI/i18n/English/Macros.pm | 2 +- lib/WebGUI/i18n/English/Thumbnail.pm | 23 +++++++++++++++++++++++ 14 files changed, 82 insertions(+), 14 deletions(-) create mode 100644 lib/WebGUI/Help/Thumbnail.pm create mode 100644 lib/WebGUI/i18n/English/Thumbnail.pm diff --git a/lib/WebGUI/Help/AOIHits.pm b/lib/WebGUI/Help/AOIHits.pm index fe005339c..c3f017e47 100644 --- a/lib/WebGUI/Help/AOIHits.pm +++ b/lib/WebGUI/Help/AOIHits.pm @@ -10,6 +10,10 @@ our $HELP = { tag => 'macros using', namespace => 'Macros' }, + { + tag => 'metadata manage', + namespace => 'Asset' + }, ] }, diff --git a/lib/WebGUI/Help/AOIRank.pm b/lib/WebGUI/Help/AOIRank.pm index 3f1dec43e..e80fd2272 100644 --- a/lib/WebGUI/Help/AOIRank.pm +++ b/lib/WebGUI/Help/AOIRank.pm @@ -10,6 +10,10 @@ our $HELP = { tag => 'macros using', namespace => 'Macros' }, + { + tag => 'metadata manage', + namespace => 'Asset' + }, ] }, diff --git a/lib/WebGUI/Help/AdminBar.pm b/lib/WebGUI/Help/AdminBar.pm index c4dc3cfc3..906c805b7 100644 --- a/lib/WebGUI/Help/AdminBar.pm +++ b/lib/WebGUI/Help/AdminBar.pm @@ -10,6 +10,10 @@ our $HELP = { tag => 'macros using', namespace => 'Macros' }, + { + tag => 'template language', + namespace => 'Template' + }, ] }, diff --git a/lib/WebGUI/Help/AdminToggle.pm b/lib/WebGUI/Help/AdminToggle.pm index 0c378267b..343f0618c 100644 --- a/lib/WebGUI/Help/AdminToggle.pm +++ b/lib/WebGUI/Help/AdminToggle.pm @@ -10,6 +10,10 @@ our $HELP = { tag => 'macros using', namespace => 'Macros' }, + { + tag => 'template language', + namespace => 'Template' + }, ] }, diff --git a/lib/WebGUI/Help/AssetProxy.pm b/lib/WebGUI/Help/AssetProxy.pm index d9b2e04d0..1662d5c5e 100644 --- a/lib/WebGUI/Help/AssetProxy.pm +++ b/lib/WebGUI/Help/AssetProxy.pm @@ -10,6 +10,10 @@ our $HELP = { tag => 'macros using', namespace => 'Macros' }, + { + tag => 'shortcut add/edit', + namespace => 'Shortcut' + }, ] }, diff --git a/lib/WebGUI/Help/Macros.pm b/lib/WebGUI/Help/Macros.pm index c0c0f17e5..1ec7ca113 100644 --- a/lib/WebGUI/Help/Macros.pm +++ b/lib/WebGUI/Help/Macros.pm @@ -18,7 +18,9 @@ our $HELP = { 'macros list' => { title => 'macros list title', body => 'macros list body', - related => [ map { + related => [ + sort { $a->{tag} cmp $b->{tag} } + map { $tag = $_; $tag =~ s/^[a-zA-Z]+_//; #Remove initial shortcuts $tag =~ s/([A-Z]+(?![a-z]))/$1 /g; #Separate acronyms @@ -27,7 +29,7 @@ our $HELP = { { tag => $tag, namespace => $_ } } - sort values %{ $session{config}{macros} } + values %{ $session{config}{macros} } ], }, diff --git a/lib/WebGUI/Help/Thumbnail.pm b/lib/WebGUI/Help/Thumbnail.pm new file mode 100644 index 000000000..fdbcd35fe --- /dev/null +++ b/lib/WebGUI/Help/Thumbnail.pm @@ -0,0 +1,18 @@ +package WebGUI::Help::Thumbnail; + +our $HELP = { + + 'thumbnail' => { + title => 'thumbnail title', + body => 'thumbnail body', + related => [ + { + tag => 'macros using', + namespace => 'Macros', + }, + ] + }, + +}; + +1; diff --git a/lib/WebGUI/i18n/English/AOIHits.pm b/lib/WebGUI/i18n/English/AOIHits.pm index 2cef651b4..a8cbce1f4 100644 --- a/lib/WebGUI/i18n/English/AOIHits.pm +++ b/lib/WebGUI/i18n/English/AOIHits.pm @@ -11,6 +11,7 @@ our $I18N = { message => q| ^AOIHits();
+^AOIHits(metadata property, metadata value);
This macro is for displaying Areas of Interest Hits, which is based on passive profiling of which wobjects are viewed by users, on a per user basis. The macro takes two arguments, a metadata property and metadata value, and returns how many times the current user has diff --git a/lib/WebGUI/i18n/English/AdminBar.pm b/lib/WebGUI/i18n/English/AdminBar.pm index 402f609ce..397432ed7 100644 --- a/lib/WebGUI/i18n/English/AdminBar.pm +++ b/lib/WebGUI/i18n/English/AdminBar.pm @@ -15,7 +15,7 @@ our $I18N = { Places the administrative tool bar on the page. Omitting this macro will prevent you from adding content, pasting content from the clipboard, accessing the help system and other administrative functions.

-The macro takes up to one optional argument, an alternate template in the Macro/AdminBar namespace for generating the AdminBar. The following variables are available in the template: +The macro may take one optional argument, an alternate template in the Macro/AdminBar namespace for generating the AdminBar. The following variables are available in the template:

packages.label
@@ -94,7 +94,7 @@ The URL for executing this admin function.

The .adminBar style sheet class is tied to the default template for this macro. |, - lastUpdated => 1112374920, + lastUpdated => 1112583521, }, }; diff --git a/lib/WebGUI/i18n/English/AdminText.pm b/lib/WebGUI/i18n/English/AdminText.pm index 3cefcbdee..85faf88e5 100644 --- a/lib/WebGUI/i18n/English/AdminText.pm +++ b/lib/WebGUI/i18n/English/AdminText.pm @@ -10,12 +10,12 @@ our $I18N = { 'admin text body' => { message => q| -^AdminText();
+^AdminText(text message);
Displays a small text message to a user who is in admin mode. Example: ^AdminText("You are in admin mode!");

|, - lastUpdated => 1112466919, + lastUpdated => 1112583570, }, }; diff --git a/lib/WebGUI/i18n/English/AdminToggle.pm b/lib/WebGUI/i18n/English/AdminToggle.pm index 8d1ef0d62..0804d0e42 100644 --- a/lib/WebGUI/i18n/English/AdminToggle.pm +++ b/lib/WebGUI/i18n/English/AdminToggle.pm @@ -3,14 +3,15 @@ package WebGUI::i18n::English::AdminToggle; our $I18N = { 'admin toggle title' => { - message => q|Admin Text Macro|, + message => q|Admin Toggle Macro|, lastUpdated => 1112466408, }, 'admin toggle body' => { message => q| -^AdminToggle; or ^AdminToggle();
+^AdminToggle();
+^AdminToggle([enable admin], [disable admin], [template name]);
Places a link on the page which is only visible to content managers and administrators. The link toggles on/off admin mode. You can optionally specify other messages to display like this: ^AdminToggle("Edit On","Edit Off"); This macro optionally takes a third parameter that allows you to specify an alternate template name in the Macro/AdminToggle namespace.

The following variables are available in the template: diff --git a/lib/WebGUI/i18n/English/AssetProxy.pm b/lib/WebGUI/i18n/English/AssetProxy.pm index 338c5ecaf..8f0c3beea 100644 --- a/lib/WebGUI/i18n/English/AssetProxy.pm +++ b/lib/WebGUI/i18n/English/AssetProxy.pm @@ -9,14 +9,17 @@ our $I18N = { 'asset proxy body' => { message => q| -

^AssetProxy();
-^AssetProxy(Asset URL);
+

^AssetProxy(Asset URL);
This macro is used to render an Asset and display it inline according to its template. Any Asset can be displayed, including Navigations, -images, links to files for downloading, snippets or for displaying -content from another part of the site on this page. +images, links to files for downloading or for snippets. + +

It can also be like a Shortcut Asset, displaying content from another +part of the site on this page. Unlike a Shortcut, it cannot override +any part of the original Asset. + |, - lastUpdated => 1112315914, + lastUpdated => 1112583827, }, }; diff --git a/lib/WebGUI/i18n/English/Macros.pm b/lib/WebGUI/i18n/English/Macros.pm index c066e10a9..e03408be8 100644 --- a/lib/WebGUI/i18n/English/Macros.pm +++ b/lib/WebGUI/i18n/English/Macros.pm @@ -7,7 +7,7 @@ our $I18N = { }, 'macros list body' => { - message => q|

These Macros are available for use on your site. The set of available Macros is defined in the WebGUI configuration file:

|, + message => q|

The set of available Macros is defined in the WebGUI configuration file. These Macros are available for use on your site:

|, context => 'Content for dynamically generated macro list', lastUpdated => 1112560683, }, diff --git a/lib/WebGUI/i18n/English/Thumbnail.pm b/lib/WebGUI/i18n/English/Thumbnail.pm new file mode 100644 index 000000000..786e6e578 --- /dev/null +++ b/lib/WebGUI/i18n/English/Thumbnail.pm @@ -0,0 +1,23 @@ +package WebGUI::i18n::English::Thumbnail; + +our $I18N = { + + 'thumbnail title' => { + message => q|Thumbnail Macro|, + lastUpdated => 1112566765, + }, + + 'thumbnail body' => { + message => q| + +^Thumbnail(assetId);
+This macro will allow you to fetch the thumbnail for any File or Image Asset by its +AssetId. +

+ +|, + lastUpdated => 1112566767, + }, +}; + +1;