Add contact type
This commit is contained in:
parent
202e46de52
commit
e113ecf59a
|
@ -13,5 +13,8 @@ themis.datatypes.egg-info/requires.txt
|
|||
themis.datatypes.egg-info/top_level.txt
|
||||
themis/datatypes/__init__.py
|
||||
themis/datatypes/commission.py
|
||||
themis/datatypes/contact.py
|
||||
themis/datatypes/deputy.py
|
||||
themis/datatypes/interfaces.py
|
||||
themis/datatypes/polgroup.py
|
||||
themis/datatypes/tests.py
|
|
@ -0,0 +1,10 @@
|
|||
from five import grok
|
||||
from zope import schema
|
||||
|
||||
from plone.directives import form, dexterity
|
||||
|
||||
from themis.datatypes.interfaces import MessageFactory as _
|
||||
|
||||
class IContact(form.Schema):
|
||||
title = schema.TextLine(title=_(u'Name'))
|
||||
|
|
@ -2,4 +2,5 @@
|
|||
<object name="themis.datatypes.commission" meta_type="Dexterity FTI" />
|
||||
<object name="themis.datatypes.polgroup" meta_type="Dexterity FTI" />
|
||||
<object name="themis.datatypes.deputy" meta_type="Dexterity FTI" />
|
||||
<object name="themis.datatypes.contact" meta_type="Dexterity FTI" />
|
||||
</object>
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
<?xml version="1.0"?>
|
||||
<object name="themis.datatypes.contact" meta_type="Dexterity FTI"
|
||||
i18n:domain="themis.datatypes" xmlns:i18n="http://xml.zope.org/namespaces/i18n">
|
||||
|
||||
<!-- Basic metadata -->
|
||||
<property name="title" i18n:translate="">Contact</property>
|
||||
<property name="description" i18n:translate="">A contact</property>
|
||||
<property name="content_icon">document_icon.gif</property>
|
||||
<property name="allow_discussion">False</property>
|
||||
<property name="global_allow">True</property>
|
||||
<property name="filter_content_types">True</property>
|
||||
<property name="allowed_content_types" />
|
||||
|
||||
<!-- schema interface -->
|
||||
<property name="schema">themis.datatypes.contact.IContact</property>
|
||||
|
||||
<!-- class used for content items -->
|
||||
<property name="klass">plone.dexterity.content.Item</property>
|
||||
|
||||
<!-- add permission -->
|
||||
<property name="add_permission">cmf.AddPortalContent</property>
|
||||
|
||||
<!-- enabled behaviors -->
|
||||
<property name="behaviors">
|
||||
<element value="plone.app.content.interfaces.INameFromTitle" />
|
||||
</property>
|
||||
|
||||
<!-- View information -->
|
||||
<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="(dynamic view)"/>
|
||||
<alias from="edit" to="@@edit"/>
|
||||
<alias from="sharing" to="@@sharing"/>
|
||||
<alias from="view" to="(selected layout)"/>
|
||||
|
||||
<!-- Actions -->
|
||||
<action title="View" action_id="view" category="object" condition_expr=""
|
||||
url_expr="string:${object_url}" visible="True">
|
||||
<permission value="View"/>
|
||||
</action>
|
||||
<action title="Edit" action_id="edit" category="object" condition_expr=""
|
||||
url_expr="string:${object_url}/edit" visible="True">
|
||||
<permission value="Modify portal content"/>
|
||||
</action>
|
||||
</object>
|
||||
|
Reference in New Issue