Commit de1e326a authored by Jean-Paul Smets's avatar Jean-Paul Smets

Initial revision


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@938 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bcc5c076
This diff is collapsed.
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
#
# This program as such is not intended to be used by end users. End
# users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
Warning
This product is a proof of concept for hard core Zope developers.
Wait version 0.2 to get something usable
Requirements
You will need a Zope system with "CMF":http://cmf.zope.org
and with "Localizer":http://www.nuxeo.org/localizer
Mail list
You may want to subscribe to the Base18 mail list::
http://mail.freesoftware.fsf.org/mailman/listinfo/erp5-base18
erp5-base18@mail.freesoftware.fsf.org
Installation Instructions
Download the Base18 tarball::
http://www.zope.org/Members/nexedi/Base18/Base18-0.1.tar.gz
or the latest CVS::
https://savannah.gnu.org/cgi-bin/viewcvs/erp5/Base18/
Install it in your local Zope product directory (ex. /var/lib/zope/Products on
Debian systems). Untar it.
Copy the files translation_workflow.zexp and migrate_content.zexp in the
Base18 directory into to your Zope import directory (ex. /var/lib/zope/import
on a Debian system).
Copy the file Extensions/MigrateContent.py to your Zope
Extensions directory (ex. /var/lib/zope/Extensions
on a Debian system).
Create a CMF site.
Import migrate_content.zexp at the root of your CMF site.
Import translation_workflow.zexp the content of your portal_worflow.
Execute the migrate_content external method at the root of your CMF
site (click on it and then on the Test button).
This will modify the default portal types and register the Base18 portal
types. You may at this point eventually need to reinder your CMF. The
migrate_content external method can also be used to migrate an entire site.
At this step, you need to modifiy the portal_workflow workflow associations
in order to associate the Translation portal type to the translation_workflow
workflow
Demos
There are two ways to use Base18.
For sites which do not contain much content and which are centralized,
it is sufficient to manage translations through a single gettext message
catalog. Thanks to Base18, content is automatically cut into small paragraphs
or sentences. It is then possible to export sentences with the Localizer
export feature into .pot or .po files. Such files can then be translated
mith toolds such as KBabel (see kbabel.png).
This first approach is used on "Storever":http://www.storever.com for
example
For sites which contain many documents for which different people
may want to translate single documents in multiple languages,
it is then recommended to proceed in 3 steps:
- Use the *Translate* menu of the document you want to translate
in order to download a .pot file which can be edited with kbabel
- Create a new *Translation* document in your personal folder
(My Stuff) within the CMF and upload the .pot file which
you translated at the previous step. At this step, you
must define the target language and the target document
of your translation
- Submit this translation to the portal reviewers so that
they can register your translation for that document
(use the menu on the left)
This process involves two new portal types
- a Translation portal type which is used to store
translations (ie. .po files for 1 language for 1 document)
- a portal_translations which registers the relations
between documents and translations (this tool also
implements the heuristics to find the most appropriate
translation for a given document and a given language)
The whole system allows to split the work of translation
accross all members of a given portal.
This second approach is being tested on the "ERP5 portal":http://www.erp5.org
We recommend to become member of ERP5 (a project to design a Zope based ERP)
in order to try Base18 first.
Localizer Patch
We patched Localizer in order to improve its operation with KBabel and
with cookies.
MessageCatalog.py
  - improved export procedure
    so that it generates multi-line strings properly
    (all lines are exported)
  - improved export procedure
    to escape quotes
        " -> \"
  Exported messages can now be read without errror by KBabel
__init__.py
  - changed language value from string type to tuple type
    so that it is now consistent with AcceptLanguage
    list-based algorithm
zgettext.py
  - improved import procedure so that it handles
    multi-line strings (all lines are now
    read into the message catalog)
  - improved export procedure
    to unescape quotes
        \" -> \
  KBabel .po files can now be read
