404 page for broken links

This commit is contained in:
Victor Dubiniuk 2013-09-26 21:50:43 +03:00
parent 4c30cf0e71
commit b0fae1bef5
2 changed files with 8 additions and 1 deletions

View File

@ -40,7 +40,7 @@ if (isset($fileOwner)) {
\OCP\Util::addScript('documents', 'documents'); \OCP\Util::addScript('documents', 'documents');
$tmpl->assign('document', $token); $tmpl->assign('document', $token);
} else { } else {
// TODO: show nice 404 page $tmpl->assign('notFound', true);
} }
$tmpl->printPage(); $tmpl->printPage();

View File

@ -1,5 +1,12 @@
<div id="notification-container">
<div id="notification" style="display: none;"></div>
</div>
<div id="documents-content"> <div id="documents-content">
<?php if (isset($_['document'])): ?> <?php if (isset($_['document'])): ?>
<input type="hidden" name="document" value ="<?php p($_['document']) ?>" /> <input type="hidden" name="document" value ="<?php p($_['document']) ?>" />
<?php endif; ?> <?php endif; ?>
<?php if (isset($_['notFound'])): ?>
<div class="push"></div>
<div class="warning"><?php p($l->t('This link has been expired or is never existed. Please contact the person who shared it with you for details.')) ?></div>
<?php endif; ?>
</div> </div>