summaryrefslogtreecommitdiffstats
path: root/templates/7.php
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-09-16 12:37:44 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-09-16 12:37:44 +0200
commitd5cb2ff75dd6734d5de50fe27a6bc224b1809b15 (patch)
tree0a3db690c2375cc98068eb5da1b19d3eb6c3ce48 /templates/7.php
parentad701076c12795609d0c6ae0cb9b40a001726dea (diff)
backport 7 fixes
Diffstat (limited to 'templates/7.php')
-rw-r--r--templates/7.php45
1 files changed, 45 insertions, 0 deletions
diff --git a/templates/7.php b/templates/7.php
new file mode 100644
index 000000000..24dde55b4
--- /dev/null
+++ b/templates/7.php
@@ -0,0 +1,45 @@
+<?php
+/**
+ * ownCloud - News
+ *
+ * This file is licensed under the Affero General Public License version 3 or
+ * later. See the COPYING file.
+ *
+ * @author Alessandro Cosentino <cosenal@gmail.com>
+ * @author Bernhard Posselt <dev@bernhard-posselt.com>
+ * @copyright Alessandro Cosentino 2012
+ * @copyright Bernhard Posselt 2012, 2014
+ */
+
+
+/**
+ * Shortcut for adding scripts to a page
+ * @param string $app the appname
+ * @param string|string[] $file the filename,
+ * if an array is given it will add all scripts
+ */
+function script($app, $file) {
+ if(is_array($file)) {
+ foreach($file as $f) {
+ OC_Util::addScript($app, $f);
+ }
+ } else {
+ OC_Util::addScript($app, $file);
+ }
+}
+
+/**
+ * Shortcut for adding styles to a page
+ * @param string $app the appname
+ * @param string|string[] $file the filename,
+ * if an array is given it will add all styles
+ */
+function style($app, $file) {
+ if(is_array($file)) {
+ foreach($file as $f) {
+ OC_Util::addStyle($app, $f);
+ }
+ } else {
+ OC_Util::addStyle($app, $file);
+ }
+} \ No newline at end of file