Move "back to profile" link from Account Profile Layout template into the View template. Added the can_edit_profile template variable to common template variables for the Profile plugin.

This commit is contained in:
Colin Kuskie 2010-09-28 09:32:33 -07:00
parent 0406e82546
commit 2adc7a24e2
4 changed files with 7 additions and 3 deletions

View file

@ -83,7 +83,8 @@ sub appendCategoryVars {
$var->{'profile_category_'.$categoryId."_shortLabel"} = $shortCategoryLabel;
$var->{'profile_category_'.$categoryId."_index" } = $index;
$var->{'profile_category_'.$categoryId."_fields" } = $fields;
$var->{'can_edit_profile' } = $self->uid eq $self->session->user->userId;
#Update the isActive flag to determine the default active tab
$self->store->{hasActiveTab} = ($self->store->{hasActiveTab} || $isActive);
@ -472,8 +473,6 @@ sub www_view {
$self->appendCommonVars($var);
$var->{'can_edit_profile' } = $uid eq $session->user->userId;
my $privacySetting = $user->profileField('publicProfile') || 'none';
$var->{"profile_privacy_$privacySetting"} = "true";