Skip to content

Commit edea36c

Browse files
committed
Apply lint
1 parent 5903dd9 commit edea36c

7 files changed

Lines changed: 129 additions & 94 deletions

File tree

src/experimental/doodle/browser/configure.zcml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@
2121
/>
2222

2323
<browser:page
24-
for="experimental.doodle.content.interfaces.IDoodle"
2524
name="view"
25+
for="experimental.doodle.content.interfaces.IDoodle"
2626
class=".views.AnswerView"
2727
permission="zope2.View"
2828
layer="experimental.doodle.interfaces.IBrowserLayer"
2929
/>
3030

3131
<browser:page
32-
for="experimental.doodle.content.interfaces.IDoodle"
3332
name="results"
33+
for="experimental.doodle.content.interfaces.IDoodle"
3434
class=".views.ResultsView"
3535
permission="zope2.View"
3636
layer="experimental.doodle.interfaces.IBrowserLayer"

src/experimental/doodle/browser/doodle_answer.pt

Lines changed: 52 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,59 @@
11
<html xmlns="http://www.w3.org/1999/xhtml"
2+
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
23
xmlns:metal="http://xml.zope.org/namespaces/metal"
34
xmlns:tal="http://xml.zope.org/namespaces/tal"
4-
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
5-
i18n:domain="experimental.doodle"
65
metal:use-macro="context/@@main_template/macros/master"
7-
>
6+
i18n:domain="experimental.doodle"
7+
>
88

99
<body>
1010
<metal:slot fill-slot="main">
1111
<link rel="stylesheet"
12-
tal:attributes="href string:${context/portal_url}/++resource++experimental.doodle/doodle.css"
13-
/>
12+
tal:attributes="
13+
href string:${context/portal_url}/++resource++experimental.doodle/doodle.css;
14+
"
15+
/>
1416
<div class="doodle-card doodle-answer">
1517
<header class="doodle-header">
1618
<div class="doodle-header-top">
1719
<div class="doodle-header-text">
1820
<h1 tal:content="context/Title">Doodle title</h1>
19-
<p class="doodle-subtitle" i18n:translate="">
21+
<p class="doodle-subtitle"
22+
i18n:translate=""
23+
>
2024
Which dates work for you?
2125
</p>
2226
</div>
2327
<div class="doodle-header-actions"
2428
tal:condition="view/is_creator"
25-
>
29+
>
2630
<a class="btn btn-secondary btn-sm"
27-
tal:attributes="href view/results_url"
31+
tal:attributes="
32+
href view/results_url;
33+
"
2834
i18n:translate=""
29-
>View results</a>
35+
>View results</a>
3036
</div>
3137
</div>
3238
</header>
3339

3440
<div class="doodle-body">
3541
<div class="doodle-share-box"
3642
tal:condition="view/is_creator"
37-
>
38-
<p class="doodle-share-label" i18n:translate="">Share this link</p>
39-
<input type="text"
43+
>
44+
<p class="doodle-share-label"
45+
i18n:translate=""
46+
>Share this link</p>
47+
<input class="doodle-share-url"
4048
readonly="readonly"
41-
class="doodle-share-url"
42-
tal:attributes="value context/absolute_url"
43-
/>
44-
<p class="doodle-share-warning" i18n:translate="">
49+
type="text"
50+
tal:attributes="
51+
value context/absolute_url;
52+
"
53+
/>
54+
<p class="doodle-share-warning"
55+
i18n:translate=""
56+
>
4557
Remember to publish this doodle before sharing, or members will not be able to view it.
4658
</p>
4759
</div>
@@ -53,39 +65,46 @@
5365
</p>
5466
</div>
5567

56-
<form action=""
68+
<form class="doodle-answer-form"
69+
action=""
5770
method="post"
58-
class="doodle-answer-form"
59-
>
60-
<input type="hidden" name="form.submitted" value="1" />
61-
<span tal:replace="structure context/@@authenticator/authenticator" />
71+
>
72+
<input name="form.submitted"
73+
type="hidden"
74+
value="1"
75+
/>
76+
<span tal:replace="structure context/@@authenticator/authenticator"></span>
6277

