cosmetic code review and typo
This commit is contained in:
parent
f2a5aa0179
commit
616175eef5
@ -111,7 +111,7 @@ class Config extends Process
|
||||
// pack_repository
|
||||
(new Para())->items([
|
||||
(new Label($check_repo . __('Path to repository:')))->for('pack_repository'),
|
||||
(new Input('pack_repository'))->class('maximal')->size(65)->maxlenght(255)->value($s->pack_repository),
|
||||
(new Input('pack_repository'))->class('maximal')->size(65)->maxlength(255)->value($s->pack_repository),
|
||||
]),
|
||||
(new Note())->class('form-note')->text(
|
||||
sprintf(
|
||||
@ -131,13 +131,13 @@ class Config extends Process
|
||||
// pack_filename
|
||||
(new Para())->items([
|
||||
(new Label($check_first . __('Name of exported package:')))->for('pack_filename'),
|
||||
(new Input('pack_filename'))->class('maximal')->size(65)->maxlenght(255)->value($s->pack_filename),
|
||||
(new Input('pack_filename'))->class('maximal')->size(65)->maxlength(255)->value($s->pack_filename),
|
||||
]),
|
||||
(new Note())->text(sprintf(__('Preconization: %s'), '%type%-%id%'))->class('form-note'),
|
||||
// secondpack_filename
|
||||
(new Para())->items([
|
||||
(new Label($check_second . __('Name of second exported package:')))->for('secondpack_filename'),
|
||||
(new Input('secondpack_filename'))->class('maximal')->size(65)->maxlenght(255)->value($s->secondpack_filename),
|
||||
(new Input('secondpack_filename'))->class('maximal')->size(65)->maxlength(255)->value($s->secondpack_filename),
|
||||
]),
|
||||
(new Note())->text(sprintf(__('Preconization: %s'), '%type%-%id%-%version%'))->class('form-note'),
|
||||
// pack_overwrite
|
||||
@ -150,7 +150,7 @@ class Config extends Process
|
||||
// pack_excludefiles
|
||||
(new Para())->items([
|
||||
(new Label(__('Extra files to exclude from package:')))->for('pack_excludefiles'),
|
||||
(new Input('pack_excludefiles'))->class('maximal')->size(65)->maxlenght(255)->value($s->pack_excludefiles),
|
||||
(new Input('pack_excludefiles'))->class('maximal')->size(65)->maxlength(255)->value($s->pack_excludefiles),
|
||||
]),
|
||||
(new Note())->text(sprintf(__('Preconization: %s'), '*.zip,*.tar,*.tar.gz'))->class('form-note'),
|
||||
// pack_nocomment
|
||||
|
@ -36,8 +36,8 @@ class My extends MyPlugin
|
||||
|
||||
public static function checkCustomContext(int $context): ?bool
|
||||
{
|
||||
// Limit to super admin
|
||||
return match ($context) {
|
||||
// Limit to super admin
|
||||
self::MODULE => App::auth()->isSuperAdmin(),
|
||||
default => null,
|
||||
};
|
||||
|
@ -13,31 +13,67 @@ namespace Dotclear\Plugin\pacKman;
|
||||
*/
|
||||
class Settings
|
||||
{
|
||||
// Remove comments from files
|
||||
/**
|
||||
* Remove comments from files.
|
||||
*
|
||||
* @var bool $pack_nocomment
|
||||
*/
|
||||
public readonly bool $pack_nocomment;
|
||||
|
||||
// Remove comments from files
|
||||
/**
|
||||
* Remove comments from files.
|
||||
*
|
||||
* @var bool $pack_fixnewline
|
||||
*/
|
||||
public readonly bool $pack_fixnewline;
|
||||
|
||||
// Overwrite existing package
|
||||
/**
|
||||
* Overwrite existing package.
|
||||
*
|
||||
* @var bool $pack_overwrite
|
||||
*/
|
||||
public readonly bool $pack_overwrite;
|
||||
|
||||
// Name of package
|
||||
/**
|
||||
* Name of package.
|
||||
*
|
||||
* @var string $pack_filename
|
||||
*/
|
||||
public readonly string $pack_filename;
|
||||
|
||||
// Name of second package
|
||||
/**
|
||||
* Name of second package.
|
||||
*
|
||||
* @var string $secondpack_filename
|
||||
*/
|
||||
public readonly string $secondpack_filename;
|
||||
|
||||
// Path to package repository
|
||||
/**
|
||||
* Path to package repository.
|
||||
*
|
||||
* @var string $pack_repository
|
||||
*/
|
||||
public readonly string $pack_repository;
|
||||
|
||||
// Seperate themes and plugins repository
|
||||
/**
|
||||
* Seperate themes and plugins repository.
|
||||
*
|
||||
* @var bool $pack_typedrepo
|
||||
*/
|
||||
public readonly bool $pack_typedrepo;
|
||||
|
||||
// Extra files to exclude from package
|
||||
/**
|
||||
* Extra files to exclude from package.
|
||||
*
|
||||
* @var string $pack_excludefiles
|
||||
*/
|
||||
public readonly string $pack_excludefiles;
|
||||
|
||||
// Hide distributed modules from lists
|
||||
/**
|
||||
* Hide distributed modules from lists.
|
||||
*
|
||||
* @var bool $hide_distrib
|
||||
*/
|
||||
public readonly bool $hide_distrib;
|
||||
|
||||
/**
|
||||
|
@ -98,7 +98,7 @@ class Utils
|
||||
/**
|
||||
* Get modules list form.
|
||||
*
|
||||
* @param array<int,ModuleDefine> $modules The modules
|
||||
* @param array<int|string, mixed> $modules The modules
|
||||
* @param string $type The modules type
|
||||
* @param string $title The list title
|
||||
*
|
||||
@ -116,6 +116,9 @@ class Utils
|
||||
$tbody = [];
|
||||
self::sort($modules);
|
||||
foreach ($modules as $module) {
|
||||
if (!is_a($module, ModuleDefine::class)) {
|
||||
continue;
|
||||
}
|
||||
$tbody[] = (new Para(null, 'tr'))
|
||||
->class('line')
|
||||
->items([
|
||||
|
Loading…
Reference in New Issue
Block a user