Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions Events.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
namespace humhub\modules\mail;

use humhub\commands\IntegrityController;
use humhub\helpers\ControllerHelper;
use humhub\modules\mail\helpers\Url;
use humhub\modules\mail\models\Config;
use humhub\modules\mail\models\Message;
Expand All @@ -22,6 +23,7 @@
use humhub\modules\ui\menu\MenuLink;
use humhub\modules\user\widgets\HeaderControlsMenu;
use humhub\widgets\MetaSearchWidget;
use humhub\widgets\TopMenu;
use Yii;

/**
Expand Down Expand Up @@ -156,16 +158,19 @@ public static function onTopMenuInit($event)
return;
}

/* @var TopMenu $menu */
$menu = $event->sender;

$module = Config::getModule();
// See https://github.com/humhub/humhub-modules-mail/issues/201
if (method_exists($module, 'hideInTopNav') && !$module->hideInTopNav()) {
$event->sender->addItem([
$menu->addEntry(new MenuLink([
'label' => Yii::t('MailModule.base', 'Messages'),
'url' => Url::toMessenger(),
'icon' => '<i class="fa fa-envelope"></i>',
'isActive' => (Yii::$app->controller->module && Yii::$app->controller->module->id == 'mail'),
'icon' => 'envelope',
'isActive' => ControllerHelper::isActivePath('mail'),
'sortOrder' => 300,
]);
]));
}
} catch (\Throwable $e) {
Yii::error($e);
Expand All @@ -179,7 +184,7 @@ public static function onNotificationAddonInit($event)
return;
}

$event->sender->addWidget(NotificationInbox::className(), [], ['sortOrder' => 90]);
$event->sender->addWidget(NotificationInbox::class, [], ['sortOrder' => 90]);
} catch (\Throwable $e) {
Yii::error($e);
}
Expand Down
3 changes: 1 addition & 2 deletions controllers/ConfigController.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@

namespace humhub\modules\mail\controllers;

use Yii;
use humhub\modules\mail\models\Config;
use humhub\models\Setting;
use Yii;

/**
* ConfigController handles the configuration requests.
Expand Down
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Changelog
=========

3.4.0 (Unreleased)
------------------
- Enh #483: Update for HumHub 1.19

3.3.9 (Unreleased)
-----------------------
- Enh #68: Make "subject" optional
Expand Down
4 changes: 2 additions & 2 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"messenger",
"communication"
],
"version": "3.3.9",
"version": "3.4.0",
"humhub": {
"minVersion": "1.18.0-beta.6"
"minVersion": "1.19"
},
"homepage": "https://github.com/humhub/mail",
"authors": [
Expand Down
1 change: 0 additions & 1 deletion widgets/ConversationStateBadge.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
use humhub\helpers\Html;
use humhub\modules\mail\models\AbstractMessageEntry;
use humhub\modules\mail\models\MessageEntry;
use humhub\modules\user\models\User;
use Yii;

/**
Expand Down
1 change: 0 additions & 1 deletion widgets/ConversationView.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

namespace humhub\modules\mail\widgets;

use Yii;
use humhub\widgets\JsWidget;
use humhub\modules\mail\helpers\Url;

Expand Down
20 changes: 0 additions & 20 deletions widgets/ManageTagsLink.php

This file was deleted.

12 changes: 0 additions & 12 deletions widgets/Notifications.php

This file was deleted.

2 changes: 1 addition & 1 deletion widgets/ParticipantUserList.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function run()
return '';
}

return Link::asLink($userList)->action('ui.modal.load', Url::toConversationUserList($this->message));
return Link::to($userList)->action('ui.modal.load', Url::toConversationUserList($this->message));
}

private function renderUserList(): string
Expand Down
7 changes: 5 additions & 2 deletions widgets/views/inboxFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

use humhub\components\View;
use humhub\helpers\Html;
use humhub\modules\mail\helpers\Url;
use humhub\modules\mail\models\forms\InboxFilterForm;
use humhub\modules\mail\widgets\ConversationTagPicker;
use humhub\modules\mail\widgets\ManageTagsLink;
use humhub\modules\ui\filter\widgets\PickerFilterInput;
use humhub\modules\ui\filter\widgets\TextFilterInput;
use humhub\modules\user\widgets\UserPickerField;
Expand Down Expand Up @@ -52,7 +52,10 @@
'pickerOptions' => ['id' => 'inbox-tag-picker', 'name' => 'tags', 'placeholder' => Yii::t('MailModule.base', 'Tags'), 'placeholderMore' => Yii::t('MailModule.base', 'Tags')]]) ?>

<small>
<?= ManageTagsLink::widget() ?>
<?= Link::to(Yii::t('MailModule.base', 'Manage Tags'), Url::toManageTags())
->icon('gear')
->right()
->cssClass('manage-tags-link') ?>
</small>
</div>
<?php ActiveForm::end() ?>
Expand Down