Imported from SVN by Bitbucket

This commit is contained in:
2015-03-31 20:26:20 +00:00
committed by bitbucket
commit ceb7984dec
212 changed files with 49537 additions and 0 deletions

View File

@@ -0,0 +1 @@
#

View File

@@ -0,0 +1,42 @@
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:browser="http://namespaces.zope.org/browser"
i18n_domain="caotek.zidol_theme">
<include package="Products.Collage" />
<includeOverrides file="overrides.zcml" />
<!-- 'caotek Zidol theme' Zope 3 browser layer -->
<interface
interface=".interfaces.IThemeSpecific"
type="zope.publisher.interfaces.browser.IBrowserSkinType"
name="caotek Zidol theme"
/>
<!-- Viewlets registration -->
<browser:viewlet
name="caotek.zidol_theme.footer"
manager="plone.app.layout.viewlets.interfaces.IPortalFooter"
class="plone.app.layout.viewlets.common.FooterViewlet"
template="templates/footer.pt"
layer=".interfaces.IThemeSpecific"
permission="zope2.View"
/>
<!-- Zope 3 browser resources -->
<!-- Resource directory for images -->
<browser:resourceDirectory
name="caotek.zidol_theme.images"
directory="images"
layer=".interfaces.IThemeSpecific"
/>
<!-- Resource directory for stylesheets -->
<browser:resourceDirectory
name="caotek.zidol_theme.stylesheets"
directory="stylesheets"
layer=".interfaces.IThemeSpecific"
/>
</configure>

View File

@@ -0,0 +1,56 @@
README for the 'browser/images/' directory
==========================================
This folder is a Zope 3 Resource Directory acting as a repository for images.
Its declaration is located in 'browser/configure.zcml':
<!-- Resource directory for images -->
<browser:resourceDirectory
name="caotek.zidol_theme.images"
directory="images"
layer=".interfaces.IThemeSpecific"
/>
An image placed in this directory (e.g. 'logo.png') can be accessed from
this relative URL:
"++resource++caotek.zidol_theme.images/logo.png"
Note that it might be better to register each of these resources separately if
you want them to be overridable from zcml directives.
The only way to override a resource in a resource directory is to override the
entire directory (all elements have to be copied over).
A Zope 3 browser resource declared like this in 'browser/configure.zcml':
<browser:resource
name="logo.png"
file="images/logo.png"
layer=".interfaces.IThemeSpecific"
/>
can be accessed from this relative URL:
"++resource++logo.png"
Notes
-----
* Whatever the way they are declared (in bulk inside a resource directory or
as separate resources), images registered as Zope 3 browser resources don't
have all the attributes that Zope 2 image objects have (i.e. the 'title'
property and the 'tag()' and 'get_size()' methods).
This means that if you want the html tag of your image to be auto-generated
(this is the case by default for the portal logo), you should store it in a
directory that is located in the 'skins/' folder of your package, registered
as a File System Directory View in the 'portal_skins' tool, and added to the
layers of your skin.
* Customizing/overriding images that are originally accessed from the
'portal_skins' tool (e.g. Plone default logo and icons) can be done inside
that tool only. There is no known way to do it with Zope 3 browser
resources.
Vice versa, there is no known (easy) way to override a Zope 3 browser
resource from a skin layer in 'portal_skins'.

View File

@@ -0,0 +1,6 @@
from plone.theme.interfaces import IDefaultPloneLayer
class IThemeSpecific(IDefaultPloneLayer):
"""Marker interface that defines a Zope 3 browser layer.
"""

View File

@@ -0,0 +1,24 @@
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:browser="http://namespaces.zope.org/browser"
i18n_domain="caotek.zidol_theme">
<browser:page
name="summary"
for="Products.ATContentTypes.content.topic.ATTopic"
permission="zope.Public"
template="templates/topic_summary.pt"
class="Products.Collage.browser.views.SummaryTopicView"
layer="Products.Collage.interfaces.ICollageBrowserLayer"
/>
<browser:page
name="standard"
for="Products.ATContentTypes.content.topic.ATTopic"
permission="zope.Public"
template="templates/topic_standard.pt"
class="Products.Collage.browser.views.StandardTopicView"
layer="Products.Collage.interfaces.ICollageBrowserLayer"
/>
</configure>

