-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #68 from humhub/enh/67-activity-wording
Update text for activity and notification of shared contents
- Loading branch information
Showing
18 changed files
with
140 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
/** | ||
* @link https://www.humhub.org/ | ||
* @copyright Copyright (c) HumHub GmbH & Co. KG | ||
* @license https://www.humhub.com/licences | ||
*/ | ||
|
||
namespace humhub\modules\sharebetween\activities; | ||
|
||
use humhub\modules\content\activities\ContentCreated; | ||
|
||
class SharedContentCreated extends ContentCreated | ||
{ | ||
/** | ||
* @inheritdoc | ||
*/ | ||
public $viewName = 'shared'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
/** | ||
* @link https://www.humhub.org/ | ||
* @copyright Copyright (c) HumHub GmbH & Co. KG | ||
* @license https://www.humhub.com/licences | ||
*/ | ||
|
||
use humhub\modules\sharebetween\models\Share; | ||
use humhub\modules\user\models\User; | ||
use yii\helpers\Html; | ||
|
||
/* @var User $originator */ | ||
/* @var Share $source */ | ||
|
||
echo Yii::t('SharebetweenModule.base', '{user} shared something interesting from Space {space}.', [ | ||
'{user}' => '<strong>' . Html::encode($originator->displayName) . '</strong>', | ||
'{space}' => '<strong>' . Html::encode($source->sharedContent->container->displayName) . '</strong>', | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php | ||
|
||
/** | ||
* @link https://www.humhub.org/ | ||
* @copyright Copyright (c) 2023 HumHub GmbH & Co. KG | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,21 @@ | ||
<?php | ||
|
||
use humhub\modules\activity\models\Activity; | ||
use humhub\modules\content\components\ContentActiveRecord; | ||
use humhub\modules\content\models\Content; | ||
use humhub\modules\content\widgets\WallEntryLinks; | ||
use humhub\modules\notification\models\Notification; | ||
use humhub\modules\sharebetween\Events; | ||
|
||
return [ | ||
'id' => 'sharebetween', | ||
'class' => 'humhub\modules\sharebetween\Module', | ||
'namespace' => 'humhub\modules\sharebetween', | ||
'events' => [ | ||
[Content::class, Content::EVENT_AFTER_SOFT_DELETE, ['humhub\modules\sharebetween\Events', 'onContentAfterSoftDelete']], | ||
[ContentActiveRecord::class, ContentActiveRecord::EVENT_BEFORE_DELETE, ['humhub\modules\sharebetween\Events', 'onContentDelete']], | ||
[WallEntryLinks::class, WallEntryLinks::EVENT_INIT, ['humhub\modules\sharebetween\Events', 'onWallEntryLinksInit']], | ||
[Content::class, Content::EVENT_AFTER_SOFT_DELETE, [Events::class, 'onContentAfterSoftDelete']], | ||
[ContentActiveRecord::class, ContentActiveRecord::EVENT_BEFORE_DELETE, [Events::class, 'onContentDelete']], | ||
[WallEntryLinks::class, WallEntryLinks::EVENT_INIT, [Events::class, 'onWallEntryLinksInit']], | ||
[Activity::class, Activity::EVENT_AFTER_FIND, [Events::class, 'onActivityAfterFind']], | ||
[Notification::class, Notification::EVENT_AFTER_FIND, [Events::class, 'onNotificationAfterFind']], | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
/** | ||
* @link https://www.humhub.org/ | ||
* @copyright Copyright (c) HumHub GmbH & Co. KG | ||
* @license https://www.humhub.com/licences | ||
*/ | ||
|
||
namespace humhub\modules\sharebetween\notifications; | ||
|
||
use humhub\modules\content\notifications\ContentCreated; | ||
use humhub\modules\sharebetween\models\Share; | ||
use Yii; | ||
use yii\bootstrap\Html; | ||
|
||
class SharedContentCreated extends ContentCreated | ||
{ | ||
/** | ||
* @inheritdoc | ||
* @var Share | ||
*/ | ||
public $source; | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public function html() | ||
{ | ||
return Yii::t('SharebetweenModule.base', '{user} shared something interesting from Space {space}.', [ | ||
'user' => Html::tag('strong', Html::encode($this->originator->displayName)), | ||
'space' => Html::tag('strong', Html::encode($this->source->sharedContent->container->displayName)), | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php | ||
|
||
/** | ||
* @link https://www.humhub.org/ | ||
* @copyright Copyright (c) 2015 HumHub GmbH & Co. KG | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php | ||
|
||
/** | ||
* @link https://www.humhub.org/ | ||
* @copyright Copyright (c) 2023 HumHub GmbH & Co. KG | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php | ||
|
||
/** | ||
* @link https://www.humhub.org/ | ||
* @copyright Copyright (c) 2023 HumHub GmbH & Co. KG | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters