Skip to content

Commit 07a21da

Browse files
committed
make check
1 parent 136ef93 commit 07a21da

File tree

7 files changed

+86
-45
lines changed

7 files changed

+86
-45
lines changed
Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
1+
from plone.app.textfield import RichText
2+
from plone.app.z3cform.widget import LinkFieldWidget
3+
from plone.autoform import directives as form
14
from plone.dexterity.content import Container
5+
from plone.namedfile.field import NamedBlobImage
26
from plone.supermodel import model
7+
from tagung.plone.de import _
38
from zope import schema
4-
from plone.autoform import directives as form
5-
from plone.app.textfield import RichText
6-
from plone.namedfile.field import NamedBlobImage
7-
from plone.app.z3cform.widget import LinkFieldWidget
89
from zope.interface import Interface
910

10-
from tagung.plone.de import _
1111

1212
# from plone.supermodel import xmlSchema
1313
# ITalkfromXML = xmlSchema('talk.xml')
1414

15+
1516
class ITalk(model.Schema):
16-
"""Talk content type schema"""
17+
"""Talk content type schema"""
1718

18-
details = RichText(
19-
title=_("Details"),
20-
description=_("Description of the talk in max 3000 characters"),
21-
required=True
22-
)
19+
details = RichText(
20+
title=_("Details"),
21+
description=_("Description of the talk in max 3000 characters"),
22+
required=True,
23+
)
2324

