diff options
| author | Thomas Hackl <hackl@data-quest.de> | 2025-11-25 11:58:42 +0100 |
|---|---|---|
| committer | Thomas Hackl <hackl@data-quest.de> | 2025-11-25 11:58:42 +0100 |
| commit | f5539ca0dace099b495b0b03fb50de16a0a73930 (patch) | |
| tree | 95225ca6f748d905642f37ea0a373ec27805df54 /app/views | |
| parent | 04db48dbe7a41068ec004d39be480d9b1c61b120 (diff) | |
Resolve "Root Assistent: Optionen direkt bearbeiten können"
Closes #5777
Merge request studip/studip!4577
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/admin/configuration/edit_configuration.php | 4 | ||||
| -rw-r--r-- | app/views/root_assistant/index.php | 28 |
2 files changed, 25 insertions, 7 deletions
diff --git a/app/views/admin/configuration/edit_configuration.php b/app/views/admin/configuration/edit_configuration.php index 6d8354f..aad38b2 100644 --- a/app/views/admin/configuration/edit_configuration.php +++ b/app/views/admin/configuration/edit_configuration.php @@ -3,6 +3,7 @@ * @var Admin_ConfigurationController $controller * @var array $config * @var array $allconfigs + * @var bool $from_root_assi */ ?> <form action="<?= $controller->link_for('admin/configuration/edit_configuration', ['field' => $config['field']]) ?>" @@ -62,6 +63,9 @@ </label> </div> </fieldset> + <? if ($from_root_assi): ?> + <input type="hidden" name="from_root_assi" value="1"> + <? endif ?> <footer data-dialog-button> <?= Studip\Button::createAccept(_('Übernehmen')) ?> <?= Studip\LinkButton::createCancel( diff --git a/app/views/root_assistant/index.php b/app/views/root_assistant/index.php index 3b3e14c..c9b6c71 100644 --- a/app/views/root_assistant/index.php +++ b/app/views/root_assistant/index.php @@ -39,7 +39,10 @@ <section> <table class="default"> <colgroup> - <col style="width: 30%"> + <col> + <col> + <col> + <col> <col> </colgroup> <thead> @@ -48,28 +51,29 @@ <th><?= _('Typ') ?></th> <th><?= _('Beschreibung') ?></th> <th><?= _('Aktueller Wert') ?></th> + <th></th> </tr> </thead> <tbody> - <? foreach ($configurations as $configuration) : ?> + <? foreach ($configurations as $configuration) : $field = $configuration->field; ?> <tr> - <td><?= htmlReady($configuration->field) ?></td> + <td><?= htmlReady($field) ?></td> <td><?= htmlReady($configuration->type) ?></td> <td><?= mb_strlen($configuration->description) > 120 ? htmlReady(mb_substr($configuration->description, 0, 120)) - . '...' . tooltip2($configuration->description) + . '...' . tooltip2($configuration->description)['title'] : htmlReady($configuration->description) ?></td> <td> <? switch ($configuration->type) { case 'string': case 'i18n': - echo htmlReady($configuration->value); + echo htmlReady(Config::get()->getValue($field)); break; case 'integer': - echo (int) $configuration->value; + echo (int) Config::get()->getValue($field); break; case 'boolean': - echo $configuration->value + echo Config::get()->getValue($field) ? Icon::create('accept', Icon::ROLE_STATUS_GREEN, ['title' => _('TRUE')]) : Icon::create('decline', Icon::ROLE_STATUS_RED, @@ -77,6 +81,16 @@ break; } ?> </td> + <td> + <a href="<?= URLHelper::getLink( + 'dispatch.php/admin/configuration/edit_configuration', + ['field' => $configuration->field, 'from_root_assi' => 1]) ?>" + title="<?= _('Diesen Eintrag bearbeiten') ?>?>" + data-dialog="size=auto" + > + <?= Icon::create('edit') ?> + </a> + </td> </tr> <? endforeach ?> </tbody> |
