diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2023-02-14 08:58:09 +0000 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2023-02-14 08:58:09 +0000 |
| commit | e3f61de1f8d1188e233ca5d0e6a6bd3728f8cd4b (patch) | |
| tree | e60d368788520758ff98f299d031998c059ce2c2 /templates | |
| parent | 31a81f952474b392102241326ce6b7d55414cb78 (diff) | |
fix display of portal plugins for nobody and set function as deprecated, fixes #2051
Closes #2051
Merge request studip/studip!1330
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/index_nobody.php | 22 | ||||
| -rw-r--r-- | templates/shared/index_box.php | 24 |
2 files changed, 33 insertions, 13 deletions
diff --git a/templates/index_nobody.php b/templates/index_nobody.php index b922822..c528d47 100644 --- a/templates/index_nobody.php +++ b/templates/index_nobody.php @@ -1,5 +1,11 @@ <?php -# Lifter010: TODO +/** + * @var int $num_active_courses + * @var int $num_registered_users + * @var int $num_online_users + * @var bool $logout + * @var string[] $plugin_contents + */ // Get background images (this should be resolved differently since mobile // browsers might still download the desktop background) @@ -18,9 +24,9 @@ if ($bg_mobile) { ?> <!-- Startseite (nicht eingeloggt) --> <main id="content"> - <? if (!empty($logout)) : ?> - <?= MessageBox::success(_('Sie sind nun aus dem System abgemeldet.'), array_filter([$GLOBALS['UNI_LOGOUT_ADD']])) ?> - <? endif; ?> +<? if ($logout): ?> + <?= MessageBox::success(_('Sie sind nun aus dem System abgemeldet.'), array_filter([$GLOBALS['UNI_LOGOUT_ADD']])) ?> +<? endif; ?> <div id="background-desktop" style="background: url(<?= $bg_desktop ?>) no-repeat top left/cover;"></div> <div id="background-mobile" style="background: url(<?= $bg_mobile ?>) no-repeat top left/cover;"></div> @@ -103,4 +109,12 @@ if ($bg_mobile) { </div> </footer> </article> + +<? if (count($plugin_contents) > 0): ?> + <div id="login-plugin-contents"> + <? foreach ($plugin_contents as $content): ?> + <?= $content ?> + <? endforeach; ?> + </div> +<? endif; ?> </main> diff --git a/templates/shared/index_box.php b/templates/shared/index_box.php index 3e93488..3430056 100644 --- a/templates/shared/index_box.php +++ b/templates/shared/index_box.php @@ -1,9 +1,13 @@ -<? -# Lifter010: TODO +<?php +/** + * @var string $content_for_layout + * @var string|null $icon_url + * @var string $title + * @var string|null $admin_url + * @var string|null $admin_title + */ ?> <? if ($content_for_layout != ''): ?> - <? if (!isset($admin_title)) $admin_title = _('Administration') ?> - <table class="index_box"> <tr> <td class="table_header_bold" style="font-weight: bold;"> @@ -14,11 +18,13 @@ </td> <td class="table_header_bold" style="text-align: right;"> - <? if (isset($admin_url)): ?> - <a href="<?= URLHelper::getLink($admin_url) ?>" title="<?= htmlReady($admin_title) ?>"> - <?= Icon::create('admin', 'info_alt')->asImg(16, ["alt" => htmlReady($admin_title)]) ?> - </a> - <? endif ?> + <? if (isset($admin_url)): ?> + <a href="<?= URLHelper::getLink($admin_url) ?>" title="<?= htmlReady($admin_title ?? _('Administration')) ?>"> + <?= Icon::create('admin', Icon::ROLE_INFO_ALT)->asImg([ + 'alt' => $admin_title ?? ('Administration'), + ]) ?> + </a> + <? endif ?> </td> </tr> |
