[Pkg-owncloud-commits] [owncloud] 50/258: add template functions for html imports
David Prévot
taffit at moszumanska.debian.org
Sat Oct 11 17:22:19 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit 8869dcf1afb62ae34dcf6be6a852af18dff0ff40
Author: Bernhard Posselt <dev at bernhard-posselt.com>
Date: Mon Sep 8 21:19:44 2014 +0200
add template functions for html imports
---
lib/private/template/functions.php | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/lib/private/template/functions.php b/lib/private/template/functions.php
index e4af4aa..364ec7c 100644
--- a/lib/private/template/functions.php
+++ b/lib/private/template/functions.php
@@ -42,6 +42,16 @@ function style($app, $file) {
}
/**
+ * Shortcut for HTML imports
+ * @param string $app the appname
+ * @param string $file the path relative to the app's component folder
+ */
+function component($app, $file) {
+ $url = link_to($app, 'component/' . $file);
+ OC_Util::addHeader('link', array('rel' => 'import', 'href' => $url));
+}
+
+/**
* make OC_Helper::linkTo available as a simple function
* @param string $app app
* @param string $file file
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list