summaryrefslogtreecommitdiff
path: root/modules/local_import/helpers/local_import_theme.php
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-03-03 22:25:22 +0000
committerTim Almdal <tnalmdal@shaw.ca>2009-03-03 22:25:22 +0000
commitc864f23f2e3863b264165e878f60fe33e5728a40 (patch)
treeae7ff69aafb247ae47152c3342fb200ba5c2a164 /modules/local_import/helpers/local_import_theme.php
parent08c47f28f25e5299142242bb15c872ac84fc702b (diff)
Only show local_import head stuff (css and js) when the local_import
admin page is shown
Diffstat (limited to 'modules/local_import/helpers/local_import_theme.php')
-rw-r--r--modules/local_import/helpers/local_import_theme.php21
1 files changed, 12 insertions, 9 deletions
diff --git a/modules/local_import/helpers/local_import_theme.php b/modules/local_import/helpers/local_import_theme.php
index 1895f3da..69341c72 100644
--- a/modules/local_import/helpers/local_import_theme.php
+++ b/modules/local_import/helpers/local_import_theme.php
@@ -19,16 +19,19 @@
*/
class local_import_theme_Core {
static function admin_head($theme) {
- $head[] = "<link media=\"screen, projection\" rel=\"stylesheet\" type=\"text/css\" href=\"" .
- url::file("modules/local_import/css/jquery.autocomplete.css") . "\" />";
- $head[] = "<link media=\"screen, projection\" rel=\"stylesheet\" type=\"text/css\" href=\"" .
- url::file("modules/local_import/css/admin.css") . "\" />";
- $base = url::base(true);
- $csrf = access::csrf_token();
- $head[] = "<script> var base_url = \"$base\"; var csrf = \"$csrf\";</script>";
+ $head = array();
+ if (Router::$current_uri == "admin/local_import") {
+ $head[] = "<link media=\"screen, projection\" rel=\"stylesheet\" type=\"text/css\" href=\"" .
+ url::file("modules/local_import/css/jquery.autocomplete.css") . "\" />";
+ $head[] = "<link media=\"screen, projection\" rel=\"stylesheet\" type=\"text/css\" href=\"" .
+ url::file("modules/local_import/css/admin.css") . "\" />";
+ $base = url::base(true);
+ $csrf = access::csrf_token();
+ $head[] = "<script> var base_url = \"$base\"; var csrf = \"$csrf\";</script>";
- $head[] = html::script("modules/local_import/js/jquery.autocomplete.pack.js");
- $head[] = html::script("modules/local_import/js/admin.js");
+ $head[] = html::script("modules/local_import/js/jquery.autocomplete.pack.js");
+ $head[] = html::script("modules/local_import/js/admin.js");
+ }
return implode("\n", $head);
}