Conjunto de mudanças 790 no repositório publico


Ignorar:
Timestamp:
30/09/2005 18:24:22 (14 anos atrás)
Autor:
paulovieira
Mensagem:

alteração na instalação do Produto

Arquivo:
1 editado

Legenda:

Não Modificado
Adicionado
Removido
  • ILPortal/trunk/Extensions/AppInstall.py

    r772 r790  
    4444    setupPublicatorOpniao(portal)
    4545    setupPublicatorProdutos(portal)
    46 #   addNewsletters(portal)
    47 #   addForuns(portal)
    48 #   addEnquetes(portal)
    49 #   addImagens(portal)
    50 #   addChats(portal)
     46    addNewsletters(portal)
     47    addForuns(portal)
     48    addEnquetes(portal)
     49    addImagens(portal)
     50    addChats(portal)
    5151    addJavaScript(portal)
    5252    addCSS(portal)
     
    150150
    151151def addNewsletters(portal):
    152     portal.invokeFactory('Folder', id='boletins', title='Boletins', excludeFromNav=0)
    153 
    154     newsletters = getattr(aq_base(portal), 'boletins')
    155     addable_types = ['Subscriber','NewsletterTheme']
    156     if getattr(newsletters.aq_base, 'setConstrainTypesMode', None) is not None:
    157         newsletters.setConstrainTypesMode(1)
    158         newsletters.setImmediatelyAddableTypes(addable_types)
    159         newsletters.setLocallyAllowedTypes(addable_types)
     152    if 'boletins' not in portal.objectIds():
     153        portal.invokeFactory('Folder', id='boletins', title='Boletins', excludeFromNav=0)
     154
     155        newsletters = getattr(aq_base(portal), 'boletins')
     156        addable_types = ['Subscriber','NewsletterTheme']
     157        if getattr(newsletters.aq_base, 'setConstrainTypesMode', None) is not None:
     158            newsletters.setConstrainTypesMode(1)
     159            newsletters.setImmediatelyAddableTypes(addable_types)
     160            newsletters.setLocallyAllowedTypes(addable_types)
    160161
    161162def addForuns(portal):
    162     portal.invokeFactory('Ploneboard', id='foruns', title='Fóruns')
     163    if 'foruns' not in portal.objectIds():
     164        portal.invokeFactory('Ploneboard', id='foruns', title='Fóruns')
    163165
    164166def addChats(portal):
    165     portal.invokeFactory('Folder', id='chats', title='Chats', excludeFromNav=0)
    166 
    167     chat = getattr(aq_base(portal), 'chats')
    168     addable_types = ['PloneChat']
    169     if getattr(chat.aq_base, 'setConstrainTypesMode', None) is not None:
    170         chat.setConstrainTypesMode(1)
    171         chat.setImmediatelyAddableTypes(addable_types)
    172         chat.setLocallyAllowedTypes(addable_types)
     167    if 'chats' not in portal.objectIds():
     168        portal.invokeFactory('Folder', id='chats', title='Chats', excludeFromNav=0)
     169
     170        chat = getattr(aq_base(portal), 'chats')
     171        addable_types = ['PloneChat']
     172        if getattr(chat.aq_base, 'setConstrainTypesMode', None) is not None:
     173            chat.setConstrainTypesMode(1)
     174            chat.setImmediatelyAddableTypes(addable_types)
     175            chat.setLocallyAllowedTypes(addable_types)
    173176
    174177def addEnquetes(portal):
    175     portal.invokeFactory('Folder', id='enquetes', title='Enquetes', excludeFromNav=0)
    176 
    177     enquete = getattr(aq_base(portal), 'enquetes')
    178     addable_types = ['PlonePopoll']
    179     if getattr(enquete.aq_base, 'setConstrainTypesMode', None) is not None:
    180         enquete.setConstrainTypesMode(1)
    181         enquete.setImmediatelyAddableTypes(addable_types)
    182         enquete.setLocallyAllowedTypes(addable_types)
     178    if 'enquetes' not in portal.objectIds():
     179        portal.invokeFactory('Folder', id='enquetes', title='Enquetes', excludeFromNav=0)
     180
     181        enquete = getattr(aq_base(portal), 'enquetes')
     182        addable_types = ['PlonePopoll']
     183        if getattr(enquete.aq_base, 'setConstrainTypesMode', None) is not None:
     184            enquete.setConstrainTypesMode(1)
     185            enquete.setImmediatelyAddableTypes(addable_types)
     186            enquete.setLocallyAllowedTypes(addable_types)
    183187
    184188def addImagens(portal):
    185     portal.invokeFactory('Folder', id='imagens', title='Imagens', excludeFromNav=0)
    186 
    187     imagem = getattr(aq_base(portal), 'imagens')
    188     addable_types = ['Image','Folder']
    189     if getattr(imagem.aq_base, 'setConstrainTypesMode', None) is not None:
    190         imagem.setConstrainTypesMode(1)
    191         imagem.setImmediatelyAddableTypes(addable_types)
    192         imagem.setLocallyAllowedTypes(addable_types)
     189    if 'imagens' not in portal.objectIds():
     190        portal.invokeFactory('Folder', id='imagens', title='Imagens', excludeFromNav=0)
     191
     192        imagem = getattr(aq_base(portal), 'imagens')
     193        addable_types = ['Image','Folder']
     194        if getattr(imagem.aq_base, 'setConstrainTypesMode', None) is not None:
     195            imagem.setConstrainTypesMode(1)
     196            imagem.setImmediatelyAddableTypes(addable_types)
     197            imagem.setLocallyAllowedTypes(addable_types)
    193198
    194199def setupActions(portal):
Note: Veja TracChangeset para ajuda no uso do visualizador de conjunto de mudanças.
 

The contents and data of this website are published under license:
Creative Commons 4.0 Brasil - Atribuir Fonte - Compartilhar Igual.