diff --git a/lib/WebGUI/Macro/AOIHits.pm b/lib/WebGUI/Macro/AOIHits.pm index bff02dba2..501653823 100644 --- a/lib/WebGUI/Macro/AOIHits.pm +++ b/lib/WebGUI/Macro/AOIHits.pm @@ -14,6 +14,27 @@ use strict; use WebGUI::Session; use WebGUI::SQL; +=head1 NAME + +Package WebGUI::Macro::AOIHits + +=head1 DESCRIPTION + +Macro for displaying the number of times a key,value pair occurs in the +metadata for content viewed by the current user. + +=head2 process ( key, value ) + +=head3 key + +The metadata property that will be looked up. + +=head3 value + +The value for the key that will be looked up. + +=cut + #------------------------------------------------------------------- sub process { my (@param, $temp); diff --git a/lib/WebGUI/Macro/AOIRank.pm b/lib/WebGUI/Macro/AOIRank.pm index 9203fb0ad..3b7de4fa3 100644 --- a/lib/WebGUI/Macro/AOIRank.pm +++ b/lib/WebGUI/Macro/AOIRank.pm @@ -14,6 +14,27 @@ use strict; use WebGUI::Session; use WebGUI::SQL; +=head1 NAME + +Package WebGUI::Macro::AOIRank + +=head1 DESCRIPTION + +Macro for displaying the value for a metadata property by rank. + +=head2 process ( key, [ rank ] ) + +=head3 key + +The metadata property that will be looked up. + +=head3 rank + +Define which value, by it's ranking, will be displayed. The highest ranking is +1. If the rank is omitted, a default of 1 will be used. + +=cut + #------------------------------------------------------------------- sub process { my (@param, $temp); diff --git a/lib/WebGUI/Macro/AdminText.pm b/lib/WebGUI/Macro/AdminText.pm index a187d8bd8..af61647ff 100644 --- a/lib/WebGUI/Macro/AdminText.pm +++ b/lib/WebGUI/Macro/AdminText.pm @@ -13,6 +13,23 @@ package WebGUI::Macro::AdminText; use strict; use WebGUI::Session; +=head1 NAME + +Package WebGUI::Macro::AdminText + +=head1 DESCRIPTION + +Macro for displaying a text message to user's with Admin turned on. + +=head2 process ( [text] ) + +=head3 text + +The text to be displayed to the user. If the user is not in Admin mode the empty +string is returned. + +=cut + #------------------------------------------------------------------- sub process { my @param = @_; diff --git a/lib/WebGUI/Macro/AdminToggle.pm b/lib/WebGUI/Macro/AdminToggle.pm index dbe78933b..7e8dfe9ec 100644 --- a/lib/WebGUI/Macro/AdminToggle.pm +++ b/lib/WebGUI/Macro/AdminToggle.pm @@ -17,6 +17,35 @@ use WebGUI::Session; use WebGUI::Asset::Template; use WebGUI::URL; +=head1 NAME + +Package WebGUI::Macro::AdminToggle + +=head1 DESCRIPTION + +Macro for displaying a url to the user for turning Admin mode on and off. + +=head2 process ( [turnOn,turnOff,template ] ) + +process takes two optional parameters for customizing the content and layout +of the account link. + +=head3 turnOn + +The text displayed to the user if Admin mode is turned off and they are in the +Turn On Admin group. If this is blank an internationalized default is used. + +=head3 turnOff + +The text displayed to the user if Admin mode is turned on and they are in the +Turn On Admin group. If this is blank an internationalized default is used. + +=head3 template + +A template to use for formatting the link. + +=cut + #------------------------------------------------------------------- sub process { if (WebGUI::Grouping::isInGroup(12)) { diff --git a/lib/WebGUI/Macro/AssetProxy.pm b/lib/WebGUI/Macro/AssetProxy.pm index 68e24742b..fedd25dc3 100644 --- a/lib/WebGUI/Macro/AssetProxy.pm +++ b/lib/WebGUI/Macro/AssetProxy.pm @@ -15,6 +15,27 @@ use Time::HiRes; use WebGUI::Asset; use WebGUI::ErrorHandler; use WebGUI::Session; +use WebGUI::International; + +=head1 NAME + +Package WebGUI::Macro::AssetProxy + +=head1 DESCRIPTION + +Macro for displaying the output of an Asset in another location. + +=head2 process ( url ) + +=head3 url + +The URL of the Asset whose output will be returned. If no Asset with that URL +can be found, an internationalized error message will be returned instead. + +No editing controls (toolbar) will be displayed in the Asset output, even if +Admin is turned on. + +=cut #------------------------------------------------------------------- sub process { @@ -28,7 +49,7 @@ sub process { $output .= "AssetProxy:".Time::HiRes::tv_interval($t) if (WebGUI::ErrorHandler::canShowPerformanceIndicators()); return $output; } else { - return "Invalid Asset URL"; + return WebGUI::International::get('invalid url', 'Macro_AssetProxy'); } } diff --git a/lib/WebGUI/i18n/English/Macro_AssetProxy.pm b/lib/WebGUI/i18n/English/Macro_AssetProxy.pm index 4cbdfdaae..dfcdf9928 100644 --- a/lib/WebGUI/i18n/English/Macro_AssetProxy.pm +++ b/lib/WebGUI/i18n/English/Macro_AssetProxy.pm @@ -12,6 +12,11 @@ our $I18N = { lastUpdated => 1112315917, }, + 'invalid url' => { + message => q|Invalid Asset URL|, + lastUpdated => 1134769012, + }, + 'asset proxy body' => { message => q|

^AssetProxy(Asset URL);