aboutsummaryrefslogtreecommitdiffstats
path: root/community/nextcloud/use-external-docs-if-local-not-avail.patch
blob: 42af94bafcaf2e11e91f87ecd502e54f96815a57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From f17c14956c51206ad82acc5d9b66fd752f0e3c03 Mon Sep 17 00:00:00 2001
From: Jakub Jirutka <jakub@jirutka.cz>
Date: Tue, 19 Dec 2023 07:53:40 +0000
Subject: [PATCH] use external docs if local not available

---
 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 649178c1..29b5ac4c 100644
--- a/apps/settings/templates/help.php
+++ b/apps/settings/templates/help.php
@@ -48,8 +48,19 @@
 	</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>
 <?php else: ?>
 	<div id="app-content">
-- 
2.42.0