From a400d3697fe7904e093d1414ff460e3a100a31ba Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Fri, 10 Apr 2009 22:39:23 +0000 Subject: [PATCH] Add missing template variables to the Story Archive. Add RSS and atom template variables. --- lib/WebGUI/Asset/Wobject/StoryArchive.pm | 2 ++ lib/WebGUI/Help/Asset_StoryArchive.pm | 5 +++ lib/WebGUI/i18n/English/Asset_StoryArchive.pm | 34 +++++++++++++++++-- 3 files changed, 39 insertions(+), 2 deletions(-) diff --git a/lib/WebGUI/Asset/Wobject/StoryArchive.pm b/lib/WebGUI/Asset/Wobject/StoryArchive.pm index c538ab83e..ce4eae985 100644 --- a/lib/WebGUI/Asset/Wobject/StoryArchive.pm +++ b/lib/WebGUI/Asset/Wobject/StoryArchive.pm @@ -370,6 +370,8 @@ sub viewTemplateVariables { $var->{addStoryUrl} = $var->{canPostStories} ? $self->getUrl('func=add;class=WebGUI::Asset::Story') : ''; + $var->{rssUrl} = $self->getUrl('func=viewRss'); + $var->{atomUrl} = $self->getUrl('func=viewAtom'); $var->{keywordCloud} = WebGUI::Keyword->new($session)->generateCloud({ startAsset => $self, displayFunc => 'view', diff --git a/lib/WebGUI/Help/Asset_StoryArchive.pm b/lib/WebGUI/Help/Asset_StoryArchive.pm index 05ce64797..611157351 100644 --- a/lib/WebGUI/Help/Asset_StoryArchive.pm +++ b/lib/WebGUI/Help/Asset_StoryArchive.pm @@ -38,6 +38,11 @@ our $HELP = { { 'name' => 'searchForm' }, { 'name' => 'searchButton' }, { 'name' => 'searchFooter' }, + { 'name' => 'canPostStories' }, + { 'name' => 'addStoryUrl' }, + { 'name' => 'rssUrl' }, + { 'name' => 'atomUrl' }, + { 'name' => 'keywordCloud' }, ], related => [] }, diff --git a/lib/WebGUI/i18n/English/Asset_StoryArchive.pm b/lib/WebGUI/i18n/English/Asset_StoryArchive.pm index 760c4b015..42a3ac395 100644 --- a/lib/WebGUI/i18n/English/Asset_StoryArchive.pm +++ b/lib/WebGUI/i18n/English/Asset_StoryArchive.pm @@ -209,7 +209,7 @@ our $I18N = { 'searchForm' => { message => q|The text field where users can enter in keywords for the search.|, - context => q|label for the URL to add a story to the archive.|, + context => q|Template variable.|, lastUpdated => 0, }, @@ -221,7 +221,37 @@ our $I18N = { 'searchFooter' => { message => q|HTML code for ending the search form.|, - context => q|label for the URL to add a story to the archive.|, + context => q|Template variable.|, + lastUpdated => 0, + }, + + 'canPostStories' => { + message => q|A boolean which is true if the user can post stories.|, + context => q|Template variable.|, + lastUpdated => 0, + }, + + 'addStoryUrl' => { + message => q|The URL for the user to add a Story.|, + context => q|Template variable.|, + lastUpdated => 0, + }, + + 'rssUrl' => { + message => q|The URL for the RSS feed for this Story Archive.|, + context => q|Template variable.|, + lastUpdated => 0, + }, + + 'atomUrl' => { + message => q|The URL for the Atom feed for this Story Archive.|, + context => q|Template variable.|, + lastUpdated => 0, + }, + + 'keywordCloud' => { + message => q|The tag cloud for the keywords for stories in this Story Archive.|, + context => q|Template variable.|, lastUpdated => 0, },