24-
audience = schema.Choice(
25+
audience = schema.Choice(
2526
title=_("Audience"), vocabulary="tagung.talk.audience", required=True
2627
)
2728

2829

2930
class Talk(Container):
30-
"""Talk content type implementation"""
31+
"""Talk content type implementation"""
Lines changed: 59 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,115 @@
1-
<model xmlns:i18n="http://xml.zope.org/namespaces/i18n" xmlns:marshal="http://namespaces.plone.org/supermodel/marshal" xmlns:form="http://namespaces.plone.org/supermodel/form" xmlns:security="http://namespaces.plone.org/supermodel/security" xmlns:indexer="http://namespaces.plone.org/supermodel/indexer" xmlns:lingua="http://namespaces.plone.org/supermodel/lingua" xmlns:users="http://namespaces.plone.org/supermodel/users" xmlns="http://namespaces.plone.org/supermodel/schema" i18n:domain="ploneconf.site">
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<model xmlns="http://namespaces.plone.org/supermodel/schema"
3+
xmlns:form="http://namespaces.plone.org/supermodel/form"
4+
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
5+
xmlns:indexer="http://namespaces.plone.org/supermodel/indexer"
6+
xmlns:lingua="http://namespaces.plone.org/supermodel/lingua"
7+
xmlns:marshal="http://namespaces.plone.org/supermodel/marshal"
8+
xmlns:security="http://namespaces.plone.org/supermodel/security"
9+
xmlns:users="http://namespaces.plone.org/supermodel/users"
10+
i18n:domain="ploneconf.site"
11+
>
212
<schema>
3-
<field name="type_of_talk" type="zope.schema.Choice">
13+
<field name="type_of_talk"
14+
type="zope.schema.Choice"
15+
>
416
<title i18n:translate="">Type of talk</title>
517
<values />
6-
<form:widget type="z3c.form.browser.radio.RadioFieldWidget"/>
18+
<form:widget type="z3c.form.browser.radio.RadioFieldWidget" />
719
</field>
8-
<field name="details" type="plone.app.textfield.RichText">
20+
<field name="details"
21+
type="plone.app.textfield.RichText"
22+
>
923
<description i18n:translate="">Description of the talk (max. 3000 characters)</description>
1024
<max_length>3000</max_length>
1125
<title i18n:translate="">Details</title>
1226
</field>
13-
<field name="audience" type="zope.schema.Set" security:write-permission="cmf.ManagePortal">
27+
<field name="audience"
28+
security:write-permission="cmf.ManagePortal"
29+
type="zope.schema.Set"
30+
>
1431
<required>False</required>
1532
<title i18n:translate="">Audience</title>
1633
<value_type type="zope.schema.Choice">
1734
<values />
1835
</value_type>
19-
<form:widget type="z3c.form.browser.checkbox.CheckBoxFieldWidget"/>
36+
<form:widget type="z3c.form.browser.checkbox.CheckBoxFieldWidget" />
2037
</field>
21-
<field name="speaker" type="zope.schema.TextLine">
38+
<field name="speaker"
39+
type="zope.schema.TextLine"
40+
>
2241
<description i18n:translate="">Name (or names) of the speaker</description>
2342
<required>False</required>
2443
<title i18n:translate="">Speaker</title>
2544
</field>
26-
<field name="company" type="zope.schema.TextLine">
45+
<field name="company"
46+
type="zope.schema.TextLine"
47+
>
2748
<required>False</required>
2849
<title i18n:translate="">Company</title>
2950
</field>
30-
<field name="email" type="plone.schema.email.Email">
51+
<field name="email"
52+
type="plone.schema.email.Email"
53+
>
3154
<description i18n:translate="">Email adress of the speaker</description>
3255
<required>False</required>
3356
<title i18n:translate="">Email</title>
3457
</field>
35-
<field name="website" type="zope.schema.TextLine">
58+
<field name="website"
59+
type="zope.schema.TextLine"
60+
>
3661
<required>False</required>
3762
<title i18n:translate="">Website</title>
3863
</field>
39-
<field name="twitter" type="zope.schema.TextLine">
64+
<field name="twitter"
65+
type="zope.schema.TextLine"
66+
>
4067
<required>False</required>
4168
<title i18n:translate="">Twitter name</title>
4269
</field>
43-
<field name="github" type="zope.schema.TextLine">
70+
<field name="github"
71+
type="zope.schema.TextLine"
72+
>
4473
<required>False</required>
4574
<title i18n:translate="">Github username</title>
4675
</field>
47-
<field name="image" type="plone.namedfile.field.NamedBlobImage">
76+
<field name="image"
77+
type="plone.namedfile.field.NamedBlobImage"
78+
>
4879
<description i18n:translate="">Portrait of the speaker</description>
4980
<required>False</required>
5081
<title i18n:translate="">Image</title>
5182
</field>
52-
<field name="speaker_biography" type="plone.app.textfield.RichText">
83+
<field name="speaker_biography"
84+
type="plone.app.textfield.RichText"
85+
>
5386
<max_length>1000</max_length>
5487
<required>False</required>
5588
<title i18n:translate="">Speaker Biography (max. 1000 characters)</title>
5689
</field>
57-
<field name="slides" type="zope.schema.URI">
90+
<field name="slides"
91+
type="zope.schema.URI"
92+
>
5893
<description i18n:translate="">URL of the Website that holds the slides</description>
5994
<required>False</required>
6095
<title i18n:translate="">Vortragsfolien</title>
6196
</field>
62-
<field name="video" type="zope.schema.URI" security:write-permission="cmf.ManagePortal">
97+
<field name="video"
98+
security:write-permission="cmf.ManagePortal"
99+
type="zope.schema.URI"
100+
>
63101
<description i18n:translate="">URL of the Website that holds the video of the talk</description>
64102
<required>False</required>
65103
<title i18n:translate="">Video</title>
66104
</field>
67-
<field name="hide_date" type="zope.schema.Bool" security:write-permission="cmf.ManagePortal">
105+
<field name="hide_date"
106+
security:write-permission="cmf.ManagePortal"
107+
type="zope.schema.Bool"
108+
>
68109
<default>True</default>
69110
<description i18n:translate="">Display talks without date and time.</description>
70111
<required>False</required>
71112
<title i18n:translate="">Hide date and time</title>
72113
</field>
73114
</schema>
74-
</model>
115+
</model>

backend/src/tagung/plone/de/permissions.zcml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
i18n_domain="tagung.plone.de"
66
>
77

8-
<configure zcml:condition="installed AccessControl.security">
8+
<configure zcml:condition="installed AccessControl.security">
99

10-
<permission
11-
id="tagung.AddTalk"
12-
title="tagung: Add Talk"
13-
/>
10+
<permission
11+
id="tagung.AddTalk"
12+
title="tagung: Add Talk"
13+
/>
1414

15-
</configure>
15+
</configure>
1616
</configure>

backend/src/tagung/plone/de/profiles/default/rolemap.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
<permissions>
44
<permission acquire="False"
55
name="Tagung: Add Talk"
6-
>
7-
<role name="Contributor" />
8-
<role name="Site Administrator" />
9-
<role name="Manager" />
10-
<role name="Owner" />
6+
>
7+
<role name="Contributor" />
8+
<role name="Site Administrator" />
9+
<role name="Manager" />
10+
<role name="Owner" />
1111
</permission>
1212
</permissions>
1313
</rolemap>

backend/src/tagung/plone/de/upgrades/configure.zcml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
/>
1515
</genericsetup:upgradeSteps>
1616

17-
</configure>
17+
</configure>

backend/src/tagung/plone/de/vocabularies/configure.zcml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<configure xmlns="http://namespaces.zope.org/zope">
22

3-
<utility
3+
<utility
44
name="tagung.talk.audience"
55
component=".talk.audience_vocabulary"
66
/>

backend/src/tagung/plone/de/vocabularies/talk.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,5 @@ def audience_vocabulary(context) -> SimpleVocabulary:
1313
SimpleTerm(value="developer", title=_("Developer")),
1414
SimpleTerm(value="expert", title=_("Expert")),
1515
SimpleTerm(value="integrator", title=_("Integrator")),
16-
1716
]
1817
)

0 commit comments

Comments
 (0)