View File

@@ -0,0 +1,61 @@
README for the 'browser/stylesheets/' directory
===============================================
This folder is a Zope 3 Resource Directory acting as a repository for
stylesheets.
Its declaration is located in 'browser/configure.zcml':
<!-- Resource directory for stylesheets -->
<browser:resourceDirectory
name="caotek.zidol_theme.stylesheets"
directory="stylesheets"
layer=".interfaces.IThemeSpecific"
/>
A stylesheet placed in this directory (e.g. 'main.css') can be accessed from
this relative URL:
"++resource++caotek.zidol_theme.stylesheets/main.css"
Note that it might be better to register each of these resources separately if
you want them to be overridable from zcml directives.
The only way to override a resource in a resource directory is to override the
entire directory (all elements have to be copied over).
A Zope 3 browser resource declared like this in 'browser/configure.zcml':
<browser:resource
name="main.css"
file="stylesheets/main.css"
layer=".interfaces.IThemeSpecific"
/>
can be accessed from this relative URL:
"++resource++main.css"
Notes
-----
* Stylesheets registered as Zope 3 resources might be flagged as not found in
the 'portal_css' tool if the layer they are registered for doesn't match the
default skin set in 'portal_skins'.
This can be confusing but it must be considered as a minor bug in the CSS
registry instead of a lack in the way Zope 3 resources are handled in
Zope 2.
* There might be a way to interpret DTML from a Zope 3 resource view.
Although, if you need to use DTML for setting values in a stylesheet (the
same way as in default Plone stylesheets where values are read from
'base_properties'), it is much easier to store it in a directory that is
located in the 'skins/' folder of your package, registered as a File System
Directory View in the 'portal_skins' tool, and added to the layers of your
skin.
* Customizing/overriding stylesheets that are originally accessed from the
'portal_skins' tool (e.g. Plone default stylesheets) can be done inside that
tool only. There is no known way to do it with Zope 3 browser resources.
Vice versa, there is no known way to override a Zope 3 browser resource from
a skin layer in 'portal_skins'.

View File

@@ -0,0 +1,2 @@
/* Stylesheet for the 'caotek Zidol theme' Plone theme */

View File

@@ -0,0 +1,21 @@
<div metal:define-macro="portal_footer"
i18n:domain="plone"
class="row">
<div class="cell width-full position-0">
<div id="portal-footer">
<table class="invisible" style="width=70%; margin-left:15%;">
<tr>
<td style="padding:1.8em;">
<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/deed.vi" target="_blank"><img alt="Licence Creative Commons" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-nd/3.0/88x31.png" /></a>
</td>
<td>
Trang này được phát hành theo <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/deed.vi" target="_blank">Giấy phép Creative Commons BY-NC-ND 3.0 France</a>.<br />
Copyright © 2006 by Dien Dan Forum, BP 50, 92340 Bourg-La-Reine, France. | <a href="mailto:diendan@diendan.org">diendan@diendan.org</a>
</td>
</tr>
</table>
</div>
</div>
</div>

View File

