Initial import

This commit is contained in:
Gaetan Delannay 2009-07-02 13:02:44 +02:00
commit e9c10a25b8
19 changed files with 2296 additions and 0 deletions

BIN
Avis.odt Normal file

Binary file not shown.

955
Avis.py Normal file
View File

@ -0,0 +1,955 @@
# -*- coding: utf-8 -*-
#
# GNU General Public License (GPL)
#
# 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., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
#
__author__ = """Gaetan Delannay <gaetan.delannay at easi.wallonie.be>"""
__docformat__ = 'plaintext'
from AccessControl import ClassSecurityInfo
from DateTime import DateTime
from Products.Archetypes.atapi import *
from Products.Avis.config import *
import os, time, os.path
import appy.pod.renderer
import Products.Avis
from Products.MasterSelectWidget.MasterSelectWidget import MasterSelectWidget
# ------------------------------------------------------------------------------
def slaveFields(action, *slaves):
'''Helps to define more smartly the slave fields of a master field
(MasterSelectWidget). The master is always a "yes/no" field.
If p_action is:
- "showIfYes": slaves will be shown when master is "yes" ;
- "showIfNo": slaves will be shown when master is "no" ;
- "setValue": it defines slaves whose values may change depending on
actions on the master. '''
res = []
for slave in slaves:
slaveDict = {'name': slave}
if action == "showIfYes":
slaveDict.update({'action': 'show', 'hide_values': ['yes'] })
elif action == "showIfNo":
slaveDict.update({'action': 'show', 'hide_values': ['no'] })
elif action == "setValue":
sName = slave[:-7]
slaveDict.update({'action': 'value',
'vocab_method': 'defo%s' % sName,
'control_param': '%sCP' % sName})
res.append(slaveDict)
return tuple(res)
# ------------------------------------------------------------------------------
# Default values for "analysis" fields.
defaultAnalysisValues = {
'delaiOrdre': \
{'yes': "Le texte en projet prévoit des délais d'ordre à l'article...",
'no': ''
},
'delaiRigueur': \
{'yes': "Le texte en projet prévoit des délais de rigueur à l'article...",
'no': ''
},
'delaiAccuse': \
{'yes': "Le texte en projet prévoit des délais d'accusés de réception à l'article...",
'no': ''
},
'envoiTermes': \
{'yes': 'Différents termes sont utilisés pour définir les envois:...',
'no': 'Les envois sont exprimés par le même terme.'
},
'envoiModalites': \
{'yes': "Les modalités d'envoi sont prévues à l'article...",
'no': 'Le texte en projet ne précise pas la nature des envois.'
},
'envoiRecommande': \
{'yes': "Des envois recommandés sont prévus à l'article...",
'no': ''
},
'piecesJustificativesDemandees': \
{'yes': "Le texte en projet requiert l'adjonction de pièces justificatives à l'article...",
'no': ''
},
'simulRenvoi': \
{'yes': "Un renvoi de modalités est prévu à l'article...",
'no': ''
},
'simulCirculaire': \
{'yes': "",
'no': ""
},
'simulBrochure': \
{'yes': "",
'no': ''
},
'acteursProcedure': \
{'yes': "",
'no': ''
},
'acteursImpact': \
{'yes': "Le texte en projet va sans conteste générer de nouvelles obligations pour...",
'no': ''
},
'delegationPrevue': \
{'yes': "Une délégation est prévue à l'article...",
'no': ''
},
'lisibiliteProblemes': \
{'yes':"Le texte est clair à lire ... L'ensemble des termes spécifiques sont définis " \
"à l'article 1er du texte en projet, ce qui permet une bonne compréhension du " \
"texte ... Le texte en projet présent une structure claire et apparente, ce " \
"qui permet une lecture aisée du texte ... Les termes utilisés sont usuels ..." \
"Le texte en projet forme un tout cohérent ... L'abrogation de ... et son " \
"remplacement par ... est également un gage de lisibilité tant pour l'usager " \
"que pour l'administration.",
'no': "Le texte est clair à lire ... L'ensemble des termes spécifiques sont définis " \
"à l'article 1er du texte en projet, ce qui permet une bonne compréhension du " \
"texte ... Le texte en projet présent une structure claire et apparente, ce " \
"qui permet une lecture aisée du texte ... Les termes utilisés sont usuels ..." \
"Le texte en projet forme un tout cohérent ... L'abrogation de ... et son " \
"remplacement par ... est également un gage de lisibilité tant pour l'usager " \
"que pour l'administration."
},
'formulairePrevu': \
{'yes': "Un formulaire est prévu.",
'no': ''
},
'formulaireAttache': \
{'yes': '',
'no': ''
},
'testKafkaKo': \
{'yes': "Le test Kafka pourrait être amélioré...",
'no': 'Le test Kafka est bien rempli.'
},
}
defaultRecommandationsValues = {
'piecesJustificativesDemandeesRecommandations': "",
'lisibiliteProblemesRecommandations': "",
'delegationPrevueRecommandations': "",
}
schema = Schema((
# Attributs liés au texte en projet ----------------------------------------
StringField(
name='apType',
widget=SelectionWidget(
label="Type de norme",
format="select",
label_msgid='Avis_label_apType',
i18n_domain='Avis',
),
enforceVocabulary=True,
vocabulary=DisplayList(( ('arreteGouv', 'arrêté du Gouvernement wallon'),
('arreteMin', 'arrêté ministériel'),
('decret', 'décret') )),
required=True
),
StringField(
name='apTitle',
widget=TextAreaWidget(
label="Intitulé de la norme",
rows=3,
label_msgid='Avis_label_apTitle',
i18n_domain='Avis',
),
required=True
),
StringField(
name='apDescription',
widget=TextAreaWidget(
label="Contexte",
rows=5,
label_msgid='Avis_label_apDescription',
i18n_domain='Avis',
)
),
# Les délais ---------------------------------------------------------------
StringField(
name='delai',
widget=MasterSelectWidget(
label="Est-il pertinent d'aborder la question des délais ?",
slave_fields= slaveFields('showIfYes',
'delaiOrdre', 'delaiOrdreAnalyse', 'delaiRigueur',
'delaiRigueurAnalyse', 'delaiAccuse', 'delaiAccuseAnalyse'),
label_msgid='Avis_label_delai',
i18n_domain='Avis',
),
enforceVocabulary=True,
vocabulary='getResponses',
required=True
),
StringField(
name='delaiOrdre',
widget=MasterSelectWidget(
label="Y a-t-il des délais d'ordre définis, et ce de manière satisfaisante ?",
slave_fields=slaveFields('setValue', 'delaiOrdreAnalyse'),
label_msgid='Avis_label_delaiOrdre',
i18n_domain='Avis',
),
enforceVocabulary=True,
vocabulary='getResponses',
required=True
),
TextField(
name='delaiOrdreAnalyse',
widget=TextAreaWidget(
label="Analyse",
label_msgid='Avis_label_delaiOrdreAnalyse',
i18n_domain='Avis',
),
default_output_type="text/html",
default=defaultAnalysisValues['delaiOrdre']['no']
),
StringField(
name='delaiRigueur',
widget=MasterSelectWidget(
label="Y a-t-il des délais de rigueur définis, et ce de manière satisfaisante ?",
slave_fields=slaveFields('setValue', 'delaiRigueurAnalyse'),
label_msgid='Avis_label_delaiRigueur',
i18n_domain='Avis',
),
enforceVocabulary=True,
vocabulary='getResponses',
required=True
),
TextField(
name='delaiRigueurAnalyse',
widget=TextAreaWidget(
label="Analyse",
label_msgid='Avis_label_delaiRigueurAnalyse',
i18n_domain='Avis',
),
default_output_type="text/html",
default=defaultAnalysisValues['delaiRigueur']['no']
),
StringField(
name='delaiAccuse',
widget=MasterSelectWidget(
label="Y a-t-il un délai d'accusé de réception défini, et ce de manière satisfaisante ?",
slave_fields=slaveFields('setValue', 'delaiAccuseAnalyse'),
label_msgid='Avis_label_delaiAccuse',
i18n_domain='Avis',
),
enforceVocabulary=True,
vocabulary='getResponses',
required=True
),
TextField(
name='delaiAccuseAnalyse',
widget=TextAreaWidget(
label="Analyse",
label_msgid='Avis_label_delaiAccuseAnalyse',
i18n_domain='Avis',
),
default_output_type="text/html",
default=defaultAnalysisValues['delaiAccuse']['no']
),
# Les envois ---------------------------------------------------------------
StringField(
name='envoi',
widget=MasterSelectWidget(
label="Est-il pertinent d'aborder la question de la transmission de documents ?",
slave_fields= slaveFields('showIfYes',
'envoiTermes', 'envoiTermesAnalyse', 'envoiModalites',
'envoiModalitesAnalyse', 'envoiRecommande', 'envoiRecommandeAnalyse'),
label_msgid='Avis_label_envoi',
i18n_domain='Avis',
),
enforceVocabulary=True,
vocabulary='getResponses',
required=True
),
StringField(
name='envoiTermes',
widget=MasterSelectWidget(
label="Y a-t-il des différences dans les termes utilisés pour exprimer les envois ?",
slave_fields=slaveFields('setValue', 'envoiTermesAnalyse'),
label_msgid='Avis_label_envoiTermes',
i18n_domain='Avis',
),
enforceVocabulary=True,
vocabulary='getResponses',
required=True
),
TextField(
name='envoiTermesAnalyse',
widget=TextAreaWidget(
label="Analyse",
label_msgid='Avis_label_envoiTermesAnalyse',
i18n_domain='Avis',
),
default_output_type="text/html",
default=defaultAnalysisValues['envoiTermes']['no']
),
StringField(
name='envoiModalites',
widget=MasterSelectWidget(
label="Les modalités d'envoi sont-elles définies ?",
slave_fields=slaveFields('setValue', 'envoiModalitesAnalyse'),
label_msgid='Avis_label_envoiModalites',
i18n_domain='Avis',
),
enforceVocabulary=True,
vocabulary='getResponses',
required=True
),
TextField(
name='envoiModalitesAnalyse',
widget=TextAreaWidget(
label="Analyse",
label_msgid='Avis_label_envoiModalitesAnalyse',
i18n_domain='Avis',
),
default_output_type="text/html",
default=defaultAnalysisValues['envoiModalites']['no']
),
StringField(
name='envoiRecommande',
widget=MasterSelectWidget(
label="Y a-t-il des envois recommandés ?",
slave_fields=slaveFields('setValue', 'envoiRecommandeAnalyse'),
label_msgid='Avis_label_envoiRecommande',
i18n_domain='Avis',
),
enforceVocabulary=True,
vocabulary='getResponses',
required=True
),
TextField(
name='envoiRecommandeAnalyse',
widget=TextAreaWidget(
label="Analyse",
label_msgid='Avis_label_envoiRecommandeAnalyse',
i18n_domain='Avis',
),
default_output_type="text/html",
default=defaultAnalysisValues['envoiRecommande']['no']
),
# Les pièces justificatives ------------------------------------------------
StringField(
name='piecesJustificatives',
widget=MasterSelectWidget(
label="Est-il pertinent d'aborder la question des pièces justificatives ?",
slave_fields= slaveFields('showIfYes', 'piecesJustificativesDemandees',
'piecesJustificativesDemandeesAnalyse'),
label_msgid='Avis_label_piecesJustificatives',
i18n_domain='Avis',
),
enforceVocabulary=True,
vocabulary='getResponses',
required=True
),
StringField(
name='piecesJustificativesDemandees',
widget=MasterSelectWidget(
label="Des pièces justificatives sont-elles demandées ?",
slave_fields=slaveFields('setValue', 'piecesJustificativesDemandeesAnalyse') + \
slaveFields('showIfYes', 'piecesJustificativesDemandeesRecommandations'),
label_msgid='Avis_label_piecesJustificativesDemandees',
i18n_domain='Avis',
),
enforceVocabulary=True,
vocabulary='getResponses',
required=True
),
TextField(
name='piecesJustificativesDemandeesAnalyse',
widget=TextAreaWidget(
label="Analyse",
label_msgid='Avis_label_piecesJustificativesDemandeesAnalyse',
i18n_domain='Avis',
),
default_output_type="text/html",
default=defaultAnalysisValues['piecesJustificativesDemandees']['no']
),
TextField(
name='piecesJustificativesDemandeesRecommandations',
widget=TextAreaWidget(
label="Recommandation(s)",
label_msgid='Avis_label_piecesJustificativesDemandeesRecommandations',
i18n_domain='Avis',
),
default_output_type="text/html",
default=defaultRecommandationsValues['piecesJustificativesDemandeesRecommandations']
),
# La simultanéité des textes -----------------------------------------------
StringField(
name='simultaneite',
widget=MasterSelectWidget(
label="Est-il pertinent d'aborder la question de la simultanéité des textes ?",
slave_fields= slaveFields('showIfYes',
'simulRenvoi', 'simulRenvoiAnalyse', 'simulCirculaire',
'simulCirculaireAnalyse', 'simulBrochure', 'simulBrochureAnalyse'),
label_msgid='Avis_label_simultaneite',
i18n_domain='Avis',
),
enforceVocabulary=True,
vocabulary='getResponses',
required=True
),
StringField(
name='simulRenvoi',
widget=MasterSelectWidget(
label="Y a-t-il renvoi de modalité vers un niveau de réglementation inférieur ?",
slave_fields=slaveFields('setValue', 'simulRenvoiAnalyse'),
label_msgid='Avis_label_simulRenvoi',
i18n_domain='Avis',
),
enforceVocabulary=True,
vocabulary='getResponses',
required=True
),
TextField(
name='simulRenvoiAnalyse',
widget=TextAreaWidget(
label="Analyse",
label_msgid='Avis_label_simulRenvoiAnalyse',
i18n_domain='Avis',
),
default_output_type="text/html",
default=defaultAnalysisValues['simulRenvoi']['no']
),
StringField(
name='simulCirculaire',
widget=MasterSelectWidget(
label="Une information est-elle nécessaire pour les Administrations (Circulaire) ?",
slave_fields=slaveFields('setValue', 'simulCirculaireAnalyse'),
label_msgid='Avis_label_simulCirculaire',
i18n_domain='Avis',
),
enforceVocabulary=True,
vocabulary='getResponses',
required=True
),
TextField(
name='simulCirculaireAnalyse',
widget=TextAreaWidget(
label="Analyse",
label_msgid='Avis_label_simulCirculaireAnalyse',
i18n_domain='Avis',
),
default_output_type="text/html",
default=defaultAnalysisValues['simulCirculaire']['no']
),
StringField(
name='simulBrochure',
widget=MasterSelectWidget(
label="Une information est-elle nécessaire pour les usagers (brochure) ?",
slave_fields=slaveFields('setValue', 'simulBrochureAnalyse'),
label_msgid='Avis_label_simulBrochure',
i18n_domain='Avis',
),
enforceVocabulary=True,
vocabulary='getResponses',
required=True
),
TextField(
name='simulBrochureAnalyse',
widget=TextAreaWidget(
label="Analyse",
label_msgid='Avis_label_simulBrochureAnalyse',
i18n_domain='Avis',
),
default_output_type="text/html",
default=defaultAnalysisValues['simulBrochure']['no']
),
# La prise en compte des acteurs -------------------------------------------
StringField(
name='acteurs',
widget=MasterSelectWidget(
label="Est-il pertinent d'aborder la question de la prise en compte des acteurs ?",
slave_fields= slaveFields('showIfYes',
'acteursProcedure', 'acteursProcedureAnalyse', 'acteursImpact',
'acteursImpactAnalyse'),
label_msgid='Avis_label_acteurs',
i18n_domain='Avis',
),
enforceVocabulary=True,
vocabulary='getResponses',
required=True
),
StringField(
name='acteursProcedure',
widget=MasterSelectWidget(
label="Y a-t-il une procédure de prise en compte des acteurs prévue ?",
slave_fields=slaveFields('setValue', 'acteursProcedureAnalyse'),
label_msgid='Avis_label_acteursProcedure',
i18n_domain='Avis',
),
enforceVocabulary=True,
vocabulary='getResponses',
required=True
),
TextField(
name='acteursProcedureAnalyse',
widget=TextAreaWidget(
label="Analyse",
label_msgid='Avis_label_acteursProcedureAnalyse',
i18n_domain='Avis',
),
default_output_type="text/html",
default=defaultAnalysisValues['acteursProcedure']['no']
),
StringField(
name='acteursImpact',
widget=MasterSelectWidget(
label="Y a-t-il un impact logistique et/ou organisationnel pour l'Administration ?",
slave_fields=slaveFields('setValue', 'acteursImpactAnalyse'),
label_msgid='Avis_label_acteursImpact',
i18n_domain='Avis',
),
enforceVocabulary=True,
vocabulary='getResponses',
required=True
),
TextField(
name='acteursImpactAnalyse',
widget=TextAreaWidget(
label="Analyse",
label_msgid='Avis_label_acteursImpactAnalyse',
i18n_domain='Avis',
),
default_output_type="text/html",
default=defaultAnalysisValues['acteursImpact']['no']
),
# Délégation ---------------------------------------------------------------
StringField(
name='delegation',
widget=MasterSelectWidget(
label="Est-il pertinent d'aborder la question de la délégation ?",
slave_fields= slaveFields('showIfYes', 'delegationPrevue',
'delegationPrevueAnalyse'),
label_msgid='Avis_label_delegation',
i18n_domain='Avis',
),
enforceVocabulary=True,
vocabulary='getResponses',
required=True
),
StringField(
name='delegationPrevue',
widget=MasterSelectWidget(
label="Des délégations sont-elles prévues de manière suffisante ?",
slave_fields=slaveFields('setValue', 'delegationPrevueAnalyse') + \
slaveFields('showIfNo', 'delegationPrevueRecommandations'),
label_msgid='Avis_label_delegationPrevue',
i18n_domain='Avis',
),
enforceVocabulary=True,
vocabulary='getResponsesInversed',
required=True
),
TextField(
name='delegationPrevueAnalyse',
widget=TextAreaWidget(
label="Analyse",
label_msgid='Avis_label_delegationPrevueAnalyse',
i18n_domain='Avis',
),
default_output_type="text/html",
default=defaultAnalysisValues['delegationPrevue']['no']
),
TextField(
name='delegationPrevueRecommandations',
widget=TextAreaWidget(
label="Recommandation(s)",
label_msgid='Avis_label_delegationPrevueRecommandations',
i18n_domain='Avis',
),
default_output_type="text/html",
default=defaultRecommandationsValues['delegationPrevueRecommandations']
),
# Lisibilité ---------------------------------------------------------------
StringField(
name='lisibilite',
widget=MasterSelectWidget(
label="Est-il pertinent d'aborder la question de la lisibilité ?",
slave_fields= slaveFields('showIfYes',
'lisibiliteProblemes', 'lisibiliteProblemesAnalyse'),
label_msgid='Avis_label_lisibilite',
i18n_domain='Avis',
),
enforceVocabulary=True,
vocabulary='getResponses',
required=True
),
StringField(
name='lisibiliteProblemes',
widget=MasterSelectWidget(
label="Y a-t-il des problèmes de lisibilité ?",
slave_fields= slaveFields('showIfYes', 'lisibiliteProblemesRecommandations') + \
slaveFields('setValue', 'lisibiliteProblemesAnalyse'),
label_msgid='Avis_label_lisibiliteProblemes',
i18n_domain='Avis',
),
enforceVocabulary=True,
vocabulary='getResponses',
required=True
),
TextField(
name='lisibiliteProblemesAnalyse',
widget=TextAreaWidget(
label="Analyse",
label_msgid='Avis_label_lisibiliteProblemesAnalyse',
i18n_domain='Avis',
),
default_output_type="text/html",
default=defaultAnalysisValues['lisibiliteProblemes']['no']
),
TextField(
name='lisibiliteProblemesRecommandations',
widget=TextAreaWidget(
label="Recommandation(s)",
label_msgid='Avis_label_lisibiliteProblemesRecommandations',
i18n_domain='Avis',
),
default_output_type="text/html",
default=defaultRecommandationsValues['lisibiliteProblemesRecommandations']
),
# Formulaires --------------------------------------------------------------
StringField(
name='formulaires',
widget=MasterSelectWidget(
label="Est-il pertinent d'aborder la question des formulaires ?",
slave_fields= slaveFields('showIfYes',
'formulairePrevu', 'formulairePrevuAnalyse',
'formulaireAttache', 'formulaireAttacheAnalyse'),
label_msgid='Avis_label_delegation',
i18n_domain='Avis',
),
enforceVocabulary=True,
vocabulary='getResponses',
required=True
),
StringField(
name='formulairePrevu',
widget=MasterSelectWidget(
label="Un formulaire est-il prévu ?",
slave_fields=slaveFields('setValue', 'formulairePrevuAnalyse'),
label_msgid='Avis_label_formulairePrevu',
i18n_domain='Avis',
),
enforceVocabulary=True,
vocabulary='getResponses',
required=True
),
TextField(
name='formulairePrevuAnalyse',
widget=TextAreaWidget(
label="Analyse",
label_msgid='Avis_label_formulairePrevuAnalyse',
i18n_domain='Avis',
),
default_output_type="text/html",
default=defaultAnalysisValues['formulairePrevu']['no']
),
StringField(
name='formulaireAttache',
widget=MasterSelectWidget(
label="Le formulaire est-il attaché au texte ?",
slave_fields=slaveFields('setValue', 'formulaireAttacheAnalyse'),
label_msgid='Avis_label_formulaireAttache',
i18n_domain='Avis',
),
enforceVocabulary=True,
vocabulary='getResponses',
required=True
),
TextField(
name='formulaireAttacheAnalyse',
widget=TextAreaWidget(
label="Analyse",
label_msgid='Avis_label_formulaireAttacheAnalyse',
i18n_domain='Avis',
),
default_output_type="text/html",
default=defaultAnalysisValues['formulaireAttache']['no']
),
# Test Kafka ---------------------------------------------------------------
StringField(
name='testKafka',
widget=MasterSelectWidget(
label="Est-il pertinent d'aborder la question du test Kafka ?",
slave_fields= slaveFields('showIfYes', 'testKafkaKo', 'testKafkaKoAnalyse'),
label_msgid='Avis_label_testKafka',
i18n_domain='Avis',
),
enforceVocabulary=True,
vocabulary='getResponses',
required=True
),
StringField(
name='testKafkaKo',
widget=MasterSelectWidget(
label="Le test Kafka pose-t-il problème ?",
slave_fields=slaveFields('setValue', 'testKafkaKoAnalyse'),
label_msgid='Avis_label_testKafkaKo',
i18n_domain='Avis',
),
enforceVocabulary=True,
vocabulary='getResponses',
required=True
),
TextField(
name='testKafkaKoAnalyse',
widget=TextAreaWidget(
label="Analyse",
label_msgid='Avis_label_testKafkaAnalyse',
i18n_domain='Avis',
),
default_output_type="text/html",
default=defaultAnalysisValues['testKafkaKo']['no']
),
),
)
Avis_schema = BaseSchema.copy() + \
schema.copy()
class Avis(BaseContent):
'''An "Avis" is a simplification-oriented critic of a legal text.'''
security = ClassSecurityInfo()
__implements__ = (getattr(BaseContent,'__implements__',()),)
# This name appears in the 'add' box
archetype_name = 'Avis'
meta_type = 'Avis'
portal_type = 'Avis'
allowed_content_types = []
filter_content_types = 0
global_allow = 1
#content_icon = 'Avis.gif'
immediate_view = 'base_view'
default_view = 'base_view'
suppl_views = ()
typeDescription = "Avis"
typeDescMsgId = 'description_edit_avis'
actions = (
{'action': "string:$object_url/generateOdt",
'category': "document_actions",
'id': 'asOdt',
'name': 'Generer en ODT',
'permissions': ("View",),
'condition': 'python:1'
},
)
_at_rename_after_creation = True
schema = Avis_schema
apPrefixes = {'arreteGouv': "l'",
'arreteMin': "l'",
'decret': "le "
}
apdPrefixes = {'arreteGouv': "d'",
'arreteMin': "d'",
'decret': "de "
}
security.declarePublic('getResponses')
def getResponses(self):
"""Returns the predefined responses that are possible for each question.
"""
return DisplayList( (('no', 'Non'), ('yes', 'Oui')) )
security.declarePublic('getResponsesInversed')
def getResponsesInversed(self):
"""Returns the predefined responses that are possible for each question.
"""
return DisplayList( (('yes', 'Oui'), ('no', 'Non')) )
security.declarePublic('generateOdt')
def generateOdt(self, RESPONSE):
'''Generates the ODT version of this advice.'''
return self._generate(RESPONSE, 'odt')
def _generate(self, response, fileType):
'''Generates a document that represents this advice.
The document format is specified by p_fileType.'''
# First, generate the PDF in a temp file
tempFileName = '/tmp/%s.%f.%s' % (self._at_uid, time.time(),
fileType)
renderer = appy.pod.renderer.Renderer(
'%s/Avis.odt' % os.path.dirname(Products.Avis.__file__),
{'avis': self}, tempFileName)
renderer.run()
# Tell the browser that the resulting page contains PDF
response.setHeader('Content-type', 'application/%s' % fileType)
response.setHeader('Content-disposition',
'inline;filename="%s.%s"' % (self.id, fileType))
# Returns the doc and removes the temp file
f = open(tempFileName, 'rb')
doc = f.read()
f.close()
os.remove(tempFileName)
return doc
def getPrefixedApType(self, de=False):
'''Returns the friendly name for the kind of law (apType), prefixed
with the right article in french (l'/le, or d'/de, depending on
p_de).'''
if de:
prefixes = self.apdPrefixes
else:
prefixes = self.apPrefixes
prefix = prefixes[self.getApType()]
friendlyApType = self.schema._fields['apType'].vocabulary.getValue(
self.getApType())
return '%s%s' % (prefix, friendlyApType)
def isEmpty(self, fieldName):
'''Is the rich text field p_fieldName empty?'''
accessor = 'get%s%s' % (fieldName[0].upper(), fieldName[1:])
fieldContent = getattr(self, accessor)()
return fieldContent.strip() == ''
def getCurrentDate(self):
now = DateTime()
return now.strftime('%d/%m/%Y')
def getUserName(self):
userInfo = self.portal_membership.getMemberById(self.Creator())
return userInfo.getProperty('fullname').decode('latin-1')
def getUserEmail(self):
return '%s@easi.wallonie.be' % self.Creator()
# Methods for getting default answers to questions -------------------------
def defodelaiOrdre(self, delaiOrdreCP):
return defaultAnalysisValues['delaiOrdre'][delaiOrdreCP]
def defodelaiRigueur(self, delaiRigueurCP):
return defaultAnalysisValues['delaiRigueur'][delaiRigueurCP]
def defodelaiAccuse(self, delaiAccuseCP):
return defaultAnalysisValues['delaiAccuse'][delaiAccuseCP]
def defoenvoiTermes(self, envoiTermesCP):
return defaultAnalysisValues['envoiTermes'][envoiTermesCP]
def defoenvoiModalites(self, envoiModalitesCP):
return defaultAnalysisValues['envoiModalites'][envoiModalitesCP]
def defoenvoiRecommande(self, envoiRecommandeCP):
return defaultAnalysisValues['envoiRecommande'][envoiRecommandeCP]
def defopiecesJustificativesDemandees(self, piecesJustificativesDemandeesCP):
return defaultAnalysisValues['piecesJustificativesDemandees'][piecesJustificativesDemandeesCP]
def defosimulRenvoi(self, simulRenvoiCP):
return defaultAnalysisValues['simulRenvoi'][simulRenvoiCP]
def defosimulCirculaire(self, simulCirculaireCP):
return defaultAnalysisValues['simulCirculaire'][simulCirculaireCP]
def defosimulBrochure(self, simulBrochureCP):
return defaultAnalysisValues['simulBrochure'][simulBrochureCP]
def defoacteursProcedure(self, acteursProcedureCP):
return defaultAnalysisValues['acteursProcedure'][acteursProcedureCP]
def defoacteursImpact(self, acteursImpactCP):
return defaultAnalysisValues['acteursImpact'][acteursImpactCP]
def defodelegationPrevue(self, delegationPrevueCP):
return defaultAnalysisValues['delegationPrevue'][delegationPrevueCP]
def defolisibiliteProblemes(self, lisibiliteProblemesCP):
return defaultAnalysisValues['lisibiliteProblemes'][lisibiliteProblemesCP]
def defoformulairePrevu(self, formulairePrevuCP):
return defaultAnalysisValues['formulairePrevu'][formulairePrevuCP]
def defoformulaireAttache(self, formulaireAttacheCP):
return defaultAnalysisValues['formulaireAttache'][formulaireAttacheCP]
def defotestKafkaKo(self, testKafkaKoCP):
return defaultAnalysisValues['testKafkaKo'][testKafkaKoCP]
registerType(Avis, PROJECTNAME)
# end of class Avis
##code-section module-footer #fill in your manual code here
##/code-section module-footer

