diff options
author | A. Wilcox <awilcox@wilcox-tech.com> | 2018-11-28 22:19:36 +0000 |
---|---|---|
committer | A. Wilcox <awilcox@wilcox-tech.com> | 2018-11-28 22:19:36 +0000 |
commit | 9fc671264764cd0765830572daa11574c92fdba8 (patch) | |
tree | 580da54b1f122edd844dd8bb9a3e6c1ab0c05156 /user/nextcloud/use-external-docs-if-local-not-avail.patch | |
parent | b0ec6a7873c7835965e2bb923e0d87ea345352d4 (diff) | |
parent | 020a30d93a101127fdd2f494026fc80c632ae728 (diff) | |
download | packages-9fc671264764cd0765830572daa11574c92fdba8.tar.gz packages-9fc671264764cd0765830572daa11574c92fdba8.tar.bz2 packages-9fc671264764cd0765830572daa11574c92fdba8.tar.xz packages-9fc671264764cd0765830572daa11574c92fdba8.zip |
Merge branch 'nextcloud' into 'master'
user/nextcloud: new package
See merge request !110
Diffstat (limited to 'user/nextcloud/use-external-docs-if-local-not-avail.patch')
-rw-r--r-- | user/nextcloud/use-external-docs-if-local-not-avail.patch | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/user/nextcloud/use-external-docs-if-local-not-avail.patch b/user/nextcloud/use-external-docs-if-local-not-avail.patch new file mode 100644 index 000000000..19145b5ce --- /dev/null +++ b/user/nextcloud/use-external-docs-if-local-not-avail.patch @@ -0,0 +1,65 @@ +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 + +--- a/settings/help.php ++++ b/settings/help.php +@@ -34,22 +34,36 @@ + OC_Util::addStyle( "settings", "settings" ); + \OC::$server->getNavigationManager()->setActiveEntry('help'); + ++$localDocs = true; + + if(isset($_GET['mode']) and $_GET['mode'] === 'admin') { +- $url=\OCP\Util::linkToAbsolute( 'core', 'doc/admin/index.html' ); ++ if (file_exists(\OC::$SERVERROOT . '/core/doc/admin/index.html')) { ++ $url=\OCP\Util::linkToAbsolute( 'core', 'doc/admin/index.html' ); ++ } else { ++ $url=\OC::$server->query(\OCP\Defaults::class)->buildDocLinkToKey('admin-manual'); ++ $localDocs=false; ++ } + $style1=''; + $style2=' active'; + }else{ + $url=\OCP\Util::linkToAbsolute( 'core', 'doc/user/index.html' ); ++ if (file_exists( \OC::$SERVERROOT . '/core/doc/user/index.html' )) { ++ $url=\OCP\Util::linkToAbsolute( 'core', 'doc/user/index.html' ); ++ } else { ++ $url=\OC::$server->query(\OCP\Defaults::class)->buildDocLinkToKey('user-manual'); ++ $localDocs=false; ++ } + $style1=' active'; + $style2=''; + } + ++ + $url1=\OC::$server->getURLGenerator()->linkToRoute('settings_help').'?mode=user'; + $url2=\OC::$server->getURLGenerator()->linkToRoute('settings_help').'?mode=admin'; + + $tmpl = new OC_Template( "settings", "help", "user" ); + $tmpl->assign( "admin", OC_User::isAdminUser(OC_User::getUser())); ++$tmpl->assign( "localDocs", $localDocs ); + $tmpl->assign( "url", $url ); + $tmpl->assign( "url1", $url1 ); + $tmpl->assign( "url2", $url2 ); + +--- a/settings/templates/help.php ++++ b/settings/templates/help.php +@@ -42,6 +42,17 @@ + </div> + + <div id="app-content" class="help-includes"> ++<?php if ($_['localDocs']) { ?> + <iframe src="<?php print_unescaped($_['url']); ?>" class="help-iframe"> + </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> |