Conjunto de mudanças 6578 no repositório publico


Ignorar:
Timestamp:
28/06/2012 20:38:10 (9 anos atrás)
Autor:
mazza
Mensagem:

refatoracao: IRelated como schema base (detalhes de interface)

Localização:
PortalInterlegis/produtos/il.portalinterlegis/trunk/src/il/portalinterlegis/browser
Arquivos:
1 adicionado
4 editados

Legenda:

Não Modificado
Adicionado
Removido
  • PortalInterlegis/produtos/il.portalinterlegis/trunk/src/il/portalinterlegis/browser/boxes/interfaces.py

    r6575 r6578  
    2222
    2323
    24 @rich(text=WysiwygFieldWidget, target=AutocompleteFieldWidget)
     24# TODO: title in "almost" WysiwygFieldWidget... (just <b></b> allowed)... configure Tiny and filters
     25@rich(text=WysiwygFieldWidget,
     26      target=AutocompleteFieldWidget)
    2527class IRelated(BoxSchema):
    2628    target = schema.Choice(title=u"Conteúdo relacionado",
     
    3335
    3436class ISuperTitleBox(IRelated):
     37    # TODO: usar hint para que este campo seja o primeiro
    3538    supertitle = schema.TextLine(title=u"Supertítulo", required=True)
    3639
  • PortalInterlegis/produtos/il.portalinterlegis/trunk/src/il/portalinterlegis/browser/boxes/templates/ihighlight.html

    r6495 r6578  
    1       <h2 class="box-header">Destaque</h2>
    2       TODO: <br/><br/><br/>
     1<h2 class="box-header">Destaque</h2>
     2TODO: <br/><br/><br/>
  • PortalInterlegis/produtos/il.portalinterlegis/trunk/src/il/portalinterlegis/browser/boxes/templates/isupertitlebox.html

    r6575 r6578  
    11        <div class="simple-box">
    2           <a href="/portal/{{target}}">
    3             <h2>{{title}}</h2>
    4             <h3 class="icon-news">{{subtitle}}</h3>
     2          <a href="/portal/{{ target }}">
     3            <h2>{{ supertitle }}</h2>
     4            <h3 class="icon-news">{{ title }}</h3>
    55            <p>
    66              {{text}}
  • PortalInterlegis/produtos/il.portalinterlegis/trunk/src/il/portalinterlegis/browser/homes.py

    r6575 r6578  
    11# -*- coding: utf-8 -*-
     2from collections import defaultdict
     3from itertools import count
     4
    25from Products.CMFPlone.interfaces import IPloneSiteRoot
     6from five import grok
     7
    38from boxes.carousel import CarouselBox
    4 from boxes.interfaces import ISuperTitleBox, ICalendar, IAcompanheOInterlegis, IHighlight
     9from boxes.interfaces import ISuperTitleBox, ICalendar, IAcompanheOInterlegis, IHighlight, IRelated
    510from boxes.manager import DtRow, Box, GridView
    611from boxes.tabs import Tab, TabbedPane
    7 from five import grok
    812from interfaces import \
    913     IComunidadeLegislativa, IInformacao, ICapacitacao, ITecnologia, IComunicacao
    1014
    1115
    12 # These are meant for more legible grid definitions. Do not overuse.
     16# These are meant for more readable grid definitions. Do not overuse.
    1317FULL = 16
    14 ___, _ = DtRow, Box
    15 
     18_count_dict = defaultdict(count)
     19def _(interface):
     20    return Box(interface, _count_dict[interface].next())
     21___ = DtRow
    1622
    1723class Home(GridView):
     
    2127
    2228    grid = [
    23         ___((10, CarouselBox()), (6, _(ICalendar, 1)),),
     29        ___((10, CarouselBox()), (6, _(ICalendar)),),
    2430        ___((FULL, TabbedPane(
    2531            Tab(u'Informação',  u'Informação Legislativa',
    26                 (4, _(IHighlight, 1)), (4, _(IHighlight, 1)), (4, _(IHighlight, 1)), (4, _(IHighlight, 1)),),
     32                (4, _(IRelated)), (4, _(IRelated)), (4, _(IRelated)), (4, _(IRelated)),),
    2733            Tab(u'Capacitação', u'Capacitação Legislativa',
    28                 (4, _(IHighlight, 1)), (4, _(IHighlight, 1)), (4, _(IHighlight, 1)), (4, _(IHighlight, 1)),),
     34                (4, _(IRelated)), (4, _(IRelated)), (4, _(IRelated)), (4, _(IRelated)),),
    2935            Tab(u'Tecnologia',  u'Tecnologia Legislativa',
    30                 (4, _(IHighlight, 1)), (4, _(IHighlight, 1)), (4, _(IHighlight, 1)), (4, _(IHighlight, 1)),),
     36                (4, _(IRelated)), (4, _(IRelated)), (4, _(IRelated)), (4, _(IRelated)),),
    3137            Tab(u'Comunicação', u'Comunicação Legislativa',
    32                 (4, _(IHighlight, 1)), (4, _(IHighlight, 1)), (4, _(IHighlight, 1)), (4, _(IHighlight, 1)),),
     38                (4, _(IRelated)), (4, _(IRelated)), (4, _(IRelated)), (4, _(IRelated)),),
    3339            ))),
    34         ___((FULL, _(IAcompanheOInterlegis, 1)), ),
    35         ___((4, _(IHighlight, 1)), (4, _(ISuperTitleBox, 1)), (4, _(ISuperTitleBox, 2)), (4, _(ISuperTitleBox, 3)),),
     40        ___((FULL, _(IAcompanheOInterlegis)), ),
     41        ___((4, _(IHighlight)), (4, _(ISuperTitleBox)), (4, _(ISuperTitleBox)), (4, _(ISuperTitleBox)),),
    3642    ]
    3743
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.