Skip to content
Snippets Groups Projects
Commit be5f0e7b authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

remove old wiki templates, fixes #4386

Closes #4386

Merge request studip/studip!3195
parent 1724e93c
No related branches found
No related tags found
No related merge requests found
<?= $contentbar ?>
<form method="post" action="<?= URLHelper::getLink('?cmd=edit', compact('keyword')) ?>" data-secure class="default">
<?= CSRFProtection::tokenTag() ?>
<fieldset>
<legend><?= htmlReady(($keyword == 'WikiWikiWeb') ? _('Wiki-Startseite') : $keyword) ?></legend>
<input type="hidden" name="wiki" value="<?= htmlReady($keyword) ?>">
<input type="hidden" name="lastpage" value="<?= htmlReady($lastpage) ?>">
<input type="hidden" name="version" value="<?= htmlReady($version) ?>">
<input type="hidden" name="ancestor" value="<?= htmlReady($ancestor) ?>">
<input type="hidden" name="submit" value="true">
<input type="hidden" name="cmd" value="show">
<textarea name="body" class="wiki-editor wysiwyg size-l" data-editor="extraPlugins=FindAndReplace,WikiLink"
><?= wysiwygReady($body) ?></textarea>
</fieldset>
<footer>
<div class="button-group">
<?= Studip\Button::createAccept(_('Speichern')) ?>
<?= Studip\Button::create(_('Speichern und weiter bearbeiten'), 'submit-and-edit') ?>
</div>
<?= Studip\LinkButton::createCancel(_('Abbrechen'), URLHelper::getURL('?cmd=abortedit', compact('keyword', 'lastpage'))) ?>
</footer>
</form>
<div id="main_content">
<table class="default">
<colgroup>
<col>
<col style="width: 10%;">
<col style="width: 15%;">
<col style="width: 35%;">
</colgroup>
<thead>
<tr>
<th>
<a href="<?= URLHelper::getLink($url, ['sortby' => $titlesortlink]) ?>">
<?= _('Titel') ?>
</a>
</th>
<th>
<a href="<?= URLHelper::getLink($url, ['sortby' => $versionsortlink]) ?>">
<?= _('Änderungen') ?>
</a>
</th>
<th>
<a href="<?= URLHelper::getLink($url, ['sortby' => $changesortlink]) ?>">
<?= _('Letzte Änderung') ?>
</a>
</th>
<th>
<?= _('Von') ?>
</th>
</tr>
</thead>
<tbody>
<? foreach ($pages as $page): ?>
<tr>
<td>
<a href="<?=URLHelper::getLink('wiki.php', ['keyword' => $page->keyword])?>">
<?= htmlReady($page->keyword === 'WikiWikiWeb' ? _('Wiki-Startseite') : $page->keyword) ?>
</a>
</td>
<td>
<?= htmlReady($page->version) ?>
</td>
<td>
<?= date('d.m.Y H:i', $page->chdate) ?>
<? if ($mode === 'new' && $page->isVisibleTo($GLOBALS['user']) && $page->version > 1): ?>
<br>
<a href="<?= URLHelper::getLink('', ['view' => 'diff', 'keyword' => $page->keyword, 'versionssince' => $lastlogindate]) ?>">
<?= _('Änderungen') ?>
</a>
<? endif; ?>
</td>
<td>
<? if (isset($page->author)) : ?>
<a href="<?= URLHelper::getLink('dispatch.php/profile', ['username' => $page->author->username]) ?>">
<?= Avatar::getAvatar($page->author->id, $page->author->username)->getImageTag(Avatar::SMALL, ['title' => $page->author->getFullName()]) ?>
<?= htmlReady($page->author->getFullName()) ?>
</a>
<? else : ?>
<?= Avatar::getNobody()->getImageTag(Avatar::SMALL) ?>
<?= _('unbekannt') ?>
<? endif ?>
</td>
</tr>
<? endforeach; ?>
</tbody>
</table>
<table class="default">
<caption>
<?= htmlReady($keyword) ?> - <?= _('Versionshistorie') ?>
</caption>
<colgroup>
<col style="width: 5%;">
<col style="width: 70%;">
<col style="width: 25%;">
</colgroup>
<thead>
<tr>
<th>
<a href="<?= URLHelper::getLink($url, ['keyword' => $keyword, 'sortby' => $versionsortlink]) ?>">
<?= _('Version') ?>
</a>
</th>
<th>
<?= _('Autor/in') ?>
</th>
<th>
<a href="<?= URLHelper::getLink($url, ['keyword' => $keyword, 'sortby' => $changesortlink]) ?>">
<?= _('Erstellt am') ?>
</a>
</th>
</tr>
</thead>
<tbody>
<? foreach ($pages as $page): ?>
<tr>
<td>
<a href="<?= URLHelper::getLink('', ['keyword' => $keyword, 'version' => $page->version]) ?>">
<?= $page->version ?>
</td>
<td>
<? if (isset($page->author)) : ?>
<a href="<?= URLHelper::getLink('dispatch.php/profile', ['username' => $page->author->username]) ?>">
<?= Avatar::getAvatar($page->author->id, $page->author->username)->getImageTag(Avatar::SMALL, ['title' => $page->author->getFullName()]) ?>
<?= htmlReady($page->author->getFullName()) ?>
</a>
<? else : ?>
<?= Avatar::getNobody()->getImageTag(Avatar::SMALL) ?>
<?= _('unbekannt') ?>
<? endif ?>
</td>
<td>
<?= date('d.m.Y H:i', $page->chdate) ?>
</td>
</tr>
<? endforeach ?>
</tbody>
<? if ($GLOBALS['perm']->have_studip_perm('tutor', Context::getId()) && keywordExists($keyword)) :?>
<tfoot>
<tr>
<td colspan="3">
<?= Studip\LinkButton::create(
_('Alle Versionen löschen'),
URLHelper::getURL("?cmd=really_delete_all&keyword=".urlencode($keyword)),
['data-confirm' => showDeleteAllDialog($keyword)]
) ?>
</td>
</tr>
</tfoot>
<? endif ?>
</table>
<?= $contentbar ?? '' ?>
<article class="studip wiki" id="main_content">
<section>
<? if ($wikipage->keyword == 'WikiWikiWeb' && $wikipage->isNew()): ?>
<div class="wiki-empty-background"></div>
<div class="flex">
<div class="wiki-teaser">
<?= _('Mach die Welt ein Stückchen schlauer.') ?>
</div>
</div>
<? else : ?>
<?= $content ?>
<? endif ?>
</section>
<? if ($wikipage->isEditableBy($GLOBALS['user'])): ?>
<footer id="wikifooter">
<div class="button-group">
<?= Studip\LinkButton::create(
$wikipage->isNew() ? _('Neue Seite anlegen') : ('Bearbeiten'),
URLHelper::getURL('', ['keyword' => $wikipage->keyword, 'view' => 'edit'])
) ?>
</div>
</footer>
<? endif ?>
</article>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment