summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@0d.be>2011-07-22 12:58:53 (GMT)
committerFrédéric Péters <fpeters@0d.be>2011-07-22 12:58:53 (GMT)
commitb54e32e70d7e8825d8a00385b057c3b5bc97b36e (patch)
treeb27889db52562b158fca1ef81fc18ea8c6af3ad0
parent29124955eaa5ae8599ddaf1f19f795d9149b0286 (diff)
downloadthemis.looks-b54e32e70d7e8825d8a00385b057c3b5bc97b36e.zip
themis.looks-b54e32e70d7e8825d8a00385b057c3b5bc97b36e.tar.gz
themis.looks-b54e32e70d7e8825d8a00385b057c3b5bc97b36e.tar.bz2
Going themal
-rw-r--r--themis/looks/browser/__init__.py0
-rw-r--r--themis/looks/browser/logo.py5
-rw-r--r--themis/looks/browser/templates/logo.pt9
-rw-r--r--themis/looks/configure.zcml25
-rw-r--r--themis/looks/profiles/default/metadata.xml3
-rw-r--r--themis/looks/profiles/default/viewlets.xml10
6 files changed, 51 insertions, 1 deletions
diff --git a/themis/looks/browser/__init__.py b/themis/looks/browser/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/themis/looks/browser/__init__.py
diff --git a/themis/looks/browser/logo.py b/themis/looks/browser/logo.py
new file mode 100644
index 0000000..bbc64a4
--- /dev/null
+++ b/themis/looks/browser/logo.py
@@ -0,0 +1,5 @@
+from plone.app.layout.viewlets.common import LogoViewlet
+from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
+
+class ThemisLogoViewlet(LogoViewlet):
+ render = ViewPageTemplateFile('templates/logo.pt')
diff --git a/themis/looks/browser/templates/logo.pt b/themis/looks/browser/templates/logo.pt
new file mode 100644
index 0000000..c3c96ee
--- /dev/null
+++ b/themis/looks/browser/templates/logo.pt
@@ -0,0 +1,9 @@
+<a metal:define-macro="portal_logo"
+ id="portal-logo"
+ accesskey="1"
+ tal:attributes="href view/navigation_root_url"
+ i18n:domain="plone">
+ Hello World
+ <!-- <img src="logo.jpg" alt="" tal:replace="structure view/logo_tag" /> --> <!--commenting out the code that normally looks for logo.jpg -->
+</a>
+
diff --git a/themis/looks/configure.zcml b/themis/looks/configure.zcml
index 5e1f3c6..71988d2 100644
--- a/themis/looks/configure.zcml
+++ b/themis/looks/configure.zcml
@@ -3,13 +3,22 @@
xmlns:five="http://namespaces.zope.org/five"
xmlns:i18n="http://namespaces.zope.org/i18n"
xmlns:browser="http://namespaces.zope.org/browser"
+ xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
i18n_domain="themis.looks">
<five:registerPackage package="." initialize=".initialize" />
- <!-- -*- extra stuff goes here -*- -->
<include package="plone.app.contentmenu" />
+ <genericsetup:registerProfile
+ name="themis.looks"
+ title="Themis Looks"
+ directory="profiles/default"
+ description="..."
+ provides="Products.GenericSetup.interfaces.EXTENSION"
+ for="Products.CMFPlone.interfaces.IPloneSiteRoot"
+ />
+
<browser:page
for=".interfaces.IBigBlocksFolderView"
name="folder_listing"
@@ -32,4 +41,18 @@
description="Big blocks view"
/>
+ <interface
+ interface=".interfaces.IThemeSpecific"
+ type="zope.publisher.interfaces.browser.IBrowserSkinType"
+ name="ThemisStyle"
+ />
+
+ <browser:viewlet
+ name=".browser.logo"
+ layer=".interfaces.IThemeSpecific"
+ manager="plone.app.layout.viewlets.interfaces.IPortalHeader"
+ class=".browser.logo.ThemisLogoViewlet"
+ permission="zope2.View"
+ />
+
</configure>
diff --git a/themis/looks/profiles/default/metadata.xml b/themis/looks/profiles/default/metadata.xml
new file mode 100644
index 0000000..05fa4b8
--- /dev/null
+++ b/themis/looks/profiles/default/metadata.xml
@@ -0,0 +1,3 @@
+<metadata>
+ <version>1</version>
+</metadata>
diff --git a/themis/looks/profiles/default/viewlets.xml b/themis/looks/profiles/default/viewlets.xml
new file mode 100644
index 0000000..4c10b3e
--- /dev/null
+++ b/themis/looks/profiles/default/viewlets.xml
@@ -0,0 +1,10 @@
+<object>
+ <hidden manager="plone.portalheader" skinname="themis">
+ <viewlet name="plone.logo" />
+ </hidden>
+ <order manager="plone.portalheader" skinname="themis"
+ based-on="Plone Default">
+ <viewlet name="themis.looks.browser.logo"
+ insert-before="*" />
+ </order>
+</object>