Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
folix-01 committed Mar 22, 2024
1 parent 51eab6c commit 29c8480
Show file tree
Hide file tree
Showing 30 changed files with 510 additions and 98 deletions.
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
collective.volto.stickyblocks
26 changes: 4 additions & 22 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,31 +33,13 @@ collective.volto.stickyblocks

Sticky blocks configurable tract

Features
--------

- Can be bullet points


Examples
--------

This add-on can be seen in action at the following sites:
- Is there a page on the internet where everybody can see the features?


Documentation
-------------

Full documentation for end users can be found in the "docs" folder, and is also available online at http://docs.plone.org/foo/bar


Translations
------------

This product has been translated into

- Klingon (thanks, K'Plai)
- Italian


Installation
Expand All @@ -79,15 +61,15 @@ and then running ``bin/buildout``
Authors
-------

Provided by awesome people ;)
RedTurtle


Contributors
------------

Put your name here, you deserve it!

- ?
- folix-01


Contribute
Expand All @@ -102,7 +84,7 @@ Support
-------

If you are having issues, please let us know.
We have a mailing list located at: project@example.com
We have a mailing list located at: info@redturtle.it


License
Expand Down
3 changes: 1 addition & 2 deletions src/collective/volto/stickyblocks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
"""Init and utils."""
from zope.i18nmessageid import MessageFactory


_ = MessageFactory('collective.volto.stickyblocks')
_ = MessageFactory("collective.volto.stickyblocks")
10 changes: 7 additions & 3 deletions src/collective/volto/stickyblocks/browser/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,24 @@
xmlns="http://namespaces.zope.org/zope"
xmlns:browser="http://namespaces.zope.org/browser"
xmlns:plone="http://namespaces.plone.org/plone"
i18n_domain="collective.volto.stickyblocks">
i18n_domain="collective.volto.stickyblocks"
>

<!-- Set overrides folder for Just-a-Bunch-Of-Templates product -->
<include package="z3c.jbot" file="meta.zcml" />
<include
package="z3c.jbot"
file="meta.zcml"
/>
<browser:jbot
directory="overrides"
layer="collective.volto.stickyblocks.interfaces.ICollectiveVoltoStickyblocksLayer"
/>

<!-- Publish static files -->
<plone:static
directory="static"
name="collective.volto.stickyblocks"
type="plone"
directory="static"
/>

</configure>
8 changes: 5 additions & 3 deletions src/collective/volto/stickyblocks/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
xmlns:i18n="http://namespaces.zope.org/i18n"
xmlns:plone="http://namespaces.plone.org/plone"
i18n_domain="collective.volto.stickyblocks">
i18n_domain="collective.volto.stickyblocks"
>

<i18n:registerTranslations directory="locales" />

Expand All @@ -17,22 +18,23 @@
<include file="permissions.zcml" />

<include package=".browser" />
<include package=".controlpanel" />

<genericsetup:registerProfile
name="default"
title="collective.volto.stickyblocks"
directory="profiles/default"
description="Installs the collective.volto.stickyblocks add-on."
provides="Products.GenericSetup.interfaces.EXTENSION"
directory="profiles/default"
post_handler=".setuphandlers.post_install"
/>

<genericsetup:registerProfile
name="uninstall"
title="collective.volto.stickyblocks (uninstall)"
directory="profiles/uninstall"
description="Uninstalls the collective.volto.stickyblocks add-on."
provides="Products.GenericSetup.interfaces.EXTENSION"
directory="profiles/uninstall"
post_handler=".setuphandlers.uninstall"
/>

Expand Down
Empty file.
16 changes: 16 additions & 0 deletions src/collective/volto/stickyblocks/controlpanel/configure.zcml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:browser="http://namespaces.zope.org/browser"
xmlns:plone="http://namespaces.plone.org/plone"
i18n_domain="collective.volto.stickyblocks"
>

<browser:page
name="sticky-blocks-settings"
for="Products.CMFPlone.interfaces.IPloneSiteRoot"
class=".sticky_blocks.StickyBlocks"
permission="cmf.ManagePortal"
layer="collective.volto.stickyblocks.interfaces.ICollectiveVoltoStickyblocksLayer"
/>

</configure>
14 changes: 14 additions & 0 deletions src/collective/volto/stickyblocks/controlpanel/sticky_blocks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from plone.app.registry.browser import controlpanel

from collective.volto.stickyblocks import _
from collective.volto.stickyblocks.interfaces import IStickyBlocks


class StickyBlocksForm(controlpanel.RegistryEditForm):
schema = IStickyBlocks
label = _("sticky_blocks_settings_label", default="Sticky Blocks Settings")
description = ""


class StickyBlocks(controlpanel.ControlPanelFormWrapper):
form = StickyBlocksForm
17 changes: 17 additions & 0 deletions src/collective/volto/stickyblocks/interfaces.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
# -*- coding: utf-8 -*-
"""Module where all interfaces, events and exceptions live."""
import json

from plone.restapi.controlpanels.interfaces import IControlpanel
from zope.publisher.interfaces.browser import IDefaultBrowserLayer
from zope.schema import SourceText

from collective.volto.stickyblocks import _


class ICollectiveVoltoStickyblocksLayer(IDefaultBrowserLayer):
"""Marker interface that defines a browser layer."""


