source: publico/ILSAAL/trunk/SAAL.py @ 1143

Última Alteração nesse arquivo desde 1143 foi 1143, incluída por jeanferri, 14 anos atrás

Primeiro passo para modificar a interface do Plone quando entrar no container saal. Precisa melhorias urgentes.

File size: 3.7 KB
Linha 
1# File: SAAL.py
2#
3# Copyright (c) 2005 by Interlegis
4# Generator: ArchGenXML Version 1.4.0-RC1 devel
5#            http://plone.org/products/archgenxml
6#
7# GNU General Public Licence (GPL)
8#
9# This program is free software; you can redistribute it and/or modify it under
10# the terms of the GNU General Public License as published by the Free Software
11# Foundation; either version 2 of the License, or (at your option) any later
12# version.
13# This program is distributed in the hope that it will be useful, but WITHOUT
14# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
16# details.
17# You should have received a copy of the GNU General Public License along with
18# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
19# Place, Suite 330, Boston, MA  02111-1307  USA
20#
21__author__  = '''STC Interlegis <stc@interlegis.gov.br>'''
22__docformat__ = 'plaintext'
23
24
25from AccessControl import ClassSecurityInfo
26from Products.Archetypes.atapi import *
27from Products.CMFCore.utils import UniqueObject
28from Products.ILSAAL.interfaces.ISAAL import ISAAL
29
30
31from Products.Archetypes.SQLStorage import *
32from Products.ILSAAL.config import *
33##code-section module-header #fill in your manual code here
34
35from Products.CMFCore.utils import getToolByName
36
37##/code-section module-header
38
39schema=Schema((
40),
41)
42
43
44##code-section after-local-schema #fill in your manual code here
45##/code-section after-local-schema
46
47SAAL_schema = OrderedBaseFolderSchema + \
48    getattr(UniqueObject,'schema',Schema(())) + \
49    schema
50
51##code-section after-schema #fill in your manual code here
52##/code-section after-schema
53
54class SAAL(UniqueObject,OrderedBaseFolder):
55    """
56    Container geral de objetos do sistema Interlegis SAAL.
57    """
58    security = ClassSecurityInfo()
59    __implements__ = (getattr(UniqueObject,'__implements__',()),) + (getattr(OrderedBaseFolder,'__implements__',()),) + (ISAAL,)
60
61
62    # This name appears in the 'add' box
63    archetype_name             = 'SAAL'
64
65    meta_type                  = 'SAAL'
66    portal_type                = 'SAAL'
67    allowed_content_types      = [] + list(getattr(UniqueObject, 'allowed_content_types', []))
68    filter_content_types       = 1
69    global_allow               = 0
70    allow_discussion           = 0
71    content_icon               = 'saal_icon.gif'
72    immediate_view             = 'base_view'
73    default_view               = 'base_view'
74    suppl_views                = ()
75    typeDescription            = "Sistema SAAL"
76    typeDescMsgId              = 'description_edit_saal'
77
78    schema = SAAL_schema
79
80    ##code-section class-header #fill in your manual code here
81
82    #if self.getPosicaoMenu() != 'Direita':
83    #    left_slots = CONTEUDO_MENU
84    #    right_slots = []
85    #else:
86    #    left_slots = []
87    #    right_slots = CONTEUDO_MENU
88
89    left_slots = CONTEUDO_MENU
90    right_slots = []
91
92    ##/code-section class-header
93
94
95    #Methods
96
97    # Use class/module security defaults
98    def __init__(self,id=None):
99        """
100        Construtor da classe. Fixa o id para nao ser mais alterado.
101        """
102       
103        OrderedBaseFolder.__init__(self, 'saal')
104
105
106    #methods from Interface ISAAL
107
108    security.declarePublic('getPosicaoMenu')
109    def getPosicaoMenu(self):
110        """
111        Retorna a posicao do menu do saal (Direita ou Esquerda). Esta
112        opcao pode ser selecionada na tool portal_saal.
113        """
114       
115        portal_saal = getToolByName(self, 'portal_saal')
116        return portal_saal.getPos_menu()
117
118
119
120registerType(SAAL,PROJECTNAME)
121# end of class SAAL
122
123##code-section module-footer #fill in your manual code here
124##/code-section module-footer
125
126
127
Note: Veja TracBrowser para ajuda no uso do navegador do trac.
 

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