[ckan-changes] commit/ckanext-dgutheme: dread: Fixed CSS of CKAN pages when dgu_theme_common is used, but not independent or embedded (needed the twenty10 css including).

Bitbucket commits-noreply at bitbucket.org
Tue Jun 14 11:52:17 UTC 2011


1 new changeset in ckanext-dgutheme:

http://bitbucket.org/okfn/ckanext-dgutheme/changeset/ba95c57574ab/
changeset:   ba95c57574ab
user:        dread
date:        2011-06-14 13:52:10
summary:     Fixed CSS of CKAN pages when dgu_theme_common is used, but not independent or embedded (needed the twenty10 css including).
affected #:  9 files (1.5 KB)

--- a/ckanext/dgutheme/plugin.py	Fri May 20 10:37:49 2011 +0100
+++ b/ckanext/dgutheme/plugin.py	Tue Jun 14 12:52:10 2011 +0100
@@ -36,10 +36,10 @@
     implements(IConfigurer)
 
     def update_config(self, config):
+        configure_template_directory(config, 'theme_embedded/templates')
+        configure_public_directory(config, 'theme_embedded/public')
         configure_template_directory(config, 'theme_common/templates')
         configure_public_directory(config, 'theme_common/public')
-        configure_template_directory(config, 'theme_embedded/templates')
-        configure_public_directory(config, 'theme_embedded/public')
 
         config['package_form'] = 'package_gov3'
 
@@ -51,10 +51,31 @@
     implements(IConfigurer)
 
     def update_config(self, config):
+        configure_template_directory(config, 'theme_independent/templates')
+        configure_public_directory(config, 'theme_independent/public')
         configure_template_directory(config, 'theme_common/templates')
         configure_public_directory(config, 'theme_common/public')
-        configure_template_directory(config, 'theme_independent/templates')
-        configure_public_directory(config, 'theme_independent/public')
 
         config['package_form'] = 'package_gov3'
 
+class WalesThemePlugin(SingletonPlugin):
+    '''DGU/Wales Visual Theme for a CKAN install independent of dgu/Drupal.
+
+    '''
+    implements(IConfigurer)
+
+    def update_config(self, config):
+        configure_template_directory(config, 'theme_wales/templates')
+        configure_public_directory(config, 'theme_wales/public')
+        configure_template_directory(config, 'theme_independent/templates')
+        configure_public_directory(config, 'theme_independent/public')
+        configure_template_directory(config, 'theme_common/templates')
+        configure_public_directory(config, 'theme_common/public')
+
+        config['package_form'] = 'package_gov3'
+        if config.get('ckan.site_title') in ('CKAN', None):
+            config['ckan.site_title'] = 'Data Wales'
+        if not config.get('ckan.site_logo'):
+            config['ckan.site_logo'] = '/images/wales.jpg'
+        config['ckan.banner_logo'] = '/images/wag_logo.jpg'
+


--- a/ckanext/dgutheme/theme_common/public/css/style.css	Fri May 20 10:37:49 2011 +0100
+++ b/ckanext/dgutheme/theme_common/public/css/style.css	Tue Jun 14 12:52:10 2011 +0100
@@ -1,5 +1,5 @@
 /* This file is just for importing other css files */
-/* @import url(http://assets.okfn.org/themes/twentyten/style.css); */
+ at import url(http://assets.okfn.org/themes/twentyten/style.css);
 @import url(ckan.css);
 @import url(buttons.css);
 @import url(stars.css);


--- a/setup.py	Fri May 20 10:37:49 2011 +0100
+++ b/setup.py	Tue Jun 14 12:52:10 2011 +0100
@@ -25,6 +25,7 @@
         [ckan.plugins]
         dgu_theme_embedded = ckanext.dgutheme.plugin:EmbeddedThemePlugin
         dgu_theme_independent = ckanext.dgutheme.plugin:IndependentThemePlugin
+#        dgu_theme_wales = ckanext.dgutheme.plugin:WalesThemePlugin
     """,
     test_suite = 'nose.collector',
 )

Repository URL: https://bitbucket.org/okfn/ckanext-dgutheme/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.




More information about the ckan-changes mailing list