diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index a05119702..339d1ee08 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,4 +1,5 @@ 7.6.0 + - added: users may now customize the post received page for the CS - fixed: shortcuts don't notify browsers of updates to their shortcutted asset - fixed: anonymous registration with email confirmation is broken - added an epochDate field to the template for CS RSS items. The ^D(); diff --git a/docs/upgrades/packages-7.6.0/default_post_received.wgpkg b/docs/upgrades/packages-7.6.0/default_post_received.wgpkg new file mode 100644 index 000000000..44633bd18 Binary files /dev/null and b/docs/upgrades/packages-7.6.0/default_post_received.wgpkg differ diff --git a/lib/WebGUI/Asset/Post.pm b/lib/WebGUI/Asset/Post.pm index 772eac26e..5371ce6c3 100644 --- a/lib/WebGUI/Asset/Post.pm +++ b/lib/WebGUI/Asset/Post.pm @@ -1454,7 +1454,20 @@ sub www_showConfirmation { } else { $url = $self->getThread->getParent->getUrl; } - return $self->getThread->getParent->processStyle('

'.$i18n->get("post received").'

'.$i18n->get("493","WebGUI").'

'); + my $parent = $self->getThread; + my ($collabSystem, $templateId); + if($parent->isa('WebGUI::Asset::Wobject::Collaboration')) { + $collabSystem = $parent; + } + else { + $collabSystem = $parent->getParent; + } + my $templateId = $collabSystem->get('postReceivedTemplateId'); + my $template = WebGUI::Asset->new($self->session, $templateId); + my %var = ( + url => $url, + ); + return $self->getThread->getParent->processStyle($template->process(\%var)); } diff --git a/lib/WebGUI/Asset/Wobject/Collaboration.pm b/lib/WebGUI/Asset/Wobject/Collaboration.pm index ffe8f195b..4eec7c2f3 100644 --- a/lib/WebGUI/Asset/Wobject/Collaboration.pm +++ b/lib/WebGUI/Asset/Wobject/Collaboration.pm @@ -781,6 +781,14 @@ sub definition { filter=>'fixId', defaultValue=>$groupIdEdit, # groupToEditPost should default to groupIdEdit }, + postReceivedTemplateId =>{ + fieldType=>'template', + namespace=>'Collaboration', + tab=>'display', + label=>$i18n->get('post received template'), + hoverHelp=>$i18n->get('post received template hoverHelp'), + defaultValue=>'default_post_received', + }, ); push(@{$definition}, { diff --git a/lib/WebGUI/i18n/English/Asset_Collaboration.pm b/lib/WebGUI/i18n/English/Asset_Collaboration.pm index 5727d62c0..78888c162 100644 --- a/lib/WebGUI/i18n/English/Asset_Collaboration.pm +++ b/lib/WebGUI/i18n/English/Asset_Collaboration.pm @@ -1661,6 +1661,15 @@ the Collaboration Asset, the user will be notified.|, lastUpdated => 1166848379, }, + 'post received template' => { + message => q|Post received template|, + lastUpdated => 1221247761, + }, + 'post received template hoverHelp' => { + message => q|The template for the message received when a user makes a post.|, + lastUpdated => 1221247761, + }, + }; 1;