Skip to content

Commit

Permalink
Move "back to profile" link from Account Profile Layout template into…
Browse files Browse the repository at this point in the history
… the View template. Added the can_edit_profile template variable to common template variables for the Profile plugin.
  • Loading branch information
perlDreamer committed Sep 28, 2010
1 parent 0e8d5cf commit ae02a4b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/changelog/7.x.x.txt
Expand Up @@ -8,6 +8,7 @@
- fixed #11876: packing templates, snippets, headtags removes conditional CSS comments
- fixed #11877: Criteria Builder on "shortcut by alternate criteria" gets ugly with many checkbox items
- fixed #11883: Wiki "Add page" link does not encode special chars
- fixed #11886: profile knows it's me, but doesn't display edit

7.9.14
- fixed #11812: Checking www_ajaxSave's response in the cart js
Expand Down
6 changes: 6 additions & 0 deletions docs/templates.txt
@@ -1,6 +1,12 @@
This is a running list of template changes made during upgrades. If you have copied the default
templates, you will need to apply these changes manually to your copies.

7.9.15

* Profile templates - root/import/account/profile/default-view-profile-template
- root/import/account/profile/profile-account-layout
Moved the "back to profile" link from the Profile View template to the Profile Layout template.

7.9.14

* Asset Report Template - asset-report/asset-report-default-template
Expand Down
Binary file not shown.
5 changes: 2 additions & 3 deletions lib/WebGUI/Account/Profile.pm
Expand Up @@ -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);
Expand Down Expand Up @@ -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";

Expand Down

0 comments on commit ae02a4b

Please sign in to comment.