6378
<fieldset class="doodle-fieldset">
6479
<legend i18n:translate="">Available dates</legend>
6580
<ul class="doodle-date-options">
6681
<li class="doodle-date-option"
6782
tal:repeat="candidate view/candidate_dates"
68-
>
69-
<input type="checkbox"
83+
>
84+
<input class="doodle-date-checkbox"
7085
name="selected_dates"
71-
class="doodle-date-checkbox"
72-
tal:attributes="id python:'doodle-date-' + candidate.isoformat();
73-
value candidate/isoformat;
74-
checked python:candidate.isoformat() in view.selected"
75-
/>
86+
type="checkbox"
87+
tal:attributes="
88+
id python:'doodle-date-' + candidate.isoformat();
89+
value candidate/isoformat;
90+
checked python:candidate.isoformat() in view.selected;
91+
"
92+
/>
7693
<label class="doodle-date-label"
77-
tal:attributes="for python:'doodle-date-' + candidate.isoformat()"
7894
tal:content="python:view.format_date_long(candidate)"
79-
>May 20, 2026 · Tuesday</label>
95+
tal:attributes="
96+
for python:'doodle-date-' + candidate.isoformat();
97+
"
98+
>May 20, 2026 &middot; Tuesday</label>
8099
</li>
81100
</ul>
82101
</fieldset>
83102

84103
<div class="doodle-form-footer">
85-
<button type="submit"
86-
class="btn btn-primary"
104+
<button class="btn btn-primary"
105+
type="submit"
87106
i18n:translate=""
88-
>Save my answer</button>
107+
>Save my answer</button>
89108
</div>
90109
</form>
91110
</div>

src/experimental/doodle/browser/doodle_results.pt

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,36 @@
11
<html xmlns="http://www.w3.org/1999/xhtml"
2+
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
23
xmlns:metal="http://xml.zope.org/namespaces/metal"
34
xmlns:tal="http://xml.zope.org/namespaces/tal"
4-
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
5-
i18n:domain="experimental.doodle"
65
metal:use-macro="context/@@main_template/macros/master"
7-
>
6+
i18n:domain="experimental.doodle"
7+
>
88

