Conjunto de mudanças 5121 no repositório publico


Ignorar:
Timestamp:
02/07/2011 13:34:55 (9 anos atrás)
Autor:
davimedeiros
Mensagem:

Implementacao inicial da Barra Governo (a partir do HTML da Secom)

Localização:
plonegovbr/plonegovbr.tema/trunk/plonegovbr/tema
Arquivos:
2 adicionados
5 editados

Legenda:

Não Modificado
Adicionado
Removido
  • plonegovbr/plonegovbr.tema/trunk/plonegovbr/tema/browser/configure.zcml

    r5114 r5121  
    1010    and viewlets only within the 'Tema do Plone para Sitios de Governo' theme.
    1111  -->
     12
    1213  <interface
    1314      interface=".interfaces.IThemeSpecific"
     
    1516      name="Tema do Plone para Sitios de Governo"
    1617      />
    17  
     18
    1819  <!-- Viewlets registration -->
    19   <!-- EXAMPLE (UNCOMMENT TO MAKE AVAILABLE):
     20
    2021  <browser:viewlet
    21       name="plonegovbr.someviewlet"
    22       manager="plone.app.layout.viewlets.interfaces.IPortalFooter"
    23       class=".viewlets.MyViewlet"
     22      name="plonegovbr.barra-governo"
     23      manager="plone.app.layout.viewlets.interfaces.IPortalTop"
     24      class=".viewlets.BarraGovernoViewlet"
    2425      layer=".interfaces.IThemeSpecific"
    2526      permission="zope2.View"
    2627      />
    27   -->
    2828
    2929  <!-- Zope 3 browser resources -->
    3030
    31   <!-- Resource directory for images
    32     See plonegovbr/tema/browser/images/README.txt
    33     for more information about registering images as Zope 3 browser
    34     resources.
    35   -->
    3631  <browser:resourceDirectory
    3732      name="plonegovbr.tema.images"
     
    4035      />
    4136
    42   <!-- Resource directory for stylesheets
    43     See plonegovbr/tema/browser/stylesheets/README.txt
    44     for more information about registering stylesheets as Zope 3 browser
    45     resources.
    46   -->
    4737  <browser:resourceDirectory
    4838      name="plonegovbr.tema.stylesheets"
  • plonegovbr/plonegovbr.tema/trunk/plonegovbr/tema/browser/viewlets.py

    r5114 r5121  
     1from cgi import escape
     2from Products.CMFPlone.utils import safe_unicode
     3from zope.component import getMultiAdapter
     4
    15from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
    26from plone.app.layout.viewlets.common import ViewletBase
     
    1519#   (unwanted) inline documentation  ;-p
    1620
    17 #class MyViewlet(ViewletBase):
    18 #    render = ViewPageTemplateFile('viewlet.pt')
    19 #
    20 #    def update(self):
    21 #        self.computed_value = 'any output'
     21class BarraGovernoViewlet(ViewletBase):
     22    render = ViewPageTemplateFile('templates/barra-governo.pt')
     23
     24    def portal_url(self):
     25        portal_state = getMultiAdapter((self.context, self.request), name=u'plone_portal_state')
     26        return portal_state.portal_url()
     27
     28    def portal_title(self):
     29        portal_state = getMultiAdapter((self.context, self.request), name=u'plone_portal_state')
     30        return escape(safe_unicode(portal_state.portal_title()))
     31
     32    def portal_logo(self):
     33        return 'logo-presidencia-bv2.png'
  • plonegovbr/plonegovbr.tema/trunk/plonegovbr/tema/profiles/default/cssregistry.xml

    r5114 r5121  
    2525      -->
    2626 <stylesheet title=""
    27     id="++resource++plonegovbr.tema.stylesheets/main.css"
     27    id="styles.css"
    2828    media="screen" rel="stylesheet" rendering="import"
    2929    cacheable="True" compression="safe" cookable="True"
  • plonegovbr/plonegovbr.tema/trunk/plonegovbr/tema/profiles/default/jsregistry.xml

    r5114 r5121  
    11<?xml version="1.0"?>
     2<!-- XXX TODO: Traduzir comentarios -->
    23<!-- This file holds the setup configuration for the portal_javascripts tool.
    34     -->
  • plonegovbr/plonegovbr.tema/trunk/plonegovbr/tema/profiles/default/viewlets.xml

    r5114 r5121  
    11<?xml version="1.0"?>
     2<!-- XXX TODO: Traduzir comentarios -->
    23<!-- This file holds the setup configuration of the viewlet managers
    34     for the "Tema do Plone para Sitios de Governo" skin.
     
    67<object>
    78
    8   <!-- Viewlets keep the same ordering than the default skin ('Plone Default'
    9        out of the box).
    10        You can specify skinname="*" if you want changes apply for all skins.
    11        Using "True"" for the 'make-default' parameter will make the 'skinname'
    12        value set as default skinname. Means the name of the skin that would be
    13        used in case the viewlets ordering was not specified for the currently
    14        used skin.
    15        The 'based-on' attribute lets you inherit the viewlets ordering from an
    16        existing skin.
    17        -->
    18   <order manager="plone.portalfooter" skinname="Tema do Plone para Sitios de Governo"
    19          based-on="Plone Default">
    20     <!-- The definition of a viewlet accepts these parameters:
    21          - name: quite self explanatory, the name of the viewlet.
    22          - insert-before: name of the viewlet before which it must be added or
    23            moved.
    24          - insert-after: name of the viewlet after which it must be added
    25            or moved.
    26          - remove: supported but rarely needed, removes the viewlet from the
    27            ordering list (doesn't mean that it hides the viewlet).
    28          Note: insert-before and -after accept the value "*" which means
    29          "all".
    30          -->
    31 <!-- EXAMPLE (UNCOMMENT TO MAKE AVAILABLE):
    32     <viewlet name="plonegovbr.someviewlet"
    33              insert-before="*" />
    34 -->
    35   </order>
     9 <!-- Viewlets keep the same ordering than the default skin ('Plone Default'
     10      out of the box).
     11      You can specify skinname="*" if you want changes apply for all skins.
     12      Using "True"" for the 'make-default' parameter will make the 'skinname'
     13      value set as default skinname. Means the name of the skin that would be
     14      used in case the viewlets ordering was not specified for the currently
     15      used skin.
     16      The 'based-on' attribute lets you inherit the viewlets ordering from an
     17      existing skin.
     18      -->
     19 <order manager="plone.portaltop" skinname="Tema do Plone para Sitios de Governo"
     20        based-on="Plone Default">
     21   <!-- The definition of a viewlet accepts these parameters:
     22        - name: quite self explanatory, the name of the viewlet.
     23        - insert-before: name of the viewlet before which it must be added or
     24          moved.
     25        - insert-after: name of the viewlet after which it must be added
     26          or moved.
     27        - remove: supported but rarely needed, removes the viewlet from the
     28          ordering list (doesn't mean that it hides the viewlet).
     29        Note: insert-before and -after accept the value "*" which means
     30        "all".
     31        -->
     32  <viewlet name="plonegovbr.barra-governo" insert-before="*" />
     33 </order>
    3634
    37   <hidden manager="plone.portalheader" skinname="Tema do Plone para Sitios de Governo">
    38 <!-- EXAMPLE (UNCOMMENT TO MAKE AVAILABLE):
     35 <!-- EXAMPLE (UNCOMMENT TO MAKE AVAILABLE):
     36 <hidden manager="plone.portalheader" skinname="Tema do Plone para Sitios de Governo">
    3937    <viewlet name="plone.global_sections" />
    40 -->
    41   </hidden>
     38 </hidden>
     39 -->
    4240
    4341</object>
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.