Commits

Jason Green  committed fdf34e2

Fixing issue with image/username links going to profile action instead
of details which produces the wrong user profile.

  • Participants
  • Parent commits 4dfa7ba
  • Branches ui0.8

Comments (0)

Files changed (6)

File app/protected/modules/comments/views/CommentsForRelatedModelView.php

                     $rows++;
                     continue;
                 }
-                $userUrl        = Yii::app()->createUrl('/users/default/profile', array('id' => $comment->createdByUser->id));
+                $userUrl        = Yii::app()->createUrl('/users/default/details', array('id' => $comment->createdByUser->id));
                 $stringContent  = ZurmoHtml::link($comment->createdByUser->getAvatarImage(36), $userUrl);
                 $userName       = ZurmoHtml::link(strval($comment->createdByUser), $userUrl);
                 $stringContent .= '<div class="comment-content"><p>' . $userName . ': ' . $comment->description . '</p>';

File app/protected/modules/conversations/views/ConversationDetailsView.php

 
         protected function renderConversationContent()
         {
-            $userUrl  = Yii::app()->createUrl('/users/default/profile', array('id' => $this->model->createdByUser->id));
+            $userUrl  = Yii::app()->createUrl('/users/default/details', array('id' => $this->model->createdByUser->id));
             $content  = '<div class="comment model-details-summary clearfix">';
             $content .= ZurmoHtml::link($this->model->createdByUser->getAvatarImage(100), $userUrl);
             $content .= '<span class="user-details">';

File app/protected/modules/gamification/views/LeaderboardView.php

                 assert('is_string($leaderboardData["userLabel"])');
                 assert('is_int($leaderboardData["points"])');
 
-                $userUrl  = Yii::app()->createUrl('/users/default/profile', array('id' => $userId));
+                $userUrl  = Yii::app()->createUrl('/users/default/details', array('id' => $userId));
                 $user        = User::getById($userId);
                 $avatarImage = $user->getAvatarImage(24);
 

File app/protected/modules/missions/views/MissionDetailsView.php

 
         protected function renderMissionContent()
         {
-            $userUrl  = Yii::app()->createUrl('/users/default/profile', array('id' => $this->model->createdByUser->id));
+            $userUrl  = Yii::app()->createUrl('/users/default/details', array('id' => $this->model->createdByUser->id));
             $content  = '<div class="comment model-details-summary">';
             $content .= ZurmoHtml::link($this->model->createdByUser->getAvatarImage(100), $userUrl);
             $content .= '<span class="user-details">';

File app/protected/modules/socialItems/utils/SocialItemsUtil.php

         public static function renderItemAndCommentsContent(SocialItem $model, $redirectUrl)
         {
             assert('is_string($redirectUrl) || $redirectUrl == null');
-            $userUrl  = Yii::app()->createUrl('/users/default/profile', array('id' => $model->owner->id));
+            $userUrl  = Yii::app()->createUrl('/users/default/details', array('id' => $model->owner->id));
             $content  = '<div class="social-item">';
             $avatarImage = $model->owner->getAvatarImage(50);
             $content .= '<div class="comment model-details-summary clearfix">';

File app/protected/modules/users/elements/AvatarTypeAndEmailElement.php

         {
             $this->nonEditableTemplate = '<td colspan="{colspan}">{content}</td>';
             $avatarImage = $this->model->getAvatarImage(200);
+            $content     = '<div class="gravatar-container">';
             if (Yii::app()->user->userModel->id == $this->model->id ||
                 RightsUtil::canUserAccessModule('UsersModule', Yii::app()->user->userModel))
             {
-                $content     = '<div class="gravatar-container">';
                 $span        = ZurmoHtml::tag('span',
                                       array('id'    => 'profile-picture-tooltip'),
                                       Yii::t('Default', 'Click me to change the profile picture.'),
                 $url         = Yii::app()->createUrl('/users/default/changeAvatar', array('id' => $this->model->id));
                 $modalTitle  = ModalView::getAjaxOptionsForModalLink(Yii::t('Default', 'Change Profile Picture') . ": " . strval($this->model));
                 $content    .= ZurmoHtml::ajaxLink($span . $avatarImage, $url, $modalTitle);
-                $content    .= '</div>';
+
             }
             else
             {
-                $content = $avatarImage;
+                $content .= $avatarImage;
             }
+            $content    .= '</div>';
             return $content;
         }