[873] | 1 | <tal:tabs i18n:domain="quintagroup.plonetabs" |
---|
| 2 | tal:define="test nocall:view/test; |
---|
[43] | 3 | dummy python:request.RESPONSE.setHeader('Expires', 'Mon, 26 Jul 1997 05:00:00 GMT'); |
---|
[55] | 4 | category python:options.get('category', None) or 'portal_tabs'; |
---|
[154] | 5 | errors options/errors|python:{}" |
---|
[48] | 6 | tal:repeat="tab options/tabs|python:view.getPortalActions(category)"> |
---|
[43] | 7 | <li tal:define="id tab/id; |
---|
[3077] | 8 | portal_state context/@@plone_portal_state; |
---|
| 9 | portal_url portal_state/portal_url; |
---|
[43] | 10 | visible tab/visible; |
---|
[48] | 11 | editing tab/editing|nothing; |
---|
| 12 | klass python:test(visible, [], ['invisible']); |
---|
| 13 | klass python:test(editing, klass + ['editing'], klass)" |
---|
[149] | 14 | tal:attributes="id string:${view/prefix}${id}; |
---|
[43] | 15 | title tab/description; |
---|
[48] | 16 | class python:' '.join(klass)"> |
---|
| 17 | |
---|
[873] | 18 | <a class="delete" href="#" i18n:translate="">Delete</a> |
---|
[502] | 19 | <div class="titleWrapper kssHidden"> |
---|
| 20 | <span class="tab-title" tal:content="tab/title">Tab Name</span> |
---|
| 21 | <span class="url-helper" tal:content="tab/url_expr">Tab Action</span> |
---|
| 22 | </div> |
---|
[43] | 23 | <form class="editform" |
---|
| 24 | method="post" |
---|
| 25 | action="@@plonetabs-controlpanel" |
---|
[48] | 26 | name="edit_form" |
---|
[43] | 27 | tal:attributes="action string:${context/portal_url}/${attrs/action}; |
---|
[48] | 28 | name string:${attrs/name}_${id}"> |
---|
| 29 | |
---|
[56] | 30 | <input type="hidden" name="orig_id" value="orig_id" tal:attributes="value id" /> |
---|
| 31 | <input type="hidden" name="category" value="current_category" tal:attributes="value category" /> |
---|
| 32 | <input type="hidden" name="form.submitted:boolean" value="True" /> |
---|
[53] | 33 | |
---|
[56] | 34 | <div class="bridge"> |
---|
[483] | 35 | <img class="drag-handle" src="++resource++drag.gif" alt="" height="11" width="11" /> |
---|
[56] | 36 | <input type="checkbox" class="visibility" value="1" name="visible" title="visibility" |
---|
| 37 | tal:define="name string:${attrs/name}_${id}; |
---|
[138] | 38 | submitted python:test(request.get('form.submitted','') and request.get('orig_id','')==id, True, False)" |
---|
| 39 | tal:attributes="name name; |
---|
[140] | 40 | checked python:test(submitted, test(request.form.get(name, False), 'checked', None), test(visible, 'checked', None))"/> |
---|
[56] | 41 | </div> |
---|
[55] | 42 | |
---|
[483] | 43 | <div class="edit-fields-wrapper"> |
---|
[56] | 44 | |
---|
[154] | 45 | <dl class="edit-field-name" |
---|
| 46 | tal:define="name string:title_${id}; |
---|
[55] | 47 | error python:errors.get(name, ''); |
---|
| 48 | tab_title tab/title" |
---|
[154] | 49 | tal:attributes="class python:test(error, '%s error' % attrs['class'], attrs['class'])"> |
---|
[873] | 50 | <dt><label tal:attributes="for name" |
---|
| 51 | i18n:translate="">Name</label></dt> |
---|
[55] | 52 | <dd> |
---|
[873] | 53 | <span class="error-container" tal:content="error" |
---|
| 54 | i18n:translate="">Validation error output</span> |
---|
[55] | 55 | <input type="text" value="" name="title" |
---|
| 56 | tal:attributes="value python:test(request.get(name, []) != [], request.get(name), tab_title); |
---|
[183] | 57 | name name; |
---|
| 58 | id name" /></dd> |
---|
[43] | 59 | </dl> |
---|
[48] | 60 | |
---|
| 61 | <dl class="collapseAdvanced collapsedBlock"> |
---|
[873] | 62 | <dt class="headerAdvanced" i18n:translate="">Advanced</dt> |
---|
[43] | 63 | <dd class="contentAdvanced"> |
---|
[154] | 64 | <dl class="edit-field-action" |
---|
| 65 | tal:define="name string:url_expr_${id}; |
---|
[55] | 66 | error python:errors.get(name, ''); |
---|
| 67 | tab_url tab/url_expr" |
---|
[154] | 68 | tal:attributes="class python:test(error, '%s error' % attrs['class'], attrs['class'])"> |
---|
[873] | 69 | <dt><label tal:attributes="for name" |
---|
| 70 | i18n:translate="">URL (Expression)</label></dt> |
---|
[55] | 71 | <dd> |
---|
[873] | 72 | <span class="error-container" tal:content="error" |
---|
| 73 | i18n:translate="">Validation error output</span> |
---|
[55] | 74 | <input type="text" value="" name="url_expr" size="30" |
---|
| 75 | tal:attributes="value python:test(request.get(name, []) != [], request.get(name), tab_url); |
---|
[183] | 76 | name name; |
---|
| 77 | id name" /></dd> |
---|
[43] | 78 | </dl> |
---|
[3682] | 79 | <dl class="edit-field-icon" |
---|
| 80 | tal:define="name string:icon_expr_${id}; |
---|
| 81 | error python:errors.get(name, ''); |
---|
| 82 | tab_icon tab/icon_expr" |
---|
| 83 | tal:attributes="class python:test(error, '%s error' % attrs['class'], attrs['class'])"> |
---|
| 84 | <dt><label tal:attributes="for name" |
---|
| 85 | i18n:translate="">Icon (Expression)</label></dt> |
---|
| 86 | <dd> |
---|
| 87 | <span class="error-container" tal:content="error" |
---|
| 88 | i18n:translate="">Validation error output</span> |
---|
| 89 | <input type="text" value="" name="icon_expr" size="30" |
---|
| 90 | tal:attributes="value python:test(request.get(name, []) != [], request.get(name), tab_icon); |
---|
| 91 | name name; |
---|
| 92 | id name" /></dd> |
---|
| 93 | </dl> |
---|
[154] | 94 | <dl class="edit-field-id" |
---|
| 95 | tal:define="name string:id_${id}; |
---|
[55] | 96 | error python:errors.get(name, ''); |
---|
| 97 | tab_id tab/id" |
---|
[154] | 98 | tal:attributes="class python:test(error, '%s error' % attrs['class'], attrs['class'])"> |
---|
[873] | 99 | <dt><label tal:attributes="for name" |
---|
| 100 | i18n:translate="">Id</label></dt> |
---|
[55] | 101 | <dd> |
---|
[873] | 102 | <span class="error-container" tal:content="error" |
---|
| 103 | i18n:translate="">Validation error output</span> |
---|
[55] | 104 | <input type="text" value="" name="id" |
---|
| 105 | tal:attributes="value python:test(request.get(name, []) != [], request.get(name), tab_id); |
---|
[183] | 106 | name name; |
---|
| 107 | id name" /></dd> |
---|
[43] | 108 | </dl> |
---|
[154] | 109 | <dl class="edit-field-condition" |
---|
| 110 | tal:define="name string:available_expr_${id}; |
---|
[55] | 111 | error python:errors.get(name, ''); |
---|
| 112 | tab_cond tab/available_expr" |
---|
[154] | 113 | tal:attributes="class python:test(error, '%s error' % attrs['class'], attrs['class'])"> |
---|
[873] | 114 | <dt><label tal:attributes="for name" |
---|
| 115 | i18n:translate="">Condition (Expression)</label></dt> |
---|
[55] | 116 | <dd> |
---|
[873] | 117 | <span class="error-container" tal:content="error" |
---|
| 118 | i18n:translate="">Validation error output</span> |
---|
[55] | 119 | <input type="text" value="" name="available_expr" size="30" |
---|
| 120 | tal:attributes="value python:test(request.get(name, []) != [], request.get(name), tab_cond); |
---|
[183] | 121 | name name; |
---|
| 122 | id name" /></dd> |
---|
[43] | 123 | </dl> |
---|
| 124 | <div class="visualClear"><!-- --></div> |
---|
| 125 | </dd> |
---|
| 126 | </dl> |
---|
[48] | 127 | |
---|
[154] | 128 | <div class="edit-controls"> |
---|
[502] | 129 | <input type="submit" class="editsave context" i18n:attributes="value" name="edit.save" value="Save" /> |
---|
| 130 | <input type="submit" class="editcancel standalone" i18n:attributes="value" name="edit.cancel" value="Cancel" /> |
---|
| 131 | <input type="reset" class="editreset kssHidden context" i18n:attributes="value" name="edit.reset" value="Reset" /> |
---|
| 132 | <input type="submit" class="editdelete kssHidden context" i18n:attributes="value" name="edit.delete" value="Delete" /> |
---|
| 133 | <input type="submit" class="editmoveup kssHidden context" i18n:attributes="value" name="edit.moveup" value="Move Up" |
---|
[135] | 134 | tal:condition="not:repeat/tab/start" /> |
---|
[502] | 135 | <input type="submit" class="editmovedown kssHidden context" i18n:attributes="value" name="edit.movedown" value="Move Down" |
---|
[135] | 136 | tal:condition="not:repeat/tab/end" /> |
---|
[43] | 137 | </div> |
---|
[48] | 138 | |
---|
[483] | 139 | </div> |
---|
[56] | 140 | |
---|
[43] | 141 | </form> |
---|
[48] | 142 | |
---|
[43] | 143 | </li> |
---|
| 144 | </tal:tabs> |
---|