Skip to content

Commit

Permalink
Fix for assets
Browse files Browse the repository at this point in the history
Fixing issue with asset not being loaded.

Co-Authored-By: Yuriy Bakhtin <[email protected]>
  • Loading branch information
mbumpalumpa and yurabakhtin committed Nov 14, 2024
1 parent 250edbe commit f046db0
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 7 deletions.
33 changes: 33 additions & 0 deletions assets/Assets.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2015 HumHub GmbH & Co. KG
* @license https://www.humhub.com/licences
*/

namespace humhub\modules\linklist\assets;

use yii\web\AssetBundle;

class Assets extends AssetBundle
{
/**
* @inheritdoc
*/
public $sourcePath = '@linklist/resources';

/**
* @inheritdoc
*/
public $css = [
'linklist.css',
];

/**
* @inheritdoc
*/
public $js = [
'linklist.js',
];
}
2 changes: 1 addition & 1 deletion views/linklist/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use humhub\modules\ui\form\widgets\ActiveForm;
use yii\helpers\Html;

humhub\modules\linklist\Assets::register($this);
humhub\modules\linklist\assets\Assets::register($this);

?>

Expand Down
4 changes: 2 additions & 2 deletions views/linklist/editCategory.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @author Sebastian Stumpf
*
*/
humhub\modules\linklist\Assets::register($this);
humhub\modules\linklist\assets\Assets::register($this);

use humhub\modules\ui\form\widgets\ActiveForm;
use yii\helpers\Html;
Expand Down Expand Up @@ -42,4 +42,4 @@

<?php $form::end(); ?>
</div>
</div>
</div>
4 changes: 2 additions & 2 deletions views/linklist/editLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @author Sebastian Stumpf
*
*/
humhub\modules\linklist\Assets::register($this);
humhub\modules\linklist\assets\Assets::register($this);

use humhub\modules\ui\form\widgets\ActiveForm;
use yii\helpers\Html;
Expand Down Expand Up @@ -46,4 +46,4 @@

<?php $form::end(); ?>
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion views/linklist/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
/* @var Link[] $links */
/* @var int $accessLevel */

humhub\modules\linklist\Assets::register($this);
humhub\modules\linklist\assets\Assets::register($this);
?>
<div class="panel panel-default">
<div class="panel-body">
Expand Down
2 changes: 1 addition & 1 deletion widgets/views/linklistPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

use humhub\libs\Html;

humhub\modules\linklist\Assets::register($this);
humhub\modules\linklist\assets\Assets::register($this);
?>
<div class="panel panel-default panel-linklist-widget">
<div class="panel-heading">
Expand Down

0 comments on commit f046db0

Please sign in to comment.