1- <html xmlns =" http://www.w3.org/1999/xhtml"
2- xmlns : i18n =" http://xml.zope.org/namespaces/i18n"
3- xmlns : metal =" http://xml.zope.org/namespaces/metal"
4- xmlns : tal =" http://xml.zope.org/namespaces/tal"
5- metal : use-macro =" context/main_template/macros/master"
6- i18n : domain =" cs_dynamicpages"
7- >
1+ <html xmlns =" http://www.w3.org/1999/xhtml" xmlns : i18n =" http://xml.zope.org/namespaces/i18n"
2+ xmlns : metal =" http://xml.zope.org/namespaces/metal" xmlns : tal =" http://xml.zope.org/namespaces/tal"
3+ metal : use-macro =" context/main_template/macros/master" i18n : domain =" cs_dynamicpages" >
84
9- <body >
10- <metal : main fill-slot =" main" >
11- <main id =" content" >
12- <tal : features define ="
5+ <body >
6+ <metal : main fill-slot =" main" >
7+ <main id =" content" >
8+ <tal : features define ="
139 features view/features;
1410 " >
15- <tal : featured repeat =" brain features" >
16- <div tal : define ="
17- featured brain/getObject;
18- "
19- tal : replace =" structure python:featured.render(request)"
20- ></div >
21- </tal : featured >
22- </tal : features >
23- </main >
24- </metal : main >
25- </body >
11+ <tal : featured repeat =" brain features" >
12+ <div tal : define =" featured brain/getObject;" >
13+ <section class =" dynamic-row state-${featured/review_state}" >
14+ <div class =" edit-buttons d-flex gap-2" tal : condition =" featured/can_edit" >
15+ <a class =" btn btn-outline-primary btn-sm align-self-start" href =" ${featured/absolute_url}" >View</a >
16+ <a class =" btn btn-outline-primary btn-sm align-self-start" href =" ${featured/absolute_url}/edit" >Edit</a >
17+ <a class =" btn btn-outline-primary btn-sm align-self-start" href =" ${featured/absolute_url}" >Move up</a >
18+ <a class =" btn btn-outline-primary btn-sm align-self-start" href =" ${featured/absolute_url}" >Move down</a >
19+ <small
20+ class =" d-inline-flex ms-auto mb-3 px-2 py-1 fw-semibold text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 position-relative" >
21+ Review state: ${featured/review_state}
22+ <span
23+ tal : attributes =" class python:featured.review_state() == 'published' and 'position-absolute top-0 start-100 translate-middle p-2 bg-success border border-light rounded-circle' or 'position-absolute top-0 start-100 translate-middle p-2 bg-danger border border-light rounded-circle'" >
24+ </span >
25+ </small >
26+ </div >
27+ <div class =" content" >
28+ <replace tal : replace =" structure python:featured.render(request)" ></replace >
29+ </div >
30+ </section >
31+ </div >
32+ </tal : featured >
33+ </tal : features >
34+ </main >
35+ </metal : main >
36+ </body >
2637
27- </html >
38+ </html >
0 commit comments