Les sous-répertoires ./help et /home/jp/Localizer/help sont identiques.
Les sous-répertoires ./img et /home/jp/Localizer/img sont identiques.
Les sous-répertoires ./locale et /home/jp/Localizer/locale sont identiques.
Les sous-répertoires ./tests et /home/jp/Localizer/tests sont identiques.
Les sous-répertoires ./ui et /home/jp/Localizer/ui sont identiques.
diff -u ./Utils.py /home/jp/Localizer/Utils.py
--- ./Utils.py 2003-06-07 03:31:54.000000000 +0200
+++ /home/jp/Localizer/Utils.py 2003-06-07 03:32:44.000000000 +0200
@@ -54,7 +54,8 @@
request = get_request()
- lang = request.AcceptLanguage.select_language(available_languages)
+ return getattr(request.PARENTS[0],'FOLDER_LANGUAGE','en')
+ #lang = request.AcceptLanguage.select_language(available_languages)
# XXX Here we should set the Vary header, but, which value should it have??
@@ -62,7 +63,7 @@
## response.setHeader('Vary', 'accept-language')
## response.setHeader('Vary', '*')
- return lang
+ #return lang
# Defines strings that must be internationalized
Seulement dans ./: Utils.py.orig
Seulement dans /home/jp/Localizer: Utils.py.rej
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
#
# This program as such is not intended to be used by end users. End
# users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
Base18 is a Zope product which allows to build multilingual portals. It uses
Localizer and extends the Zope CMFDefault product to provide a way
to translate documents at a sentence per sentence level.
It implements a new kind of CMF document: Translations. Translations allow to
store a .po file which allows to translate a given document. This approach
was inspired by the poxml approach used by the "KDE":http://www.kde.org project
to translate its documentation.
Because it works at the sentence or paragraph level, it is possible to use
the fuzzy feature of gettext to find similar translations for a given sentence
and accelerate the translation process.
Base18 also includes a translation workflow which allows to keep track
of translations and their association to documents in a portal.
Base18 is currently much of a "proof-of-concept" which needs to be extended.
Future versions will include greater flexibility and will implement relations.
More information can be found on the "Nexedi":http://www.nexedi.org/software
site::
http://www.nexedi.org/software
TODO:
Version 0.1 (Done)
- proof of concept
Version 1.0
- Release
This diff is collapsed.
Zope Public License (ZPL) Version 2.0
-----------------------------------------------
This software is Copyright (c) Zope Corporation (tm) and
Contributors. All rights reserved.
This license has been certified as open source. It has also
been designated as GPL compatible by the Free Software
Foundation (FSF).
Redistribution and use in source and binary forms, with or
without modification, are permitted provided that the
following conditions are met:
1. Redistributions in source code must retain the above
copyright notice, this list of conditions, and the following
disclaimer.
2. Redistributions in binary form must reproduce the above
copyright notice, this list of conditions, and the following
disclaimer in the documentation and/or other materials
provided with the distribution.
3. The name Zope Corporation (tm) must not be used to
endorse or promote products derived from this software
without prior written permission from Zope Corporation.
4. The right to distribute this software or to use it for
any purpose does not give you the right to use Servicemarks
(sm) or Trademarks (tm) of Zope Corporation. Use of them is
covered in a separate agreement (see
http://www.zope.com/Marks).
5. If any files are modified, you must cause the modified
files to carry prominent notices stating that you changed
the files and the date of any change.
Disclaimer
THIS SOFTWARE IS PROVIDED BY ZOPE CORPORATION ``AS IS''
AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
NO EVENT SHALL ZOPE CORPORATION OR ITS CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
This software consists of contributions made by Zope
Corporation and many individuals on behalf of Zope
Corporation. Specific attributions are listed in the
accompanying credits file.
##############################################################################
#
# Base18: a Zope product which provides multilingual services for CMF Default
# documents.
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
#
# This program as such is not intended to be used by end users. End
# users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# TODO:
# - Implement Vary so that cache can take into account translated version
# - Implement language caching....
#
##############################################################################
"""
"""
ADD_CONTENT_PERMISSION = 'Add portal content'
import Translation
import TranslationTool
from Products.CMFCore import utils
import Products.CMFCore
from Products.CMFCore.DirectoryView import registerDirectory
contentClasses = ( Translation.Translation,
)
contentConstructors = ( Translation.addTranslation,
)
contentFactoryTypeInformations = []
for content in contentClasses:
if type(content.factory_type_information) == type({}):
contentFactoryTypeInformations.append(content.factory_type_information)
else:
contentFactoryTypeInformations.append(content.factory_type_information[0])
tools = ( TranslationTool.TranslationTool,
)
bases = contentClasses
import sys
this_module = sys.modules[ __name__ ]
z_bases = utils.initializeBasesPhase1( bases, this_module )
z_tool_bases = utils.initializeBasesPhase1( tools, this_module )
base18_globals=globals()
# Make the skins available as DirectoryViews.
registerDirectory('skins', globals())
registerDirectory('help', globals())
def initialize( context ):
utils.initializeBasesPhase2( z_bases, context )
utils.initializeBasesPhase2( z_tool_bases, context )
utils.ToolInit('CMFTranslation Tool', tools=tools,
product_name='CMFTranslation', icon='tool.png',
).initialize( context )
utils.ContentInit( 'CMFTranslation Content'
, content_types=contentClasses
, permission=ADD_CONTENT_PERMISSION
, extra_constructors=contentConstructors
, fti=contentFactoryTypeInformations
).initialize( context )
context.registerHelp()
context.registerHelpTitle('CMFTranslation Help')
<dtml-comment>
Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
Jean-Paul Smets <jp@nexedi.com>
WARNING: This program as such is intended to be used by professional
programmers who take the whole responsability of assessing all potential
consequences resulting from its eventual inadequacies and bugs
This program as such is not intended to be used by end users. End
users who are looking for a ready-to-use solution with commercial
garantees and support are strongly adviced to contract a Free Software
Service Company
This program is Free Software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
</dtml-comment>
<dtml-var manage_page_header>
<dtml-var manage_tabs>
<h3> <code>portal_translations</code> Tool </h3>
<p> This tool embodies site-wide policies concerning content translation.
The default heuristics consists in searching first for a message
catalog next to the document, then a translation created by a member
and in the end a global message catalog.
</p>
<dtml-var manage_page_footer>
Updating an existing Zope CMF
Export your CMF as XML
First use the update-products script on the XML file
Beware : buggy, will destroy some non CMF types !!!
Update portal types (! local roles)
Add
gettext
portal_translations
portal_membership
\ No newline at end of file
? AcceptLanguage.pyc
? Gettext.pyc
? GettextTag.pyc
? LanguageManager.pyc
? LocalAttributes.pyc
? LocalContent.pyc
? LocalFiles.pyc
? LocalFolder.pyc
? LocalPropertyManager.pyc
? Localizer.pyc
? MessageCatalog.pyc
? Translator.py.org
? Utils.pyc
? __init__.pyc
? jps.diff
? refresh.txt
? zgettext.pyc
? locale/ca.mo
? locale/de.mo
? locale/en.mo
? locale/es.mo
? locale/eu.mo
? locale/fr.mo
? locale/hu.mo
Index: AcceptLanguage.py
===================================================================
RCS file: /cvsroot/lleu/Localizer/AcceptLanguage.py,v
retrieving revision 1.2
diff -u -r1.2 AcceptLanguage.py
--- AcceptLanguage.py 21 Feb 2002 10:53:54 -0000 1.2
+++ AcceptLanguage.py 16 Apr 2002 08:07:44 -0000
@@ -23,7 +23,6 @@
#from UserDict import UserDict
from types import StringType
-
class AcceptLanguageNode:
"""
This class is a recursive representation of a tree.
Index: Localizer.py
===================================================================
RCS file: /cvsroot/lleu/Localizer/Localizer.py,v
retrieving revision 1.53
diff -u -r1.53 Localizer.py
--- Localizer.py 25 Feb 2002 09:46:40 -0000 1.53
+++ Localizer.py 16 Apr 2002 08:07:45 -0000
@@ -215,17 +215,17 @@
stack.append(self.id)
-## # Changing the language, useful snippets
-## security.declarePublic('changeLanguage')
-## changeLanguageForm = LocalDTMLFile('ui/changeLanguageForm', globals())
-## def changeLanguage(self, REQUEST, RESPONSE):
-## """ """
-## lang = REQUEST['lang']
+ # Changing the language, useful snippets
+ security.declarePublic('changeLanguage')
+ changeLanguageForm = LocalDTMLFile('ui/changeLanguageForm', globals())
+ def changeLanguage(self, REQUEST, RESPONSE):
+ """ """
+ lang = REQUEST['lang']
-## path = self.absolute_url()[len(REQUEST['SERVER_URL']):] or '/'
-## RESPONSE.setCookie('LOCALIZER_LANGUAGE', lang, path=path)
+ path = self.absolute_url()[len(REQUEST['SERVER_URL']):] or '/'
+ RESPONSE.setCookie('LOCALIZER_LANGUAGE', lang, path=path)
-## RESPONSE.redirect(REQUEST['HTTP_REFERER'])
+ RESPONSE.redirect(REQUEST['HTTP_REFERER'])
# Upgrading..
security.declarePublic('need_upgrade')
Index: MessageCatalog.py
===================================================================
RCS file: /cvsroot/lleu/Localizer/MessageCatalog.py,v
retrieving revision 1.17
diff -u -r1.17 MessageCatalog.py
--- MessageCatalog.py 25 Feb 2002 09:46:40 -0000 1.17
+++ MessageCatalog.py 16 Apr 2002 08:07:46 -0000
@@ -379,9 +379,14 @@
d[k] = ""
# Generate the file
+ quote_esc = re.compile(r'"')
for k, v in d.items():
- r.append('msgid "%s"' % k)
- r.append('msgstr "%s"' % v)
+ r.append('msgid ""')
+ for line in k.split('\n'):
+ r.append( '"%s"' % quote_esc.sub('\\"',line))
+ r.append('msgstr ""')
+ for line in v.split('\n'):
+ r.append( '"%s"' % quote_esc.sub('\\"',line))
r.append('')
@@ -405,10 +410,29 @@
k, k, k, d = parse_po_file(content)
for k, v in d.items():
- k = k[0]
+ if len(k) == 1:
+ # single line msgid
+ k = k[0]
+ else:
+ # multiline msgid
+ if k[0] == '':
+ k = '\n'.join(k[1:])
+ else:
+ k = '\n'.join(k)
if not messages.has_key(k):
messages[k] = PersistentMapping()
- messages[k][lang] = v[1][0]
+ # Take the commentaries only
+ v = v[1]
+ if len(v) == 1:
+ # single line msgstr
+ v = v[0]
+ else:
+ # multiline msgstr
+ if v[0] == '':
+ v = '\n'.join(v[1:])
+ else:
+ v = '\n'.join(v)
+ messages[k][lang] = v
if REQUEST is not None:
return self.manage_messages(self, REQUEST)
Index: __init__.py
===================================================================
RCS file: /cvsroot/lleu/Localizer/__init__.py,v
retrieving revision 1.35
diff -u -r1.35 __init__.py
--- __init__.py 25 Feb 2002 09:46:40 -0000 1.35
+++ __init__.py 16 Apr 2002 08:07:46 -0000
@@ -115,12 +115,12 @@
# Add the language from the form
lang = request.form.get('LOCALIZER_LANGUAGE', None)
if lang is not None:
- accept_language[lang] = 3.0
+ accept_language[lang.split('-',1)] = 3.0
# Add the language from the cookies
lang = request.cookies.get('LOCALIZER_LANGUAGE', None)
if lang is not None:
- accept_language[lang] = 2.0
+ accept_language[lang.split('-',1)] = 2.0
self.other['USER_PREF_LANGUAGES'] = accept_language
@@ -193,7 +193,7 @@
context.registerClass(
LocalContent.LocalContent,
constructors = (LocalContent.manage_addLocalContentForm,
- LocalContent.manage_addLocalContent),
+ LocalContent.manage_addLocalContent),
icon='img/local_content.gif')
# Register MessageCatalog
Index: zgettext.py
===================================================================
RCS file: /cvsroot/lleu/Localizer/zgettext.py,v
retrieving revision 1.15
diff -u -r1.15 zgettext.py
--- zgettext.py 25 Feb 2002 09:46:40 -0000 1.15
+++ zgettext.py 16 Apr 2002 08:07:47 -0000
@@ -39,10 +39,11 @@
def parse_po_file(content):
# The regular expressions
com = re.compile('^#.*')
- msgid = re.compile(r'^ *msgid *"(.*?[^\\]*)"')
- msgstr = re.compile(r'^ *msgstr *"(.*?[^\\]*)"')
- re_str = re.compile(r'^ *"(.*?[^\\])"')
+ msgid = re.compile(r'^ *msgid *"(.*[^\\]*)"')
+ msgstr = re.compile(r'^ *msgstr *"(.*[^\\]*)"')
+ re_str = re.compile(r'^ *"(.*[^\\])"')
blank = re.compile(r'^\s*$')
+ quote_esc = re.compile(r'\\"')
trans = {}
pointer = 0
@@ -59,7 +60,8 @@
state = 1
pointer = pointer + 1
elif msgid.match(line):
- MSGID.append(msgid.match(line).group(1))
+ line = msgid.match(line).group(1)
+ MSGID.append(quote_esc.sub('"',line))
state = 2
pointer = pointer + 1
elif blank.match(line):
@@ -72,7 +74,8 @@
state = 1
pointer = pointer + 1
elif msgid.match(line):
- MSGID.append(msgid.match(line).group(1))
+ line = msgid.match(line).group(1)
+ MSGID.append(quote_esc.sub('"',line))
state = 2
pointer = pointer + 1
elif blank.match(line):
@@ -85,11 +88,13 @@
state = 2
pointer = pointer + 1
elif re_str.match(line):
- MSGID.append(re_str.match(line).group(1))
+ line = re_str.match(line).group(1)
+ MSGID.append(quote_esc.sub('"',line))
state = 2
pointer = pointer + 1
elif msgstr.match(line):
- MSGSTR.append(msgstr.match(line).group(1))
+ line = msgstr.match(line).group(1)
+ MSGSTR.append(quote_esc.sub('"',line))
state = 3
pointer = pointer + 1
elif blank.match(line):
@@ -102,7 +107,8 @@
trans[tuple(MSGID)] = (COM, MSGSTR)
state = 0
elif re_str.match(line):
- MSGSTR.append(re_str.match(line).group(1))
+ line = re_str.match(line).group(1)
+ MSGSTR.append(quote_esc.sub('"',line))
state = 3
pointer = pointer + 1
elif blank.match(line):
## Script (Python) "TranslatedBody"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=Modify the status of a content object
##
##############################################################################
#
# Base18: a Zope product which provides multilingual services for CMF Default
# documents.
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
#
# This program as such is not intended to be used by end users. End
# users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
return context.CookedBody()
\ No newline at end of file
## Script (Python) "TranslatedDescription"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=Modify the status of a content object
##
##############################################################################
#
# Base18: a Zope product which provides multilingual services for CMF Default
# documents.
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
#
# This program as such is not intended to be used by end users. End
# users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
Description = context.Description
if callable(Description):
Description = Description()
if Description: return Description
return ''
## Script (Python) "TranslatedTitle"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=Modify the status of a content object
##
##############################################################################
#
# Base18: a Zope product which provides multilingual services for CMF Default
# documents.
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
#
# This program as such is not intended to be used by end users. End
# users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
title=context.title
if callable(title):
title=title()
if title: return context.gettext(title)
return ''
## Script (Python) "TranslatedTitle_or_id"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=Modify the status of a content object
##
##############################################################################
#
# Base18: a Zope product which provides multilingual services for CMF Default
# documents.
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
#
# This program as such is not intended to be used by end users. End
# users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
title=context.title
if callable(title):
title=title()
if title: return title
return context.getId()
<dtml-let relative_to_content="1">
<dtml-var standard_html_header>
</dtml-let>
<div class="Desktop">
<div class="Document">
<dtml-var content_byline>
<div class="Discussion">
<dtml-var aboveInThread>
</div>
<h1> &dtml-TranslatedTitle; </h1>
<dtml-var TranslatedBody>
<div class="Discussion">
<dtml-var viewThreadsAtBottom>
</div>
</div>
</div>
<dtml-var standard_html_footer>
<dtml-let relative_to_content="1">
<dtml-var standard_html_header>
</dtml-let>
<div class="Desktop">
<div class="Document">
<dtml-var content_byline>
<dtml-var TranslatedBody>
<div class="Discussion">
<dtml-var viewThreadsAtBottom>
</div>
</div>
</div>
<dtml-var standard_html_footer>
<dtml-var standard_html_header>
<div class="Desktop">
<div class="Link">
<dtml-var content_byline>
<p> <a href="&dtml-getRemoteUrl;">"><dtml-var getRemoteUrl></a> </p>
<dtml-var TranslatedDescription>
<div class="Discussion">
<dtml-var viewThreadsAtBottom>
</div>
</div>
</div>
<dtml-var standard_html_footer>
<dtml-var standard_html_header>
<div class="Desktop">
<div class="File">
<dtml-var content_byline>
<p>
<b>Filename</b>: <dtml-var getId><br>
<b>Size</b>: <dtml-var size><br>
<b>Content type</b>: <dtml-var content_type><br>
<b>Description</b>: <dtml-var name="description" newline_to_br>
</p>
<a href="&dtml-absolute_url;">Download &dtml-title;</a>
<div class="Discussion">
<dtml-var viewThreadsAtBottom>
</div>
</div>
</div>
<dtml-var standard_html_footer>
<dtml-var standard_html_header>
<h2><dtml-var title_or_id></h2>
<dtml-let folder_url=absolute_url>
<dtml-in expr="objectValues( [ 'Document', 'News Item', 'Portal Image', 'Portal File', 'Base18 Document', 'Base18 News Item', 'Base18 File', 'Base18 Image' ] )"
skip_unauthorized>
<dtml-if sequence-start>
<h3> Documents, Images, and Files </h3>
<ul>
</dtml-if>
<li> <a href="&dtml-id;"> <dtml-var TranslatedTitle> </a>
<dtml-if name="Description"><blockquote>&dtml-TranslatedDescription;</blockquote></dtml-if></li>
<dtml-if sequence-end>
</ul>
</dtml-if>
</dtml-in>
<dtml-in expr="objectValues( [ 'Link', 'Favorite', 'Base18 Link','Base18 Favorite' ] )" skip_unauthorized>
<dtml-if sequence-start>
<h3> Links </h3>
<ul>
</dtml-if>
<li> <a href="&dtml-getRemoteUrl;"> <dtml-var TranslatedTitle> </a>
<dtml-if name="Description"><blockquote>&dtml-TranslatedDescription;</blockquote></dtml-if></li>
<dtml-if sequence-end>
</ul>
</dtml-if>
</dtml-in>
<dtml-in expr="objectValues( [ 'Folder', 'Portal Folder', 'Skinned Folder' , 'Base18 Folder'] )" skip_unauthorized>
<dtml-if sequence-start>
<h3> Folders </h3>
<ul>
</dtml-if>
<li> <a href="&dtml-id;"> <dtml-var TranslatedTitle_or_id> </a>
<dtml-if name="Description"><blockquote>&dtml-TranslatedDescription;</blockquote></dtml-if></li>
<dtml-if sequence-end>
</ul>
</dtml-if>
</dtml-in>
</dtml-let>
<dtml-var standard_html_footer>
<dtml-comment>
folderfilter cookie maintenance.
</dtml-comment>
<dtml-in filterCookie>
</dtml-in>
<dtml-comment>
Folder contents display.
</dtml-comment>
<dtml-call "REQUEST.set('isDesktop', 1)">
<dtml-var standard_html_header>
<dtml-if "not portal_membership.checkPermission('List folder contents'
, this())">
<dtml-call "RESPONSE.redirect(absolute_url())">
</dtml-if>
<!-- This is the desktop area -->
<div class="Desktop">
<h1> Desktop </h1>
<form action="&dtml-absolute_url;" method="POST">
<table class="FormLayout">
<tr>
<td valign="top">
<table class="ContentsList">
<dtml-if "portal_membership.checkPermission( 'List folder contents'
, this(), 'aq_parent')">
<dtml-let upNav="_.hasattr(this().aq_parent, 'portal_url')"
upID="this().aq_parent.getId()"
>
<tr valign="top">
<td width="16"><br></td>
<td>
<dtml-if upNav>
<a href="../folder_contents"
><img src="&dtml-portal_url;/UpFolder_icon.gif"
alt="[Link]" border="0"></a>
</dtml-if>
</td>
<td>
<dtml-if upNav>
Up to <a href="../folder_contents"><dtml-var upID></a>
<dtml-else>
<span class="mild">Root</span>
</dtml-if>
</td>
</tr>
</dtml-let>
</dtml-if>
<dtml-let filterString="REQUEST.get( 'folderfilter', '' )"
filter="decodeFolderFilter( filterString )"
>
<dtml-in expr="listFolderContents( contentFilter=filter )"
sort="getId" size="19" start=qs skip_unauthorized>
<dtml-if next-sequence>
<dtml-call "REQUEST.set('next-sequence'
, _['next-sequence-start-number'])">
</dtml-if>
<dtml-if previous-sequence>
<dtml-call "REQUEST.set('previous-sequence'
,_['previous-sequence-start-number'])">
</dtml-if>
<dtml-let obj="_.getitem('sequence-item', 0 )"
folderish=isPrincipiaFolderish
portalish="_.hasattr( obj, 'isPortalContent' )
and obj.isPortalContent"
methodID="folderish and '/folder_contents' or ( portalish
and '/view' or '' )"
getIcon="_.hasattr(obj, 'getIcon') and obj.getIcon()"
icon="getIcon or _.getattr(obj, 'icon', '')"
>
<tr valign="top">
<td>
<input type="checkbox" name="ids:list" value="&dtml-getId;"
id="cb_&dtml-getId;" />
</td>
<td>
<dtml-if icon>
<a href="&dtml.url_quote-getId;&dtml-methodID;"
><img src="&dtml-portal_url;/&dtml-icon;"
alt="&dtml-Type;" border="0"></a>
</dtml-if>
</td>
<td>
<a href="&dtml.url_quote-getId;&dtml-methodID;"
>&dtml-getId;<dtml-if title> (&dtml-title;)</dtml-if></a>
</td>
</tr>
<dtml-if qs>
<dtml-if "_['sequence-index'] - _.int(qs) == 7">
</table><dtml-comment> End of first column </dtml-comment>
</td>
<td>
<table class="ContentsList">
</dtml-if>
<dtml-else> <dtml-comment> No batch </dtml-comment>
<dtml-if "_['sequence-index'] == 8">
</table><dtml-comment> End of first column </dtml-comment>
</td>
<td valign="top">
<table class="ContentsList">
</dtml-if>
</dtml-if>
</dtml-let>
</dtml-in>
</dtml-let>
</table>
</td>
</tr>
<tr>
<td align="right">
<dtml-if previous-sequence>
<a href="folder_contents?qs=&dtml-previous-sequence;">Previous items</a>
<dtml-else>
<br>
</dtml-if>
</td>
<td align="left">
<dtml-if next-sequence>
<a href="folder_contents?qs=&dtml-next-sequence;">Next items</a>
<dtml-else>
<br>
</dtml-if>
</td>
</tr>
</table><dtml-comment> End of listing table </dtml-comment>
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<td align="left" valign="top" width="16"></td>
<td align="left" valign="top">
<dtml-if expr="portal_membership.checkPermission('Add portal content'
, this())">
<input type="submit" name="folder_factories:method" value="New...">
</dtml-if>
<dtml-if expr="portal_membership.checkPermission('View management screens'
, this())">
<input type="submit" name="folder_rename_form:method" value="Rename">
<input type="submit" name="folder_cut:method" value="Cut">
<input type="submit" name="folder_copy:method" value="Copy">
<dtml-if cb_dataValid>
<input type="submit" name="folder_paste:method" value="Paste">
</dtml-if>
</dtml-if>
<dtml-if expr="portal_membership.checkPermission('Delete objects', this())">
<input type="submit" name="folder_delete:method" value="Delete">
</dtml-if>
</td>
</tr>
</table>
</form>
<dtml-var folder_filter_form>
</div>
<dtml-var standard_html_footer>
return context.TranslatedBody()
\ No newline at end of file
return context.TranslatedDescription()
\ No newline at end of file
return context.TranslatedTitle()
\ No newline at end of file
return context.TranslatedTitle_or_id()
\ No newline at end of file
<dtml-var standard_html_header>
<div class="Desktop">
<div class="Image">
<dtml-var tag>
<div class="Discussion">
<dtml-var viewThreadsAtBottom>
</div>
</div>
</div>
<dtml-var standard_html_footer>
<dtml-var standard_html_header>
<div class="Desktop">
<div class="Link">
<dtml-var content_byline>
<p>
<a href="<dtml-var remote_url>"><dtml-var remote_url></a></p>
</p>
<dtml-var TranslatedDescription>
<div class="Discussion">
<dtml-var viewThreadsAtBottom>
</div>
</div>
</div>
<dtml-var standard_html_footer>
<dtml-let relative_to_content="1">
<dtml-var standard_html_header>
</dtml-let>
<div class="Desktop">
<div class="NewsItem">
<blockquote class="Description">
<dtml-var TranslatedDescription fmt="structured-text">
</blockquote>
<dtml-var content_byline>
<dtml-var TranslatedBody>
<div class="Discussion">
<dtml-var viewThreadsAtBottom>
</div>
</div>
</div>
<dtml-var standard_html_footer>
## Script (Python) "translation_edit"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=target_content, target_language, text, file='', SafetyBelt='', choice=' Change '
##title=Edit a document
##
##############################################################################
#
# Base18: a Zope product which provides multilingual services for CMF Default
# documents.
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
#
# This program as such is not intended to be used by end users. End
# users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
#try:
if 1:
target_content = context.restrictedTraverse(target_content, None)
context.edit( ''
, text
, file
, safety_belt=SafetyBelt
, target_language=target_language
, target_content=target_content
)
qst='portal_status_message=Document+changed.'
if choice == ' Change and View ':
target_action = context.getTypeInfo().getActionById( 'view' )
else:
target_action = context.getTypeInfo().getActionById( 'edit' )
context.REQUEST.RESPONSE.redirect( '%s/%s?%s' % ( context.absolute_url()
, target_action
, qst
) )
#except Exception, msg:
# target_action = context.getTypeInfo().getActionById( 'edit' )
# context.REQUEST.RESPONSE.redirect('%s/%s?portal_status_message=%s' % (
# context.absolute_url()
# , target_action
# , msg
# ))
<dtml-var standard_html_header>
<div class="Desktop">
<dtml-if message>
<p>&dtml-message;</p>
<hr>
</dtml-if>
<div class="Document">
<h2>Edit &dtml-getId;</h2>
<form action="translation_edit" method="post" enctype="multipart/form-data">
<input type="hidden" name="SafetyBelt" value="&dtml-SafetyBelt;">
<table class="FormLayout">
<tr>
<th>
Title
</th>
<td>
<dtml-var Title>
</td>
</tr>
<tr>
<th>
Description
</th>
<td>
<dtml-var description>
</td>
</tr>
<tr>
<th>
Target
</th>
<td>
<input type="text" name="target_content:string" value="&dtml-targetContentPath;" />
</td>
</tr>
<tr>
<th>
Language
</th>
<td>
<input type="text" name="target_language:string" value="&dtml-targetLanguage;" />
</td>
</tr>
<tr>
<th> Upload </th>
<td>
<input type="file" name="file" size="25">
</td>
</tr>
<tr>
<th class="TextField"> Edit </th>
<td class="TextField">
<textarea name="text:text"
rows="20" cols="80"><dtml-var EditableBody html_quote></textarea>
</td>
</tr>
<tr>
<td> <br> </td>
<td>
<input type="submit" name="choice" value=" Change ">
<input type="submit" name="choice" value=" Change and View ">
</td>
</tr>
</table>
</form>
</div>
</div>
<dtml-var standard_html_footer>
\ No newline at end of file
<dtml-var standard_html_header>
<dtml-let member="portal_membership.getAuthenticatedMember()"
translation_state="portal_workflow.getInfoFor(this(), 'translation_state')"
translation_history="portal_workflow.getInfoFor(this(), 'translation_history')"
url="portal_workflow.getInfoFor(this(), 'url')">
<div class="Desktop">
<h1> Register a Translation </h1>
<dtml-if message>
<h2 class="DesktopTitle">&dtml-message;</h2>
</dtml-if>
<p>To make use of a translation, it has to be reviewed by one of the site's reviewers.
A <b>registered</b> translation becomes the default translation for a given document
to the general member base and anonymous visitors.</p>
<form method="post" action="translation_status_modify">
<table class="FormLayout">
<tr>
<td valign=top align=left>
<strong>Status</strong>
</td>
<td valign=top align=left>
This item is currently in <b>&dtml-translation_state;</b> status.
<input type="hidden" name="workflow_action" value="register">
</td>
</tr>
<tr>
<td valign=top align=left colspan=2>
<strong><em>Comments</em></strong><br>
<textarea name="comment" cols="60" rows="5" wrap="soft"
style="width: 100%"></textarea>
</td>
</tr>
<tr>
<td></td>
<td><input type="submit" value=" Register Translation "></td>
</tr>
</table>
</form>
<dtml-if review_history>
<p><strong>Reviewing history</strong><br>
<dtml-in review_history mapping reverse>
<dtml-var time fmt="aCommon"> &dtml-action;
<dtml-if effective_date>
(effective: <dtml-var effective_date fmt="aCommon">)
</dtml-if>
by &dtml-actor;<br>
<dtml-if "_['sequence-item']['comments']">
</p><dtml-var "_['sequence-item']['comments']" fmt="structured-text"><p>
</dtml-if>
</dtml-in>
</p>
</dtml-if>
</dtml-let>
</div>
<dtml-var standard_html_footer>
\ No newline at end of file
## Script (Python) "translation_status_modify"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=workflow_action, comment='', url=''
##title=Modify the status of a content object
##
##############################################################################
#
# Base18: a Zope product which provides multilingual services for CMF Default
# documents.
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
#
# This program as such is not intended to be used by end users. End
# users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
context.portal_workflow.doActionFor(
context,
workflow_action,
comment=comment)
content = context.restrictedTraverse(context.targetContent)
language = context.targetLanguage
translation = context.restrictedTraverse(context.id)
if workflow_action == 'unregister':
context.portal_translations.unregisterTranslation(content,translation,language=language)
redirect_url = '%s/view?%s' % ( context.absolute_url()
, 'portal_status_message=Status+changed.'
)
elif workflow_action == 'register':
context.portal_translations.registerTranslation(content,translation,language=language)
redirect_url = '%s/view?%s' % ( context.absolute_url()
, 'portal_status_message=Status+changed.'
)
else:
redirect_url = '%s/view?%s' % ( context.absolute_url()
, 'portal_status_message=Status+changed.'
)
context.REQUEST[ 'RESPONSE' ].redirect( redirect_url )
<dtml-var standard_html_header>
<dtml-let member="portal_membership.getAuthenticatedMember()"
translation_state="portal_workflow.getInfoFor(this(), 'translation_state')"
translation_history="portal_workflow.getInfoFor(this(), 'translation_history')"
url="portal_workflow.getInfoFor(this(), 'url')">
<div class="Desktop">
<h1> Submit a Translation for Review </h1>
<dtml-if message>
<h2 class="DesktopTitle">&dtml-message;</h2>
</dtml-if>
<p>To make use of a translation, it has to be reviewed by one of the site's reviewers.
A <b>registered</b> translation becomes the default translation for a given document
to the general member base and anonymous visitors.</p>
<form method="post" action="translation_status_modify">
<table class="FormLayout">
<tr>
<td valign=top align=left>
<strong>Status</strong>
</td>
<td valign=top align=left>
This item is currently in <b>&dtml-translation_state;</b> status.
<input type="hidden" name="workflow_action" value="submit">
</td>
</tr>
<tr>
<td valign=top align=left colspan=2>
<strong><em>Comments</em></strong><br>
<textarea name="comment" cols="60" rows="5" wrap="soft"
style="width: 100%"></textarea>
</td>
</tr>
<tr>
<td></td>
<td><input type="submit" value=" Submit Translation "></td>
</tr>
</table>
</form>
<dtml-if review_history>
<p><strong>Reviewing history</strong><br>
<dtml-in review_history mapping reverse>
<dtml-var time fmt="aCommon"> &dtml-action;
<dtml-if effective_date>
(effective: <dtml-var effective_date fmt="aCommon">)
</dtml-if>
by &dtml-actor;<br>
<dtml-if "_['sequence-item']['comments']">
</p><dtml-var "_['sequence-item']['comments']" fmt="structured-text"><p>
</dtml-if>
</dtml-in>
</p>
</dtml-if>
</dtml-let>
</div>
<dtml-var standard_html_footer>
\ No newline at end of file
<dtml-var standard_html_header>
<div class="Desktop">
<div class="File">
<dtml-var content_byline>
<p>
<b>Document</b>: <dtml-var getId><br>
<b>Description</b>: <dtml-var name="description" newline_to_br>
</p>
<a href="&dtml-absolute_url;/TranslationTemplate">Download &dtml-title;</a>
<div class="Discussion">
<dtml-var viewThreadsAtBottom>
</div>
</div>
</div>
<dtml-var standard_html_footer>
<dtml-let relative_to_content="1">
<dtml-var standard_html_header>
</dtml-let>
<div class="Desktop">
<div class="Document">
<dtml-var content_byline>
<dtml-var CookedBody>
<div class="Discussion">
<dtml-var viewThreadsAtBottom>
</div>
</div>
</div>
<dtml-var standard_html_footer>
## Script (Python) "change_language"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=Modify the language cookie
##
request = context.REQUEST
PARENTS = request.PARENTS
portal_root = context.portal_url.getPortalObject()
portal_root_path = portal_root.getPhysicalPath()
lang_list = context.gettext.get_available_languages()
if len(PARENTS) >= (1 + len(portal_root_path)):
section = PARENTS[len(PARENTS) - 1
- len(portal_root.getPhysicalPath())]
if section.id in lang_list:
if len(PARENTS) >= (2 + len(portal_root_path)):
section = PARENTS[len(PARENTS) - 2
- len(portal_root_path)]
else:
section = context
else:
section = context
return section
## Script (Python) "change_language"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=Modify the language cookie
##
request = context.REQUEST
PARENTS = request.PARENTS
portal_root = context.portal_url.getPortalObject()
portal_root_path = portal_root.getPhysicalPath()
lang_list = context.gettext.get_available_languages()
if len(PARENTS) >= (2 + len(portal_root_path)):
section = PARENTS[len(PARENTS) - 1
- len(portal_root.getPhysicalPath())]
subsection = PARENTS[len(PARENTS) - 2
- len(portal_root.getPhysicalPath())]
if section.id in lang_list:
if len(PARENTS) >= (3 + len(portal_root_path)):
subsection = PARENTS[len(PARENTS) - 3
- len(portal_root_path)]
else:
subsection = context
else:
subsection = context
return subsection
\ No newline at end of file
TODO
- make sure permission to see private folder is OK
\ No newline at end of file
<dtml-let portal_obj="portal_url.getPortalObject()">
<dtml-if "portal_obj != this()">
<a href="&dtml-portal_url;"><dtml-var "portal_obj.Title()"></a>&nbsp;<dtml-in "REQUEST.PARENTS[0:-(_.len(portal_obj.getPhysicalPath()))]" reverse>&gt;&nbsp;<a href="<dtml-var local_absolute_url>"><dtml-var TranslatedTitle_or_id></a>&nbsp;</dtml-in>
<dtml-if "REQUEST.PARENTS[0] != this()">&gt;&nbsp;<a href="<dtml-var local_absolute_url>"><dtml-var TranslatedTitle_or_id></a></dtml-if>
</dtml-if>
</dtml-let>
## Script (Python) "change_language"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=REQUEST
##title=Modify the language cookie
##
lang = REQUEST['lang']
path = context.absolute_url()[len(REQUEST['SERVER_URL']):] or '/'
REQUEST.RESPONSE.setCookie('LOCALIZER_LANGUAGE', lang, path=path)
REQUEST.RESPONSE.redirect(REQUEST['HTTP_REFERER'])
## Script (Python) "combined_subjects"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=Combine all possible subjects and sub-subjects
##
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
def buildCombinedSubjects(topic):
myquery = topic.buildQuery()
if myquery.has_key('Subject'):
subjects = [myquery['Subject']]
else:
subjects = []
for subtopic in topic.listSubtopics():
subjects = subjects + buildCombinedSubjects(subtopic)
return subjects
return buildCombinedSubjects(context)
<dtml-comment>
Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
This software is subject to the provisions of the Zope Public License,
Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
FOR A PARTICULAR PURPOSE
</dtml-comment>
<dtml-var standard_html_header>
<dtml-let member="portal_membership.getAuthenticatedMember()"
review_state="portal_workflow.getInfoFor(this(), 'review_state')"
review_history="portal_workflow.getInfoFor(this(), 'review_history')">
<div class="Desktop">
<h1> Hide Item </h1>
<dtml-if message>
<h2 class="DesktopTitle">&dtml-message;</h2>
</dtml-if>
<p align="center"><img src="corporate_workflow.png" /></p>
<p>A <b>private</b> item is only available to its owner.</p>
<p>Another way to control the visibility of an item is with its <b>effective
date</b>. An item is not publicly available before its effective date,
<em>even if its status is <b>published</b></em>.</p>
<form method="post" action="content_status_modify">
<table class="FormLayout">
<tr>
<td valign=top align=left>
<strong>Status</strong>
</td>
<td valign=top align=left>
This item is currently in <b>&dtml-review_state;</b> status.
<input type="hidden" name="workflow_action" value="hide">
</td>
</tr>
<tr>
<td valign=top align=left colspan=2>
<strong><em>Comments</em></strong><br>
<textarea name="comment" cols="60" rows="5" wrap="soft"
style="width: 100%"></textarea>
</td>
</tr>
<tr>
<td></td>
<td><input type="submit" value=" Hide this Item "></td>
</tr>
</table>
</form>
<dtml-if review_history>
<p><strong>Reviewing history</strong><br>
<dtml-in review_history mapping reverse>
<dtml-var time fmt="aCommon"> &dtml-action;
<dtml-if effective_date>
(effective: <dtml-var effective_date fmt="aCommon">)
</dtml-if>
by &dtml-actor;<br>
<dtml-if "_['sequence-item']['comments']">
</p><dtml-var "_['sequence-item']['comments']" fmt="structured-text"><p>
</dtml-if>
</dtml-in>
</p>
</dtml-if>
</dtml-let>
</div>
<dtml-var standard_html_footer>
<dtml-comment>
Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
This software is subject to the provisions of the Zope Public License,
Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
FOR A PARTICULAR PURPOSE
</dtml-comment>
<dtml-var standard_html_header>
<dtml-let member="portal_membership.getAuthenticatedMember()"
review_state="portal_workflow.getInfoFor(this(), 'review_state')"
review_history="portal_workflow.getInfoFor(this(), 'review_history')">
<div class="Desktop">
<h1> Publish Item </h1>
<dtml-if message>
<h2 class="DesktopTitle">&dtml-message;</h2>
</dtml-if>
<p align="center"><img src="corporate_workflow.png" /></p>
<p>A <b>published</b> item is available to the general
member base and anonymous visitors.</p>
<p>Another way to control the visibility of an item is with its <b>effective
date</b>. An item is not publicly available before its effective date,
<em>even if its status is <b>published</b></em>.</p>
<form method="post" action="content_status_modify">
<table class="FormLayout">
<tr>
<td valign=top align=left>
<strong>Status</strong>
</td>
<td valign=top align=left>
This item is currently in <b>&dtml-review_state;</b> status.
<input type="hidden" name="workflow_action" value="publish">
</td>
</tr>
<tr>
<td valign=top align=left colspan=2>
<strong><em>Comments</em></strong><br>
<textarea name="comment" cols="60" rows="5" wrap="soft"
style="width: 100%"></textarea>
</td>
</tr>
<tr>
<td></td>
<td><input type="submit" value=" Publish this Item "></td>
</tr>
</table>
</form>
<dtml-if review_history>
<p><strong>Reviewing history</strong><br>
<dtml-in review_history mapping reverse>
<dtml-var time fmt="aCommon"> &dtml-action;
<dtml-if effective_date>
(effective: <dtml-var effective_date fmt="aCommon">)
</dtml-if>
by &dtml-actor;<br>
<dtml-if "_['sequence-item']['comments']">
</p><dtml-var "_['sequence-item']['comments']" fmt="structured-text"><p>
</dtml-if>
</dtml-in>
</p>
</dtml-if>
</dtml-let>
</div>
<dtml-var standard_html_footer>
<dtml-comment>
Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
This software is subject to the provisions of the Zope Public License,
Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
FOR A PARTICULAR PURPOSE
</dtml-comment>
<dtml-var standard_html_header>
<dtml-let member="portal_membership.getAuthenticatedMember()"
review_state="portal_workflow.getInfoFor(this(), 'review_state')"
review_history="portal_workflow.getInfoFor(this(), 'review_history')">
<div class="Desktop">
<h1> Reject Item </h1>
<dtml-if message>
<h2 class="DesktopTitle">&dtml-message;</h2>
</dtml-if>
<p align="center"><img src="corporate_workflow.png" /></p>
<p>Use this form to reject the publication of a content item and set its
status to <b>Private</b>, thereby making it unavailable to
other portal members and visitors.</p>
<form method="post" action="content_status_modify">
<table class="FormLayout">
<tr>
<td valign=top align=left>
<strong>Status</strong>
</td>
<td valign=top align=left>
This item is currently in <b>&dtml-review_state;</b> status.
<input type="hidden" name="workflow_action" value="reject">
</td>
</tr>
<tr>
<td valign=top align=left colspan=2>
<strong><em>Comments</em></strong><br>
<textarea name="comment" cols="60" rows="5" wrap="soft"
style="width: 100%"></textarea>
</td>
</tr>
<tr>
<td></td>
<td><input type="submit" value=" Reject this Item "></td>
</tr>
</table>
</form>
<dtml-if review_history>
<p><strong>Reviewing history</strong><br>
<dtml-in review_history mapping reverse>
<dtml-var time fmt="aCommon"> &dtml-action;
<dtml-if effective_date>
(effective: <dtml-var effective_date fmt="aCommon">)
</dtml-if>
by &dtml-actor;<br>
<dtml-if "_['sequence-item']['comments']">
</p><dtml-var "_['sequence-item']['comments']" fmt="structured-text"><p>
</dtml-if>
</dtml-in>
</p>
</dtml-if>
</dtml-let>
</div>
<dtml-var standard_html_footer>
<dtml-comment>
Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
This software is subject to the provisions of the Zope Public License,
Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
FOR A PARTICULAR PURPOSE
</dtml-comment>
<dtml-var standard_html_header>
<dtml-let member="portal_membership.getAuthenticatedMember()"
review_state="portal_workflow.getInfoFor(this(), 'review_state')"
review_history="portal_workflow.getInfoFor(this(), 'review_history')">
<div class="Desktop">
<h1> Release Item </h1>
<dtml-if message>
<h2 class="DesktopTitle">&dtml-message;</h2>
</dtml-if>
<p align="center"><img src="corporate_workflow.png" /></p>
<p>A <b>published</b> item is available to the general
member base but not to anonymous visitors.</p>
<p>Another way to control the visibility of an item is with its <b>effective
date</b>. An item is not publicly available before its effective date,
<em>even if its status is <b>published</b></em>.</p>
<form method="post" action="content_status_modify">
<table class="FormLayout">
<tr>
<td valign=top align=left>
<strong>Status</strong>
</td>
<td valign=top align=left>
This item is currently in <b>&dtml-review_state;</b> status.
<input type="hidden" name="workflow_action" value="publish">
</td>
</tr>
<tr>
<td valign=top align=left colspan=2>
<strong><em>Comments</em></strong><br>
<textarea name="comment" cols="60" rows="5" wrap="soft"
style="width: 100%"></textarea>
</td>
</tr>
<tr>
<td></td>
<td><input type="submit" value=" Release this Item "></td>
</tr>
</table>
</form>
<dtml-if review_history>
<p><strong>Reviewing history</strong><br>
<dtml-in review_history mapping reverse>
<dtml-var time fmt="aCommon"> &dtml-action;
<dtml-if effective_date>
(effective: <dtml-var effective_date fmt="aCommon">)
</dtml-if>
by &dtml-actor;<br>
<dtml-if "_['sequence-item']['comments']">
</p><dtml-var "_['sequence-item']['comments']" fmt="structured-text"><p>
</dtml-if>
</dtml-in>
</p>
</dtml-if>
</dtml-let>
</div>
<dtml-var standard_html_footer>
<dtml-comment>
Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
This software is subject to the provisions of the Zope Public License,
Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
FOR A PARTICULAR PURPOSE
</dtml-comment>
<dtml-var standard_html_header>
<dtml-let member="portal_membership.getAuthenticatedMember()"
review_state="portal_workflow.getInfoFor(this(), 'review_state')"
review_history="portal_workflow.getInfoFor(this(), 'review_history')">
<div class="Desktop">
<h1> Retract Item </h1>
<dtml-if message>
<h2 class="DesktopTitle">&dtml-message;</h2>
</dtml-if>
<p align="center"><img src="corporate_workflow.png" /></p>
<p>Use this form to retract a content item by setting its
status to <b>Private</b>, thereby making it unavailable to
other portal members and visitors.</p>
<form method="post" action="content_status_modify">
<table class="FormLayout">
<tr>
<td valign=top align=left>
<strong>Status</strong>
</td>
<td valign=top align=left>
This item is currently in <b>&dtml-review_state;</b> status.
<input type="hidden" name="workflow_action" value="retract">
</td>
</tr>
<tr>
<td valign=top align=left colspan=2>
<strong><em>Comments</em></strong><br>
<textarea name="comment" cols="60" rows="5" wrap="soft"
style="width: 100%"></textarea>
</td>
</tr>
<tr>
<td></td>
<td><input type="submit" value=" Retract this Item "></td>
</tr>
</table>
</form>
<dtml-if review_history>
<p><strong>Reviewing history</strong><br>
<dtml-in review_history mapping reverse>
<dtml-var time fmt="aCommon"> &dtml-action;
<dtml-if effective_date>
(effective: <dtml-var effective_date fmt="aCommon">)
</dtml-if>
by &dtml-actor;<br>
<dtml-if "_['sequence-item']['comments']">
</p><dtml-var "_['sequence-item']['comments']" fmt="structured-text"><p>
</dtml-if>
</dtml-in>
</p>
</dtml-if>
</dtml-let>
</div>
<dtml-var standard_html_footer>
<dtml-comment>
Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
This software is subject to the provisions of the Zope Public License,
Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
FOR A PARTICULAR PURPOSE
</dtml-comment>
<dtml-var standard_html_header>
<dtml-let member="portal_membership.getAuthenticatedMember()"
review_state="portal_workflow.getInfoFor(this(), 'review_state')"
review_history="portal_workflow.getInfoFor(this(), 'review_history')">
<div class="Desktop">
<h1> Show Item </h1>
<dtml-if message>
<h2 class="DesktopTitle">&dtml-message;</h2>
</dtml-if>
<p align="center"><img src="corporate_workflow.png" /></p>
<p>A <b>restricted</b> item is available to your partners ie. Members which
have a Partner local role.</p>
<p>Another way to control the visibility of an item is with its <b>effective
date</b>. An item is not publicly available before its effective date,
<em>even if its status is <b>published</b></em>.</p>
<form method="post" action="content_status_modify">
<table class="FormLayout">
<tr>
<td valign=top align=left>
<strong>Status</strong>
</td>
<td valign=top align=left>
This item is currently in <b>&dtml-review_state;</b> status.
<input type="hidden" name="workflow_action" value="show">
</td>
</tr>
<tr>
<td valign=top align=left colspan=2>
<strong><em>Comments</em></strong><br>
<textarea name="comment" cols="60" rows="5" wrap="soft"
style="width: 100%"></textarea>
</td>
</tr>
<tr>
<td></td>
<td><input type="submit" value=" Show this Item to Partners "></td>
</tr>
</table>
</form>
<dtml-if review_history>
<p><strong>Reviewing history</strong><br>
<dtml-in review_history mapping reverse>
<dtml-var time fmt="aCommon"> &dtml-action;
<dtml-if effective_date>
(effective: <dtml-var effective_date fmt="aCommon">)
</dtml-if>
by &dtml-actor;<br>
<dtml-if "_['sequence-item']['comments']">
</p><dtml-var "_['sequence-item']['comments']" fmt="structured-text"><p>
</dtml-if>
</dtml-in>
</p>
</dtml-if>
</dtml-let>
</div>
<dtml-var standard_html_footer>
<dtml-comment>
Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
This software is subject to the provisions of the Zope Public License,
Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
FOR A PARTICULAR PURPOSE
</dtml-comment>
<dtml-var standard_html_header>
<dtml-let member="portal_membership.getAuthenticatedMember()"
review_state="portal_workflow.getInfoFor(this(), 'review_state')"
review_history="portal_workflow.getInfoFor(this(), 'review_history')">
<div class="Desktop">
<h1> Submit Item for Review </h1>
<dtml-if message>
<h2 class="DesktopTitle">&dtml-message;</h2>
</dtml-if>
<p align="center"><img src="corporate_workflow.png" /></p>
<p>To make an item published, it
has to be reviewed by one of the site's reviewers.
A <b>published</b> item is available to the general
member base and eventually to anonymous visitors.</p>
<p>Another way to control the visibility of an item is with its <b>effective
date</b>. An item is not publicly available before its effective date,
<em>even if its status is <b>published</b></em>.</p>
<form method="post" action="content_status_modify">
<table class="FormLayout">
<tr>
<td valign=top align=left>
<strong>Status</strong>
</td>
<td valign=top align=left>
This item is currently in <b>&dtml-review_state;</b> status.
<input type="hidden" name="workflow_action" value="submit">
</td>
</tr>
<tr>
<td valign=top align=left colspan=2>
<strong><em>Comments</em></strong><br>
<textarea name="comment" cols="60" rows="5" wrap="soft"
style="width: 100%"></textarea>
</td>
</tr>
<tr>
<td></td>
<td><input type="submit" value=" Submit Item "></td>
</tr>
</table>
</form>
<dtml-if review_history>
<p><strong>Reviewing history</strong><br>
<dtml-in review_history mapping reverse>
<dtml-var time fmt="aCommon"> &dtml-action;
<dtml-if effective_date>
(effective: <dtml-var effective_date fmt="aCommon">)
</dtml-if>
by &dtml-actor;<br>
<dtml-if "_['sequence-item']['comments']">
</p><dtml-var "_['sequence-item']['comments']" fmt="structured-text"><p>
</dtml-if>
</dtml-in>
</p>
</dtml-if>
</dtml-let>
</div>
<dtml-var standard_html_footer>
This diff is collapsed.
<dtml-comment>
Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
Jean-Paul Smets <jp@nexedi.com>
WARNING: This program as such is intended to be used by professional
programmers who take the whole responsability of assessing all potential
consequences resulting from its eventual inadequacies and bugs
This program as such is not intended to be used by end users. End
users who are looking for a ready-to-use solution with commercial
garantees and support are strongly adviced to contract a Free Software
Service Company
This program is Free Software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
</dtml-comment>
<dtml-let relative_to_content="1">
<dtml-var printable_html_header>
</dtml-let>
<div class="Document">
<p class="title">&dtml-TranslatedTitle;</h1>
<dtml-var TranslatedBody>
</div>
<dtml-var printable_html_footer>
<dtml-comment>
Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
Jean-Paul Smets <jp@nexedi.com>
WARNING: This program as such is intended to be used by professional
programmers who take the whole responsability of assessing all potential
consequences resulting from its eventual inadequacies and bugs
This program as such is not intended to be used by end users. End
users who are looking for a ready-to-use solution with commercial
garantees and support are strongly adviced to contract a Free Software
Service Company
This program is Free Software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
</dtml-comment>
<dtml-let relative_to_content="1">
<dtml-var printable_html_header>
</dtml-let>
<div class="Document">
<p class="title">&dtml-TranslatedTitle;</h1>
<p class="summary"><dtml-var TranslatedDescription></p>
<dtml-var TranslatedBody>
</div>
<dtml-var printable_html_footer>
<dtml-let relative_to_content="1">
<dtml-var standard_html_header>
</dtml-let>
<div class="Document">
<dtml-var TranslatedBody>
</div>
<dtml-if "not portal_membership.isAnonymousUser()">
<div class="ContentBy"><dtml-var content_byline></div>
</dtml-if>
<div class="Discussion">
<dtml-var viewThreadsAtBottom>
</div>
<dtml-var standard_html_footer>
<dtml-comment>
Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
Jean-Paul Smets <jp@nexedi.com>
WARNING: This program as such is intended to be used by professional
programmers who take the whole responsability of assessing all potential
consequences resulting from its eventual inadequacies and bugs
This program as such is not intended to be used by end users. End
users who are looking for a ready-to-use solution with commercial
garantees and support are strongly adviced to contract a Free Software
Service Company
This program is Free Software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
</dtml-comment>
<dtml-let relative_to_content="1">
<dtml-var printable_html_header>
</dtml-let>
<div class="Document">
<div align="center">
<h1><dtml-var title></h1>
</div>
<dtml-var TranslatedBody>
</div>
<dtml-if "not portal_membership.isAnonymousUser()">
<div class="ContentBy"><dtml-var content_byline></div>
</dtml-if>
<dtml-var printable_html_footer>
<dtml-let relative_to_content="1">
<dtml-var standard_html_header>
</dtml-let>
<div class="Document">
<dtml-var CookedBody>
</div>
<dtml-if "not portal_membership.isAnonymousUser()">
<div class="ContentBy"><dtml-var content_byline></div>
</dtml-if>
<div class="Discussion">
<dtml-var viewThreadsAtBottom>
</div>
<dtml-var standard_html_footer>
<dtml-if "'index.html' in objectIds()">
<dtml-var index.html>
<dtml-elif "'index.stx' in objectIds()">
<dtml-var index.stx>
<dtml-elif "'default.htm' in objectIds()">
<dtml-var default.htm>
<dtml-else>
<dtml-var standard_html_header>
<dtml-let folder_url=absolute_url>
<div class="Document">
<dtml-if name="Description">
<p><dtml-var TranslatedDescription></p>
</dtml-if>
<dtml-in expr="objectValues()" skip_unauthorized
sort=TranslatedTitle_or_id>
<dtml-let obj="_.getitem('sequence-item', 0 )"
folderish=isPrincipiaFolderish
portalish="_.hasattr( obj, 'isPortalContent' ) and obj.isPortalContent"
getIcon="_.hasattr(obj, 'getIcon') and obj.getIcon()"
icon="getIcon or _.getattr(obj, 'icon', '')">
<dtml-if portalish>
<h1>
<dtml-if icon>
<a href="&dtml-folder_url;/&dtml.url_quote-getId;"><img
src="&dtml-portal_url;/&dtml-icon;" alt="&dtml-Type;" border="0">
</a>
</dtml-if>
<a href="&dtml-folder_url;/&dtml.url_quote-getId;"
>&dtml-TranslatedTitle_or_id;</a>
</h1>
<dtml-if name="Description">
<p>&dtml.html_quote-TranslatedDescription;</p>
</dtml-if>
</dtml-if>
</dtml-let>
</dtml-in>
</div>
</dtml-let>
<dtml-var standard_html_footer>
</dtml-if>
<dtml-var standard_html_header>
<div class="Desktop">
<dtml-if message>
<p>&dtml-message;</p>
<hr>
</dtml-if>
<div class="File">
<dtml-if name="role_submit">
<h2>Search results</h2>
<dtml-in expr="portal_membership.searchMembers( search_param=search_param
, search_term=search_term
)" mapping sort="username">
<dtml-if name="sequence-start">
<p>Select Member(s) and a role to assign:</p>
<form method="post" action="folder_localrole_edit">
<input type="hidden" name="change_type" value="add">
<table class="FormLayout">
<tr>
<td width="16">&nbsp;</td>
<td><b>User ID</b></td>
<td><b>Email address</td>
</tr>
</dtml-if>
<dtml-with sequence-item mapping only>
<tr>
<td width="16"><input type="checkbox" name="member_ids:list"
value="&dtml-username;"></td>
<td>&dtml-username;</td>
<td>&dtml-email;</td>
</tr>
</dtml-with>
<dtml-if name="sequence-end">
<tr><td colspan="3">&nbsp;</td></tr>
</tr>
<td colspan="2"><b>Role to assign:</b></td>
<td>
<select name="member_role">
<dtml-in expr="portal_membership.getCandidateLocalRoles( this() )">
<option>&dtml-sequence-item;</option>
</dtml-in>
</select>
</td>
</tr>
<tr><td colspan="3">&nbsp;</td></tr>
<tr>
<td width="16">&nbsp;</td>
<td colspan="2"><input type="submit" value=" Assign Roles "></td>
</tr>
</table>
</form>
</dtml-if>
</dtml-in>
<dtml-else>
<h2>Assign local roles</h2>
<form method="post" action="folder_localrole_form">
<table class="FormLayout">
<tr>
<td><b>Search by</b></td>
<td>
<select name="search_param">
<option value="username">User Name</option>
<option value="email">Email Address</option>
</select>
</td>
</tr>
<tr>
<td><b>Search Term</b></td>
<td><input type="text" name="search_term" size="30"></td>
</tr>
<tr>
<td><br /></td>
<td><input type="submit" name="role_submit" value=" Search "></td>
</tr>
</table>
</form>
<p><hr></p>
<h2>Currently assigned local roles</h2>
<p>These users currently have local roles assigned in this folder:</p>
<form method="post" action="folder_localrole_edit">
<input type="hidden" name="change_type" value="delete">
<input type="hidden" name="member_role" value="">
<table class="FormLayout">
<tr>
<td width="16">&nbsp;</td>
<td><b>User Name</b></td>
<td><b>Role(s)</b></td>
</tr>
<dtml-in expr="this().get_local_roles()">
<tr>
<td width="16">
<dtml-if expr="_['sequence-key'] !=
portal_membership.getAuthenticatedMember().getUserName()">
<input type="checkbox" name="member_ids:list" value="&dtml-sequence-key;">
<dtml-else>
&nbsp;
</dtml-if>
</td>
<td>&dtml-sequence-key;</td>
<td><dtml-var expr="_.string.join( _['sequence-item'], ', ')"></td>
</tr>
</dtml-in>
<tr><td colspan="3">&nbsp;</td></tr>
<tr>
<td><br /></td>
<td colspan="2"><input type="submit" value=" Delete "></td>
</tr>
</table>
</form>
</dtml-if>
</div>
</div>
<dtml-var standard_html_footer>
## Script (Python) "transformation_identity_update"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=lang
##title=
##
from ZTUtils import make_query
request = context.REQUEST
query = make_query(request.form)
# Try to get the id of the DTML method / PT / etc.
method_id = request.URL0[len(request.URL1):]
my_id = context.id
if callable(my_id): my_id = my_id()
if '/' + my_id == method_id:
method_id = ''
relative_url = context.portal_url.getRelativeUrl(context)
# Chop useless language information
for l in context.gettext.get_available_languages():
if relative_url[0:len(l) + 1] == l + '/':
relative_url = relative_url[len(l) + 1:]
# Chop useless /
if relative_url == '':
if len(method_id) > 0:
if method_id[0] == '/':
method_id = method_id[1:]
# Build the new URL
if query == '':
return '%s/%s/%s%s' % (context.portal_url.getPortalObject().absolute_url(), lang,
relative_url,
method_id)
else:
return '%s/%s/%s%s?%s' % (context.portal_url.getPortalObject().absolute_url(), lang,
relative_url,
method_id, query)
<dtml-comment>
Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
Jean-Paul Smets <jp@nexedi.com>
WARNING: This program as such is intended to be used by professional
programmers who take the whole responsability of assessing all potential
consequences resulting from its eventual inadequacies and bugs
This program as such is not intended to be used by end users. End
users who are looking for a ready-to-use solution with commercial
garantees and support are strongly adviced to contract a Free Software
Service Company
This program is Free Software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
</dtml-comment>
<dtml-if "'index.html' in objectIds()">
<dtml-var index.html>
<dtml-else>
<dtml-var standard_html_header>
<div class="Document">
<dtml-var description fmt="structured-text">
</div>
<dtml-var standard_html_footer>
</dtml-if>
<dtml-comment>
Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
Jean-Paul Smets <jp@nexedi.com>
WARNING: This program as such is intended to be used by professional
programmers who take the whole responsability of assessing all potential
consequences resulting from its eventual inadequacies and bugs
This program as such is not intended to be used by end users. End
users who are looking for a ready-to-use solution with commercial
garantees and support are strongly adviced to contract a Free Software
Service Company
This program is Free Software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
</dtml-comment>
<dtml-if "'index.html' in objectIds()">
<dtml-var index.html>
<dtml-else>
<dtml-var standard_html_header>
<div class="Document">
<dtml-var description fmt="structured-text">
</div>
<dtml-var standard_html_footer>
</dtml-if>
<font size="-1">
<dtml-gettext>language</dtml-gettext>:&nbsp;<dtml-in "gettext.get_available_languages()">
<dtml-if expr="gettext.get_selected_language() != _['sequence-item']">
<a href="<dtml-var "getLocalizedPath(_['sequence-item'])">">&dtml-sequence-item;</a>&nbsp;
<dtml-else>
<a href="<dtml-var "getLocalizedPath(_['sequence-item'])">"><b><u>&dtml-sequence-item;</u></b></a>&nbsp;
</dtml-if>
</dtml-in>
<br>
<dtml-let actions="portal_actions.listFilteredActionsFor(this())"
user_actions="actions['object']">
<dtml-in "user_actions" mapping>
<dtml-if "id=='print'">
<a href="&dtml-local_absolute_url;/&dtml-action;"><img src="fileprint.png" border="0"></a>
</dtml-if>
</dtml-in>
</dtml-let>
</font>
<dtml-comment>
Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
This software is subject to the provisions of the Zope Public License,
Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
FOR A PARTICULAR PURPOSE
</dtml-comment>
<table class="NewsItems" cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td class="NewsBorder" width="0" rowspan="13" bgcolor="#6699CC">
<img src="spacer.gif" alt=" "
width="1" height="2" border="0">
</td>
<td valign="top" class="NewsTitle" width="100%">
<b>Latest Additions</b>
</td>
<td class="NewsBorder" width="0" rowspan="13" bgcolor="#6699CC">
<img src="spacer.gif" alt=" "
width="1" height="2" border="0">
</td>
</tr>
<dtml-if "meta_type=='Portal Topic'">
<dtml-in "portal_catalog.searchResults( meta_type=['Base18 File', 'File', 'Document','Link','Base18 Document','Base18 Link']
, sort_on='Date'
, sort_order='reverse'
, review_state='published'
, Subject=combined_subjects()
)" size="10">
<tr class="NewsItemRow">
<td valign="top" class="title">
<p><a href="<dtml-var "getObject().local_absolute_url(lang=gettext.get_selected_language())">"> &dtml-Title; </a></p>
<p class="description"><dtml-var Date> - <dtml-var Description></p>
</td>
</tr>
<dtml-else>
<tr class="NewsItemRow">
<td valign="top" class="title">
No news is no news.
</td>
</tr>
</dtml-in>
<dtml-else>
<dtml-in "portal_catalog.searchResults( meta_type=['Document','Link','Base18 Document','Base18 Link']
, sort_on='Date'
, sort_order='reverse'
, review_state='published'
)" size="10">
<tr class="NewsItemRow">
<td valign="top" class="title">
<p><a href="<dtml-var "getObject().local_absolute_url(lang=gettext.get_selected_language())">"> &dtml-Title; </a></p>
<p class="description"><dtml-var Date> - <dtml-var Description></p>
</td>
</tr>
<dtml-else>
<tr class="NewsItemRow">
<td valign="top" class="title">
No news is no news.
</td>
</tr>
</dtml-in>
</dtml-if>
<tr class="NewsItemRow" >
<td class="title">
<a href="&dtml-local_absolute_url;/recent_additions">More...</a>
</td>
</tr>
<tr class="NewsItemRow" height="1">
<td class="NewsBorder" height="1" bgcolor="#6699CC">
<img src="spacer.gif" alt=" "
width="1" height="1" border="0">
</td>
</tr>
</table>
<ul tal:condition="python:here.public_subtopics is not []">
<span tal:repeat="item here/public_subtopics">
<li ><a tal:content="item/title_or_id" tal:attributes="href item/absolute_url">Title</a></li>
<span tal:replace="structure item/list_subtopics" />
</span>
</ul>
\ No newline at end of file
<dtml-if expr="_.has_key('root_topic')"><dtml-var root_topic>/<dtml-var id>
<dtml-let root_topic="root_topic + '/' + id"><dtml-in public_subtopics><dtml-var
list_topic_vocabulary></dtml-in></dtml-let>
<dtml-else><dtml-var id>
<dtml-let root_topic="id"><dtml-in public_subtopics><dtml-var
list_topic_vocabulary></dtml-in></dtml-let></dtml-if>
\ No newline at end of file
## Script (Python) "local_absolute_url"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=lang=None,target=None
##title=
##
if lang is None: lang = context.gettext.get_selected_language()
relative_url = context.portal_url.getRelativeUrl(context)
return '%s/%s/%s' % (context.portal_url.getPortalObject().absolute_url(), lang,
relative_url)
REQUEST=context.REQUEST
try:
return context.portal_registration.mailPassword(REQUEST['userid'], REQUEST)
except 'NotFound', error:
message = error
except 'ValueError', error:
message = error
redirect_url = '%s/mail_password_form?portal_status_message=%s' % ( context.absolute_url()
, message
)
REQUEST.RESPONSE.redirect( redirect_url )
\ No newline at end of file
<table class="menubox" width="100%" tal:define="
portal_root here/portal_url/getPortalObject;
section here/CurrentSection;
subsection here/CurrentSubSection;
lang python:here.gettext.get_selected_language()">
<tr tal:repeat="item portal_root/sections" class="section">
<td class="sectiontitle">
<div class="" tal:attributes="class python:
'selected'*(section.id==item)">
<p class="sectiontitle"><a href="service"
tal:attributes="href python:'%s/%s/%s' % (here.portal_url(),lang,item)"
tal:content="item">Services</a>
</p>
</div>
<p class="subsectiontitle"
tal:repeat="subitem python:section.objectValues(
['Portal Topic','Document','Base18 Document'
,'Base18 Wiki'])"
tal:condition="python:section.id==item">
<a href="/service/qt.stx"
tal:attributes="href python: here.portal_url() + '/' + lang +
'/' + item + '/' + subitem.id"
tal:content="python:subitem.title"
tal:condition="python:subsection.id!=subitem.id">Qt Development</a>
<a href="/service/qt.stx"
tal:attributes="href python: here.portal_url() + '/' + lang +
'/' + item + '/' + subitem.id"
tal:content="python:'>' + subitem.title"
tal:condition="python:subsection.id==subitem.id">Qt Development</a>
</p>
</td>
</tr>
<tr>
<td class="endline"></td>
</tr>
</table>
<table class="NewsItems" cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td class="NewsBorder" width="0" rowspan="8" bgcolor="#6699CC">
<img src="spacer.gif" alt=" "
width="1" height="2" border="0">
</td>
<td valign="top" class="NewsTitle" width="100%">
<b>News</b>
</td>
<td class="NewsBorder" width="0" rowspan="8" bgcolor="#6699CC">
<img src="spacer.gif" alt=" "
width="1" height="2" border="0">
</td>
</tr>
<dtml-in "portal_catalog.searchResults( meta_type=['News Item','Base18 News Item']
, sort_on='Date'
, sort_order='reverse'
, review_state='published'
)" size="5">
<tr class="NewsItemRow">
<td valign="top" class="title">
<dtml-if "getObject()">
<p><a href="<dtml-var "getObject().local_absolute_url(lang=gettext.get_selected_language())">"> <dtml-var "getObject().TranslatedTitle()"> </a></p>
<p class="description"><dtml-var Date> - <dtml-var TranslatedDescription></p>
</dtml-if>
</td>
</tr>
<dtml-else>
<tr class="NewsItemRow">
<td valign="top" class="title">
<dtml-gettext>No news is no news.</dtml-gettext>
</td>
</tr>
</dtml-in>
<tr class="NewsItemRow" >
<td class="title">
<a href="&dtml.url-recent_news;"><dtml-gettext>More...</dtml-gettext></a>
</td>
</tr>
<tr>
<td class="NewsBorder" colspan="3" height="0" bgcolor="#6699CC">
<img src="spacer.gif" alt=" "
width="1" height="1" border="0">
</td>
</tr>
</table>
<dtml-comment>
Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
Jean-Paul Smets <jp@nexedi.com>
WARNING: This program as such is intended to be used by professional
programmers who take the whole responsability of assessing all potential
consequences resulting from its eventual inadequacies and bugs
This program as such is not intended to be used by end users. End
users who are looking for a ready-to-use solution with commercial
garantees and support are strongly adviced to contract a Free Software
Service Company
This program is Free Software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
</dtml-comment>
<dtml-let relative_to_content="1">
<dtml-var pr_printable_html_header>
</dtml-let>
<div class="Document">
<p class="title">&dtml-TranslatedTitle;</h1>
<p class="release"><dtml-gettext>For Immediate Release</dtml-gettext></p>
<p class="summary">&dtml-effective_date; - &dtml-TranslatedDescription;</p>
<dtml-var TranslatedBody>
<h1><dtml-gettext>Permanent URL for this Press Release</dtml-gettext></h1>
<p>&dtml-absolute_url;</p>
<h1><dtml-gettext>About</dtml-gettext>
<dtml-with portal_properties>&dtml-title;</dtml-with></h1>
<p><dtml-var "gettext(news_plate)"></p>
</div>
<dtml-var printable_html_footer>
<dtml-let relative_to_content="1">
<dtml-var standard_html_header>
</dtml-let>
<div class="Document">
<p><dtml-gettext>For Immediate Release</dtml-gettext></p>
<p><b>&dtml-effective_date; - <dtml-var TranslatedDescription></b></p>
<dtml-var TranslatedBody>
<h1><dtml-gettext>Permanent URL for this Press Release</dtml-gettext></h1>
<p>&dtml-absolute_url;</p>
<h1><dtml-gettext>About</dtml-gettext>
<dtml-with portal_properties>&dtml-TranslatedTitle;</dtml-with></h1>
<p><dtml-var "gettext(news_plate)"></p>
</div>
<dtml-if "not portal_membership.isAnonymousUser()">
<div class="ContentBy"><dtml-var content_byline></div>
</dtml-if>
<div class="Discussion">
<dtml-var viewThreadsAtBottom>
</div>
<dtml-var standard_html_footer>
<dtml-comment>
Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
Jean-Paul Smets <jp@nexedi.com>
WARNING: This program as such is intended to be used by professional
programmers who take the whole responsability of assessing all potential
consequences resulting from its eventual inadequacies and bugs
This program as such is not intended to be used by end users. End
users who are looking for a ready-to-use solution with commercial
garantees and support are strongly adviced to contract a Free Software
Service Company
This program is Free Software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
</dtml-comment>
<dtml-let relative_to_content="1">
<dtml-var standard_html_header>
</dtml-let>
<h1>Send a news release to the press</h1>
<form action="<dtml-var absolute_url>/send_newsitem" method="POST">
<p>Text:</p>
<textarea name="text" rows="25" cols="80" ><dtml-var PreformattedView></textarea>
<p>Journalists:</p>
<textarea name="journalists" rows="25" cols="80" ></textarea>
<p align="center"><input type="submit" name="Send" value="Send" /></p>
</form>
<dtml-var standard_html_footer>
<dtml-let relative_to_content="1">
<dtml-var standard_html_header>
</dtml-let>
<div class="NewsItem">
<blockquote class="Description">
<dtml-var Description fmt="structured-text">
</blockquote>
</div>
<div class="Document">
<dtml-var CookedBody>
</div>
<dtml-if "not portal_membership.isAnonymousUser()">
<div class="ContentBy"><dtml-var content_byline></div>
</dtml-if>
<div class="Discussion">
<dtml-var viewThreadsAtBottom>
</div>
<dtml-var standard_html_footer>
<dtml-let relative_to_content="1">
<dtml-var standard_html_header>
</dtml-let>
<div class="NewsItem">
<blockquote class="Description">
<dtml-var Description fmt="structured-text">
</blockquote>
</div>
<div class="Document">
<dtml-var CookedBody>
</div>
<dtml-if "not portal_membership.isAnonymousUser()">
<div class="ContentBy"><dtml-var content_byline></div>
</dtml-if>
<div class="Discussion">
<dtml-var viewThreadsAtBottom>
</div>
<dtml-var standard_html_footer>
<dtml-comment>
Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
Jean-Paul Smets <jp@nexedi.com>
WARNING: This program as such is intended to be used by professional
programmers who take the whole responsability of assessing all potential
consequences resulting from its eventual inadequacies and bugs
This program as such is not intended to be used by end users. End
users who are looking for a ready-to-use solution with commercial
garantees and support are strongly adviced to contract a Free Software
Service Company
This program is Free Software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
</dtml-comment>
<dtml-if "_.hasattr(this(),'isEffective') and not isEffective( ZopeTime() )">
<dtml-unless "portal_membership.checkPermission('Request review',this())
or portal_membership.checkPermission('Review portal content',this())">
<dtml-var "RESPONSE.unauthorized()">
</dtml-unless>
</dtml-if>
<html>
<head>
<title><dtml-with portal_properties>&dtml-title;</dtml-with
><dtml-if name="Title">: &dtml-TranslatedTitle;</dtml-if></title>
<link rel="stylesheet" href="pr_printable_stylesheet" type="text/css" />
<dtml-if relative_to_content>
<base href="&dtml-absolute_url;" />
</dtml-if>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<dtml-with stylesheet_properties>
<body font="&dtml-base_font_color;">
</dtml-with>
<dtml-with logo-hires>
<img src="logo-hires" height="&dtml-height;" width="&dtml-width;" />
</dtml-with>
<div class="legalinfo">
<p><dtml-var legal_footer></p>
</div>
</body>
</html>
<dtml-if "_.hasattr(this(),'isEffective') and not isEffective( ZopeTime() )">
<dtml-unless "portal_membership.checkPermission('Request review',this())
or portal_membership.checkPermission('Review portal content',this())">
<dtml-var "RESPONSE.unauthorized()">
</dtml-unless>
</dtml-if>
<html>
<head>
<title><dtml-with portal_properties>&dtml-title;</dtml-with
><dtml-if name="Title">: &dtml-TranslatedTitle;</dtml-if></title>
<link rel="stylesheet" href="printable_stylesheet" type="text/css" />
<dtml-if relative_to_content>
<base href="&dtml-absolute_url;" />
</dtml-if>
<dtml-if HTML_CHARSET>
<meta http-equiv="Content-Type"
content="<dtml-var HTML_CHARSET>" />
<dtml-if "HTML_CHARSET == 'text/html; charset=utf-8'">
<dtml-call "REQUEST.RESPONSE.setHeader('Content-Type','text/html; charset=utf-8')">
</dtml-if>
<dtml-else>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1" />
</dtml-if>
</head>
<dtml-with stylesheet_properties>
<body font="&dtml-base_font_color;">
</dtml-with>
<dtml-let lang="gettext.get_selected_language()">
<dtml-if AFFILIATE_PATH>
<img src="&dtml-portal_url;/&dtml-lang;/&dtml-AFFILIATE_PATH;logo.png"
border="0" />
<dtml-else>
<img src="&dtml-portal_url;/&dtml-lang;/logo.png"
border="0" />
</dtml-if>
</dtml-let>
This diff is collapsed.
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
return context.listSubtopics()
<dtml-if "portal_membership.isAnonymousUser()">
<form action="&dtml.url-logged_in;" method="post">
<input type="hidden" name="came_from" value="&dtml-absolute_url;">
<table class="FormLayout" >
<tr>
<td align="left" valign="top">
<strong><font size="-2"><dtml-gettext>Name</dtml-gettext></font></strong>
</td>
<td align="left" valign="top">
<font size="-2"><input type="TEXT" name="__ac_name" size="12"
value="<dtml-var "REQUEST.get('__ac_name', '')">"></font>
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><font size="-2"><dtml-gettext>Password</dtml-gettext></font></strong>
</td>
<td align="left" valign="top">
<font size="-2"><input type="PASSWORD" name="__ac_password" size="12"></font>
</td>
</tr>
<tr>
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<font size="-2"><input type="submit" name="submit" value="
<dtml-gettext>Login</dtml-gettext> "></font>
</td>
</tr>
<tr>
<td align="center" colspan="2">
</td>
</tr>
<tr>
<td align="center" colspan="2"><i><font size="-2">
<a href="mail_password_form"><dtml-gettext>Lost your password?</dtml-gettext>
</a></font></i>
</td>
</tr>
<tr>
<td align="center" colspan="2"><i><font size="-2">
<a href="join_form"><dtml-gettext>Apply for membership...</dtml-gettext>
</a></font></i>
</td>
</tr>
</table>
</form>
<dtml-else>
<dtml-comment>
<form action="&dtml.url-logout;" method="post">
<table class="FormLayout" >
<tr><td>
<center><font size="-2"><input type="submit" name="submit" value="
<dtml-gettext>Logout</dtml-gettext> "></font></center>
</td></tr>
</table>
</form>
</dtml-comment>
<table class="FormLayout" >
<tr>
<td align="center" colspan="2"><i><font size="-2">
<a href="password_form"><dtml-gettext>Change Password...</dtml-gettext>
</a></font></i>
</td>
</tr>
</table>
</dtml-if>
<dtml-var standard_html_header>
<dtml-if "meta_type=='Portal Topic'">
<dtml-let newsitems="portal_catalog.searchResults(meta_type=['Document','Link','Base18 Document', 'Base18 Link'],
sort_on='Date', sort_order='reverse', review_state='published', Subject=combined_subjects())">
<dtml-in newsitems size="10" start="batch_start" previous>
<p style="Desktop">
<a href="&dtml-URL;&dtml-sequence-query;batch_start=&dtml-previous-sequence-start-number;">
Next &dtml-previous-sequence-size; more recent articles
</a>
</p>
</dtml-in>
<dtml-in newsitems size="10" start="batch_start">
<dtml-if sequence-start>
<table cellspacing="0" border="0" width="90%">
</dtml-if>
<tr>
<td class="NewsListing" align="left" valign="top">
<a href="&dtml-getURL;"> &dtml-title; </a>
<br> By &dtml-Creator;
</td>
<td class="NewsListing" align="right" valign="top">
<dtml-var Date>
</td>
</tr>
<tr>
<td colspan="2">
<em> <dtml-var Description fmt="structured-text"> </em>
</td>
</tr>
<dtml-if sequence-end>
</table>
<dtml-else>
<tr> <td> <br /> </td> </tr>
</dtml-if>
<dtml-else>
<p class="Desktop">
No news is good news!
</p>
</dtml-in>
<dtml-in newsitems size="10" start="batch_start" next>
<p class="Desktop">
<a href="&dtml-URL;&dtml-sequence-query;batch_start=&dtml-next-sequence-start-number;">
Next &dtml-next-sequence-size; older articles
</a>
</p>
</dtml-in>
</dtml-let>
<dtml-else>
<dtml-let newsitems="portal_catalog.searchResults(meta_type=['Document','Link'],
sort_on='Date', sort_order='reverse', review_state='published')">
<dtml-in newsitems size="10" start="batch_start" previous>
<p style="Desktop">
<a href="&dtml-URL;&dtml-sequence-query;batch_start=&dtml-previous-sequence-start-number;">
Next &dtml-previous-sequence-size; more recent articles
</a>
</p>
</dtml-in>
<dtml-in newsitems size="10" start="batch_start">
<dtml-if sequence-start>
<table cellspacing="0" border="0" width="90%">
</dtml-if>
<tr>
<td class="NewsListing" align="left" valign="top">
<a href="&dtml-getURL;"> &dtml-title; </a>
<br> By &dtml-Creator;
</td>
<td class="NewsListing" align="right" valign="top">
<dtml-var Date>
</td>
</tr>
<tr>
<td colspan="2">
<em> <dtml-var Description fmt="structured-text"> </em>
</td>
</tr>
<dtml-if sequence-end>
</table>
<dtml-else>
<tr> <td> <br /> </td> </tr>
</dtml-if>
<dtml-else>
<p class="Desktop">
No news is good news!
</p>
</dtml-in>
<dtml-in newsitems size="10" start="batch_start" next>
<p class="Desktop">
<a href="&dtml-URL;&dtml-sequence-query;batch_start=&dtml-next-sequence-start-number;">
Next &dtml-next-sequence-size; older articles
</a>
</p>
</dtml-in>
</dtml-let>
</dtml-if>
<dtml-var standard_html_footer>
<dtml-var standard_html_header>
<dtml-let newsitems="portal_catalog.searchResults(meta_type=('News Item', 'Base18 News Item'),
sort_on='Date', sort_order='reverse', review_state='published')">
<dtml-in newsitems size="10" start="batch_start" previous>
<p style="Desktop">
<a href="&dtml-URL;&dtml-sequence-query;batch_start=&dtml-previous-sequence-start-number;">
Next &dtml-previous-sequence-size; more recent articles
</a>
</p>
</dtml-in>
<dtml-in newsitems size="10" start="batch_start">
<dtml-if sequence-start>
<table cellspacing="0" border="0" width="90%">
</dtml-if>
<tr>
<td class="NewsListing" align="left" valign="top">
<a href="&dtml-getURL;"> &dtml-title; </a>
<br> By &dtml-Creator;
</td>
<td class="NewsListing" align="right" valign="top">
<dtml-var Date>
</td>
</tr>
<tr>
<td colspan="2">
<em> <dtml-var Description fmt="structured-text"> </em>
</td>
</tr>
<dtml-if sequence-end>
</table>
<dtml-else>
<tr> <td> <br /> </td> </tr>
</dtml-if>
<dtml-else>
<p class="Desktop">
No news is good news!
</p>
</dtml-in>
<dtml-in newsitems size="10" start="batch_start" next>
<p class="Desktop">
<a href="&dtml-URL;&dtml-sequence-query;batch_start=&dtml-next-sequence-start-number;">
Next &dtml-next-sequence-size; older articles
</a>
</p>
</dtml-in>
</dtml-let>
<dtml-var standard_html_footer>
<dtml-var standard_html_header>
<div class="Desktop">
<h1> Search Results </h1>
<dtml-let results="doFormSearch( REQUEST=REQUEST )">
<p>Found <dtml-var expr="_.len(results)" thousands_commas>
items<dtml-if name="SearchableText"> matching "&dtml-SearchableText;"</dtml-if>.</p>
<dtml-in results size="25" start="batch_start">
<dtml-let objURL="getURL() + '/view'">
<dtml-if sequence-start>
<table class="SearchResults">
<tr>
<td width="16"><br></td>
<th> Title
</th>
<th> Type
</th>
<th> Date
</th>
</tr>
</dtml-if>
<tr>
<td>
<dtml-if getIcon>
<a href="&dtml-objURL;"><img
src="&dtml-portal_url;/&dtml-getIcon;" border="0"
alt="[&dtml.missing-Type;]"
title="[&dtml.missing-Type;]"></a>
</dtml-if>
</td>
<td>
<a href="&dtml-objURL;"><dtml-if name="Title"><dtml-var name="Title" size="75" html_quote><dtml-else>(No title)</dtml-if></a>
</td>
<td>
&dtml.missing-Type;
</td>
<td>
&dtml-Date;
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="3"><em>
<dtml-if name="Description"><dtml-var name="Description"
missing="(No description)" size="100" html_quote>
<dtml-else>(No description)</dtml-if></em></td>
</tr>
<dtml-if sequence-end>
</table>
</dtml-if>
</dtml-let>
<dtml-else>
<p> There are no items matching your specified criteria. </p>
</dtml-in>
<dtml-in results size="25" start="batch_start" next>
<dtml-let url=URL
sqry=sequence-query
next=next-sequence-start-number
nextSize=next-sequence-size
nextURL="'%s%sbatch_start=%s' % (url,sqry,next)"
>
<p> <a href="&dtml-nextURL;"> Next &dtml-nextSize; items </a> </p>
</dtml-let>
</dtml-in>
</dtml-let>
</div>
<dtml-var standard_html_footer>
\ No newline at end of file
This diff is collapsed.
## Script (Python) "secure_absolute_url"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=lang=None,target=None
##title=
##
if target is None: target = context
if lang is None: lang = context.gettext.get_selected_language()
relative_url = context.portal_url.getRelativeUrl(target)
return '%s/%s/%s' % (context.secure_url, lang,
relative_url)
This diff is collapsed.
<dtml-var standard_html_header>
<div class="Document">
<pre>
<dtml-with aq_parent>
<dtml-in expr="objectValues('Portal Topic')"><dtml-var list_topic_vocabulary></dtml-in>
</dtml-with>
</pre>
</div>
<dtml-var standard_html_footer>
This diff is collapsed.
<div class="Desktop">
<dtml-if localFooter>
<dtml-var localFooter>
</dtml-if>
</div>
</td>
</tr>
</tbody>
</table>
<!-- Legalese -->
<div class="legalinfo">
<p><dtml-var legal_footer></p>
</div>
</body>
</html>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment