Add missing template variables to the Story Archive.

Add RSS and atom template variables.
This commit is contained in:
Colin Kuskie 2009-04-10 22:39:23 +00:00
parent cf546ad031
commit a400d3697f
3 changed files with 39 additions and 2 deletions

View file

@ -370,6 +370,8 @@ sub viewTemplateVariables {
$var->{addStoryUrl} = $var->{canPostStories} $var->{addStoryUrl} = $var->{canPostStories}
? $self->getUrl('func=add;class=WebGUI::Asset::Story') ? $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({ $var->{keywordCloud} = WebGUI::Keyword->new($session)->generateCloud({
startAsset => $self, startAsset => $self,
displayFunc => 'view', displayFunc => 'view',

View file

@ -38,6 +38,11 @@ our $HELP = {
{ 'name' => 'searchForm' }, { 'name' => 'searchForm' },
{ 'name' => 'searchButton' }, { 'name' => 'searchButton' },
{ 'name' => 'searchFooter' }, { 'name' => 'searchFooter' },
{ 'name' => 'canPostStories' },
{ 'name' => 'addStoryUrl' },
{ 'name' => 'rssUrl' },
{ 'name' => 'atomUrl' },
{ 'name' => 'keywordCloud' },
], ],
related => [] related => []
}, },

View file

@ -209,7 +209,7 @@ our $I18N = {
'searchForm' => { 'searchForm' => {
message => q|The text field where users can enter in keywords for the search.|, 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, lastUpdated => 0,
}, },
@ -221,7 +221,37 @@ our $I18N = {
'searchFooter' => { 'searchFooter' => {
message => q|HTML code for ending the search form.|, 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, lastUpdated => 0,
}, },