133
AvisConfiguration.py Normal file
View File

@ -0,0 +1,133 @@
# -*- coding: utf-8 -*-
#
# File: AvisConfiguration.py
#
# Copyright (c) 2007 by []
# Generator: ArchGenXML Version 1.5.3 dev/svn
# http://plone.org/products/archgenxml
#
# GNU General Public License (GPL)
#
# 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., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
#
__author__ = """unknown <unknown>"""
__docformat__ = 'plaintext'
from AccessControl import ClassSecurityInfo
from Products.Archetypes.atapi import *
from Products.Avis.config import *
from Products.CMFCore.utils import UniqueObject
##code-section module-header #fill in your manual code here
from Products.CMFCore.utils import getToolByName
##/code-section module-header
schema = Schema((
),
)
##code-section after-local-schema #fill in your manual code here
##/code-section after-local-schema
AvisConfiguration_schema = BaseSchema.copy() + \
schema.copy()
##code-section after-schema #fill in your manual code here
##/code-section after-schema
class AvisConfiguration(UniqueObject, BaseContent):
"""
"""
security = ClassSecurityInfo()
__implements__ = (getattr(UniqueObject,'__implements__',()),) + (getattr(BaseContent,'__implements__',()),)
# This name appears in the 'add' box
archetype_name = 'AvisConfiguration'
meta_type = 'AvisConfiguration'
portal_type = 'AvisConfiguration'
allowed_content_types = []
filter_content_types = 0
global_allow = 0
#content_icon = 'AvisConfiguration.gif'
immediate_view = 'base_view'
default_view = 'base_view'
suppl_views = ()
typeDescription = "AvisConfiguration"
typeDescMsgId = 'description_edit_avisconfiguration'
#toolicon = 'AvisConfiguration.gif'
_at_rename_after_creation = True
schema = AvisConfiguration_schema
##code-section class-header #fill in your manual code here
##/code-section class-header
# tool-constructors have no id argument, the id is fixed
def __init__(self, id=None):
BaseContent.__init__(self,'portal_avisconfiguration')
self.setTitle('AvisConfiguration')
##code-section constructor-footer #fill in your manual code here
##/code-section constructor-footer
# tool should not appear in portal_catalog
def at_post_edit_script(self):
self.unindexObject()
##code-section post-edit-method-footer #fill in your manual code here
##/code-section post-edit-method-footer
# Methods
security.declarePublic('getAvisFolder')
def getAvisFolder(self):
'''Checks the existence of the avis folder in the user's home folder
(create it if not) and returns the path to this folder.'''
portal = getToolByName(self, 'portal_url').getPortalObject()
home_folder = portal.portal_membership.getHomeFolder()
if home_folder is None: # Necessary for the admin zope user
return ''
if not hasattr(home_folder, AVIS_FOLDER):
# Create the Req folder into the user's home folder
id = home_folder.invokeFactory(type_name="AvisFolder", id=AVIS_FOLDER,
title="Mes avis")
avisFolder = getattr(home_folder, id)
avisFolder.description = "C'est dans ce dossier que vous pouvez creer "\
"vos avis."
avisFolder.reindexObject()
else:
avisFolder = getattr(home_folder, AVIS_FOLDER)
return avisFolder.absolute_url()
registerType(AvisConfiguration, PROJECTNAME)
# end of class AvisConfiguration
##code-section module-footer #fill in your manual code here
##/code-section module-footer

