diff options
| author | Thomas Hackl <hackl@data-quest.de> | 2022-10-19 14:29:53 +0000 |
|---|---|---|
| committer | Thomas Hackl <hackl@data-quest.de> | 2022-10-19 14:29:53 +0000 |
| commit | 2167eb75a29b0ae0f8199652fae85b273ec627e5 (patch) | |
| tree | 8e0cc55f36616ec0e03a2b58c01ed7ffef91b487 /templates/sidebar | |
| parent | 258732f52a2f157704e089ba365b42e9555f871d (diff) | |
Resolve "Styling des Sidebar-Suchwidgets an das Erscheinungsbild der globalen Suche anpassen"
Closes #1103
Merge request studip/studip!656
Diffstat (limited to 'templates/sidebar')
| -rw-r--r-- | templates/sidebar/search-widget.php | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/templates/sidebar/search-widget.php b/templates/sidebar/search-widget.php index 597e574..df4a1dd 100644 --- a/templates/sidebar/search-widget.php +++ b/templates/sidebar/search-widget.php @@ -1,8 +1,3 @@ -<? if ($reset_search): ?> -<div style="text-align: right;"> - <?= $reset_search ?> -</div> -<? endif; ?> <form action="<?= URLHelper::getLink($url) ?>" method="<?= $method ?>" <? if (isset($id)) printf('id="%s"', htmlReady($id)); ?> class="sidebar-search"> <? foreach ($url_params as $key => $value): ?> <?=addHiddenFields($key,$value)?> @@ -10,19 +5,29 @@ <ul class="needles"> <? foreach ($needles as $needle): ?> <li <? if ($needle['quick_search'] && $needle['quick_search']->hasExtendedLayout()) echo 'class="extendedLayout" id="' . $needle['quick_search']->getId() . '_frame"'; ?>> - <label for="needle-<?= $hash = md5($url . '|' . $needle['name']) ?>" <? if ($needle['placeholder']) echo 'style="display:none;"'; ?>> - <?= htmlReady($needle['label']) ?> - </label> - <? if ($needle['quick_search']): ?> - <?= $needle['quick_search']->render() ?> - <? else: ?> - <input type="text" id="needle-<?= $hash ?>" - name="<?= htmlReady($needle['name']) ?>" - value="<?= htmlReady($needle['value']) ?>" - <? if ($needle['placeholder']) printf('placeholder="%s"', htmlReady($needle['label'])); ?> - <?= arrayToHtmlAttributes($needle['attributes']) ?>> - <? endif; ?> - <input type="submit" value="<?= _('Suchen') ?>"> + <div class="input-group files-search"> + <label for="needle-<?= $hash = md5($url . '|' . $needle['name']) ?>" <? if ($needle['placeholder']) echo 'style="display:none;"'; ?>> + <?= htmlReady($needle['label']) ?> + </label> + <? if ($needle['quick_search']): ?> + <?= $needle['quick_search']->render() ?> + <? else: ?> + <input type="text" id="needle-<?= $hash ?>" + name="<?= htmlReady($needle['name']) ?>" + value="<?= htmlReady($needle['value']) ?>" + <? if ($needle['placeholder']) printf('placeholder="%s"', htmlReady($needle['label'])); ?> + <?= arrayToHtmlAttributes($needle['attributes']) ?>> + <? endif; ?> + <? if ($reset_link): ?> + <a class="reset-search" href="<?= $reset_link ?>" tabindex="0" + title="<?= _('Suche zurücksetzen') ?>"> + <?= Icon::create('decline')->asImg(20) ?> + </a> + <? endif; ?> + <button type="submit" class="submit-search<?= $reset_link ? ' is-executed' : '' ?>" + title="<?= _('Suche ausführen') ?>"> + <?= Icon::create('search')->asImg(20) ?> + </button> </li> <? endforeach; ?> </ul> |