@@ -0,0 +1,55 @@
<tal:manager replace="structure provider:collage.ContentManager" />
<tal:variables define="plone_view here/@@plone;
toLocalizedTime nocall: plone_view/toLocalizedTime;
isAnon view/isAnon;
mtool view/mtool;
portal_url view/portal_url;
normalizeString view/normalizeString;
site_properties view/site_properties">
<div class="standard-topic"
tal:define="topicContents view/getContents"
tal:condition="topicContents">
<a tal:omit-tag="not: view/isAlias"
tal:attributes="href context/absolute_url">
<h2 metal:define-macro="title"
tal:define="kssview context/@@collage_kss_helper"
tal:attributes="id string:title-${kssview/getUniqueIdentifier};
class python: kssview.getKssClasses('title')"
tal:condition="here/Title">
<span metal:define-slot="inside"
tal:replace="here/Title">title</span>
</h2>
</a>
<p class="description-topic">
<span metal:define-macro="description"
tal:define="view context/@@collage_kss_helper"
tal:attributes="id string:description-${view/getUniqueIdentifier};
class python: view.getKssClasses('description')"
tal:condition="here/Description">
<span metal:define-slot="inside"
tal:replace="here/Description">description</span>
</span>
</p>
<!-- idem vue standard mais avec about -->
<tal:listing i18n:domain="plone"
define="view context/@@collage_kss_helper/getKssView;
getKssClasses python: view.getKssClasses;
templateId string:folder_summary_view;
folderContents topicContents">
<metal:listing-macro use-macro="here/folder_listing_with_about/macros/listing" />
</tal:listing>
<a tal:attributes="href here/absolute_url"
tal:condition="python:len(topicContents) == here.itemCount"
i18n:domain="plone" i18n:translate="box_morelink">More...</a>
</div>
</tal:variables>

View File

@@ -0,0 +1,81 @@
<tal:manager replace="structure provider:collage.ContentManager" />
<tal:variables define="plone_view here/@@plone;
toLocalizedTime nocall: plone_view/toLocalizedTime;
isAnon view/isAnon;
mtool view/mtool;
portal_url view/portal_url;
normalizeString view/normalizeString;
site_properties view/site_properties">
<div class="standard-topic"
tal:define="topicContents view/getContents;
dossierTTM string:thay-tren-mang;
dossierTBD string:ban-doc-va-dien-dan;
dossierLu here/getId"
tal:condition="topicContents">
<a tal:omit-tag="not: view/isAlias"
tal:attributes="href context/absolute_url">
<h2 metal:define-macro="title"
tal:define="kssview context/@@collage_kss_helper"
tal:attributes="id string:title-${kssview/getUniqueIdentifier};
class python: kssview.getKssClasses('title')"
tal:condition="here/Title">
<span metal:define-slot="inside"
tal:replace="here/Title">title</span>
</h2>
</a>
<!-- collection Thay tren mang -->
<div tal:condition="python:dossierLu == dossierTTM">
<a href="" tal:attributes="href string:${portal_url}/thay-tren-mang-moi">
Xem thư mục Thấy trên mạng</a>
</div>
<!-- collection Bạn đọc và diễn đàn -->
<div tal:condition="python:dossierLu == dossierTBD">
<a href="" tal:attributes="href string:${portal_url}/BanDocVaZD">
Xem thư mục Bạn đọc và Diễn Đàn </a>
</div>
<p class="description-topic">
<span metal:define-macro="description"
tal:define="view context/@@collage_kss_helper"
tal:attributes="id string:description-${view/getUniqueIdentifier};
class python: view.getKssClasses('description')"
tal:condition="here/Description">
<span metal:define-slot="inside"
tal:replace="here/Description">description</span>
</span>
</p>
<!-- avec description
<tal:listing i18n:domain="plone"
define="view context/@@collage_kss_helper/getKssView;
getKssClasses python: view.getKssClasses;
templateId string:folder_summary_view;
folderContents topicContents">
<metal:listing-macro use-macro="here/folder_listing/macros/listing" />
</tal:listing>
-->
<!-- idem vue standard mais sans description -->
<tal:listing i18n:domain="plone"
define="view context/@@collage_kss_helper/getKssView;
getKssClasses python: view.getKssClasses;
templateId string:folder_summary_view;
folderContents topicContents">
<metal:listing-macro use-macro="here/folder_listing_sans_desc/macros/listing" />
</tal:listing>
<!-- cacher le lien "More"
<a tal:attributes="href here/absolute_url"
tal:condition="python:len(topicContents) == here.itemCount"
i18n:domain="plone" i18n:translate="box_morelink">More...</a>
-->
</div>
</tal:variables>

View File

@@ -0,0 +1 @@
<div tal:content="view/computed_value|nothing"/>

View File

@@ -0,0 +1,2 @@
#from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
#from plone.app.layout.viewlets.common import ViewletBase