ayaports/backports/nextcloud/use-external-docs-if-local-not-avail.patch

32 lines
939 B
Diff

From: Jakub Jirutka <jakub@jirutka.cz>
Date: Tue, 27 Jun 2017 02:07:00 +0200
Subject: [PATCH] Show link to external docs if local is not installed
---
apps/settings/templates/help.php | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/apps/settings/templates/help.php b/apps/settings/templates/help.php
index 18cba185..45b5c8d5 100644
--- a/apps/settings/templates/help.php
+++ b/apps/settings/templates/help.php
@@ -43,6 +43,17 @@
</div>
<div id="app-content" class="help-includes">
+<?php if ($_['localDocs']) { ?>
<iframe src="<?php print_unescaped($_['url']); ?>" class="help-iframe" tabindex="0">
</iframe>
+<?php } else { ?>
+ <div class="section">
+ <h2>Local documentation is not installed</h2>
+ <p>Please use
+ <a href="<?php print_unescaped($_['url']); ?>" target="_blank" rel="noreferrer">
+ <?php p($l->t('online documentation')); ?> ↗
+ </a>
+ </p>
+ </div>
+<?php } ?>
</div>
--
2.37.3