Conjunto de mudanças 6527 no repositório publico


Ignorar:
Timestamp:
18/06/2012 18:32:41 (9 anos atrás)
Autor:
jeanferri
Mensagem:

Atualizados os arquivos de conteúdo da ouvidoria após regeração de código e correção das inconsistências

Localização:
Ombudsman/trunk/content
Arquivos:
4 editados

Legenda:

Não Modificado
Adicionado
Removido
  • Ombudsman/trunk/content/Ombudsman.py

    r6423 r6527  
     1# -*- coding: utf-8 -*-
     2#
    13# File: Ombudsman.py
    24#
    3 # Copyright (c) 2006 by Rafahela Garcia Bazzanella
     5# Copyright (c) 2012 by Interlegis
    46# Generator: ArchGenXML
    57#            http://plone.org/products/archgenxml
     
    2325#
    2426
    25 __author__ = """Rafahela Bazzanella <rafabazzanella@yahoo.com.br>, Jean Rodrigo Ferri
    26 <jeanrodrigoferri@yahoo.com.br>"""
     27__author__ = """Rafahela Garcia Bazzanella <rafahela@gmail.com>, Jean Rodrigo Ferri
     28<jeanferri@gmail.com>"""
    2729__docformat__ = 'plaintext'
    2830
     
    5860
    5961    copied_fields['title'],
    60    
    6162    copied_fields['availableIssueTypes'],
    62    
    6363    copied_fields['availableAreas'],
    64    
    6564    copied_fields['managers'],
    66    
    6765),
    6866)
     
    8987
    9088class Ombudsman(PoiTracker):
    91     """
    92     Class that contains all registered claims.
     89    """Class that contains all registered claims.
    9390    """
    9491    security = ClassSecurityInfo()
     
    111108    typeDescMsgId = 'description_edit_ombudsman'
    112109
     110
    113111    actions =  (
    114112
     
    150148        Send a notification email
    151149        """
    152        
     150
    153151        portal_url  = getToolByName(self, 'portal_url')
    154152        plone_utils = getToolByName(self, 'plone_utils')
     
    158156        charset     = plone_utils.getSiteEncoding()
    159157        fromAddress = portal.getProperty('email_from_address', None)
    160        
     158
    161159        if fromAddress is None:
    162160            log('Cannot send notification email: email sender address or name not set')
    163161            return
    164        
     162
    165163        email = MIMEMultipart('alternative')
    166164        email.epilogue = ''
    167            
     165
    168166        textPart = MIMEText(rstText, 'plain', charset)
    169167        email.attach(textPart)
     
    172170
    173171        message = str(email)
    174        
     172
    175173        mailHost.send(message = message,
    176174                              mto = addresses,
     
    183181        Get key state.
    184182        """
    185        
     183
    186184        if criteria is None:
    187185            criteria = kwargs
  • Ombudsman/trunk/content/OmbudsmanClaim.py

    r6423 r6527  
     1# -*- coding: utf-8 -*-
     2#
    13# File: OmbudsmanClaim.py
    24#
    3 # Copyright (c) 2006 by Rafahela Garcia Bazzanella
     5# Copyright (c) 2012 by Interlegis
    46# Generator: ArchGenXML
    57#            http://plone.org/products/archgenxml
     
    2325#
    2426
    25 __author__ = """Rafahela Bazzanella <rafabazzanella@yahoo.com.br>, Jean Rodrigo Ferri
    26 <jeanrodrigoferri@yahoo.com.br>"""
     27__author__ = """Rafahela Garcia Bazzanella <rafahela@gmail.com>, Jean Rodrigo Ferri
     28<jeanferri@gmail.com>"""
    2729__docformat__ = 'plaintext'
    2830
     
    5254
    5355    copied_fields['id'],
    54    
    5556    StringField(
    5657        name='title',
     
    6869
    6970    copied_fields['contactEmail'],
    70    
    7171    StringField(
    7272        name='sex',
     
    169169
    170170    copied_fields['issueType'],
    171    
    172171    copied_fields['details'],
    173    
    174172    copied_fields['responsibleManager'],
    175    
    176173    copied_fields['area'],
    177    
    178174),
    179175)
     
    195191
    196192class OmbudsmanClaim(BaseFolder):
    197     """
    198     Class that defines claims of people.
     193    """Class that defines claims of people.
    199194    """
    200195    security = ClassSecurityInfo()
     
    209204    filter_content_types = 1
    210205    global_allow = 0
    211     allow_discussion = 0
    212206    content_icon = 'ombudsman_claim_icon.png'
    213207    immediate_view = 'base_view'
     
    216210    typeDescription = "Class that defines claims of people"
    217211    typeDescMsgId = 'description_edit_ombudsmanclaim'
     212    allow_discussion = 0
     213
    218214
    219215    actions =  (
     
    242238    # Methods from Interface IClaim
    243239
    244     security.declarePublic('getCities')
    245     def getCities(self):
    246         """
    247         Return cities list.
    248         """
    249         portal_membership = getToolByName(self, 'portal_membership')
    250         member = portal_membership.getAuthenticatedMember()
    251         city = member.getProperty('city', '')
    252         return city
    253 
    254     security.declarePublic('getRegions')
    255     def getRegions(self):
    256         """
    257         Return states/regions list.
    258         """
     240    security.declarePublic('getAddresses')
     241    def getAddresses(self):
     242        """
     243        Return member address.
     244        """
     245        portal_membership = getToolByName(self, 'portal_membership')
     246        member = portal_membership.getAuthenticatedMember()
     247        address = member.getProperty('address', '')
     248        return address
     249
     250    security.declarePublic('getSexs')
     251    def getSexs(self):
     252        """
     253        Return sex list.
     254        """
     255
    259256        portal_ombudsman = getToolByName(self, 'portal_ombudsman')
    260257        result = []
    261         vocabulary = portal_ombudsman.getVocab_region()
     258        vocabulary = portal_ombudsman.getVocab_sex()
    262259
    263260        for item in vocabulary:
     
    266263        return DisplayList(tuple(result))
    267264
    268 
    269     security.declarePublic('getAges')
    270     def getAges(self):
    271         """
    272         Return ages list.
    273         """
    274 
    275         portal_ombudsman = getToolByName(self, 'portal_ombudsman')       
     265    security.declarePublic('getZips')
     266    def getZips(self):
     267        """
     268        Return member zip code.
     269        """
     270        portal_membership = getToolByName(self, 'portal_membership')
     271        member = portal_membership.getAuthenticatedMember()
     272        zip_code = member.getProperty('zip', '')
     273        return zip_code
     274
     275    security.declarePublic('getCities')
     276    def getCities(self):
     277        """
     278        Return cities list.
     279        """
     280        portal_membership = getToolByName(self, 'portal_membership')
     281        member = portal_membership.getAuthenticatedMember()
     282        city = member.getProperty('city', '')
     283        return city
     284
     285    security.declarePublic('getRegions')
     286    def getRegions(self):
     287        """
     288        Return states/regions list.
     289        """
     290        portal_ombudsman = getToolByName(self, 'portal_ombudsman')
    276291        result = []
    277         vocabulary = portal_ombudsman.getVocab_age()
     292        vocabulary = portal_ombudsman.getVocab_region()
    278293
    279294        for item in vocabulary:
     
    282297        return DisplayList(tuple(result))
    283298
    284     security.declarePublic('getSexs')
    285     def getSexs(self):
    286         """
    287         Return sex list.
    288         """
    289 
    290         portal_ombudsman = getToolByName(self, 'portal_ombudsman')       
     299    security.declarePublic('getAges')
     300    def getAges(self):
     301        """
     302        Return ages list.
     303        """
     304
     305        portal_ombudsman = getToolByName(self, 'portal_ombudsman')
    291306        result = []
    292         vocabulary = portal_ombudsman.getVocab_sex()
     307        vocabulary = portal_ombudsman.getVocab_age()
    293308
    294309        for item in vocabulary:
     
    297312        return DisplayList(tuple(result))
    298313
    299     security.declarePublic('getAddresses')
    300     def getAddresses(self):
    301         """
    302         Return member address.
    303         """
    304         portal_membership = getToolByName(self, 'portal_membership')
    305         member = portal_membership.getAuthenticatedMember()
    306         address = member.getProperty('address', '')
    307         return address
    308 
    309     security.declarePublic('getZips')
    310     def getZips(self):
    311         """
    312         Return member zip code.
    313         """
    314         portal_membership = getToolByName(self, 'portal_membership')
    315         member = portal_membership.getAuthenticatedMember()
    316         zip_code = member.getProperty('zip', '')
    317         return zip_code
    318 
    319314    # Manually created methods
    320315
     
    332327        fromName = portal.getProperty('email_from_name', None)
    333328        title = portal.getProperty('title', None)
    334        
    335        
     329
     330
    336331        claimCreator = self.Creator()
    337332        claimCreatorInfo = portal_membership.getMemberInfo(claimCreator);
     
    341336            claimAuthor = claimCreatorInfo['fullname'] or claimCreator
    342337
    343         mailText = self.ombudsman_email_claim_reviewer(self, 
     338        mailText = self.ombudsman_email_claim_reviewer(self,
    344339                                            ombudsman = ombudsman,
    345                                             claim = self, 
     340                                            claim = self,
    346341                                            fromName = fromName,
    347342                                            claimAuthor = claimAuthor)
    348343        subject = "%s" % (title,)
    349344        #subject = "[%s] New claim: #%s" % (ombudsman.getExternalTitle(), self.Title(),)
    350         #subject = i18n.translate(domain='Ombudsman', 
    351         #                         msgid='Ombudsman_subject_new_claim_reviewer', 
    352         #                         context=self, 
     345        #subject = i18n.translate(domain='Ombudsman',
     346        #                         msgid='Ombudsman_subject_new_claim_reviewer',
     347        #                         context=self,
    353348        #                         default="You have a new revision")
    354349
     
    403398        subject = "%s" % (title,)
    404399        #subject = "[%s] Your claim is resolved - %s" % (ombudsman.getExternalTitle(), claim.Title(),)
    405         #subject = i18n.translate(domain='Ombudsman', 
    406         #                         msgid='Ombudsman_subject_resolved_email', 
    407         #                         context=self, 
     400        #subject = i18n.translate(domain='Ombudsman',
     401        #                         msgid='Ombudsman_subject_resolved_email',
     402        #                         context=self,
    408403        #                         default="Your claim was resolved")
    409404
    410405        ombudsman.sendNotificationEmail([claimEmail], subject, mailText)
    411 
    412406
    413407    def getIssueTypesVocab(self):
     
    500494        subject = "%s" % (title,)
    501495        #subject = "[%s] Your claim was sent - %s" % (ombudsman.getExternalTitle(), claim.Title(),)
    502         #subject = i18n.translate(domain='Ombudsman', 
    503         #                         msgid='Ombudsman_subject_new_claim', 
    504         #                         context=self, 
     496        #subject = i18n.translate(domain='Ombudsman',
     497        #                         msgid='Ombudsman_subject_new_claim',
     498        #                         context=self,
    505499        #                         default="Your claim was sent")
    506500
  • Ombudsman/trunk/content/OmbudsmanResponse.py

    r6423 r6527  
     1# -*- coding: utf-8 -*-
     2#
    13# File: OmbudsmanResponse.py
    24#
    3 # Copyright (c) 2006 by Rafahela Garcia Bazzanella
     5# Copyright (c) 2012 by Interlegis
    46# Generator: ArchGenXML
    57#            http://plone.org/products/archgenxml
     
    2325#
    2426
    25 __author__ = """Rafahela Bazzanella <rafabazzanella@yahoo.com.br>, Jean Rodrigo Ferri
    26 <jeanrodrigoferri@yahoo.com.br>"""
     27__author__ = """Rafahela Garcia Bazzanella <rafahela@gmail.com>, Jean Rodrigo Ferri
     28<jeanferri@gmail.com>"""
    2729__docformat__ = 'plaintext'
    2830
     
    4749
    4850    copied_fields['id'],
    49    
    5051    copied_fields['title'],
    51    
    5252    copied_fields['response'],
    53    
    5453    copied_fields['issueTransition'],
    55    
    5654    copied_fields['newResponsibleManager'],
    57    
    5855),
    5956)
     
    7370
    7471class OmbudsmanResponse(PoiResponse):
    75     """
    76     Class that defines response of a claim.
     72    """Class that defines response of a claim.
    7773    """
    7874    security = ClassSecurityInfo()
  • Ombudsman/trunk/content/__init__.py

    r6423 r6527  
     1# -*- coding: utf-8 -*-
     2#
    13# File: content.py
    24#
    3 # Copyright (c) 2006 by Rafahela Garcia Bazzanella
     5# Copyright (c) 2012 by Interlegis
    46# Generator: ArchGenXML
    57#            http://plone.org/products/archgenxml
     
    2325#
    2426
    25 __author__ = """Rafahela Bazzanella <rafabazzanella@yahoo.com.br>, Jean Rodrigo Ferri
    26 <jeanrodrigoferri@yahoo.com.br>"""
     27__author__ = """Rafahela Garcia Bazzanella <rafahela@gmail.com>, Jean Rodrigo Ferri
     28<jeanferri@gmail.com>"""
    2729__docformat__ = 'plaintext'
    2830
     
    3335
    3436# Subpackages
     37# Additional
    3538
    3639# Classes
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.