|
6 | 6 | > |
7 | 7 | <body> |
8 | 8 | <metal:content-core fill-slot="content-core"> |
9 | | - <h1>Doodle</h1> |
10 | | - <table class="listing" |
11 | | - tal:condition="view/rows" |
12 | | - > |
13 | | - <thead> |
14 | | - <tr> |
15 | | - <th>Date</th> |
16 | | - <th>Option</th> |
17 | | - <th>Participants</th> |
18 | | - <th>Action</th> |
19 | | - </tr> |
20 | | - </thead> |
21 | | - <tbody> |
22 | | - <tr tal:repeat="row view/rows"> |
23 | | - <td tal:content="python:view.date_label(row['date'])">2026-01-01</td> |
24 | | - <td tal:content="row/title">Date option</td> |
25 | | - <td> |
26 | | - <span tal:condition="python:not row['participants']">No participants yet</span> |
27 | | - <span tal:repeat="member row/participants" |
28 | | - tal:content="member" |
29 | | - tal:attributes=" |
30 | | - class string:label; |
31 | | - " |
32 | | - >member</span> |
33 | | - </td> |
34 | | - <td> |
35 | | - <form method="post" |
36 | | - tal:condition="row/can_toggle" |
37 | | - tal:attributes=" |
38 | | - action row/toggle_url; |
39 | | - " |
40 | | - > |
41 | | - <!-- Removed _authenticator input --> |
42 | | - <button type="submit" |
43 | | - tal:content="python:'Unselect' if row['selected'] else 'Select'" |
44 | | - >Select</button> |
45 | | - </form> |
46 | | - </td> |
47 | | - </tr> |
48 | | - </tbody> |
49 | | - </table> |
50 | | - <p tal:condition="python:not view.rows()">No date options yet.</p> |
| 9 | + <section class="doodle-view card shadow-sm border-0"> |
| 10 | + <div class="card-body p-3 p-md-4"> |
| 11 | + <h2 class="h4 mb-2">Doodle</h2> |
| 12 | + <p class="text-muted mb-4">Pick the dates that work for you and compare availability at a glance.</p> |
| 13 | + <div class="table-responsive" |
| 14 | + tal:condition="view/rows" |
| 15 | + > |
| 16 | + <table class="listing table table-striped table-hover align-middle mb-0"> |
| 17 | + <thead> |
| 18 | + <tr> |
| 19 | + <th scope="col">Date</th> |
| 20 | + <th scope="col">Option</th> |
| 21 | + <th scope="col">Participants</th> |
| 22 | + <th scope="col">Action</th> |
| 23 | + </tr> |
| 24 | + </thead> |
| 25 | + <tbody> |
| 26 | + <tr tal:repeat="row view/rows"> |
| 27 | + <td class="doodle-date" |
| 28 | + tal:content="python:view.date_label(row['date'])" |
| 29 | + >2026-01-01</td> |
| 30 | + <td class="fw-semibold" |
| 31 | + tal:content="row/title" |
| 32 | + >Date option</td> |
| 33 | + <td> |
| 34 | + <span class="text-muted" |
| 35 | + tal:condition="python:not row['participants']" |
| 36 | + >No participants yet</span> |
| 37 | + <span tal:repeat="member row/participants" |
| 38 | + tal:content="member" |
| 39 | + tal:attributes=" |
| 40 | + class python:'badge rounded-pill text-bg-success' if row['selected'] and member == user.getId() else 'badge rounded-pill text-bg-light'; |
| 41 | + " |
| 42 | + >member</span> |
| 43 | + </td> |
| 44 | + <td> |
| 45 | + <form method="post" |
| 46 | + tal:condition="row/can_toggle" |
| 47 | + tal:attributes=" |
| 48 | + action row/toggle_url; |
| 49 | + " |
| 50 | + > |
| 51 | + <button type="submit" |
| 52 | + tal:content="python:'Unselect' if row['selected'] else 'Select'" |
| 53 | + tal:attributes=" |
| 54 | + class python:'btn btn-sm btn-outline-secondary' if row['selected'] else 'btn btn-sm btn-primary'; |
| 55 | + " |
| 56 | + >Select</button> |
| 57 | + </form> |
| 58 | + </td> |
| 59 | + </tr> |
| 60 | + </tbody> |
| 61 | + </table> |
| 62 | + </div> |
| 63 | + <p class="text-muted mt-3 mb-0" |
| 64 | + tal:condition="python:not view.rows()" |
| 65 | + >No date options yet.</p> |
| 66 | + </div> |
| 67 | + </section> |
51 | 68 | </metal:content-core> |
52 | 69 | </body> |
53 | 70 | </html> |
0 commit comments