57
AvisFolder.py Normal file
View File

@ -0,0 +1,57 @@
# -*- coding: utf-8 -*-
##
# GNU General Public License (GPL)
#
# 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., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
#
__author__ = """Gaetan Delannay <gaetan.delannay at easi.wallonie.be>"""
__docformat__ = 'plaintext'
from AccessControl import ClassSecurityInfo
from Products.Archetypes.atapi import *
from Products.Avis.config import *
schema = Schema((
),
)
AvisFolder_schema = OrderedBaseFolderSchema.copy() + \
schema.copy()
class AvisFolder(OrderedBaseFolder):
'''Folder than may only contain Avis instances and AvisFolder subfolders.'''
security = ClassSecurityInfo()
__implements__ = (getattr(OrderedBaseFolder,'__implements__',()),)
# This name appears in the 'add' box
archetype_name = "Dossier d'avis"
meta_type = 'AvisFolder'
portal_type = 'AvisFolder'
allowed_content_types = ['Avis', 'AvisFolder']
filter_content_types = 1
global_allow = 1
#content_icon = 'AvisFolder.gif'
immediate_view = 'base_view'
default_view = 'base_view'
suppl_views = ()
typeDescription = "AvisFolder"
typeDescMsgId = 'description_edit_avisfolder'
_at_rename_after_creation = True
schema = AvisFolder_schema
registerType(AvisFolder, PROJECTNAME)

