Conjunto de mudanças 1061 no repositório publico


Ignorar:
Timestamp:
26/10/2005 15:23:32 (14 anos atrás)
Autor:
rafahelabazzanella
Mensagem:

Corrigido para que quando o produto for instalado trocar o estado dos links e das imagens inseridas para publicado

Localização:
ILPortalCasas/trunk/Extensions
Arquivos:
2 editados

Legenda:

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

    r1048 r1061  
    4343'''
    4444
     45ARQUIVO = '''[channels]
     46zopept=1h:http://rss.groups.yahoo.com/group/zope-pt/rss
     47
     48[maps]
     49Zope-PT=zopept
     50'''
     51
    4552def install(self,reinstall=0):
    4653    portal = self
     54    setupWorkflow(portal)
    4755    replaceIndex(portal)
    4856    deletePastas(portal)
     
    7785    setupMaintenance(portal)
    7886    setupMemberdata(portal)
    79     setupMembership(portal)
     87#    setupMembership(portal)
    8088    setupMetadata(portal)
    8189    setupPortalCss(portal)
    82     setupWorkflow(portal)
    8390    setupProperties(portal)
    8491    setupPublicatorUtilidades(portal)
     
    9198    setupTipo(portal)
    9299    addBackup(portal)
     100
     101def setupWorkflow(portal):
     102    portal_workflow = getToolByName(portal, 'portal_workflow')
     103    portal_workflow.setDefaultChain('portal_modelo_workflow')
     104    portal_workflow.setChainForPortalTypes( ['CalendarX'], "plone_workflow")
    93105
    94106def replaceIndex(portal):
     
    304316
    305317    link = getattr(portal, 'utilidades', None)
    306     link.invokeFactory('Link', id='interlegis', title='Programa Interlegis', remoteUrl='http://www.interlegis.gov.br')
    307     link.invokeFactory('Link', id='senado', title='Senado Federal', remoteUrl='http://www.senado.gov.br')
    308     link.invokeFactory('Link', id='camara', title='Câmara dos Deputados', remoteUrl='http://www.camara.gov.br')
    309     portal_workflow = getToolByName(portal, 'portal_workflow')
    310     interlegis = getattr(link, 'interlegis', None)
     318    link.invokeFactory('Link', id='link-interlegis', title='Programa Interlegis', remoteUrl='http://www.interlegis.gov.br')
     319    link.invokeFactory('Link', id='link-senado', title='Senado Federal', remoteUrl='http://www.senado.gov.br')
     320    link.invokeFactory('Link', id='link-camara', title='Câmara dos Deputados', remoteUrl='http://www.camara.gov.br')
     321
     322    portal_workflow = getToolByName(portal, 'portal_workflow')
     323
     324    interlegis = getattr(link, 'link-interlegis', None)
    311325    if interlegis is not None:
    312326        portal_workflow.doActionFor(interlegis, 'publish')
    313     senado = getattr(link, 'senado', None)
     327
     328    senado = getattr(link, 'link-senado', None)
    314329    if senado is not None:
    315330        portal_workflow.doActionFor(senado, 'publish')
    316     camara = getattr(link, 'camara', None)
     331
     332    camara = getattr(link, 'link-camara', None)
    317333    if camara is not None:
    318334        portal_workflow.doActionFor(camara, 'publish')
     
    336352    newImage = getattr(imgban, 'banner_interlegis.jpg')
    337353    newImage.edit(file=file(INSTANCE_HOME+'/Products/ILPortalCasas/Extensions/banner_interlegis.jpg').read())
     354    if newImage is not None:
     355        portal_workflow.doActionFor(newImage, 'publish')
    338356
    339357    imgban.invokeFactory('Image', id='banner_senado.jpg', title='Banner Senado')
    340358    newImage = getattr(imgban, 'banner_senado.jpg')
    341359    newImage.edit(file=file(INSTANCE_HOME+'/Products/ILPortalCasas/Extensions/banner_senado.jpg').read())
     360    if newImage is not None:
     361        portal_workflow.doActionFor(newImage, 'publish')
    342362
    343363    imgban.invokeFactory('Image', id='banner_camara.jpg', title='Banner Câmara')
    344364    newImage = getattr(imgban, 'banner_camara.jpg')
    345365    newImage.edit(file=file(INSTANCE_HOME+'/Products/ILPortalCasas/Extensions/banner_camara.jpg').read())
    346 
     366    if newImage is not None:
     367        portal_workflow.doActionFor(newImage, 'publish')
     368   
    347369def addEnquetes(portal):
    348370    portal.invokeFactory('Folder', id='enquetes', title='Enquetes', excludeFromNav=1)
     
    562584        portal_memberdata._setProperty('fone_res', '', 'string')
    563585
    564 def setupMembership(portal):
    565     portal_membership = getToolByName(portal, 'portal_membership')
    566     portal_membership.setMemberareaCreationFlag()
     586#def setupMembership(portal):
     587#    portal_membership = getToolByName(portal, 'portal_membership')
     588#    portal_membership.setMemberareaCreationFlag()
    567589
    568590def setupMetadata(portal):
     
    582604    portal_css.manage_addStylesheet(id='generated.css', expression='', media='screen', rel='stylesheet',
    583605                             rendering='import', enabled=False)
    584 
    585 def setupWorkflow(portal):
    586     portal_workflow = getToolByName(portal, 'portal_workflow')
    587     portal_workflow.setDefaultChain('portal_modelo_workflow')
    588606
    589607def setupProperties(portal):
     
    655673def setupSin(portal):
    656674    sin_tool = getToolByName(portal, 'sin_tool')
    657     channel = sin_tool.addChannel('zopept', '1h:http://rss.groups.yahoo.com/group/zope-pt/rss')
    658     maps = sin_tool.addMap('Zope-PT', ['zopept'])
     675    sin_tool.manage_configSin(submit='Set Config', config=ARQUIVO)   
    659676
    660677def setupSkin(portal):
  • ILPortalCasas/trunk/Extensions/InstallWorkflows.py

    r1040 r1061  
    1616    workflowTool._setObject('portal_modelo_workflow', workflow)
    1717
     18
    1819    return workflowTool
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.