Skip to content

Commit f567df6

Browse files
committed
Migration to Bootstrap 5 for HumHub 1.18
1 parent a714143 commit f567df6

File tree

11 files changed

+29
-46
lines changed

11 files changed

+29
-46
lines changed

.github/workflows/php-test-master.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

assets/Assets.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace acmeCorp\humhub\modules\exampleBasic\assets;
44

5-
use yii\web\AssetBundle;
5+
use humhub\components\assets\AssetBundle;
66

77
class Assets extends AssetBundle
88
{
@@ -14,11 +14,9 @@ class Assets extends AssetBundle
1414
/**
1515
* @inheritdoc
1616
*/
17-
public $publishOptions = [
18-
// TIPP: Change forceCopy to true when testing your js in order to rebuild
19-
// this assets on every request (otherwise they will be cached)
20-
'forceCopy' => false,
21-
];
17+
// TIP: Change forceCopy to true when testing your js in order to rebuild
18+
// this assets on every request (otherwise they will be cached)
19+
public $forceCopy = false;
2220

2321
/**
2422
* @inheritdoc

docs/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Changelog
22
=========
33

4+
1.1.0 (Unreleased)
5+
----------------------
6+
- Enh #12: Migration to Bootstrap 5 for HumHub 1.18
7+
48
1.0.2 (Unreleased)
59
----------------------
610
- Enh #5: Add `requirements.php`

module.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"description": "A very basic module example",
55
"keywords": [
66
],
7-
"version": "1.0.2",
7+
"version": "1.1.0",
88
"humhub": {
9-
"minVersion": "1.2"
9+
"minVersion": "1.18"
1010
},
1111
"screenshots": ["resources/screen1.jpg"]
1212
}

tests/codeception.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,11 @@ settings:
1313
backup_globals: true
1414
paths:
1515
tests: codeception
16-
log: codeception/_output
16+
output: codeception/_output
1717
data: codeception/_data
1818
helpers: codeception/_support
1919
envs: ../../../humhub/tests/config/env
2020
config:
2121
# the entry script URL (with host info) for functional and acceptance tests
2222
# PLEASE ADJUST IT TO THE ACTUAL ENTRY SCRIPT URL
2323
test_entry_url: http://localhost:8080/index-test.php
24-

tests/codeception/acceptance.suite.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
# RUN `build` COMMAND AFTER ADDING/REMOVING MODULES.
1010

11-
class_name: AcceptanceTester
11+
actor: AcceptanceTester
1212
modules:
1313
enabled:
1414
- WebDriver
@@ -19,4 +19,4 @@ modules:
1919
url: 'http://localhost:8080/'
2020
browser: chrome
2121
restart: true
22-
port: 4444
22+
port: 4444

tests/codeception/functional.suite.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# (tip: better to use with frameworks).
66

77
# RUN `build` COMMAND AFTER ADDING/REMOVING MODULES.
8-
class_name: FunctionalTester
8+
actor: FunctionalTester
99
modules:
1010
enabled:
1111
- Filesystem
@@ -15,4 +15,4 @@ modules:
1515
- tests\codeception\_support\HumHubHelper
1616
config:
1717
Yii2:
18-
configFile: 'codeception/config/functional.php'
18+
configFile: 'codeception/config/functional.php'

tests/codeception/unit.suite.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# suite for unit (internal) tests.
44
# RUN `build` COMMAND AFTER ADDING/REMOVING MODULES.
55

6-
class_name: UnitTester
6+
actor: UnitTester
77
modules:
88
enabled:
99
- tests\codeception\_support\CodeHelper

views/index/index.php

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
<?php
22

3-
/* @var $this \humhub\modules\ui\view\components\View */
3+
/* @var $this View */
44

55
use acmeCorp\humhub\modules\exampleBasic\assets\Assets;
6-
use humhub\widgets\Button;
6+
use humhub\components\View;
7+
use humhub\widgets\bootstrap\Alert;
8+
use humhub\widgets\bootstrap\Button;
79

810
// Register our module assets, this could also be done within the controller
911
Assets::register($this);
@@ -21,7 +23,7 @@
2123

2224
<div class="container">
2325
<div class="row">
24-
<div class="col-md-8">
26+
<div class="col-lg-8">
2527
<div class="panel panel-default">
2628
<div class="panel-heading">
2729
<strong>Example-basic</strong> <?= Yii::t('ExampleBasicModule.base', 'overview') ?></div>
@@ -303,27 +305,19 @@
303305
<div class="panel-heading">Panel-Heading: Bootstrap Elements</div>
304306
<div class="panel-body">
305307

306-
<div class="alert alert-warning">
307-
Warning Alert
308-
</div>
308+
<?= Alert::warning('Warning Alert') ?>
309309

310-
<div class="alert alert-info">
311-
Info Alert
312-
</div>
310+
<?= Alert::info('Info Alert') ?>
313311

314-
<div class="alert alert-success">
315-
Success Alert
316-
</div>
312+
<?= Alert::success('Success Alert') ?>
317313

318-
<div class="alert alert-danger">
319-
Danger Alert
320-
</div>
314+
<?= Alert::danger('Danger Alert')->closeButton(false) ?>
321315

322316
</div>
323317
</div>
324318
</div>
325319

326-
<div class="col-md-4">
320+
<div class="col-lg-4">
327321
<div class="panel panel-default">
328322
<div class="panel-heading"><strong>Example</strong> basic</div>
329323
<div class="panel-body">
@@ -335,5 +329,3 @@
335329

336330
</div>
337331
</div>
338-
339-

0 commit comments

Comments
 (0)