99
<body>
1010
<metal:slot fill-slot="main">
1111
<link rel="stylesheet"
12-
tal:attributes="href string:${context/portal_url}/++resource++experimental.doodle/doodle.css"
13-
/>
12+
tal:attributes="
13+
href string:${context/portal_url}/++resource++experimental.doodle/doodle.css;
14+
"
15+
/>
1416
<div class="doodle-card doodle-results">
1517
<header class="doodle-header">
1618
<div class="doodle-header-top">
1719
<div class="doodle-header-text">
1820
<h1 tal:content="context/Title">Doodle title</h1>
19-
<p class="doodle-subtitle" i18n:translate="">
21+
<p class="doodle-subtitle"
22+
i18n:translate=""
23+
>
2024
Pick the best date to meet.
2125
</p>
2226
</div>
2327
<div class="doodle-header-actions">
2428
<a class="btn btn-secondary btn-sm"
25-
tal:attributes="href view/answer_url"
29+
tal:attributes="
30+
href view/answer_url;
31+
"
2632
i18n:translate=""
27-
>Back to answer form</a>
33+
>Back to answer form</a>
2834
</div>
2935
</div>
3036
</header>
@@ -40,13 +46,15 @@
4046
</thead>
4147
<tbody>
4248
<tr tal:repeat="row view/rows"
43-
tal:attributes="class python:'doodle-best' if row['count'] == max((r['count'] for r in view.rows), default=0) and row['count'] > 0 else ''"
44-
>
49+
tal:attributes="
50+
class python:'doodle-best' if row['count'] == max((r['count'] for r in view.rows), default=0) and row['count'] > 0 else '';
51+
"
52+
>
4553
<td tal:content="python:view.format_date(row['date'])">May 20, 2026</td>
4654
<td>
4755
<span class="doodle-count"
4856
tal:content="python:'%d / %d' % (row['count'], view.total_users)"
49-
>0 / 0</span>
57+
>0 / 0</span>
5058
</td>
5159
<td tal:content="python:', '.join(row['names']) if row['names'] else '-'">-</td>
5260
</tr>
Lines changed: 48 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,53 @@
11
<html xmlns="http://www.w3.org/1999/xhtml"
2-
xmlns:tal="http://xml.zope.org/namespaces/tal"
32
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
3+
xmlns:tal="http://xml.zope.org/namespaces/tal"
44
tal:omit-tag=""
5-
>
6-
<div tal:attributes="class view/klass">
7-
<table class="table table-borderless candidate-dates-table">
8-
<colgroup>
9-
<col class="candidate-dates-check-col" />
10-
<col class="candidate-dates-input-col" />
11-
</colgroup>
12-
<tbody>
13-
<tal:block tal:repeat="widget view/widgets">
14-
<tr tal:condition="python:widget.mode != 'hidden'"
15-
tal:attributes="id string:${widget/id}-row"
16-
>
17-
<td class="candidate-dates-check">
18-
<input type="checkbox"
19-
value="1"
20-
class="multi-widget-checkbox checkbox-widget"
21-
tal:attributes="id string:${widget/id}-remove;
22-
name string:${widget/name}.remove"
23-
/>
24-
</td>
25-
<td class="candidate-dates-input">
26-
<div tal:condition="widget/error"
27-
class="mb-1"
28-
tal:replace="structure widget/error/render"
29-
></div>
30-
<div tal:content="structure widget/render"
31-
tal:omit-tag=""
32-
></div>
33-
</td>
34-
</tr>
35-
</tal:block>
36-
</tbody>
37-
</table>
38-
<div class="buttons">
39-
<input tal:repeat="action view/actions/values"
40-
tal:replace="structure action/render"
41-
/>
5+
>
6+
<div tal:attributes="
7+
class view/klass;
8+
">
9+
<table class="table table-borderless candidate-dates-table">
10+
<colgroup>
11+
<col class="candidate-dates-check-col" />
12+
<col class="candidate-dates-input-col" />
13+
</colgroup>
14+
<tbody>
15+
<tal:block tal:repeat="widget view/widgets">
16+
<tr tal:condition="python:widget.mode != 'hidden'"
17+
tal:attributes="
18+
id string:${widget/id}-row;
19+
"
20+
>
21+
<td class="candidate-dates-check">
22+
<input class="multi-widget-checkbox checkbox-widget"
23+
type="checkbox"
24+
value="1"
25+
tal:attributes="
26+
id string:${widget/id}-remove;
27+
name string:${widget/name}.remove;
28+
"
29+
/>
30+
</td>
31+
<td class="candidate-dates-input">
32+
<div class="mb-1"
33+
tal:condition="widget/error"
34+
tal:replace="structure widget/error/render"
35+
></div>
36+
<div tal:content="structure widget/render"
37+
tal:omit-tag=""
38+
></div>
39+
</td>
40+
</tr>
41+
</tal:block>
42+
</tbody>
43+
</table>
44+
<div class="buttons">
45+
<input tal:repeat="action view/actions/values"
46+
tal:replace="structure action/render"
47+
/>
48+
</div>
4249
</div>
43-
</div>
44-
<input type="hidden" tal:replace="structure view/counterMarker" />
50+
<input type="hidden"
51+
tal:replace="structure view/counterMarker"
52+
/>
4553
</html>

src/experimental/doodle/profiles/default/registry/main.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<records interface="plone.base.interfaces.IBundleRegistry"
77
prefix="plone.bundles/experimental.doodle"
8-
>
8+
>
99
<value key="enabled">True</value>
1010
<value key="csscompilation">++resource++experimental.doodle/doodle.css</value>
1111
<value key="merge_with">logged-in</value>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<object meta_type="Plone Types Tool"
33
name="portal_types"
4-
>
4+
>
55
<object meta_type="Dexterity FTI"
66
name="Doodle"
7-
/>
7+
/>
88
</object>

src/experimental/doodle/profiles/default/types/Doodle.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<object meta_type="Dexterity FTI"
2+
<object xmlns:i18n="http://xml.zope.org/i18n"
3+
meta_type="Dexterity FTI"
34
name="Doodle"
45
i18n:domain="plone"
5-
xmlns:i18n="http://xml.zope.org/i18n"
6-
>
6+
>
77
<property name="title"
88
i18n:translate=""
9-
>Doodle</property>
9+
>Doodle</property>
1010
<property name="description"
1111
i18n:translate=""
12-
>Poll participants on meeting dates.</property>
12+
>Poll participants on meeting dates.</property>
1313
<property name="factory">doodle</property>
1414
<property name="schema">experimental.doodle.content.interfaces.IDoodle</property>
1515
<property name="klass">experimental.doodle.content.doodle.Doodle</property>

0 commit comments

Comments
 (0)