Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CarnetApp/CarnetNextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhie <phie@phie.ovh>2018-09-04 22:34:12 +0300
committerPhie <phie@phie.ovh>2018-09-04 22:34:12 +0300
commit8cfb1b0121287b616eb6bf48eaa2ec0787d55287 (patch)
tree449b1a8595905766900b3a74d3fe5e14ce1515ca /templates
parent34ee3f380670affa124bdb138abd37287b36bf95 (diff)
display fullscreen as a nextcloud admin setting
Diffstat (limited to 'templates')
-rwxr-xr-xtemplates/index.php2
-rw-r--r--templates/settings/settings-admin.php45
2 files changed, 47 insertions, 0 deletions
diff --git a/templates/index.php b/templates/index.php
index 7bff5a8..c4ef1f7 100755
--- a/templates/index.php
+++ b/templates/index.php
@@ -10,6 +10,8 @@ preg_match_all('/<script.*?src=\"(.*?\.js(?:\?.*?)?)"/si', $file, $matches, PREG
for ($i = 0; $i < count($matches[1]); $i++) {
script("carnet","../templates/CarnetElectron/".substr($matches[1][$i],0,-3));
}
+if($_['carnet_display_fullscreen']=="yes")
+ script("carnet","../templates/CarnetElectron/compatibility/nextcloud/browser_fullscreen");
$file = preg_replace('#<script(.*?)>(.*?)</script>#is', '', $file);
$root = substr(__DIR__, strlen($_SERVER['DOCUMENT_ROOT']));
$file = str_replace("src=\"","defer src=\"".$root."/CarnetElectron/",$file);
diff --git a/templates/settings/settings-admin.php b/templates/settings/settings-admin.php
new file mode 100644
index 0000000..fc5e4e9
--- /dev/null
+++ b/templates/settings/settings-admin.php
@@ -0,0 +1,45 @@
+<?php
+/**
+ * @copyright 2017, Georg Ehrke <oc.list@georgehrke.com>
+ *
+ * @author Georg Ehrke <oc.list@georgehrke.com>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+script('carnet', [
+ 'settings-admin'
+]);
+
+/** @var \OCP\IL10N $l */
+/** @var array $_ */
+?>
+<form id="Carnet" class="section">
+ <h2>
+ <?php p($l->t('Carnet')); ?>
+ </h2>
+ <p>
+ <input type="checkbox" name="carnet_display_fullscreen" id="carnetDisplayFullscreen" class="checkbox" <?php
+ ($_['carnet_display_fullscreen']==='yes' ) ? print_unescaped('checked="checked"') : null ?>/>
+ <label for="carnetDisplayFullscreen"><?php p($l->t('
+ Display fullscreen as a standalone app')); ?></label>
+ <br>
+ <em>
+ <?php p($l->t('To use only if you provide a service with only Carnet')); ?></em>
+ </p>
+
+</form> \ No newline at end of file