@@ -4,9 +4,9 @@ discard block |
||
| 4 | 4 | use yii\helpers\Url; |
| 5 | 5 | use yii\helpers\Html; |
| 6 | 6 | if ($space->isAdmin()) { |
| 7 | - $this->registerJsFile('@web/resources/space/spaceHeaderImageUpload.js'); |
|
| 8 | - $this->registerJsVar('profileImageUploaderUrl', $space->createUrl('/space/manage/image/upload')); |
|
| 9 | - $this->registerJsVar('profileHeaderUploaderUrl', $space->createUrl('/space/manage/image/banner-upload')); |
|
| 7 | + $this->registerJsFile('@web/resources/space/spaceHeaderImageUpload.js'); |
|
| 8 | + $this->registerJsVar('profileImageUploaderUrl', $space->createUrl('/space/manage/image/upload')); |
|
| 9 | + $this->registerJsVar('profileHeaderUploaderUrl', $space->createUrl('/space/manage/image/banner-upload')); |
|
| 10 | 10 | } |
| 11 | 11 | ?> |
| 12 | 12 | |
@@ -47,28 +47,28 @@ discard block |
||
| 47 | 47 | class="fa fa-cloud-upload"></i></a> |
| 48 | 48 | <a id="profile-image-upload-edit-button" |
| 49 | 49 | style="<?php |
| 50 | - if (!$space->getProfileImage()->hasImage()) { |
|
| 51 | - echo 'display: none;'; |
|
| 52 | - } |
|
| 53 | - ?>" |
|
| 50 | + if (!$space->getProfileImage()->hasImage()) { |
|
| 51 | + echo 'display: none;'; |
|
| 52 | + } |
|
| 53 | + ?>" |
|
| 54 | 54 | href="<?php echo $space->createUrl('/space/manage/image/crop'); ?>" |
| 55 | 55 | class="btn btn-info btn-sm" data-target="#globalModal" data-backdrop="static"><i |
| 56 | 56 | class="fa fa-edit"></i></a> |
| 57 | 57 | <?php |
| 58 | - echo humhub\widgets\ModalConfirm::widget(array( |
|
| 59 | - 'uniqueID' => 'modal_profileimagedelete', |
|
| 60 | - 'linkOutput' => 'a', |
|
| 61 | - 'title' => Yii::t('SpaceModule.widgets_views_deleteImage', '<strong>Confirm</strong> image deleting'), |
|
| 62 | - 'message' => Yii::t('SpaceModule.widgets_views_deleteImage', 'Do you really want to delete your profile image?'), |
|
| 63 | - 'buttonTrue' => Yii::t('SpaceModule.widgets_views_deleteImage', 'Delete'), |
|
| 64 | - 'buttonFalse' => Yii::t('SpaceModule.widgets_views_deleteImage', 'Cancel'), |
|
| 65 | - 'linkContent' => '<i class="fa fa-times"></i>', |
|
| 66 | - 'cssClass' => 'btn btn-danger btn-sm', |
|
| 67 | - 'style' => $space->getProfileImage()->hasImage() ? '' : 'display: none;', |
|
| 68 | - 'linkHref' => $space->createUrl("/space/manage/image/delete", array('type' => 'profile')), |
|
| 69 | - 'confirmJS' => 'function(jsonResp) { resetProfileImage(jsonResp); }' |
|
| 70 | - )); |
|
| 71 | - ?> |
|
| 58 | + echo humhub\widgets\ModalConfirm::widget(array( |
|
| 59 | + 'uniqueID' => 'modal_profileimagedelete', |
|
| 60 | + 'linkOutput' => 'a', |
|
| 61 | + 'title' => Yii::t('SpaceModule.widgets_views_deleteImage', '<strong>Confirm</strong> image deleting'), |
|
| 62 | + 'message' => Yii::t('SpaceModule.widgets_views_deleteImage', 'Do you really want to delete your profile image?'), |
|
| 63 | + 'buttonTrue' => Yii::t('SpaceModule.widgets_views_deleteImage', 'Delete'), |
|
| 64 | + 'buttonFalse' => Yii::t('SpaceModule.widgets_views_deleteImage', 'Cancel'), |
|
| 65 | + 'linkContent' => '<i class="fa fa-times"></i>', |
|
| 66 | + 'cssClass' => 'btn btn-danger btn-sm', |
|
| 67 | + 'style' => $space->getProfileImage()->hasImage() ? '' : 'display: none;', |
|
| 68 | + 'linkHref' => $space->createUrl("/space/manage/image/delete", array('type' => 'profile')), |
|
| 69 | + 'confirmJS' => 'function(jsonResp) { resetProfileImage(jsonResp); }' |
|
| 70 | + )); |
|
| 71 | + ?> |
|
| 72 | 72 | </div> |
| 73 | 73 | <?php endif; ?> |
| 74 | 74 | |
@@ -97,22 +97,22 @@ discard block |
||
| 97 | 97 | </div> |
| 98 | 98 | <div class="row no-margin p-v-sm b-b"> |
| 99 | 99 | <?php |
| 100 | - echo humhub\modules\space\widgets\HeaderControls::widget(['widgets' => [ |
|
| 101 | - [\humhub\modules\space\widgets\InviteButton::className(), ['space' => $space], ['sortOrder' => 10]], |
|
| 102 | - [\humhub\modules\space\widgets\MembershipButton::className(), ['space' => $space], ['sortOrder' => 20]], |
|
| 103 | - [\humhub\modules\space\widgets\FollowButton::className(), [ |
|
| 104 | - 'space' => $space, |
|
| 105 | - 'followOptions' => ['class' => 'btn btn-primary'], |
|
| 106 | - 'unfollowOptions' => ['class' => 'btn btn-info']], |
|
| 107 | - ['sortOrder' => 30]] |
|
| 108 | - ]]); |
|
| 109 | - ?> |
|
| 100 | + echo humhub\modules\space\widgets\HeaderControls::widget(['widgets' => [ |
|
| 101 | + [\humhub\modules\space\widgets\InviteButton::className(), ['space' => $space], ['sortOrder' => 10]], |
|
| 102 | + [\humhub\modules\space\widgets\MembershipButton::className(), ['space' => $space], ['sortOrder' => 20]], |
|
| 103 | + [\humhub\modules\space\widgets\FollowButton::className(), [ |
|
| 104 | + 'space' => $space, |
|
| 105 | + 'followOptions' => ['class' => 'btn btn-primary'], |
|
| 106 | + 'unfollowOptions' => ['class' => 'btn btn-info']], |
|
| 107 | + ['sortOrder' => 30]] |
|
| 108 | + ]]); |
|
| 109 | + ?> |
|
| 110 | 110 | <?= |
| 111 | - humhub\modules\space\widgets\HeaderControlsMenu::widget([ |
|
| 112 | - 'space' => $space, |
|
| 113 | - 'template' => '@humhub/widgets/views/dropdownNavigation' |
|
| 114 | - ]); |
|
| 115 | - ?> |
|
| 111 | + humhub\modules\space\widgets\HeaderControlsMenu::widget([ |
|
| 112 | + 'space' => $space, |
|
| 113 | + 'template' => '@humhub/widgets/views/dropdownNavigation' |
|
| 114 | + ]); |
|
| 115 | + ?> |
|
| 116 | 116 | </div> |
| 117 | 117 | |
| 118 | 118 | |
@@ -129,15 +129,15 @@ discard block |
||
| 129 | 129 | </form> |
| 130 | 130 | |
| 131 | 131 | <?php |
| 132 | - // set standard padding for banner progressbar |
|
| 133 | - $padding = '90px 350px'; |
|
| 132 | + // set standard padding for banner progressbar |
|
| 133 | + $padding = '90px 350px'; |
|
| 134 | 134 | |
| 135 | - // if the default banner image is displaying |
|
| 136 | - if (!$space->getProfileBannerImage()->hasImage()) { |
|
| 137 | - // change padding to the lower image height |
|
| 138 | - $padding = '50px 350px'; |
|
| 139 | - } |
|
| 140 | - ?> |
|
| 135 | + // if the default banner image is displaying |
|
| 136 | + if (!$space->getProfileBannerImage()->hasImage()) { |
|
| 137 | + // change padding to the lower image height |
|
| 138 | + $padding = '50px 350px'; |
|
| 139 | + } |
|
| 140 | + ?> |
|
| 141 | 141 | |
| 142 | 142 | <div class="image-upload-loader" id="banner-image-upload-loader" style="padding: <?php echo $padding ?>;"> |
| 143 | 143 | <div class="progress image-upload-progess-bar" id="banner-image-upload-bar"> |
@@ -155,29 +155,29 @@ discard block |
||
| 155 | 155 | <i class="fa fa-cloud-upload"></i> |
| 156 | 156 | </a> |
| 157 | 157 | <a id="banner-image-upload-edit-button" style="<?php |
| 158 | - if (!$space->getProfileBannerImage()->hasImage()) { |
|
| 159 | - echo 'display: none;'; |
|
| 160 | - } |
|
| 161 | - ?>" |
|
| 158 | + if (!$space->getProfileBannerImage()->hasImage()) { |
|
| 159 | + echo 'display: none;'; |
|
| 160 | + } |
|
| 161 | + ?>" |
|
| 162 | 162 | href="<?php echo $space->createUrl('/space/manage/image/crop-banner'); ?>" |
| 163 | 163 | class="btn btn-info btn-sm" data-target="#globalModal" data-backdrop="static"> |
| 164 | 164 | <i class="fa fa-edit"></i> |
| 165 | 165 | </a> |
| 166 | 166 | <?php |
| 167 | - echo humhub\widgets\ModalConfirm::widget(array( |
|
| 168 | - 'uniqueID' => 'modal_bannerimagedelete', |
|
| 169 | - 'linkOutput' => 'a', |
|
| 170 | - 'title' => Yii::t('SpaceModule.widgets_views_deleteBanner', '<strong>Confirm</strong> image deleting'), |
|
| 171 | - 'message' => Yii::t('SpaceModule.widgets_views_deleteBanner', 'Do you really want to delete your title image?'), |
|
| 172 | - 'buttonTrue' => Yii::t('SpaceModule.widgets_views_deleteBanner', 'Delete'), |
|
| 173 | - 'buttonFalse' => Yii::t('SpaceModule.widgets_views_deleteBanner', 'Cancel'), |
|
| 174 | - 'linkContent' => '<i class="fa fa-times"></i>', |
|
| 175 | - 'cssClass' => 'btn btn-danger btn-sm', |
|
| 176 | - 'style' => $space->getProfileBannerImage()->hasImage() ? '' : 'display: none;', |
|
| 177 | - 'linkHref' => $space->createUrl("/space/manage/image/delete", ['type' => 'banner']), |
|
| 178 | - 'confirmJS' => 'function(jsonResp) { resetProfileImage(jsonResp); }' |
|
| 179 | - )); |
|
| 180 | - ?> |
|
| 167 | + echo humhub\widgets\ModalConfirm::widget(array( |
|
| 168 | + 'uniqueID' => 'modal_bannerimagedelete', |
|
| 169 | + 'linkOutput' => 'a', |
|
| 170 | + 'title' => Yii::t('SpaceModule.widgets_views_deleteBanner', '<strong>Confirm</strong> image deleting'), |
|
| 171 | + 'message' => Yii::t('SpaceModule.widgets_views_deleteBanner', 'Do you really want to delete your title image?'), |
|
| 172 | + 'buttonTrue' => Yii::t('SpaceModule.widgets_views_deleteBanner', 'Delete'), |
|
| 173 | + 'buttonFalse' => Yii::t('SpaceModule.widgets_views_deleteBanner', 'Cancel'), |
|
| 174 | + 'linkContent' => '<i class="fa fa-times"></i>', |
|
| 175 | + 'cssClass' => 'btn btn-danger btn-sm', |
|
| 176 | + 'style' => $space->getProfileBannerImage()->hasImage() ? '' : 'display: none;', |
|
| 177 | + 'linkHref' => $space->createUrl("/space/manage/image/delete", ['type' => 'banner']), |
|
| 178 | + 'confirmJS' => 'function(jsonResp) { resetProfileImage(jsonResp); }' |
|
| 179 | + )); |
|
| 180 | + ?> |
|
| 181 | 181 | </div> |
| 182 | 182 | |
| 183 | 183 | <?php } ?> |
@@ -201,22 +201,22 @@ discard block |
||
| 201 | 201 | |
| 202 | 202 | <div class="controls controls-header pull-right"> |
| 203 | 203 | <?php |
| 204 | - echo humhub\modules\space\widgets\HeaderControls::widget(['widgets' => [ |
|
| 205 | - [\humhub\modules\space\widgets\InviteButton::className(), ['space' => $space], ['sortOrder' => 10]], |
|
| 206 | - [\humhub\modules\space\widgets\MembershipButton::className(), ['space' => $space], ['sortOrder' => 20]], |
|
| 207 | - [\humhub\modules\space\widgets\FollowButton::className(), [ |
|
| 208 | - 'space' => $space, |
|
| 209 | - 'followOptions' => ['class' => 'btn btn-primary'], |
|
| 210 | - 'unfollowOptions' => ['class' => 'btn btn-info']], |
|
| 211 | - ['sortOrder' => 30]] |
|
| 212 | - ]]); |
|
| 213 | - ?> |
|
| 204 | + echo humhub\modules\space\widgets\HeaderControls::widget(['widgets' => [ |
|
| 205 | + [\humhub\modules\space\widgets\InviteButton::className(), ['space' => $space], ['sortOrder' => 10]], |
|
| 206 | + [\humhub\modules\space\widgets\MembershipButton::className(), ['space' => $space], ['sortOrder' => 20]], |
|
| 207 | + [\humhub\modules\space\widgets\FollowButton::className(), [ |
|
| 208 | + 'space' => $space, |
|
| 209 | + 'followOptions' => ['class' => 'btn btn-primary'], |
|
| 210 | + 'unfollowOptions' => ['class' => 'btn btn-info']], |
|
| 211 | + ['sortOrder' => 30]] |
|
| 212 | + ]]); |
|
| 213 | + ?> |
|
| 214 | 214 | <?= |
| 215 | - humhub\modules\space\widgets\HeaderControlsMenu::widget([ |
|
| 216 | - 'space' => $space, |
|
| 217 | - 'template' => '@humhub/widgets/views/dropdownNavigation' |
|
| 218 | - ]); |
|
| 219 | - ?> |
|
| 215 | + humhub\modules\space\widgets\HeaderControlsMenu::widget([ |
|
| 216 | + 'space' => $space, |
|
| 217 | + 'template' => '@humhub/widgets/views/dropdownNavigation' |
|
| 218 | + ]); |
|
| 219 | + ?> |
|
| 220 | 220 | </div> |
| 221 | 221 | </div> |
| 222 | 222 | </div> |
@@ -22,8 +22,11 @@ |
||
| 22 | 22 | data-footer='<button type="button" class="btn btn-primary" data-dismiss="modal"><?php echo Yii::t('SpaceModule.widgets_views_profileHeader', 'Close'); ?></button>'> |
| 23 | 23 | <?php echo \humhub\modules\space\widgets\Image::widget(['space' => $space, 'width' => 64]); ?> |
| 24 | 24 | </a> |
| 25 | - <?php else : ?> |
|
| 26 | - <?php echo \humhub\modules\space\widgets\Image::widget(['space' => $space, 'width' => 64]); ?> |
|
| 25 | + <?php else { |
|
| 26 | + : ?> |
|
| 27 | + <?php echo \humhub\modules\space\widgets\Image::widget(['space' => $space, 'width' => 64]); |
|
| 28 | +} |
|
| 29 | +?> |
|
| 27 | 30 | <?php endif; ?> |
| 28 | 31 | |
| 29 | 32 | <!-- check if the current user is the profile owner and can change the images --> |
@@ -7,12 +7,15 @@ |
||
| 7 | 7 | <div class="modal-header"> |
| 8 | 8 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> |
| 9 | 9 | <h4 class="modal-title" id="myModalLabel"><?php |
| 10 | - if ($status == Membership::STATUS_INVITED) |
|
| 11 | - echo Yii::t('SpaceModule.views_space_statusInvite', 'User has been invited.'); |
|
| 12 | - if ($status == Membership::STATUS_MEMBER) |
|
| 13 | - echo Yii::t('SpaceModule.views_space_statusInvite', 'User has become a member.'); |
|
| 14 | - if (!$status) |
|
| 15 | - echo Yii::t('SpaceModule.views_space_statusInvite', 'User has not been invited.'); |
|
| 10 | + if ($status == Membership::STATUS_INVITED) { |
|
| 11 | + echo Yii::t('SpaceModule.views_space_statusInvite', 'User has been invited.'); |
|
| 12 | + } |
|
| 13 | + if ($status == Membership::STATUS_MEMBER) { |
|
| 14 | + echo Yii::t('SpaceModule.views_space_statusInvite', 'User has become a member.'); |
|
| 15 | + } |
|
| 16 | + if (!$status) { |
|
| 17 | + echo Yii::t('SpaceModule.views_space_statusInvite', 'User has not been invited.'); |
|
| 18 | + } |
|
| 16 | 19 | ?></h4> |
| 17 | 20 | </div> |
| 18 | 21 | <div class="modal-body text-center"> |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | <?php if ($linkOutput == 'button') { ?> |
| 31 | 31 | |
| 32 | 32 | <!-- create button element --> |
| 33 | - <button class="<?php echo $class; ?> <?php if ($tooltip != "") : ?>tt<?php endif;?>" style="<?php echo $style; ?>" |
|
| 33 | + <button class="<?php echo $class; ?> <?php if ($tooltip != "") : ?>tt<?php endif; ?>" style="<?php echo $style; ?>" |
|
| 34 | 34 | data-toggle="modal" data-target="#confirmModal_<?php echo $uniqueID; ?>" <?php echo $tooltip; ?>> |
| 35 | 35 | <?php echo $linkContent; ?> |
| 36 | 36 | </button> |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | <?php } else if ($linkOutput == 'a') { ?> |
| 39 | 39 | |
| 40 | 40 | <!-- create normal link element --> |
| 41 | - <a id="deleteLinkPost_<?php echo $uniqueID; ?>" class="<?php echo $class; ?> <?php if ($tooltip != "") : ?>tt<?php endif;?>" style="<?php echo $style; ?>" href="#" |
|
| 41 | + <a id="deleteLinkPost_<?php echo $uniqueID; ?>" class="<?php echo $class; ?> <?php if ($tooltip != "") : ?>tt<?php endif; ?>" style="<?php echo $style; ?>" href="#" |
|
| 42 | 42 | data-toggle="modal" data-target="#confirmModal_<?php echo $uniqueID; ?>" <?php echo $tooltip; ?>> |
| 43 | 43 | <?php echo $linkContent; ?> |
| 44 | 44 | </a> |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | var sortable = ui.item.closest('.<?php echo $containerClassName; ?>'); |
| 20 | 20 | var items = sortable.find('.<?php echo $sortableItemClassName; ?>'); |
| 21 | 21 | <?php foreach($additionalAjaxParams as $name => $value) { |
| 22 | - if($name != null && $name != '' && $value != null && $value != '') { ?> |
|
| 22 | + if($name != null && $name != '' && $value != null && $value != '') { ?> |
|
| 23 | 23 | data.<?php echo $name ?> = '<?php echo $value ?>'; |
| 24 | 24 | <?php } } ?> |
| 25 | 25 | data.items = []; |
@@ -18,8 +18,8 @@ |
||
| 18 | 18 | var data = {}; |
| 19 | 19 | var sortable = ui.item.closest('.<?php echo $containerClassName; ?>'); |
| 20 | 20 | var items = sortable.find('.<?php echo $sortableItemClassName; ?>'); |
| 21 | - <?php foreach($additionalAjaxParams as $name => $value) { |
|
| 22 | - if($name != null && $name != '' && $value != null && $value != '') { ?> |
|
| 21 | + <?php foreach ($additionalAjaxParams as $name => $value) { |
|
| 22 | + if ($name != null && $name != '' && $value != null && $value != '') { ?> |
|
| 23 | 23 | data.<?php echo $name ?> = '<?php echo $value ?>'; |
| 24 | 24 | <?php } } ?> |
| 25 | 25 | data.items = []; |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | <div class="list-group"> |
| 21 | 21 | <?php foreach ($items as $item) : ?> |
| 22 | 22 | <?php $item['htmlOptions']['class'] .= " list-group-item"; ?> |
| 23 | - <?php echo \yii\helpers\Html::a($item['icon']."<span>".$item['label']."</span>", $item['url'], $item['htmlOptions']); ?> |
|
| 23 | + <?php echo \yii\helpers\Html::a($item['icon'] . "<span>" . $item['label'] . "</span>", $item['url'], $item['htmlOptions']); ?> |
|
| 24 | 24 | <?php endforeach; ?> |
| 25 | 25 | </div> |
| 26 | 26 | <?php endforeach; ?> |
@@ -12,7 +12,10 @@ |
||
| 12 | 12 | <?php foreach ($this->context->getItemGroups() as $group) : ?> |
| 13 | 13 | |
| 14 | 14 | <?php $items = $this->context->getItems($group['id']); ?> |
| 15 | - <?php if (count($items) == 0) continue; ?> |
|
| 15 | + <?php if (count($items) == 0) { |
|
| 16 | + continue; |
|
| 17 | +} |
|
| 18 | +?> |
|
| 16 | 19 | |
| 17 | 20 | <?php if ($group['label'] != "") : ?> |
| 18 | 21 | <div class="panel-heading"><?php echo $group['label']; ?></div> |
@@ -9,7 +9,10 @@ |
||
| 9 | 9 | <?php foreach ($this->context->getItemGroups() as $group) : ?> |
| 10 | 10 | |
| 11 | 11 | <?php $items = $this->context->getItems($group['id']); ?> |
| 12 | - <?php if (count($items) == 0) continue; ?> |
|
| 12 | + <?php if (count($items) == 0) { |
|
| 13 | + continue; |
|
| 14 | +} |
|
| 15 | +?> |
|
| 13 | 16 | |
| 14 | 17 | <div class="btn-group dropdown-navigation"> |
| 15 | 18 | <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" |
@@ -21,10 +21,10 @@ |
||
| 21 | 21 | 'header' => 'Actions', |
| 22 | 22 | 'class' => 'yii\grid\ActionColumn', |
| 23 | 23 | 'buttons' => [ |
| 24 | - 'update' => function ($url, $model) { |
|
| 24 | + 'update' => function($url, $model) { |
|
| 25 | 25 | return Html::a('Accept', ['/friendship/request/add', 'userId' => $model->id], ['class' => 'btn btn-success btn-sm', 'data-method' => 'POST']); |
| 26 | 26 | }, |
| 27 | - 'view' => function () { |
|
| 27 | + 'view' => function() { |
|
| 28 | 28 | return; |
| 29 | 29 | }, |
| 30 | 30 | 'delete' => function($url, $model) { |
@@ -22,10 +22,10 @@ |
||
| 22 | 22 | 'header' => 'Actions', |
| 23 | 23 | 'class' => 'yii\grid\ActionColumn', |
| 24 | 24 | 'buttons' => [ |
| 25 | - 'update' => function () { |
|
| 25 | + 'update' => function() { |
|
| 26 | 26 | return; |
| 27 | 27 | }, |
| 28 | - 'view' => function () { |
|
| 28 | + 'view' => function() { |
|
| 29 | 29 | return; |
| 30 | 30 | }, |
| 31 | 31 | 'delete' => function($url, $model) { |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | - humhub\assets\TabbedFormAsset::register($this); |
|
| 2 | + humhub\assets\TabbedFormAsset::register($this); |
|
| 3 | 3 | ?> |
| 4 | 4 | |
| 5 | 5 | <div class="panel-heading"> |