From c25101654fafc393fd1c4d9bb8a3f1aad42a1312 Mon Sep 17 00:00:00 2001 From: Chris Nehren Date: Mon, 29 Sep 2008 18:21:29 +0000 Subject: [PATCH] users may now customize the post received page for the CS --- docs/changelog/7.x.x.txt | 1 + .../packages-7.6.0/default_post_received.wgpkg | Bin 0 -> 829 bytes lib/WebGUI/Asset/Post.pm | 15 ++++++++++++++- lib/WebGUI/Asset/Wobject/Collaboration.pm | 8 ++++++++ lib/WebGUI/i18n/English/Asset_Collaboration.pm | 9 +++++++++ 5 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 docs/upgrades/packages-7.6.0/default_post_received.wgpkg 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 0000000000000000000000000000000000000000..44633bd18ab0abdd81d2214c77b31258d0777603 GIT binary patch literal 829 zcmV-D1H$|tiwFP!000001MO99PunmM?q`05mCsvALSJarRpOl@#wuRMUYL-Z9EnG2 zd$!Y3CjR@*Zc9oFW0R;fX;@X$`h4f-o_p?6E-iogzF)6aOC|fP)ru#%Uw$bF{JI|o z_ERE3P^nc)1YMTDa&4$WXjB4IfVMo2?@$D(011yvnL}3)IhvBvb)}z=MGy#Mzz_wkwT$$!};($%kItCWyZz#WZuh| zP9ZLQISkJkkHydh^$UX@aUnHZ3@3&h)R_j=iRXd9jZt(TXnabOMMtVNn2A#iS2WMe zr4-s+Du{p$W>MuTbFrT}#`HdmW8m}HneHlKgc-?k-ZN<>O60N=@5IbFuS$`zfxgV9 zRJCL~r6ZE$SOxM~vIqzbOyU3e{ncrFK25u~Gi;k7qubZw)!2(4Ax zwk`#J##2ztoT+SAiGG(Vj5^Ou#yCvW=GkfEKQe!ch!HAFAJP7p#dGNGopqYc4O_=% z^K?qrL!oV@lqZj=)G(8c18t9sPr8=Tf<@o(ek%L!A2SemH|0 z`vs*n)x|8UsTg+nu2B6k8#5-3ve1%7V;Z(ZmeC$gGROVBB7jF~Bu#f3dIp%G$z&Gj z{6Q&GdmAaC2kr%rV}?r=lKZzY8cjv z8?lbqI}><&M;|uyr^fnVOK1MU@$hPR_%=yAJE`wh?q1?W@EYTlfma6pI|hCMtB!7v H01f~E(0r3L literal 0 HcmV?d00001 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;