46
Extensions/AppInstall.py Normal file
View File

@ -0,0 +1,46 @@
# -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
# Copyright (c) 2007 by CommunesPlone
#
# GNU General Public License (GPL)
#
# 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., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
#
__author__ = """Gaetan Delannay <gde at easi.wallonie.be>"""
__docformat__ = 'plaintext'
# ------------------------------------------------------------------------------
from Products.Avis.config import *
# ------------------------------------------------------------------------------
def install(self):
# Create the folder 'Avis' at the rot of the site.
if not hasattr(self, 'avis'):
self.invokeFactory('AvisFolder', id='avis', title='Avis')
# Add a tab in portal_actions
actions = self.portal_actions.listActions()
action_ids = [action.id for action in actions]
if not TAB_ID in action_ids:
self.portal_actions.addAction(
TAB_ID, 'Avis', 'string:$portal_url/avis', 'member',
'View', 'portal_tabs')
# Add OpenOffice icon
if not self.portal_actionicons.queryActionIcon('plone', 'asOdt'):
self.portal_actionicons.addActionIcon('plone', 'asOdt', 'odt.png',
title='odt')
return True
# ------------------------------------------------------------------------------

313
Extensions/Install.py Normal file
View File

@ -0,0 +1,313 @@
# -*- coding: utf-8 -*-
#
# File: Install.py
#
# Copyright (c) 2007 by []
# Generator: ArchGenXML Version 1.5.3 dev/svn
# http://plone.org/products/archgenxml
#
# GNU General Public License (GPL)
#
# 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., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
#
__author__ = """unknown <unknown>"""
__docformat__ = 'plaintext'
import os.path
import sys
from StringIO import StringIO
from sets import Set
from App.Common import package_home
from Products.CMFCore.utils import getToolByName
from Products.CMFCore.utils import manage_addTool
from Products.ExternalMethod.ExternalMethod import ExternalMethod
from zExceptions import NotFound, BadRequest
from Products.Archetypes.Extensions.utils import installTypes
from Products.Archetypes.Extensions.utils import install_subskin
from Products.Archetypes.config import TOOL_NAME as ARCHETYPETOOLNAME
from Products.Archetypes.atapi import listTypes
from Products.Avis.config import PROJECTNAME
from Products.Avis.config import product_globals as GLOBALS
def install(self, reinstall=False):
""" External Method to install Avis """
out = StringIO()
print >> out, "Installation log of %s:" % PROJECTNAME
# If the config contains a list of dependencies, try to install
# them. Add a list called DEPENDENCIES to your custom
# AppConfig.py (imported by config.py) to use it.
try:
from Products.Avis.config import DEPENDENCIES
except:
DEPENDENCIES = []
portal = getToolByName(self,'portal_url').getPortalObject()
quickinstaller = portal.portal_quickinstaller
for dependency in DEPENDENCIES:
print >> out, "Installing dependency %s:" % dependency
quickinstaller.installProduct(dependency)
get_transaction().commit(1)
classes = listTypes(PROJECTNAME)
installTypes(self, out,
classes,
PROJECTNAME)
install_subskin(self, out, GLOBALS)
# autoinstall tools
portal = getToolByName(self,'portal_url').getPortalObject()
for t in ['AvisConfiguration']:
try:
portal.manage_addProduct[PROJECTNAME].manage_addTool(t)
except BadRequest:
# if an instance with the same name already exists this error will
# be swallowed. Zope raises in an unelegant manner a 'Bad Request' error
pass
except:
e = sys.exc_info()
if e[0] != 'Bad Request':
raise
# hide tools in the search form
portalProperties = getToolByName(self, 'portal_properties', None)
if portalProperties is not None:
siteProperties = getattr(portalProperties, 'site_properties', None)
if siteProperties is not None and siteProperties.hasProperty('types_not_searched'):
for tool in ['AvisConfiguration']:
current = list(siteProperties.getProperty('types_not_searched'))
if tool not in current:
current.append(tool)
siteProperties.manage_changeProperties(**{'types_not_searched' : current})
# remove workflow for tools
portal_workflow = getToolByName(self, 'portal_workflow')
for tool in ['AvisConfiguration']:
portal_workflow.setChainForPortalTypes([tool], '')
# uncatalog tools
for toolname in ['portal_avisconfiguration']:
try:
portal[toolname].unindexObject()
except:
pass
# hide tools in the navigation
portalProperties = getToolByName(self, 'portal_properties', None)
if portalProperties is not None:
navtreeProperties = getattr(portalProperties, 'navtree_properties', None)
if navtreeProperties is not None and navtreeProperties.hasProperty('idsNotToList'):
for toolname in ['portal_avisconfiguration']:
current = list(navtreeProperties.getProperty('idsNotToList'))
if toolname not in current:
current.append(toolname)
navtreeProperties.manage_changeProperties(**{'idsNotToList' : current})
# try to call a workflow install method
# in 'InstallWorkflows.py' method 'installWorkflows'
try:
installWorkflows = ExternalMethod('temp', 'temp',
PROJECTNAME+'.InstallWorkflows',
'installWorkflows').__of__(self)
except NotFound:
installWorkflows = None
if installWorkflows:
print >>out,'Workflow Install:'
res = installWorkflows(self,out)
print >>out,res or 'no output'
else:
print >>out,'no workflow install'
# enable portal_factory for given types
factory_tool = getToolByName(self,'portal_factory')
factory_types=[
"Avis",
"AvisConfiguration",
"AvisFolder",
] + factory_tool.getFactoryTypes().keys()
factory_tool.manage_setPortalFactoryTypes(listOfTypeIds=factory_types)
from Products.Avis.config import STYLESHEETS
try:
portal_css = getToolByName(portal, 'portal_css')
for stylesheet in STYLESHEETS:
try:
portal_css.unregisterResource(stylesheet['id'])
except:
pass
defaults = {'id': '',
'media': 'all',
'enabled': True}
defaults.update(stylesheet)
portal_css.registerStylesheet(**defaults)
except:
# No portal_css registry
pass
from Products.Avis.config import JAVASCRIPTS
try:
portal_javascripts = getToolByName(portal, 'portal_javascripts')
for javascript in JAVASCRIPTS:
try:
portal_javascripts.unregisterResource(javascript['id'])
except:
pass
defaults = {'id': ''}
defaults.update(javascript)
portal_javascripts.registerScript(**defaults)
except:
# No portal_javascripts registry
pass
# try to call a custom install method
# in 'AppInstall.py' method 'install'
try:
install = ExternalMethod('temp', 'temp',
PROJECTNAME+'.AppInstall', 'install')
except NotFound:
install = None
if install:
print >>out,'Custom Install:'
try:
res = install(self, reinstall)
except TypeError:
res = install(self)
if res:
print >>out,res
else:
print >>out,'no output'
else:
print >>out,'no custom install'
return out.getvalue()
def uninstall(self, reinstall=False):
out = StringIO()
# unhide tools in the search form
portalProperties = getToolByName(self, 'portal_properties', None)
if portalProperties is not None:
siteProperties = getattr(portalProperties, 'site_properties', None)
if siteProperties is not None and siteProperties.hasProperty('types_not_searched'):
for tool in ['AvisConfiguration']:
current = list(siteProperties.getProperty('types_not_searched'))
if tool in current:
current.remove(tool)
siteProperties.manage_changeProperties(**{'types_not_searched' : current})
# unhide tools
portalProperties = getToolByName(self, 'portal_properties', None)
if portalProperties is not None:
navtreeProperties = getattr(portalProperties, 'navtree_properties', None)
if navtreeProperties is not None and navtreeProperties.hasProperty('idsNotToList'):
for toolname in ['portal_avisconfiguration']:
current = list(navtreeProperties.getProperty('idsNotToList'))
if toolname in current:
current.remove(toolname)
navtreeProperties.manage_changeProperties(**{'idsNotToList' : current})
# try to call a workflow uninstall method
# in 'InstallWorkflows.py' method 'uninstallWorkflows'
try:
uninstallWorkflows = ExternalMethod('temp', 'temp',
PROJECTNAME+'.InstallWorkflows',
'uninstallWorkflows').__of__(self)
except NotFound:
uninstallWorkflows = None
if uninstallWorkflows:
print >>out, 'Workflow Uninstall:'
res = uninstallWorkflows(self, out)
print >>out, res or 'no output'
else:
print >>out,'no workflow uninstall'
# try to call a custom uninstall method
# in 'AppInstall.py' method 'uninstall'
try:
uninstall = ExternalMethod('temp', 'temp',
PROJECTNAME+'.AppInstall', 'uninstall')
except:
uninstall = None
if uninstall:
print >>out,'Custom Uninstall:'
try:
res = uninstall(self, reinstall)
except TypeError:
res = uninstall(self)
if res:
print >>out,res
else:
print >>out,'no output'
else:
print >>out,'no custom uninstall'
return out.getvalue()
def beforeUninstall(self, reinstall, product, cascade):
""" try to call a custom beforeUninstall method in 'AppInstall.py'
method 'beforeUninstall'
"""
out = StringIO()
try:
beforeuninstall = ExternalMethod('temp', 'temp',
PROJECTNAME+'.AppInstall', 'beforeUninstall')
except:
beforeuninstall = []
if beforeuninstall:
print >>out, 'Custom beforeUninstall:'
res = beforeuninstall(self, reinstall=reinstall
, product=product
, cascade=cascade)
if res:
print >>out, res
else:
print >>out, 'no output'
else:
print >>out, 'no custom beforeUninstall'
return (out,cascade)
def afterInstall(self, reinstall, product):
""" try to call a custom afterInstall method in 'AppInstall.py' method
'afterInstall'
"""
out = StringIO()
try:
afterinstall = ExternalMethod('temp', 'temp',
PROJECTNAME+'.AppInstall', 'afterInstall')
except:
afterinstall = None
if afterinstall:
print >>out, 'Custom afterInstall:'
res = afterinstall(self, product=None
, reinstall=None)
if res:
print >>out, res
else:
print >>out, 'no output'
else:
print >>out, 'no custom afterInstall'
return out

