summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d229778)
raw | patch | inline | side by side (parent: d229778)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 18 Jan 2010 08:47:35 +0000 (08:47 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 18 Jan 2010 08:47:35 +0000 (08:47 +0000) |
-Allow to load xml/tpl files from the themes too. Enables global usable lists like the 'baseSelectDialog'.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15164 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15164 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_filter.inc | patch | blob | history | |
gosa-core/include/class_listing.inc | patch | blob | history |
index 6a6a4216efff52f5c61a9a59d8c889acb8339bca..efd72574e18683c237523fd59872278ea2f73ec6 100644 (file)
$smarty->assign("$tag", $htmlCode);
}
+ // Try to load template from plugin the folder first...
+ $file = get_template_path($this->xmlData['definition']['template'], true);
+
+ // ... if this fails, try to load the file from the theme folder.
+ if(!file_exists($file)){
+ $file = get_template_path($this->xmlData['definition']['template']);
+ }
+
// Load template
- return ("<input type='hidden' name='FILTER_PID' value='".$this->pid."'>".$smarty->fetch(get_template_path($this->xmlData['definition']['template'], true)));
+ return ("<input type='hidden' name='FILTER_PID' value='".$this->pid."'>".$smarty->fetch($file));
}
index a9c218123977de83aaf28eaeafd2437c157d9cf3..9001f584abec747c6beb7f106e7e40c60424d273 100644 (file)
// Assign summary
$smarty->assign("HEADLINE", $this->headline);
- return ($smarty->fetch(get_template_path($this->xmlData['definition']['template'], true)));
+ // Try to load template from plugin the folder first...
+ $file = get_template_path($this->xmlData['definition']['template'], true);
+
+ // ... if this fails, try to load the file from the theme folder.
+ if(!file_exists($file)){
+ $file = get_template_path($this->xmlData['definition']['template']);
+ }
+
+ return ($smarty->fetch($file));
}