From 2b842110884f01e905e8d8774104babde6a728d1 Mon Sep 17 00:00:00 2001 From: James Tolley Date: Fri, 25 May 2007 20:10:47 +0000 Subject: [PATCH] Added canEdit template variable for events. --- lib/WebGUI/Asset/Event.pm | 1 + lib/WebGUI/Help/Asset_Event.pm | 3 +++ lib/WebGUI/i18n/English/Asset_Event.pm | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/lib/WebGUI/Asset/Event.pm b/lib/WebGUI/Asset/Event.pm index ca89fd008..e9136b377 100644 --- a/lib/WebGUI/Asset/Event.pm +++ b/lib/WebGUI/Asset/Event.pm @@ -1160,6 +1160,7 @@ sub getTemplateVars { my %var; # Some miscellaneous stuff + $var{'canEdit'} = $self->canEdit; $var{"isPublic"} = 1 if $self->get("groupIdView") eq "7"; $var{"groupToView"} = $self->get("groupIdView"); # Todo: Remove this? diff --git a/lib/WebGUI/Help/Asset_Event.pm b/lib/WebGUI/Help/Asset_Event.pm index 8cae77428..98e427d50 100644 --- a/lib/WebGUI/Help/Asset_Event.pm +++ b/lib/WebGUI/Help/Asset_Event.pm @@ -88,6 +88,9 @@ our $HELP = { isa => [ ], variables => [ + { + 'name' => 'canEdit', + }, { 'name' => 'isPublic', }, diff --git a/lib/WebGUI/i18n/English/Asset_Event.pm b/lib/WebGUI/i18n/English/Asset_Event.pm index 990d7aaad..cd9ebca89 100644 --- a/lib/WebGUI/i18n/English/Asset_Event.pm +++ b/lib/WebGUI/i18n/English/Asset_Event.pm @@ -452,6 +452,11 @@ be useful, others may not.|, message => q{Event}, lastUpdated => 1131394072, }, + + 'canEdit' => { + message => q{This variable is true if the current user can edit this event.}, + lastUpdated => 0, + }, }; 1;