aboutsummaryrefslogtreecommitdiff
path: root/app/views/course/wiki/search.php
diff options
context:
space:
mode:
authorPhilipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de>2024-09-24 10:53:31 +0200
committerPhilipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de>2024-09-24 10:53:31 +0200
commit4459dd7917f4d1c34f40bb68f0e991e9c3d53e4c (patch)
tree5c07151ae61276d334e88f6309c30d439a85c12e /app/views/course/wiki/search.php
parentda0022e5c1abbf9825ae76debaabdff7e8623bb4 (diff)
parent97a188592c679890a25c37ab78463add76a52ff7 (diff)
Merge branch 'main' into issue-3911issue-3911
Diffstat (limited to 'app/views/course/wiki/search.php')
-rw-r--r--app/views/course/wiki/search.php19
1 files changed, 17 insertions, 2 deletions
diff --git a/app/views/course/wiki/search.php b/app/views/course/wiki/search.php
index 27811eb..8ef886a 100644
--- a/app/views/course/wiki/search.php
+++ b/app/views/course/wiki/search.php
@@ -10,7 +10,7 @@
<table class="default">
<caption>
- <?= sprintf(_('Treffer für Suche nach <em>%s</em> in allen Versionen'), htmlReady(Request::get('search'))) ?>
+ <?= sprintf(_('Treffer für Suche nach <em>%s</em>'), htmlReady(Request::get('search'))) ?>
</caption>
<thead>
<tr>
@@ -45,6 +45,7 @@
<td>
<?
$content = Studip\Markup::removeHtml($content);
+ $ignore_next_hits = 0;
$offset = 0;
$output = [];
@@ -55,7 +56,7 @@
break;
}
$offset = $pos + 1;
- if (($ignore_next_hits--) > 0) {
+ if ($ignore_next_hits-- > 0) {
// if more than one occurence is found
// in a fragment to be displayed,
// the fragment is only shown once
@@ -95,6 +96,20 @@
<? endif ?>
</td>
</tr>
+ <? if ($pagedata['is_in_history'] && count($pagedata['versions']) > 1 || ($pagedata['is_in_content'] && count($pagedata['versions']) > 0)) : ?>
+ <tr>
+ <td colspan="3">
+ <a href="<?= $controller->searchpage($page_id, ['search' => Request::get('search')]) ?>">
+ <?= Icon::create('add')->asImg(['class' => 'text-bottom']) ?>
+ <? if (count($pagedata['versions']) === 1) : ?>
+ <?= _('Weiterer Treffer in einer älteren Version.') ?>
+ <? else : ?>
+ <?= sprintf(_('Weitere Treffer in %d älteren Versionen.'), count($pagedata['versions'])) ?>
+ <? endif ?>
+ </a>
+ </td>
+ </tr>
+ <? endif ?>
<? endforeach ?>
</tbody>
</table>