source: publico/ILSAAL/trunk/GerenciamentoSAAL.py @ 1246

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

Adicionadas as views do container principal do SAAL

File size: 4.2 KB
Linha 
1# File: GerenciamentoSAAL.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.ILSAAL.interfaces.IGerenciamentoSAAL import IGerenciamentoSAAL
28
29
30from Products.Archetypes.SQLStorage import *
31# additional imports from tagged value 'import'
32from Products.ILSAAL.saalapi import *
33from vocabularies import VOCAB_ESTADOS
34
35from Products.ILSAAL.config import *
36
37from Products.CMFCore.utils import UniqueObject
38
39   
40##code-section module-header #fill in your manual code here
41##/code-section module-header
42
43schema=Schema((
44    StringField('pos_menu',
45        default="Esquerda",
46        widget=SelectionWidget(
47            label="Posicao do Menu",
48            description="Selecione a posicao no site que voce deseja que o menu do SAAL encontre-se.",
49            label_msgid='ILSAAL_label_pos_menu',
50            description_msgid='ILSAAL_help_pos_menu',
51            i18n_domain='ILSAAL',
52        ),
53        required=1,
54        vocabulary=('Direita','Esquerda')
55    ),
56
57),
58)
59
60
61##code-section after-local-schema #fill in your manual code here
62##/code-section after-local-schema
63
64GerenciamentoSAAL_schema = BaseSchema + \
65    schema
66
67##code-section after-schema #fill in your manual code here
68##/code-section after-schema
69
70class GerenciamentoSAAL(UniqueObject,BaseContent):
71    """
72    Ferramenta de gerenciamento do Sistema de Apoio a Administracao
73    Legislativa.
74    """
75    security = ClassSecurityInfo()
76    __implements__ = (getattr(UniqueObject,'__implements__',()),) + (getattr(BaseContent,'__implements__',()),) + (IGerenciamentoSAAL,)
77
78
79    # This name appears in the 'add' box
80    archetype_name             = 'Gerenciamento do SAAL'
81
82    meta_type                  = 'GerenciamentoSAAL'
83    portal_type                = 'GerenciamentoSAAL'
84    allowed_content_types      = []
85    filter_content_types       = 0
86    global_allow               = 0
87    allow_discussion           = 0
88    content_icon               = 'saal_icon.gif'
89    immediate_view             = 'base_edit'
90    default_view               = 'base_edit'
91    suppl_views                = ()
92    typeDescription            = "Ferramenta de Gerenciamento do SAAL"
93    typeDescMsgId              = 'description_edit_gerenciamentosaal'
94
95    actions =  (
96
97
98       {'action':      "string:${object_url}/base_edit",
99        'category':    "object",
100        'id':          'view',
101        'name':        'Propriedades do SAAL',
102        'permissions': ("View",),
103        'condition'  : 'python:1'
104       },
105
106
107    )
108    toolicon                   = 'saal_icon.gif'
109
110    schema = GerenciamentoSAAL_schema
111
112    ##code-section class-header #fill in your manual code here
113    ##/code-section class-header
114
115
116    # tool-constructors have no id argument, the id is fixed
117    def __init__(self, id=None):
118        BaseContent.__init__(self,'portal_saal')
119       
120        ##code-section constructor-footer #fill in your manual code here
121        ##/code-section constructor-footer
122
123
124
125    #Methods
126def modify_fti(fti):
127    # hide unnecessary tabs (usability enhancement)
128    for a in fti['actions']:
129        if a['id'] in ['view', 'metadata', 'references']:
130            a['visible'] = 0
131    return fti
132
133registerType(GerenciamentoSAAL,PROJECTNAME)
134# end of class GerenciamentoSAAL
135
136##code-section module-footer #fill in your manual code here
137##/code-section module-footer
138
139
140
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.