1
Extensions/__init__.py Normal file
View File

@ -0,0 +1 @@
# make me a python module

21
INSTALL.TXT Normal file
View File

@ -0,0 +1,21 @@
This piece of software is a Plone 2.5 product that allows to encode advices that some institution or organism
must give on some legal text for example. It is available in french only, and currently used only for
EASI-WAL, the department responsible for administrative simplication in Wallonia, a Region from Belgium.
EASI-WAL uses this tool to express its simplification-oriented advice on legal texts voted by the Walloon Government.
This tool proposes a series of questions to the user. Depending on the nature and content of the legal text,
some questions are shown or hidden; responses to questions are prefefined and can be edited by the user. At the end
of this process, the user may generate a document (in ODT, DOC, PDF or RTF) that can be sent to the Government.
Prerequisites
-------------
Install the product MasterSelectWidget in your Zope instance
Install Appy framework on your Python interpreter running Zope (see http://appyframework.org)
Installation
------------
Copy the "Avis" folder into the Products folder of your Zope Instance.
Launch your instance, log in to Plone as admin and go to "Site setup" -> "Add/Remove products" and install
the "Avis" product.
The product creates a new content type "Avis" and a new folder type "AvisFolder" that can only contain Avis instances.

110
__init__.py Normal file
View File

@ -0,0 +1,110 @@
# -*- coding: utf-8 -*-
#
# File: Avis.py
#
# Copyright (c) 2007 by []
# Generator: ArchGenXML Version 1.5.3 dev/svn
# http://plone.org/products/archgenxml
#
# GNU General Public License (GPL)
#
# 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., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
#
__author__ = """unknown <unknown>"""
__docformat__ = 'plaintext'
# There are three ways to inject custom code here:
#
# - To set global configuration variables, create a file AppConfig.py.
# This will be imported in config.py, which in turn is imported in
# each generated class and in this file.
# - To perform custom initialisation after types have been registered,
# use the protected code section at the bottom of initialize().
# - To register a customisation policy, create a file CustomizationPolicy.py
# with a method register(context) to register the policy.
import logging
logger = logging.getLogger('Avis')
logger.info('Installing Product')
try:
import CustomizationPolicy
except ImportError:
CustomizationPolicy = None
import os, os.path
from Globals import package_home
from Products.CMFCore import utils as cmfutils
try: # New CMF
from Products.CMFCore import permissions as CMFCorePermissions
except: # Old CMF
from Products.CMFCore import CMFCorePermissions
from Products.CMFCore import DirectoryView
from Products.CMFPlone.utils import ToolInit
from Products.Archetypes.atapi import *
from Products.Archetypes import listTypes
from Products.Archetypes.utils import capitalize
from config import *
DirectoryView.registerDirectory('skins', product_globals)
##code-section custom-init-head #fill in your manual code here
##/code-section custom-init-head
def initialize(context):
##code-section custom-init-top #fill in your manual code here
##/code-section custom-init-top
# imports packages and types for registration
import Avis
import AvisConfiguration
import AvisFolder
# Initialize portal tools
tools = [AvisConfiguration.AvisConfiguration]
ToolInit( PROJECTNAME +' Tools',
tools = tools,
icon='tool.gif'
).initialize( context )
# Initialize portal content
content_types, constructors, ftis = process_types(
listTypes(PROJECTNAME),
PROJECTNAME)
cmfutils.ContentInit(
PROJECTNAME + ' Content',
content_types = content_types,
permission = DEFAULT_ADD_CONTENT_PERMISSION,
extra_constructors = constructors,
fti = ftis,
).initialize(context)
# Apply customization-policy, if theres any
if CustomizationPolicy and hasattr(CustomizationPolicy, 'register'):
CustomizationPolicy.register(context)
print 'Customization policy for Avis installed'
##code-section custom-init-bottom #fill in your manual code here
##/code-section custom-init-bottom

26
bin/clean.py Normal file
View File

@ -0,0 +1,26 @@
# Imports ----------------------------------------------------------------------
import os, os.path
# ------------------------------------------------------------------------------
class Cleaner:
exts = ('.pyc', '.log')
def makeDir(self, folder):
os.mkdir(folder)
f = file('%s/Readme.txt' % folder, 'w')
f.write('This is a temp folder.')
f.close()
def run(self, verbose=True):
# Remove files with an extention listed in self.exts
for root, dirs, files in os.walk('..'):
for fileName in files:
ext = os.path.splitext(fileName)[1]
if (ext in Cleaner.exts) or ext.endswith('~'):
fileToRemove = os.path.join(root, fileName)
if verbose:
print 'Removing %s...' % fileToRemove
os.remove(fileToRemove)
# Main program -----------------------------------------------------------------
if __name__ == '__main__':
Cleaner().run()
# ------------------------------------------------------------------------------

93
config.py Normal file
View File

@ -0,0 +1,93 @@
# -*- coding: utf-8 -*-
#
# File: Avis.py
#
# Copyright (c) 2007 by []
# Generator: ArchGenXML Version 1.5.3 dev/svn
# http://plone.org/products/archgenxml
#
# GNU General Public License (GPL)
#
# 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., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
#
__author__ = """unknown <unknown>"""
__docformat__ = 'plaintext'
# Product configuration.
#
# The contents of this module will be imported into __init__.py, the
# workflow configuration and every content type module.
#
# If you wish to perform custom configuration, you may put a file
# AppConfig.py in your product's root directory. This will be included
# in this file if found.
try: # New CMF
from Products.CMFCore.permissions import setDefaultRoles
except ImportError: # Old CMF
from Products.CMFCore.CMFCorePermissions import setDefaultRoles
##code-section config-head #fill in your manual code here
TOOL_ID = 'portal_avisconfiguration'
TAB_ID = 'avis'
AVIS_FOLDER = 'mes-avis'
##/code-section config-head
PROJECTNAME = "Avis"
# Check for Plone 2.1
try:
from Products.CMFPlone.migrations import v2_1
except ImportError:
HAS_PLONE21 = False
else:
HAS_PLONE21 = True
# Permissions
DEFAULT_ADD_CONTENT_PERMISSION = "Add portal content"
setDefaultRoles(DEFAULT_ADD_CONTENT_PERMISSION, ('Manager', 'Owner'))
product_globals = globals()
# Dependencies of Products to be installed by quick-installer
# override in custom configuration
DEPENDENCIES = []
# Dependend products - not quick-installed - used in testcase
# override in custom configuration
PRODUCT_DEPENDENCIES = []
# You can overwrite these two in an AppConfig.py:
# STYLESHEETS = [{'id': 'my_global_stylesheet.css'},
# {'id': 'my_contenttype.css',
# 'expression': 'python:object.getTypeInfo().getId() == "MyType"'}]
# You can do the same with JAVASCRIPTS.
STYLESHEETS = []
JAVASCRIPTS = []
##code-section config-bottom #fill in your manual code here
##/code-section config-bottom
# Load custom configuration not managed by ArchGenXML
try:
from Products.Avis.AppConfig import *
except ImportError:
pass

14
i18n/avis-fr.po Normal file
View File

@ -0,0 +1,14 @@
msgid ""
msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Language-code: fr\n"
"Language-name: French\n"
"Preferred-encodings: utf-8 latin1\n"
"Domain: Avis\n"
"X-is-fallback-for: fr-be fr-ca fr-lu fr-mc fr-ch fr-fr\n"
msgid "AvisFolder"
msgstr "Dossier"
msgid "description_edit_avisfolder"
msgstr "Dossier"

0
refresh.txt Normal file
View File

237
skins/Avis/avis_edit.pt Normal file
View File

@ -0,0 +1,237 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"
lang="en-US" i18n:domain="plone">
<body>
<!-- Body redefinition -->
<div metal:define-macro="body"
tal:define="portal_type portal_type|string:unknowntype">
<form name="edit_form"
method="post"
enctype="multipart/form-data"
class="enableUnloadProtection atBaseEditForm"
action=""
id=""
tal:attributes="action python:here.absolute_url()+'/'+template.id;
id string:${portal_type}-base-edit">
<metal:block define-slot="extra_top" />
<metal:block define-slot="widgets">
<!-- Main fields -->
<span metal:use-macro="python:here.widget('title', mode='edit')" />
<span metal:use-macro="python:here.widget('apType', mode='edit')" />
<span metal:use-macro="python:here.widget('apTitle', mode='edit')" />
<span metal:use-macro="python:here.widget('apDescription', mode='edit')" />
<fieldset style="border-width: 4px;"><legend><b>Les délais</b></legend>
<span metal:use-macro="python:here.widget('delai', mode='edit')" />
<span metal:use-macro="python:here.widget('delaiOrdre', mode='edit')" />
<span metal:use-macro="python:here.widget('delaiOrdreAnalyse', mode='edit')" />
<span metal:use-macro="python:here.widget('delaiRigueur', mode='edit')" />
<span metal:use-macro="python:here.widget('delaiRigueurAnalyse', mode='edit')" />
<span metal:use-macro="python:here.widget('delaiAccuse', mode='edit')" />
<span metal:use-macro="python:here.widget('delaiAccuseAnalyse', mode='edit')" />
</fieldset>
<fieldset style="border-width: 4px;"><legend>Les envois</legend>
<span metal:use-macro="python:here.widget('envoi', mode='edit')" />
<span metal:use-macro="python:here.widget('envoiTermes', mode='edit')" />
<span metal:use-macro="python:here.widget('envoiTermesAnalyse', mode='edit')" />
<span metal:use-macro="python:here.widget('envoiModalites', mode='edit')" />
<span metal:use-macro="python:here.widget('envoiModalitesAnalyse', mode='edit')" />
<span metal:use-macro="python:here.widget('envoiRecommande', mode='edit')" />
<span metal:use-macro="python:here.widget('envoiRecommandeAnalyse', mode='edit')" />
</fieldset>
<fieldset style="border-width: 4px;"><legend>Les pièces justificatives</legend>
<span metal:use-macro="python:here.widget('piecesJustificatives', mode='edit')" />
<span metal:use-macro="python:here.widget('piecesJustificativesDemandees', mode='edit')" />
<span metal:use-macro="python:here.widget('piecesJustificativesDemandeesAnalyse', mode='edit')" />
<span metal:use-macro="python:here.widget('piecesJustificativesDemandeesRecommandations', mode='edit')" />
</fieldset>
<fieldset style="border-width: 4px;"><legend>La simultanéité des textes</legend>
<span metal:use-macro="python:here.widget('simultaneite', mode='edit')" />
<span metal:use-macro="python:here.widget('simulRenvoi', mode='edit')" />
<span metal:use-macro="python:here.widget('simulRenvoiAnalyse', mode='edit')" />
<span metal:use-macro="python:here.widget('simulCirculaire', mode='edit')" />
<span metal:use-macro="python:here.widget('simulCirculaireAnalyse', mode='edit')" />
<span metal:use-macro="python:here.widget('simulBrochure', mode='edit')" />
<span metal:use-macro="python:here.widget('simulBrochureAnalyse', mode='edit')" />
</fieldset>
<fieldset style="border-width: 4px;"><legend>La prise en compte des acteurs</legend>
<span metal:use-macro="python:here.widget('acteurs', mode='edit')" />
<span metal:use-macro="python:here.widget('acteursProcedure', mode='edit')" />
<span metal:use-macro="python:here.widget('acteursProcedureAnalyse', mode='edit')" />
<span metal:use-macro="python:here.widget('acteursImpact', mode='edit')" />
<span metal:use-macro="python:here.widget('acteursImpactAnalyse', mode='edit')" />
</fieldset>
<fieldset style="border-width: 4px;"><legend>Délégation</legend>
<span metal:use-macro="python:here.widget('delegation', mode='edit')" />
<span metal:use-macro="python:here.widget('delegationPrevue', mode='edit')" />
<span metal:use-macro="python:here.widget('delegationPrevueAnalyse', mode='edit')" />
<span metal:use-macro="python:here.widget('delegationPrevueRecommandations', mode='edit')" />
</fieldset>
<fieldset style="border-width: 4px;"><legend>Lisibilité</legend>
<span metal:use-macro="python:here.widget('lisibilite', mode='edit')" />
<span metal:use-macro="python:here.widget('lisibiliteProblemes', mode='edit')" />
<span metal:use-macro="python:here.widget('lisibiliteProblemesAnalyse', mode='edit')" />
<span metal:use-macro="python:here.widget('lisibiliteProblemesRecommandations', mode='edit')" />
</fieldset>
<fieldset style="border-width: 4px;"><legend>Formulaires</legend>
<span metal:use-macro="python:here.widget('formulaires', mode='edit')" />
<span metal:use-macro="python:here.widget('formulairePrevu', mode='edit')" />
<span metal:use-macro="python:here.widget('formulairePrevuAnalyse', mode='edit')" />
<span metal:use-macro="python:here.widget('formulaireAttache', mode='edit')" />
<span metal:use-macro="python:here.widget('formulaireAttacheAnalyse', mode='edit')" />
</fieldset>
<fieldset style="border-width: 4px;"><legend>Test Kafka</legend>
<span metal:use-macro="python:here.widget('testKafka', mode='edit')" />
<span metal:use-macro="python:here.widget('testKafkaKo', mode='edit')" />
<span metal:use-macro="python:here.widget('testKafkaKoAnalyse', mode='edit')" />
</fieldset>
</metal:block>
<metal:block define-slot="extra_bottom" />
<div class="formControls">
<input type="hidden"
name="fieldset"
value="default"
tal:attributes="value fieldset"
/>
<input type="hidden"
name="form.submitted"
value="1"
/>
<input type="hidden"
name="add_reference.field:record"
value=""
/>
<input type="hidden"
name="add_reference.type:record"
value=""
/>
<input type="hidden"
name="add_reference.destination:record"
value=""
/>
<tal:env define="env request/controller_state/kwargs">
<tal:loop repeat="varname python:('reference_source_url', 'reference_source_field', 'reference_source_fieldset')">
<tal:reference define="items python:env.get(varname, request.get(varname))"
condition="items">
<input tal:repeat="item items"
type="hidden"
name="form_env.reference_source_url:list:record"
value="value"
tal:attributes="value item;
name string:form_env.${varname}:list:record"
/>
</tal:reference>
</tal:loop>
</tal:env>
<tal:comment replace="nothing">
Turn 'persistent_' variables from controller_state persistent
</tal:comment>
<tal:env repeat="env request/controller_state/kwargs/items">
<input type="hidden"
name="key"
value="value"
tal:define="key python:env[0];
value python:env[1]"
tal:condition="python:key.startswith('persistent_')"
tal:attributes="name string:form_env.${key}:record;
value value"
/>
</tal:env>
<tal:comment replace="nothing">
Turn 'persistent_' variables from forms (GET/POST) persistent
</tal:comment>
<tal:env repeat="env request/form">
<input type="hidden"
name="key"
value="value"
tal:define="key env;
value request/?env"
tal:condition="python:key.startswith('persistent_')"
tal:attributes="name string:form_env.${key}:record;
value value"
/>
</tal:env>
<tal:comment replace="nothing">
Store referrer to remember where to go back
</tal:comment>
<input type="hidden"
name="last_referer"
tal:define="last_referer python:here.session_restore_value('HTTP_REFERER', request.form.get('last_referer', request.get('HTTP_REFERER')))"
tal:attributes="value python:(last_referer and '%s/%s' % (here.absolute_url(), template.id) not in last_referer) and last_referer or (here.getParentNode() and here.getParentNode().absolute_url())"
/>
<metal:block define-slot="buttons"
tal:define="fieldset_index python:fieldsets.index(fieldset);
n_fieldsets python:len(fieldsets)">
<input tal:condition="python:fieldset_index &gt; 0"
class="context"
tabindex=""
type="submit"
name="form_previous"
value="Previous"
i18n:attributes="value label_previous;"
tal:attributes="tabindex tabindex/next;
disabled python:test(isLocked, 'disabled', None);"
/>
<input tal:condition="python:fieldset_index &lt; n_fieldsets - 1"
class="context"
tabindex=""
type="submit"
name="form_next"
value="Next"
i18n:attributes="value label_next;"
tal:attributes="tabindex tabindex/next;
disabled python:test(isLocked, 'disabled', None);"
/>
<input class="context"
tabindex=""
type="submit"
name="form_submit"
value="Save"
i18n:attributes="value label_save;"
tal:attributes="tabindex tabindex/next;
disabled python:test(isLocked, 'disabled', None);"
/>
<input class="standalone"
tabindex=""
type="submit"
name="form.button.cancel"
value="Cancel"
i18n:attributes="value label_cancel;"
tal:attributes="tabindex tabindex/next"
/>
</metal:block>
<metal:block define-slot="extra_buttons" />
</div>
</form>
</div>
</body>
</html>

284
skins/Avis/avis_view.pt Normal file
View File

@ -0,0 +1,284 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"
lang="en-US" i18n:domain="plone">
<body>
<!-- Body -->
<div metal:define-macro="body">
<!-- Texte en projet -->
<fieldset>
<legend>Texte en projet</legend>
<div tal:define="f python:here.getField('apTitle')">
<b tal:content="f/widget/label"></b>&nbsp;:&nbsp;<span tal:content="here/getApTitle"></span>
</div>
<div tal:define="f python:here.getField('apDescription')">
<b tal:content="f/widget/label"></b>&nbsp;:&nbsp;<span tal:content="here/getApDescription"></span>
</div>
<div tal:define="f python:here.getField('apType')">
<b tal:content="f/widget/label"></b>&nbsp;:&nbsp;<span tal:content="python: f.vocabulary.getValue(here.getApType())"></span>
</div>
</fieldset>
<h2>Mesures concrètes de simplification administrative</h2>
<!-- Les délais -->
<fieldset>
<legend>a. Les délais</legend>
<div tal:define="f python:here.getField('delai')">
<b tal:content="f/widget/label"></b>&nbsp;<span i18n:translate="" tal:content="here/getDelai"></span>
</div>
<span tal:condition="python: here.getDelai() == 'yes'">
<div tal:define="f python:here.getField('delaiOrdre')">
<b tal:content="f/widget/label"></b>&nbsp;<span i18n:translate="" tal:content="here/getDelaiOrdre"></span>
</div>
<div class="avisIndent" tal:define="f python:here.getField('delaiOrdreAnalyse')">
<label tal:content="f/widget/label"></label>
<div tal:content="structure here/getDelaiOrdreAnalyse"></div>
</div>
<div tal:define="f python:here.getField('delaiRigueur')">
<b tal:content="f/widget/label"></b>&nbsp;<span i18n:translate="" tal:content="here/getDelaiRigueur"></span>
</div>
<div class="avisIndent" tal:define="f python:here.getField('delaiRigueurAnalyse')">
<label tal:content="f/widget/label"></label>
<div tal:content="structure here/getDelaiRigueurAnalyse"></div>
</div>
<div tal:define="f python:here.getField('delaiAccuse')">
<b tal:content="f/widget/label"></b>&nbsp;<span i18n:translate="" tal:content="here/getDelaiAccuse"></span>
</div>
<div class="avisIndent" tal:define="f python:here.getField('delaiAccuseAnalyse')">
<label tal:content="f/widget/label"></label>
<div tal:content="structure here/getDelaiAccuseAnalyse"></div>
</div>
</span>
</fieldset>
<!-- Les modalités de transmission de documents -->
<fieldset>
<legend>b. Les modalités de transmission de documents</legend>
<div tal:define="f python:here.getField('envoi')">
<b tal:content="f/widget/label"></b>&nbsp;<span i18n:translate="" tal:content="here/getEnvoi"></span>
</div>
<span tal:condition="python: here.getEnvoi() == 'yes'">
<div tal:define="f python:here.getField('envoiTermes')">
<b tal:content="f/widget/label"></b>&nbsp;<span i18n:translate="" tal:content="here/getEnvoiTermes"></span>
</div>
<div class="avisIndent" tal:define="f python:here.getField('envoiTermesAnalyse')">
<label tal:content="f/widget/label"></label>
<div tal:content="structure here/getEnvoiTermesAnalyse"></div>
</div>
<div tal:define="f python:here.getField('envoiModalites')">
<b tal:content="f/widget/label"></b>&nbsp;<span i18n:translate="" tal:content="here/getEnvoiModalites"></span>
</div>
<div class="avisIndent" tal:define="f python:here.getField('envoiModalitesAnalyse')">
<label tal:content="f/widget/label"></label>
<div tal:content="structure here/getEnvoiModalitesAnalyse"></div>
</div>
<div tal:define="f python:here.getField('envoiRecommande')">
<b tal:content="f/widget/label"></b>&nbsp;<span i18n:translate="" tal:content="here/getEnvoiRecommande"></span>
</div>
<div class="avisIndent" tal:define="f python:here.getField('envoiRecommandeAnalyse')">
<label tal:content="f/widget/label"></label>
<div tal:content="structure here/getEnvoiRecommandeAnalyse"></div>
</div>
</span>
</fieldset>
<!-- La transmission de pièces justificatives -->
<fieldset>
<legend>c. La transmission de pièces justificatives</legend>
<div tal:define="f python:here.getField('piecesJustificatives')">
<b tal:content="f/widget/label"></b>&nbsp;<span i18n:translate="" tal:content="here/getPiecesJustificatives"></span>
</div>
<span tal:condition="python: here.getPiecesJustificatives() == 'yes'">
<div tal:define="f python:here.getField('piecesJustificativesDemandees')">
<b tal:content="f/widget/label"></b>&nbsp;<span i18n:translate="" tal:content="here/getPiecesJustificativesDemandees"></span>
</div>
<div class="avisIndent" tal:define="f python:here.getField('piecesJustificativesDemandeesAnalyse')">
<label tal:content="f/widget/label"></label>
<div tal:content="structure here/getPiecesJustificativesDemandeesAnalyse"></div>
</div>
<div class="avisIndent" tal:define="f python:here.getField('piecesJustificativesDemandeesRecommandations')"
tal:condition="python: here.getPiecesJustificativesDemandees() == 'yes'">
<label tal:content="f/widget/label"></label>
<div tal:content="structure here/getPiecesJustificativesDemandeesRecommandations"></div>
</div>
</span>
</fieldset>
<h2>Mesures générales de simplification administrative</h2>
<!-- Simultanéité des textes -->
<fieldset>
<legend>a. Simultanéité des textes</legend>
<div tal:define="f python:here.getField('simultaneite')">
<b tal:content="f/widget/label"></b>&nbsp;<span i18n:translate="" tal:content="here/getSimultaneite"></span>
</div>
<span tal:condition="python: here.getSimultaneite() == 'yes'">
<div tal:define="f python:here.getField('simulRenvoi')">
<b tal:content="f/widget/label"></b>&nbsp;<span i18n:translate="" tal:content="here/getSimulRenvoi"></span>
</div>
<div class="avisIndent" tal:define="f python:here.getField('simulRenvoiAnalyse')">
<label tal:content="f/widget/label"></label>
<div tal:content="structure here/getSimulRenvoiAnalyse"></div>
</div>
<div tal:define="f python:here.getField('simulCirculaire')">
<b tal:content="f/widget/label"></b>&nbsp;<span i18n:translate="" tal:content="here/getSimulCirculaire"></span>
</div>
<div class="avisIndent" tal:define="f python:here.getField('simulCirculaireAnalyse')">
<label tal:content="f/widget/label"></label>
<div tal:content="structure here/getSimulCirculaireAnalyse"></div>
</div>
<div tal:define="f python:here.getField('simulBrochure')">
<b tal:content="f/widget/label"></b>&nbsp;<span i18n:translate="" tal:content="here/getSimulBrochure"></span>
</div>
<div class="avisIndent" tal:define="f python:here.getField('simulBrochureAnalyse')">
<label tal:content="f/widget/label"></label>
<div tal:content="structure here/getSimulBrochureAnalyse"></div>
</div>
</span>
</fieldset>
<!-- Prise en compte des acteurs -->
<fieldset>
<legend>b. Prise en compte des acteurs</legend>
<div tal:define="f python:here.getField('acteurs')">
<b tal:content="f/widget/label"></b>&nbsp;<span i18n:translate="" tal:content="here/getActeurs"></span>
</div>
<span tal:condition="python: here.getActeurs() == 'yes'">
<div tal:define="f python:here.getField('acteursProcedure')">
<b tal:content="f/widget/label"></b>&nbsp;<span i18n:translate="" tal:content="here/getActeursProcedure"></span>
</div>
<div class="avisIndent" tal:define="f python:here.getField('acteursProcedureAnalyse')">
<label tal:content="f/widget/label"></label>
<div tal:content="structure here/getActeursProcedureAnalyse"></div>
</div>
<div tal:define="f python:here.getField('acteursImpact')">
<b tal:content="f/widget/label"></b>&nbsp;<span i18n:translate="" tal:content="here/getActeursImpact"></span>
</div>
<div class="avisIndent" tal:define="f python:here.getField('acteursImpactAnalyse')">
<label tal:content="f/widget/label"></label>
<div tal:content="structure here/getActeursImpactAnalyse"></div>
</div>
</span>
</fieldset>
<!-- Délégation -->
<fieldset>
<legend>c. Délégation</legend>
<div tal:define="f python:here.getField('delegation')">
<b tal:content="f/widget/label"></b>&nbsp;<span i18n:translate="" tal:content="here/getDelegation"></span>
</div>
<span tal:condition="python: here.getDelegation() == 'yes'">
<div tal:define="f python:here.getField('delegationPrevue')">
<b tal:content="f/widget/label"></b>&nbsp;<span i18n:translate="" tal:content="here/getDelegationPrevue"></span>
</div>
<div class="avisIndent" tal:define="f python:here.getField('delegationPrevueAnalyse')">
<label tal:content="f/widget/label"></label>
<div tal:content="structure here/getDelegationPrevueAnalyse"></div>
</div>
<div class="avisIndent" tal:define="f python:here.getField('delegationPrevueRecommandations')"
tal:condition="python: here.getDelegationPrevue() == 'no'">
<label tal:content="f/widget/label"></label>
<div tal:content="structure here/getDelegationPrevueRecommandations"></div>
</div>
</span>
</fieldset>
<!-- Lisibilité du texte -->
<fieldset>
<legend>d. Lisibilité du texte</legend>
<div tal:define="f python:here.getField('lisibilite')">
<b tal:content="f/widget/label"></b>&nbsp;<span i18n:translate="" tal:content="here/getLisibilite"></span>
</div>
<span tal:condition="python: here.getLisibilite() == 'yes'">
<div tal:define="f python:here.getField('lisibiliteProblemes')">
<b tal:content="f/widget/label"></b>&nbsp;<span i18n:translate="" tal:content="here/getLisibiliteProblemes"></span>
</div>
<div class="avisIndent" tal:define="f python:here.getField('lisibiliteProblemesAnalyse')">
<label tal:content="f/widget/label"></label>
<div tal:content="structure here/getLisibiliteProblemesAnalyse"></div>
</div>
<div class="avisIndent" tal:define="f python:here.getField('lisibiliteProblemesRecommandations')"
tal:condition="python: here.getLisibiliteProblemes() == 'yes'">
<label tal:content="f/widget/label"></label>
<div tal:content="structure here/getLisibiliteProblemesRecommandations"></div>
</div>
</span>
</fieldset>
<!-- Les formulaires -->
<fieldset>
<legend>e. Les formulaires</legend>
<div tal:define="f python:here.getField('formulaires')">
<b tal:content="f/widget/label"></b>&nbsp;<span i18n:translate="" tal:content="here/getFormulaires"></span>
</div>
<span tal:condition="python: here.getFormulaires() == 'yes'">
<div tal:define="f python:here.getField('formulairePrevu')">
<b tal:content="f/widget/label"></b>&nbsp;<span i18n:translate="" tal:content="here/getFormulairePrevu"></span>
</div>
<div class="avisIndent" tal:define="f python:here.getField('formulairePrevuAnalyse')">
<label tal:content="f/widget/label"></label>
<div tal:content="structure here/getFormulairePrevuAnalyse"></div>
</div>
<div tal:define="f python:here.getField('formulaireAttache')">
<b tal:content="f/widget/label"></b>&nbsp;<span i18n:translate="" tal:content="here/getFormulaireAttache"></span>
</div>
<div class="avisIndent" tal:define="f python:here.getField('formulaireAttacheAnalyse')">
<label tal:content="f/widget/label"></label>
<div tal:content="structure here/getFormulaireAttacheAnalyse"></div>
</div>
</span>
</fieldset>
<!-- Le test Kafka -->
<fieldset>
<legend>f. Le test Kafka</legend>
<div tal:define="f python:here.getField('testKafka')">
<b tal:content="f/widget/label"></b>&nbsp;<span i18n:translate="" tal:content="here/getTestKafka"></span>
</div>
<span tal:condition="python: here.getTestKafka() == 'yes'">
<div tal:define="f python:here.getField('testKafkaKo')">
<b tal:content="f/widget/label"></b>&nbsp;<span i18n:translate="" tal:content="here/getTestKafkaKo"></span>
</div>
<div class="avisIndent" tal:define="f python:here.getField('testKafkaKoAnalyse')">
<label tal:content="f/widget/label"></label>
<div tal:content="structure here/getTestKafkaKoAnalyse"></div>
</div>
</span>
</fieldset>
</div>
</body>
</html>

BIN
skins/Avis/odt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 749 B

View File

@ -0,0 +1,5 @@
.avisIndent {
padding-left: 20px;
font-style: italic;
font-size: 88%;
}

BIN
tool.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 B

1
version.txt Normal file
View File

@ -0,0 +1 @@
0.2 build 02