aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorThomas Hackl <hackl@data-quest.de>2025-12-19 08:44:03 +0100
committerThomas Hackl <hackl@data-quest.de>2025-12-19 08:44:03 +0100
commit1c78a3b0a73e72d34714fa749aff293dbda6b4d2 (patch)
treea6638fb62ef5e672b0e326ebeb204e8f47afafeb /templates
parent4e8a808e1a3a0c6698afaacf50173051bcf1dcee (diff)
Resolve "Deeplinks und Definition von Kurz-URLs"
Closes #5896 Merge request studip/studip!4570
Diffstat (limited to 'templates')
-rw-r--r--templates/footer.php46
-rw-r--r--templates/header.php11
2 files changed, 38 insertions, 19 deletions
diff --git a/templates/footer.php b/templates/footer.php
index 37389c6..77c406a 100644
--- a/templates/footer.php
+++ b/templates/footer.php
@@ -1,33 +1,41 @@
<? if (PageLayout::isFooterEnabled()): ?>
-<!-- Beginn Footer -->
-<?= SkipLinks::addIndex(_('Fußzeile'), 'main-footer', 900, false) ?>
-<footer id="main-footer" aria-label="<?= _('Fußzeile') ?>">
-<? if (is_object($GLOBALS['user']) && $GLOBALS['user']->id != 'nobody') : ?>
- <div id="main-footer-info">
- <? printf(_('Sie sind angemeldet als %s (%s)'),
- htmlReady($GLOBALS['user']->username),
- htmlReady($GLOBALS['user']->perms)) ?>
- |
- <?= strftime('%x, %X') ?>
- </div>
-<? endif; ?>
-
+ <!-- Beginn Footer -->
+ <?php SkipLinks::addIndex(_('Fußzeile'), 'main-footer', 900, false) ?>
+ <footer id="main-footer" aria-label="<?= _('Fußzeile') ?>">
+ <? if (is_object($GLOBALS['user']) && $GLOBALS['user']->id != 'nobody') : ?>
+ <div id="main-footer-info">
+ <?= studip_interpolate(_('Sie sind angemeldet als %{username} (%{perms})'),
+ [
+ 'username' => htmlReady($GLOBALS['user']->username),
+ 'perms' =>htmlReady($GLOBALS['user']->perms)
+ ]
+ ); ?>
+ |
+ <?= strftime('%x, %X') ?>
+ </div>
+ <? endif ?>
<? if (Navigation::hasItem('/footer')): ?>
<nav id="main-footer-navigation" aria-label="<?= _('Fußzeilennavigation') ?>">
<ul>
+ <? if (is_object($GLOBALS['user']) && $GLOBALS['user']->id !== 'nobody') : ?>
+ <li>
+ <?= Studip\VueApp::create('short-urls/ShortUrlLink')
+ ->withProps(['isInContext' => Context::isCourse() && Context::get()->hasCourseSet()]) ?>
+ </li>
+ <? endif ?>
<? foreach (Navigation::getItem('/footer') as $nav): ?>
<? if ($nav->isVisible()): ?>
<li>
<a <? if (is_internal_url($url = $nav->getURL())): ?>
- href="<?= URLHelper::getLink($url, $link_params ?? null) ?>" <? else: ?>
- href="<?= htmlReady($url) ?>" target="_blank" rel="noopener noreferrer" <? endif ?>
+ href="<?= URLHelper::getLink($url, $link_params ?? null) ?>" <? else: ?>
+ href="<?= htmlReady($url) ?>" target="_blank" rel="noopener noreferrer" <? endif ?>
<?= arrayToHtmlAttributes($nav->getLinkAttributes()) ?>><?= htmlReady($nav->getTitle()) ?></a>
</li>
- <? endif; ?>
- <? endforeach; ?>
+ <? endif ?>
+ <? endforeach ?>
</ul>
</nav>
- <? endif; ?>
+ <? endif ?>
</footer>
-<? endif; ?>
+<? endif ?>
<!-- Ende Footer -->
diff --git a/templates/header.php b/templates/header.php
index 023a8c3..b4df4c4 100644
--- a/templates/header.php
+++ b/templates/header.php
@@ -172,6 +172,17 @@ if ($navigation) {
<? endif; ?>
<? endif; ?>
+
+ <li id="responsive-create-shortlink" class="hidden-small-up">
+ <a href="<?= URLHelper::getLink('dispatch.php/short_urls/create') ?>" id="responsive-create-shortlink-dummy">
+ <?= Icon::create('share', Icon::ROLE_INFO_ALT)->asSvg(24) ?>
+ </a>
+ <?= Studip\VueApp::create('short-urls/ShortUrlLink')
+ ->withProps([
+ 'isInContext' => Context::isCourse() && Context::get()->hasCourseSet(),
+ 'withIcon' => true
+ ]) ?>
+ </li>
<? else: ?>
<li>
<form method="post" action="<?= URLHelper::getLink(Request::url(), ['cancel_login' => null]) ?>">