class IStickyBlocks(IControlpanel):
sticky_blocks_configuration = SourceText(
title=_(
"sticky_blocks_label",
default="Sticky Blocks Configuration",
),
description="",
required=True,
default=json.dumps([{"rootPath": "/", "items": []}]),
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2024-03-22 14:47+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0\n"
"Language-Code: en\n"
"Language-Name: English\n"
"Preferred-Encodings: utf-8 latin1\n"
"Domain: DOMAIN\n"

#: collective/volto/stickyblocks/configure.zcml:30
msgid "Installs the collective.volto.stickyblocks add-on."
msgstr ""

#: collective/volto/stickyblocks/profiles/default/controlpanel.xml
msgid "Sticky Blocks Settings"
msgstr ""

#: collective/volto/stickyblocks/configure.zcml:39
msgid "Uninstalls the collective.volto.stickyblocks add-on."
msgstr ""

#: collective/volto/stickyblocks/configure.zcml:30
msgid "collective.volto.stickyblocks"
msgstr ""

#: collective/volto/stickyblocks/configure.zcml:39
msgid "collective.volto.stickyblocks (uninstall)"
msgstr ""

#. Default: "Sticky Blocks Configuration"
#: collective/volto/stickyblocks/interfaces.py:18
msgid "sticky_blocks_label"
msgstr ""

#. Default: "Sticky Blocks Settings"
#: collective/volto/stickyblocks/controlpanel/sticky_blocks.py:9
msgid "sticky_blocks_settings_label"
msgstr ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#--- PLEASE EDIT THE LINES BELOW CORRECTLY ---
#SOME DESCRIPTIVE TITLE.
#FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2024-03-22 14:47+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0\n"
"Language-Code: en\n"
"Language-Name: English\n"
"Preferred-Encodings: utf-8 latin1\n"
"Domain: collective.volto.stickyblocks\n"

#: collective/volto/stickyblocks/configure.zcml:30
msgid "Installs the collective.volto.stickyblocks add-on."
msgstr ""

#: collective/volto/stickyblocks/profiles/default/controlpanel.xml
msgid "Sticky Blocks Settings"
msgstr ""

#: collective/volto/stickyblocks/configure.zcml:39
msgid "Uninstalls the collective.volto.stickyblocks add-on."
msgstr ""

#: collective/volto/stickyblocks/configure.zcml:30
msgid "collective.volto.stickyblocks"
msgstr ""

#: collective/volto/stickyblocks/configure.zcml:39
msgid "collective.volto.stickyblocks (uninstall)"
msgstr ""

#. Default: "Sticky Blocks Configuration"
#: collective/volto/stickyblocks/interfaces.py:18
msgid "sticky_blocks_label"
msgstr ""

#. Default: "Sticky Blocks Settings"
#: collective/volto/stickyblocks/controlpanel/sticky_blocks.py:9
msgid "sticky_blocks_settings_label"
msgstr ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2024-03-22 14:47+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0\n"
"Language-Code: en\n"
"Language-Name: English\n"
"Preferred-Encodings: utf-8 latin1\n"
"Domain: DOMAIN\n"

#: collective/volto/stickyblocks/configure.zcml:30
msgid "Installs the collective.volto.stickyblocks add-on."
msgstr ""

#: collective/volto/stickyblocks/profiles/default/controlpanel.xml
msgid "Sticky Blocks Settings"
msgstr ""

#: collective/volto/stickyblocks/configure.zcml:39
msgid "Uninstalls the collective.volto.stickyblocks add-on."
msgstr ""

#: collective/volto/stickyblocks/configure.zcml:30
msgid "collective.volto.stickyblocks"
msgstr ""

#: collective/volto/stickyblocks/configure.zcml:39
msgid "collective.volto.stickyblocks (uninstall)"
msgstr ""

#. Default: "Sticky Blocks Configuration"
#: collective/volto/stickyblocks/interfaces.py:18
msgid "sticky_blocks_label"
msgstr ""

#. Default: "Sticky Blocks Settings"
#: collective/volto/stickyblocks/controlpanel/sticky_blocks.py:9
msgid "sticky_blocks_settings_label"
msgstr ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2024-03-22 14:47+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0\n"
"Language-Code: en\n"
"Language-Name: English\n"
"Preferred-Encodings: utf-8 latin1\n"
"Domain: DOMAIN\n"

#: collective/volto/stickyblocks/configure.zcml:30
msgid "Installs the collective.volto.stickyblocks add-on."
msgstr ""

#: collective/volto/stickyblocks/profiles/default/controlpanel.xml
msgid "Sticky Blocks Settings"
msgstr "Blocchi Fissi"

#: collective/volto/stickyblocks/configure.zcml:39
msgid "Uninstalls the collective.volto.stickyblocks add-on."
msgstr ""

#: collective/volto/stickyblocks/configure.zcml:30
msgid "collective.volto.stickyblocks"
msgstr ""

#: collective/volto/stickyblocks/configure.zcml:39
msgid "collective.volto.stickyblocks (uninstall)"
msgstr ""

#. Default: "Sticky Blocks Configuration"
#: collective/volto/stickyblocks/interfaces.py:18
msgid "sticky_blocks_label"
msgstr "Blocchi Fissi"

#. Default: "Sticky Blocks Settings"
#: collective/volto/stickyblocks/controlpanel/sticky_blocks.py:9
msgid "sticky_blocks_settings_label"
msgstr "Blocchi Fissi Controlpanel"
Loading

0 comments on commit 29c8480

Please sign in to comment.