diff --git a/lib/WebGUI/Asset/Post.pm b/lib/WebGUI/Asset/Post.pm index 9e7be19b6..ed461d270 100644 --- a/lib/WebGUI/Asset/Post.pm +++ b/lib/WebGUI/Asset/Post.pm @@ -518,6 +518,13 @@ sub getTemplateVars { } #------------------------------------------------------------------- + +=head2 getThread + +Returns the Thread that this Post belongs to. The method caches the result of the Asset creation. + +=cut + sub getThread { my $self = shift; unless (defined $self->{_thread}) { diff --git a/lib/WebGUI/Help/Asset_Post.pm b/lib/WebGUI/Help/Asset_Post.pm index c0d14119d..889f03347 100644 --- a/lib/WebGUI/Help/Asset_Post.pm +++ b/lib/WebGUI/Help/Asset_Post.pm @@ -1,9 +1,19 @@ package WebGUI::Help::Asset_Post; our $HELP = { - 'post add/edit template' => { + 'post add/edit template' => { ##Asset/Post/www_edit title => 'add/edit post template title', body => 'add/edit post template body', + isa => [ + { + tag => 'collaboration template labels', + namespace => 'Asset_Collaboration' + }, + { + tag => 'template language', + namespace => 'Asset_Template' + }, + ], fields => [ ], variables => [ @@ -127,19 +137,21 @@ our $HELP = { ], related => [ { - tag => 'template language', - namespace => 'Asset_Template' - }, - { - tag => 'post template variables', + tag => 'notification template', namespace => 'Asset_Post' }, ] }, - 'post template variables' => { + 'post template variables' => { ##Asset/Post/getTemplateVars title => 'post template variables title', body => 'post template variables body', + isa => [ + { + tag => 'post asset variables', + namespace => 'Asset_Post' + }, + ], variables => [ { 'name' => 'userId' @@ -163,7 +175,8 @@ our $HELP = { 'name' => 'title.short' }, { - 'name' => 'content' + 'name' => 'content', + 'description' => 'formatted.content' }, { 'name' => 'user.canEdit' @@ -233,6 +246,27 @@ our $HELP = { } ] }, + ], + fields => [ + ], + related => [ + { + tag => 'template language', + namespace => 'Asset_Template' + }, + { + tag => 'collaboration template labels', + namespace => 'Asset_Collaboration' + }, + ] + }, + + 'post asset variables' => { + title => 'post asset variables title', + body => 'post asset variables body', + isa => [ + ], + variables => [ { 'name' => 'storageId' }, @@ -315,20 +349,21 @@ our $HELP = { fields => [ ], related => [ + ] + }, + 'notification template' => { + title => 'notification template title', + body => 'notification template body', + isa => [ + { + namespace => "Asset_Post", + tag => "post template variables" + }, { tag => 'template language', namespace => 'Asset_Template' }, - { - tag => 'collaboration template labels', - namespace => 'Asset_Collaboration' - }, - ] - }, - - 'notification template' => { - title => 'notification template title', - body => 'notification template body', + ], fields => [ ], variables => [ @@ -347,11 +382,7 @@ our $HELP = { ], related => [ { - tag => 'template language', - namespace => 'Asset_Template' - }, - { - tag => 'post template variables', + tag => 'post add/edit template', namespace => 'Asset_Post' }, ] diff --git a/lib/WebGUI/i18n/English/Asset_Post.pm b/lib/WebGUI/i18n/English/Asset_Post.pm index 012d7e634..747084437 100644 --- a/lib/WebGUI/i18n/English/Asset_Post.pm +++ b/lib/WebGUI/i18n/English/Asset_Post.pm @@ -261,6 +261,11 @@ Collaboration System and the user has an avatar.|, lastUpdated => 1150167057, }, + 'formatted.content' => { + message => q|The formatted and filtered content of the post, if a thread containing the Post exists. This variable will override any other variables with this name in the list of template variables.|, + lastUpdated => 1164424431, + }, + 'user.canEdit' => { message => q|A conditional that is true if the user is adding a new Post, as opposed to editing an existing Post, and a thread containing the Post exists.|, @@ -503,11 +508,22 @@ editing an existing Post, and a thread containing the Post exists.|, }, 'post template variables body' => { - message => q|

The following variables are available in all Post templates. Internationalized labels - for the action URLs (reply, delete, etc.) are provided in the set of Collaboration Template labels. -

+ message => q|

The following variables are available in all Post templates and +templates in the Collaboration System.

|, - lastUpdated => 1150167094, + lastUpdated => 1164424949, + }, + + 'post asset variables title' => { + message => q|Post Asset Template Variables|, + lastUpdated => 1164425086, + }, + + 'post asset variables body' => { + message => q|

The following variables are used in many Post and Collaboration System templates. They + pull their data directly from the Post Asset's properties.

+|, + lastUpdated => 1164425047, }, 'post received' => {