-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OGIP 17: Add workspace root content type
- Loading branch information
raphael-s
committed
Dec 12, 2017
1 parent
962af68
commit c4fd8c9
Showing
32 changed files
with
266 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
opengever/core/profiles/default/types/opengever.workspace.root.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<object xmlns:i18n="http://xml.zope.org/namespaces/i18n" name="opengever.workspace.root" meta_type="Dexterity FTI" i18n:domain="opengever.core"> | ||
|
||
<!-- Basic metadata --> | ||
<property name="title" i18n:translate="">WorkspaceRoot</property> | ||
<property name="description" i18n:translate="" /> | ||
<property name="icon_expr" /> | ||
<property name="allow_discussion">False</property> | ||
<property name="global_allow">False</property> | ||
<property name="filter_content_types">True</property> | ||
<property name="allowed_content_types"> | ||
</property> | ||
|
||
<!-- schema interface --> | ||
<property name="schema">opengever.workspace.workspace_root.IWorkspaceRootSchema</property> | ||
|
||
<!-- class used for content items --> | ||
<property name="klass">opengever.workspace.workspace_root.WorkspaceRoot</property> | ||
|
||
<!-- add permission --> | ||
<property name="add_permission">opengever.workspace.AddWorkspace</property> | ||
|
||
<!-- enabled behaviors --> | ||
<property name="behaviors"> | ||
<element value="plone.app.lockingbehavior.behaviors.ILocking" /> | ||
<element value="ftw.journal.interfaces.IAnnotationsJournalizable" /> | ||
<element value="opengever.base.behaviors.translated_title.ITranslatedTitle" /> | ||
</property> | ||
|
||
<!-- View information --> | ||
<property name="immediate_view">view</property> | ||
<property name="default_view">view</property> | ||
<property name="default_view_fallback">False</property> | ||
<property name="view_methods"> | ||
<element value="view" /> | ||
</property> | ||
|
||
<!-- Method aliases --> | ||
<alias from="(Default)" to="(selected layout)" /> | ||
<alias from="edit" to="@@edit" /> | ||
<alias from="sharing" to="@@sharing" /> | ||
<alias from="view" to="@@view" /> | ||
|
||
<!-- Actions --> | ||
<action | ||
title="View" | ||
action_id="view" | ||
category="object" | ||
condition_expr="" | ||
url_expr="string:${object_url}" | ||
visible="False"> | ||
<permission value="View" /> | ||
</action> | ||
|
||
<action | ||
title="Edit" | ||
action_id="edit" | ||
category="object" | ||
condition_expr="not:object/@@plone_lock_info/is_locked_for_current_user|python:True" | ||
url_expr="string:${object_url}/edit" | ||
visible="True"> | ||
<permission value="Modify portal content" /> | ||
</action> | ||
|
||
</object> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -177,4 +177,8 @@ | |
</type> | ||
</bindings> | ||
|
||
<bindings> | ||
<type type_id="opengever.workspace.root" /> | ||
</bindings> | ||
|
||
</object> |
Empty file.
9 changes: 9 additions & 0 deletions
9
opengever/core/upgrades/20171206170115_add_workspace_root_content_type/rolemap.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<rolemap> | ||
|
||
<permissions> | ||
<permission name="opengever.workspace: Add WorkspaceRoot" acquire="True"> | ||
<role name="Manager" /> | ||
</permission> | ||
</permissions> | ||
|
||
</rolemap> |
5 changes: 5 additions & 0 deletions
5
opengever/core/upgrades/20171206170115_add_workspace_root_content_type/types.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<object name="portal_types" meta_type="Plone Types Tool"> | ||
|
||
<object name="opengever.workspace.root" meta_type="Dexterity FTI" /> | ||
|
||
</object> |
7 changes: 7 additions & 0 deletions
7
opengever/core/upgrades/20171206170115_add_workspace_root_content_type/types/Plone_Site.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<object name="Plone Site"> | ||
|
||
<property name="allowed_content_types" purge="False"> | ||
<element value="opengever.workspace.root" /> | ||
</property> | ||
|
||
</object> |
64 changes: 64 additions & 0 deletions
64
...pgrades/20171206170115_add_workspace_root_content_type/types/opengever.workspace.root.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<object xmlns:i18n="http://xml.zope.org/namespaces/i18n" name="opengever.workspace.root" meta_type="Dexterity FTI" i18n:domain="opengever.workspace"> | ||
|
||
<!-- Basic metadata --> | ||
<property name="title" i18n:translate="">WorkspaceRoot</property> | ||
<property name="description" i18n:translate="" /> | ||
<property name="icon_expr" /> | ||
<property name="allow_discussion">False</property> | ||
<property name="global_allow">False</property> | ||
<property name="filter_content_types">True</property> | ||
<property name="allowed_content_types"> | ||
</property> | ||
|
||
<!-- schema interface --> | ||
<property name="schema">opengever.workspace.workspace_root.IWorkspaceRootSchema</property> | ||
|
||
<!-- class used for content items --> | ||
<property name="klass">opengever.workspace.workspace_root.WorkspaceRoot</property> | ||
|
||
<!-- add permission --> | ||
<property name="add_permission">opengever.workspace.AddWorkspace</property> | ||
|
||
<!-- enabled behaviors --> | ||
<property name="behaviors"> | ||
<element value="plone.app.lockingbehavior.behaviors.ILocking" /> | ||
<element value="ftw.journal.interfaces.IAnnotationsJournalizable" /> | ||
<element value="opengever.base.behaviors.translated_title.ITranslatedTitle" /> | ||
</property> | ||
|
||
<!-- View information --> | ||
<property name="immediate_view">view</property> | ||
<property name="default_view">view</property> | ||
<property name="default_view_fallback">False</property> | ||
<property name="view_methods"> | ||
<element value="view" /> | ||
</property> | ||
|
||
<!-- Method aliases --> | ||
<alias from="(Default)" to="(selected layout)" /> | ||
<alias from="edit" to="@@edit" /> | ||
<alias from="sharing" to="@@sharing" /> | ||
<alias from="view" to="@@view" /> | ||
|
||
<!-- Actions --> | ||
<action | ||
title="View" | ||
action_id="view" | ||
category="object" | ||
condition_expr="" | ||
url_expr="string:${object_url}" | ||
visible="False"> | ||
<permission value="View" /> | ||
</action> | ||
|
||
<action | ||
title="Edit" | ||
action_id="edit" | ||
category="object" | ||
condition_expr="not:object/@@plone_lock_info/is_locked_for_current_user|python:True" | ||
url_expr="string:${object_url}/edit" | ||
visible="True"> | ||
<permission value="Modify portal content" /> | ||
</action> | ||
|
||
</object> |
9 changes: 9 additions & 0 deletions
9
opengever/core/upgrades/20171206170115_add_workspace_root_content_type/upgrade.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from ftw.upgrade import UpgradeStep | ||
|
||
|
||
class AddWorkspaceRootContentType(UpgradeStep): | ||
"""Add workspace root content type. | ||
""" | ||
|
||
def __call__(self): | ||
self.install_upgrade_profile() |
7 changes: 7 additions & 0 deletions
7
opengever/core/upgrades/20171206170115_add_workspace_root_content_type/workflows.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<object name="portal_workflow" meta_type="Plone Workflow Tool"> | ||
|
||
<bindings> | ||
<type type_id="opengever.workspace.root"/> | ||
</bindings> | ||
|
||
</object> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<configure | ||
xmlns="http://namespaces.zope.org/zope" | ||
xmlns:browser="http://namespaces.zope.org/browser" | ||
i18n_domain="opengever.workspace"> | ||
|
||
</configure> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.