From 7657b04ec6292a0cdc1186d7abbcff6fbcc37486 Mon Sep 17 00:00:00 2001
From: emkael <emkael@tlen.pl>
Date: Mon, 2 May 2016 23:15:21 +0200
Subject:  * theme manager

---
 app/php/pages/config.xml             |   9 ++++++++-
 app/php/themes/default/preloader.gif | Bin 0 -> 7681 bytes
 app/php/web/ThemeManager.php         |  11 +++++++++++
 http/_themes                         |   1 +
 4 files changed, 20 insertions(+), 1 deletion(-)
 create mode 100644 app/php/themes/default/preloader.gif
 create mode 100644 app/php/web/ThemeManager.php
 create mode 120000 http/_themes

diff --git a/app/php/pages/config.xml b/app/php/pages/config.xml
index d6403ff..11d708f 100644
--- a/app/php/pages/config.xml
+++ b/app/php/pages/config.xml
@@ -3,10 +3,17 @@
   <services>
     <service id="page"
              class="TPageService"
-             ClientScriptManagerClass="Application.web.ClientScriptManager" />
+             ClientScriptManagerClass="Application.web.ClientScriptManager">
+      <modules>
+        <module id="theme"
+                class="Application.web.ThemeManager"
+                BasePath="Web._themes" />
+      </modules>
+    </service>
   </services>
 
   <pages MasterClass="Application.layouts.MainLayout"
+         Theme="default"
          StatePersisterClass="System.Web.UI.TCachePageStatePersister"
          StatePersister.CacheModuleID="cache"
          StatePersister.CacheTimeout="3600" />
diff --git a/app/php/themes/default/preloader.gif b/app/php/themes/default/preloader.gif
new file mode 100644
index 0000000..6505467
Binary files /dev/null and b/app/php/themes/default/preloader.gif differ
diff --git a/app/php/web/ThemeManager.php b/app/php/web/ThemeManager.php
new file mode 100644
index 0000000..9dcae76
--- /dev/null
+++ b/app/php/web/ThemeManager.php
@@ -0,0 +1,11 @@
+<?php
+
+Prado::using('Application.web.BaseUrlDerivedFromBasePath');
+
+class ThemeManager extends TThemeManager {
+
+    use BaseUrlDerivedFromBasePath;
+
+}
+
+?>
diff --git a/http/_themes b/http/_themes
new file mode 120000
index 0000000..db75df8
--- /dev/null
+++ b/http/_themes
@@ -0,0 +1 @@
+../app/php/themes
\ No newline at end of file
-- 
cgit v1.2.3