1 | <html xmlns="http://www.w3.org/1999/xhtml" |
---|
2 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
---|
3 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
---|
4 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
---|
5 | i18n:domain="plone"> |
---|
6 | |
---|
7 | <body> |
---|
8 | |
---|
9 | <metal:define define-macro="edit_manipulators"> |
---|
10 | |
---|
11 | <tal:manipulator-cells> |
---|
12 | |
---|
13 | <tal:comment replace="nothing"> |
---|
14 | IE doesn't seem to respect em unit paddings here so we |
---|
15 | use absolute pixel paddings. |
---|
16 | </tal:comment> |
---|
17 | |
---|
18 | <tal:comment replace="nothing"> |
---|
19 | <!-- Add reference --> |
---|
20 | </tal:comment> |
---|
21 | |
---|
22 | <td class="datagridwidget-manipulator" |
---|
23 | tal:define="multiVal python:0; |
---|
24 | fieldRealName field/getName; |
---|
25 | "> |
---|
26 | <div style="clear: both" |
---|
27 | tal:define="startup_directory python:here.referencebrowser_startupDirectory(widget.getStartupDirectory(here)); |
---|
28 | global at_url at_url|python:'/'.join(here.getPhysicalPath()); |
---|
29 | field_id string:uid_${fieldId}; |
---|
30 | field_link_id string:link_${fieldId}; |
---|
31 | field_title_id string:title_${fieldId}; |
---|
32 | "> |
---|
33 | <input type="button" |
---|
34 | class="searchButton" |
---|
35 | value="Select" |
---|
36 | onClick="" |
---|
37 | i18n:attributes="value label_select;" |
---|
38 | tal:attributes="onClick string:javascript:referencebrowser_openBrowser('${startup_directory}','${field_id}', '${at_url}', '${fieldRealName}', '${field_title_id}', '${field_link_id}', this)" /> |
---|
39 | </div> |
---|
40 | </td> |
---|
41 | |
---|
42 | <tal:comment replace="nothing"> |
---|
43 | <!-- Insert --> |
---|
44 | </tal:comment> |
---|
45 | |
---|
46 | <td class="datagridwidget-manipulator" |
---|
47 | tal:condition="python: widget.isInsertEnabled(context, field)"> |
---|
48 | <img tal:attributes=" |
---|
49 | src string:${portal_url}/add_row_icon.gif; |
---|
50 | " |
---|
51 | alt="Add row" |
---|
52 | onclick="dataGridFieldFunctions.addRowAfter(this); return false"/> |
---|
53 | </td> |
---|
54 | |
---|
55 | <tal:comment replace="nothing"> |
---|
56 | <!-- Delete --> |
---|
57 | </tal:comment> |
---|
58 | <td class="datagridwidget-manipulator" |
---|
59 | tal:condition="python: widget.isDeleteEnabled(context, field)"> |
---|
60 | <img tal:attributes=" |
---|
61 | src string:${portal_url}/delete_row_icon.gif; |
---|
62 | " |
---|
63 | alt="Delete row" |
---|
64 | onclick="dataGridFieldFunctions.removeFieldRow(this);return false"/> |
---|
65 | </td> |
---|
66 | |
---|
67 | <tal:comment replace="nothing"> |
---|
68 | <!-- Move up --> |
---|
69 | </tal:comment> |
---|
70 | <td class="datagridwidget-manipulator"> |
---|
71 | |
---|
72 | <img tal:attributes=" |
---|
73 | src string:${portal_url}/move_row_up_icon.gif; |
---|
74 | " |
---|
75 | alt="Move row up" |
---|
76 | tal:condition="python: widget.isReorderEnabled(context, field)" |
---|
77 | onclick="dataGridFieldFunctions.moveRowUp(this);return false"/> |
---|
78 | |
---|
79 | </td> |
---|
80 | |
---|
81 | <tal:comment replace="nothing"> |
---|
82 | <!-- Move down --> |
---|
83 | </tal:comment> |
---|
84 | <td class="datagridwidget-manipulator"> |
---|
85 | |
---|
86 | <img tal:attributes=" |
---|
87 | src string:${portal_url}/move_row_down_icon.gif; |
---|
88 | " |
---|
89 | alt="Move row down" |
---|
90 | tal:condition="python: widget.isReorderEnabled(context, field)" |
---|
91 | onclick="dataGridFieldFunctions.moveRowDown(this);return false"/> |
---|
92 | |
---|
93 | </td> |
---|
94 | |
---|
95 | |
---|
96 | <tal:comment replace="nothing"> |
---|
97 | <!-- The index field of this row --> |
---|
98 | </tal:comment> |
---|
99 | <td class="datagridwidget-hidden-data"> |
---|
100 | |
---|
101 | <tal:ordering-field tal:condition="newRow"> |
---|
102 | <input type="hidden" |
---|
103 | value="template_row_marker" |
---|
104 | tal:attributes="name string:${fieldName}.orderindex_:records; |
---|
105 | id string:orderindex__${fieldId};" /> |
---|
106 | </tal:ordering-field> |
---|
107 | |
---|
108 | <tal:ordering-field tal:condition="not: newRow"> |
---|
109 | <input type="hidden" |
---|
110 | tal:attributes="name string:${fieldName}.orderindex_:records; |
---|
111 | id string:orderindex__${fieldId}; |
---|
112 | value repeat/rows/number;" /> |
---|
113 | </tal:ordering-field> |
---|
114 | </td> |
---|
115 | |
---|
116 | </tal:manipulator-cells> |
---|
117 | </metal:define> |
---|
118 | </body> |
---|
119 | |
---|
120 | </html> |
---|