|
18 | 18 | class="d-inline-flex mb-3 px-2 py-1 fw-semibold text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 position-relative"> |
19 | 19 | Template: ${row/row_template} |
20 | 20 | </small> |
21 | | - <a class="btn btn-outline-primary btn-sm align-self-start" href="${row/absolute_url}">View</a> |
| 21 | + <!-- <a class="btn btn-outline-primary btn-sm align-self-start" href="${row/absolute_url}">View</a> --> |
22 | 22 | <a class="btn btn-outline-primary btn-sm align-self-start" href="${row/absolute_url}/edit">Edit</a> |
| 23 | + <a class="btn btn-sm btn-danger align-self-start" href="#" data-bs-toggle="modal" |
| 24 | + data-bs-target="#deleteRowModal" data-rowid="${row/id}">Delete row</a> |
23 | 25 |
|
24 | 26 | <div class="ms-auto d-flex gap-2 align-items-start"> |
25 | | - <a class="btn btn-sm btn-danger" href="#" data-bs-toggle="modal" data-bs-target="#deleteRowModal" |
26 | | - data-rowid="${row/id}">Delete row</a> |
| 27 | + |
27 | 28 | <a tal:condition="python:not(repeat['brain'].start)" |
28 | 29 | class="btn btn-outline-primary btn-sm align-self-start" href="#" data-action="move-up">Move up</a> |
29 | 30 | <a tal:condition="python:not(repeat['brain'].end)" |
30 | 31 | class="btn btn-outline-primary btn-sm align-self-start" href="#" data-action="move-down">Move |
31 | 32 | down</a> |
32 | | - <small |
33 | | - class="d-inline-flex mb-3 px-2 py-1 fw-semibold text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 position-relative"> |
34 | | - Review state: ${row/review_state} |
35 | | - <span |
36 | | - tal:attributes="class python:row.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'"> |
37 | | - </span> |
38 | | - </small> |
| 33 | + <div class="btn-group"> |
| 34 | + <a tal:attributes="class python:row.review_state() == 'published' and |
| 35 | + 'position-relative btn btn-outline-success btn-sm bg-success-subtle dropdown-toggle' or |
| 36 | + 'position-relative btn btn-outline-danger btn-sm bg-danger-subtle dropdown-toggle'" type="button" |
| 37 | + class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" data-bs-display="static" |
| 38 | + aria-expanded="false"> |
| 39 | + Review state: ${row/review_state} |
| 40 | + <span |
| 41 | + tal:attributes="class python:row.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'"> |
| 42 | + </span> |
| 43 | + </a> |
| 44 | + <ul class="dropdown-menu"> |
| 45 | + <li><a class="dropdown-item" href="#">Send back</a></li> |
| 46 | + <li><a class="dropdown-item" href="#">Publish</a></li> |
| 47 | + </ul> |
| 48 | + </div> |
39 | 49 | </div> |
40 | 50 |
|
41 | 51 | </div> |
|
44 | 54 | tal:define="features_list row/featured_list" tal:condition="features_list"> |
45 | 55 | <tal:featured repeat="featured_brain features_list"> |
46 | 56 | <div tal:define="featured_obj featured_brain/getObject;"> |
47 | | - <a tal:attributes="class python:featured_obj.review_state() == 'published' and 'btn btn-outline-success btn-sm bg-success-subtle' or 'btn btn-outline-danger btn-sm bg-danger-subtle'" |
48 | | - href="${featured_obj/absolute_url}">${featured_obj/Title}</a> |
| 57 | + <div class="btn-group"> |
| 58 | + <a tal:attributes="class python:featured_obj.review_state() == 'published' and |
| 59 | + 'position-relative btn btn-outline-success btn-sm bg-success-subtle dropdown-toggle' or |
| 60 | + 'position-relative btn btn-outline-danger btn-sm bg-danger-subtle dropdown-toggle'" |
| 61 | + type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" |
| 62 | + data-bs-display="static" aria-expanded="false"> |
| 63 | + ${featured_obj/Title} |
| 64 | + <span |
| 65 | + tal:attributes="class python:featured_obj.review_state() == 'published' and 'text-white position-absolute top-0 start-100 translate-middle p-1 bg-success border border-light rounded-circle' or 'text-white position-absolute top-0 start-100 translate-middle p-1 bg-danger border border-light rounded-circle'"> |
| 66 | + </span> |
| 67 | + </a> |
| 68 | + <ul class="dropdown-menu"> |
| 69 | + <li><a class="dropdown-item" href="${featured_obj/absolute_url}/edit">Edit</a> |
| 70 | + </li> |
| 71 | + <li> |
| 72 | + <h5 class="dropdown-header">State</h5> |
| 73 | + </li> |
| 74 | + <li><a class="dropdown-item" href="#">Published</a></li> |
| 75 | + <li><a class="dropdown-item" href="#">Draft</a></li> |
| 76 | + <li> |
| 77 | + <hr class="dropdown-divider"> |
| 78 | + </li> |
| 79 | + <li><a class="ms-3 btn btn-sm btn-danger align-self-start" href="#" data-bs-toggle="modal" |
| 80 | + data-bs-target="#deleteRowModal" data-rowid="${featured_obj/id}" |
| 81 | + data-rowurl="${featured_obj/absolute_url}">Delete</a></li> |
| 82 | + </ul> |
| 83 | + </div> |
49 | 84 | </div> |
50 | 85 | </tal:featured> |
51 | 86 | <tal:featured_add_button tal:condition="python:row.show_featured_add_button(request)"> |
|
76 | 111 | <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> |
77 | 112 | </div> |
78 | 113 | <div class="modal-body"> |
79 | | - <p i18n:translate="">Are you sure you want to delete this row? This action cannot be undone.</p> |
| 114 | + <p i18n:translate="">Are you sure you want to delete this item? This action cannot be undone.</p> |
80 | 115 | </div> |
81 | 116 | <div class="modal-footer"> |
82 | 117 | <button type="button" class="btn btn-secondary" data-bs-dismiss="modal" i18n:translate="">Cancel</button> |
|
0 commit comments