Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide uninstall profile #19

Merged
merged 2 commits into from
Jun 9, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ Changelog
1.0b2 (unreleased)
^^^^^^^^^^^^^^^^^^

- Remove old thumbnail vocabulary - replaced with plone.app.vocabularies.ImagesScales (closes `#17`_).
- Hide uninstall profile.
[hvelarde]

- Use `plone.app.vocabularies.ImagesScales` vocabulary (closes `#17`_).
[rodfersou]

- Fix exception with localized dates (closes `#15`_).
Expand Down
8 changes: 6 additions & 2 deletions src/sc/periodicals/profiles.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@
title="sc.periodicals"
description="A content type to register periodicals of a publication."
directory="profiles/default"
provides="Products.GenericSetup.interfaces.EXTENSION" />
provides="Products.GenericSetup.interfaces.EXTENSION"
/>

<genericsetup:registerProfile
name="uninstall"
title="sc.periodicals uninstall"
directory="profiles/uninstall"
description="Uninstall profile for the sc.periodicals package."
provides="Products.GenericSetup.interfaces.EXTENSION" />
provides="Products.GenericSetup.interfaces.EXTENSION"
/>

<utility factory=".setuphandlers.HiddenProfiles" name="sc.periodicals" />

</configure>
13 changes: 13 additions & 0 deletions src/sc/periodicals/setuphandlers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# -*- coding: utf-8 -*-
from Products.CMFPlone.interfaces import INonInstallable
from zope.interface import implementer


@implementer(INonInstallable)
class HiddenProfiles(object): # pragma: no cover

def getNonInstallableProfiles(self):
"""Do not show on Plone's list of installable profiles."""
return [
u'sc.periodicals:uninstall',
]