Skip to content
Merged
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
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Changelog
0.17.1 - (Unreleased)
------------------------
- Enh #255: Improved Module Test GitHub Actions
- Fix #256: Missing icon in Context Menu (File handler) and wrong styling in files context menu

0.17.0 - August 29, 2025
------------------------
Expand Down
11 changes: 7 additions & 4 deletions models/ZipImportHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,25 @@

namespace humhub\modules\cfiles\models;

use Yii;
use humhub\modules\file\handler\BaseFileHandler;
use humhub\modules\ui\icon\widgets\Icon;
use Yii;

class ZipImportHandler extends BaseFileHandler
{
public string $icon = 'file-archive-o';

/**
* The file handler link
*
* @see \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
* @see \humhub\modules\file\widgets\FileHandlerButtonDropdown
* @return array the HTML attributes of the button.
* @see \humhub\modules\file\widgets\FileHandlerButtonDropdown
* @see \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
*/
public function getLinkAttributes()
{
return [
'label' => Yii::t('CfilesModule.base', 'Import Zip'),
'label' => Icon::get($this->icon) . Yii::t('CfilesModule.base', 'Import Zip'),
'data-action-click' => 'file.upload',
'data-action-target' => '#cfilesUploadZipFile',
];
Expand Down
5 changes: 4 additions & 1 deletion widgets/FileListContextMenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,10 @@ private function addMenu(string $label, string $action, string $icon, int $sortO
'url' => '#',
'icon' => $icon,
'sortOrder' => $sortOrder,
'htmlOptions' => ['data-action' => $action],
'htmlOptions' => [
'data-action' => $action,
'class' => 'link dropdown-item',
],
]));
}

Expand Down