Conjunto de mudanças 6122 no repositório publico


Ignorar:
Timestamp:
12/03/2012 22:20:02 (8 anos atrás)
Autor:
davilima6
Mensagem:

Corrige erro de exibicao das anotacoes do tile (tile.plaintext ainda gera AttributeError?)

Localização:
PortalInterlegis/produtos/il.portal.theme/trunk/il/portal/theme
Arquivos:
4 editados

Legenda:

Não Modificado
Adicionado
Removido
  • PortalInterlegis/produtos/il.portal.theme/trunk/il/portal/theme/browser/configure.zcml

    r6099 r6122  
    5959
    6060  <plone:tile
    61       name="ilportal.tiles.relateditens"
     61      name="ilportal.tiles.relateditems"
    6262      title="Portal Interlegis related items tile"
    6363      description="Itens relacionados"
    6464      add_permission="cmf.ModifyPortalContent"
    65       schema=".tile.IRelatedItensTileData"
    66       class=".tile.RelatedItensTile"
     65      schema=".tile.IRelatedItemsTileData"
     66      class=".tile.RelatedItemsTile"
    6767      permission="zope2.View"
    6868      for="*"
  • PortalInterlegis/produtos/il.portal.theme/trunk/il/portal/theme/browser/templates/paginainicial.pt

    r6079 r6122  
    55<body>
    66    <div metal:fill-slot="main" id="tile">
    7 
    8         <div class="bottom-right">
    9             <div tal:attributes="data-tile string:${context/absolute_url}/@@ilportal.tiles.richtext/bottom-right-tile" />
     7        <div class="tile-one">
     8            <div tal:attributes="data-tile string:${context/absolute_url}/@@ilportal.tiles.richtext/tile-one-tile" />
    109        </div>
    11         <div class="bottom-plan">
    12             <div tal:attributes="data-tile string:${context/absolute_url}/@@ilportal.tiles.plaintext/bottom-plan-tile" />
     10        <div class="tile-two">
     11            <div tal:attributes="data-tile string:${context/absolute_url}/@@ilportal.tiles.plaintext/tile-two-tile" />
    1312        </div>
    14         <div class="related">
    15             <div tal:attributes="data-tile string:${context/absolute_url}/@@ilportal.tiles.relateditens/itens-relacionados" />
    16         </div>   
     13        <div class="tile-three">
     14            <div tal:attributes="data-tile string:${context/absolute_url}/@@ilportal.tiles.relateditems/tile-three-tile" />
     15        </div>
    1716    </div>
    1817</body>
  • PortalInterlegis/produtos/il.portal.theme/trunk/il/portal/theme/browser/tile.py

    r6104 r6122  
    77from plone import tiles
    88
    9 from z3c.relationfield.schema import RelationChoice
    10 from z3c.relationfield.schema import RelationList
     9#from z3c.relationfield.schema import RelationChoice
     10#from z3c.relationfield.schema import RelationList
    1111
    1212from plone.app.textfield import RichText
    1313from plone.app.textfield.interfaces import ITransformer
    1414
    15 from plone.formwidget.autocomplete.widget import AutocompleteMultiFieldWidget
    16 from plone.formwidget.contenttree import ContentTreeFieldWidget, ObjPathSourceBinder
     15#from plone.formwidget.autocomplete.widget import AutocompleteMultiFieldWidget
     16from plone.formwidget.contenttree import ContentTreeFieldWidget
     17from plone.formwidget.contenttree import MultiContentTreeFieldWidget
    1718from plone.formwidget.contenttree import PathSourceBinder
     19#from plone.formwidget.contenttree import ObjPathSourceBinder
    1820
    1921
    2022class IRichTextTileData(Interface):
     23
    2124    text = RichText(title=u'Text')
    2225
     
    4750
    4851
    49 class IRelatedItensTileData(Interface):
     52class IRelatedItemsTileData(Interface):
    5053
    51     related_itens = RelationChoice(title=u"Escolha o item relacionado",
     54    """
     55    related_item = RelationChoice(title=u"Item relacionado",
    5256                       required=False,
    5357                       source=ObjPathSourceBinder())
     58    """
     59    related_item = Choice(title=u"Item relacionado",
     60                          description=u"Selecione somente um item, por favor",
     61                          required=False,
     62                          source=PathSourceBinder())
    5463
     64    related_items = List(title=u"Múltiplos ítens",
     65                         description=u"Selecione quantos ítens quiser",
     66                         value_type=Choice(title=u"Selection",
     67                                           source=PathSourceBinder()))
    5568    #import pdb;pdb.set_trace()
    5669
    5770
    5871class RelatedForm(form.EditForm):
    59     fields = field.Fields(IRelatedItensTileData)
    60     fields['related_itens'].widgetFactory = ContentTreeFieldWidget
     72    fields = field.Fields(IRelatedItemsTileData)
     73    fields['related_item'].widgetFactory = ContentTreeFieldWidget
     74    fields['related_items'].widgetFactory = MultiContentTreeFieldWidget
     75    mode = 'display'
    6176
    6277RelatedView = layout.wrap_form(RelatedForm)
    6378
    6479
    65 class RelatedItensTile(tiles.PersistentTile):
     80class RelatedItemsTile(tiles.PersistentTile):
    6681
    6782    def __call__(self):
    68         relateditens = ''
    69         if self.data['related_itens']:
    70             relateditens = self.data['related_itens']
    71         return '<html><body>%s</body></html>' % relateditens
     83        related_item = related_items = ''
     84        if self.data['related_item']:
     85            related_item = self.data['related_item']
     86        if self.data['related_items']:
     87            related_items = self.data['related_items']
     88        return '<html><body>%s | %s</body></html>' % (related_item, related_items)
  • PortalInterlegis/produtos/il.portal.theme/trunk/il/portal/theme/profiles/default/metadata.xml

    r5434 r6122  
    33 <version>1000</version>
    44 <dependencies>
     5  <dependency>profile-plone.app.blocks:default</dependency>
    56  <dependency>profile-plone.app.theming:default</dependency>
     7  <dependency>profile-plone.app.tiles:default</dependency>
    68 </dependencies>
    79</metadata>
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.