Commits

Anonymous committed ba95c57

Fixed CSS of CKAN pages when dgu_theme_common is used, but not independent or embedded (needed the twenty10 css including).

  • Participants
  • Parent commits 92d6846

Comments (0)

Files changed (9)

File ckanext/dgutheme/plugin.py

     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'
 
     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'
+

File ckanext/dgutheme/theme_common/public/css/style.css

 /* This file is just for importing other css files */
-/* @import url(http://assets.okfn.org/themes/twentyten/style.css); */
+@import url(http://assets.okfn.org/themes/twentyten/style.css);
 @import url(ckan.css);
 @import url(buttons.css);
 @import url(stars.css);

File ckanext/dgutheme/theme_embedded/public/__init__.py

Empty file added.

File ckanext/dgutheme/theme_embedded/public/css/__init__.py

Empty file added.

File ckanext/dgutheme/theme_embedded/public/css/style.css

+/* This file is just for importing other css files */
+/* @import url(http://assets.okfn.org/themes/twentyten/style.css); */
+@import url(ckan.css);
+@import url(buttons.css);
+@import url(stars.css);
+@import url(tabs.css);
+/* @import url(extra.css); */

File ckanext/dgutheme/theme_independent/public/__init__.py

Empty file added.

File ckanext/dgutheme/theme_independent/public/css/__init__.py

Empty file added.

File ckanext/dgutheme/theme_independent/public/css/style.css

+/* This file is just for importing other css files */
+/* @import url(http://assets.okfn.org/themes/twentyten/style.css); */
+@import url(ckan.css);
+@import url(buttons.css);
+@import url(stars.css);
+@import url(tabs.css);
+/* @import url(extra.css); */
         [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',
 )