|
26 | 26 | use humhub\modules\content\assets\ContainerHeaderAsset; |
27 | 27 | use humhub\modules\content\components\ContentContainerActiveRecord; |
28 | 28 | use humhub\modules\file\widgets\Upload; |
| 29 | +use humhub\modules\space\models\Space; |
29 | 30 | use humhub\widgets\bootstrap\Link; |
30 | 31 |
|
31 | 32 | ContainerHeaderAsset::register($this); |
|
68 | 69 | 'cropUrl' => $coverCropUrl, |
69 | 70 | 'deleteUrl' => $coverDeleteUrl, |
70 | 71 | 'dropZone' => '.profile-banner-image-container', |
71 | | - 'confirmBody' => Yii::t('SpaceModule.base', 'Do you really want to delete your title image?'), |
| 72 | + 'confirmBody' => $container instanceof Space |
| 73 | + ? Yii::t('SpaceModule.base', 'Do you really want to delete the space title image?') |
| 74 | + : Yii::t('SpaceModule.base', 'Do you really want to delete your title image?'), |
72 | 75 | ]) ?> |
73 | 76 | <?php endif; ?> |
74 | 77 | </div> |
|
77 | 80 | style="width: <?= $profileImageWidth ?>px; height: <?= $profileImageHeight ?>px;"> |
78 | 81 |
|
79 | 82 | <?php if ($container->image->exists()) : ?> |
80 | | - <a data-ui-gallery="spaceHeader" href="<?= $container->image->getUrl([]) ?>"> |
81 | | - <?= $container->getProfileImage()->render($profileImageWidth - 10, ['class' => 'img-profile-header-background profile-user-photo', 'link' => false, 'showSelfOnlineStatus' => true]) ?> |
| 83 | + <a data-ui-gallery="spaceHeader" |
| 84 | + href="<?= $container->image->getUrl([]) ?>" |
| 85 | + aria-label="<?= Html::encode($container instanceof Space |
| 86 | + ? Yii::t('SpaceModule.base', 'View space image of {name}', ['name' => $container->displayName]) |
| 87 | + : Yii::t('UserModule.base', 'View profile image of {name}', ['name' => $container->displayName])) ?>"> |
| 88 | + <?= $container->getProfileImage()->render($profileImageWidth - 10, [ |
| 89 | + 'class' => 'img-profile-header-background profile-user-photo', |
| 90 | + 'link' => false, |
| 91 | + 'showSelfOnlineStatus' => true, |
| 92 | + ]) ?> |
82 | 93 | </a> |
83 | 94 | <?php else : ?> |
84 | 95 | <?= $container->getProfileImage()->render($profileImageHeight - 10, ['class' => 'img-profile-header-background profile-user-photo']) ?> |
|
95 | 106 | 'deleteUrl' => $imageDeleteUrl, |
96 | 107 | 'cropUrl' => $imageCropUrl, |
97 | 108 | 'dropZone' => '.profile-user-photo-container', |
98 | | - 'confirmBody' => Yii::t('SpaceModule.base', 'Do you really want to delete your profile image?'), |
| 109 | + 'confirmBody' => $container instanceof Space |
| 110 | + ? Yii::t('SpaceModule.base', 'Do you really want to delete the space image?') |
| 111 | + : Yii::t('SpaceModule.base', 'Do you really want to delete your profile image?'), |
99 | 112 | ]) ?> |
100 | 113 | <?php endif; ?> |
101 | 114 |
|
|
0 commit comments