Skip to content

Commit

Permalink
Fix #523: Global calendar: display the "My profile" filter only when …
Browse files Browse the repository at this point in the history
…the module is enabled in for the User account
  • Loading branch information
marc-farre committed Jan 22, 2025
1 parent cb4af93 commit 7256594
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Changelog
=========

1.7.2 (Unreleased)
------------------------
- Fix #523: Global calendar: display the "My profile" filter only when the module is enabled in for the User account

1.7.1 (January 17, 2025)
------------------------
- Fix #521: Fix global calendar url
Expand Down
2 changes: 1 addition & 1 deletion module.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Calendar",
"description": "Create one-time or recurring events, invite and manage attendees, and keep track of all your events with the Calendar module.",
"keywords": ["calendar"],
"version": "1.7.1",
"version": "1.7.2",
"humhub": {
"minVersion": "1.17.0-beta.2"
},
Expand Down
18 changes: 10 additions & 8 deletions widgets/views/calendarFilterBar.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,16 @@
<?= Yii::t('CalendarModule.views', 'Select calendars') ?>
</div>
<div style="display:inline-block; float:left;margin-right:10px;">
<div class="checkbox">
<label class="calendar_my_profile">
<input type="checkbox" name="selector" class="selectorCheckbox"
value="<?= ActiveQueryContent::USER_RELATED_SCOPE_OWN_PROFILE; ?>"
<?php if (in_array(ActiveQueryContent::USER_RELATED_SCOPE_OWN_PROFILE, $selectors)): ?>checked="checked"<?php endif; ?>>
<?= Yii::t('CalendarModule.views', 'My profile'); ?>
</label>
</div>
<?php if (Yii::$app->user->identity->moduleManager->isEnabled('calendar')): ?>
<div class="checkbox">
<label class="calendar_my_profile">
<input type="checkbox" name="selector" class="selectorCheckbox"
value="<?= ActiveQueryContent::USER_RELATED_SCOPE_OWN_PROFILE; ?>"
<?php if (in_array(ActiveQueryContent::USER_RELATED_SCOPE_OWN_PROFILE, $selectors)): ?>checked="checked"<?php endif; ?>>
<?= Yii::t('CalendarModule.views', 'My profile'); ?>
</label>
</div>
<?php endif; ?>
<div class="checkbox">
<label class="calendar_my_spaces">
<input type="checkbox" name="selector" class="selectorCheckbox"
Expand Down

0 comments on commit 7256594

Please sign in to comment.