예제 #1
0
class NewsBigPhotoView(BrowserView):
    """
    Custom view that shows a news with a big photo on the background
    """

    implements(ICollectionTileRenderer)

    display_name = _("News with big photo")
예제 #2
0
class NewsAreaTematicaView(BrowserView):
    """
    Custom view that shows news in area tematica
    """

    implements(ICollectionTileRenderer)

    display_name = _("News in area tematica")
예제 #3
0
class NewsHighlightView(BrowserView):
    """
    Custom view that shows an highlighted news
    """

    implements(ICollectionTileRenderer)

    display_name = _("News highlight")
예제 #4
0
class SightsView(BrowserView):
    """
    Custom view that shows sights
    """

    implements(ICollectionTileRenderer)

    display_name = _("Sights layout")
예제 #5
0
class ServiziAreaTematicaView(BrowserView):
    """
    Custom view that shows servizi in area tematica
    """

    implements(ICollectionTileRenderer)

    display_name = _("Servizi in area tematica")
예제 #6
0
 def getBandoState(self, bando):
     """
     return corretc bando state
     """
     scadenza_bando = bando.getScadenza_bando
     chiusura_procedimento_bando = bando.getChiusura_procedimento_bando
     state = (
         'open',
         translate(bandiMessageFactory(u'Open'), context=self.request),
     )
     if scadenza_bando and scadenza_bando.isPast():
         if (
             chiusura_procedimento_bando
             and chiusura_procedimento_bando.isPast()
         ):
             state = (
                 'closed',
                 translate(
                     bandiMessageFactory(u'Closed'), context=self.request
                 ),
             )
         else:
             state = (
                 'inProgress',
                 translate(
                     bandiMessageFactory(u'In progress'),
                     context=self.request,
                 ),
             )
     else:
         if (
             chiusura_procedimento_bando
             and chiusura_procedimento_bando.isPast()
         ):
             state = (
                 'closed',
                 translate(_(u'Closed'), context=self.request),
             )
     return state
예제 #7
0
class LandingAreeTematicheView(BrowserView):
    implements(ICollectionTileRenderer)

    display_name = _("Landing page aree tematiche")
예제 #8
0
class AreeTematicheView(BrowserView):
    implements(ICollectionTileRenderer)

    display_name = _("Link aree tematiche")
예제 #9
0
class GalleryView(BrowserView):
    implements(ICollectionTileRenderer)

    display_name = _("Gallery layout")
예제 #10
0
class EventsView(BrowserView):
    implements(ICollectionTileRenderer)

    display_name = _("Events layout")
예제 #11
0
class VideoView(BrowserView):
    implements(ICollectionTileRenderer)

    display_name = _("Video layout")
예제 #12
0
class NewsView(BrowserView):
    implements(ICollectionTileRenderer)

    display_name = _("News layout with image")
예제 #13
0
class BandiCollectionView(BrowserView):
    implements(ICollectionTileRenderer)

    display_name = _("Layout bandi")
예제 #14
0
class PairedCollectionView(BrowserView):
    implements(ICollectionTileRenderer)

    display_name = _("Layout tile affiancate")
예제 #15
0
class NewsTwoRowsView(BrowserView):
    implements(ICollectionTileRenderer)

    display_name = _("Layout news su due righe")
예제 #16
0
class OnlineServicesView(BrowserView):
    implements(ICollectionTileRenderer)

    display_name = _("Layout servizi online")
예제 #17
0
class CCIAACollectionTileView(BrowserView):
    implements(ICollectionTileRenderer)

    display_name = _("Layout collezione CCIAA")
예제 #18
0
class INavigationTile(Schema):
    """A tile which can render the navigation tree."""

    name = schema.TextLine(
        title=_(u'Title'),
        description=_(u'The title of the navigation tree.'),
        default=u'',
        required=False,
    )

    root = schema.Choice(
        title=_(u'Root node'),
        description=_(
            u'You may search for and choose a folder to act as the root '
            u'of the navigation tree. Leave blank to use the Plone site '
            u'root.'),
        source=UUIDSourceBinder(),
        required=False,
    )
    directives.widget(root=ContentTreeFieldWidget)

    includeTop = schema.Bool(
        title=_(u'Include top node'),
        description=_(
            u'Whether or not to show the top, or "root", node in the '
            u'navigation tree. This is affected by the "Start level" '
            u'setting.'),
        default=False,
        required=False,
    )

    currentFolderOnly = schema.Bool(
        title=_(u'Only show the contents of the current folder.'),
        description=_(
            u'If selected, the navigation tree will only show the current '
            u'folder and its children at all times.'),
        default=False,
        required=False,
    )

    topLevel = schema.Int(
        title=_(u'Start level'),
        description=_(
            u'An integer value that specifies the number of folder levels '
            u'below the site root that must be exceeded before the '
            u'navigation tree will display. 0 means that the navigation '
            u'tree should be displayed everywhere including pages in the '
            u'root of the site. 1 means the tree only shows up inside '
            u'folders located in the root and downwards, never showing at '
            u'the top level.'),
        default=0,
        required=False,
    )

    bottomLevel = schema.Int(
        title=_(u'Navigation tree depth'),
        description=_(
            u'How many folders should be included before the navigation '
            u'tree stops. 0 means no limit. 1 only includes the root '
            u'folder.'),
        default=0,
        required=False,
    )