source: products/quintagroup.referencedatagridfield/branches/plone4/quintagroup/referencedatagridfield/skins/referencedatagridfield/datagridwidget_manipulators.pt @ 2317

Last change on this file since 2317 was 2317, checked in by mylan, 14 years ago

Update datagridwidget_manipulators template for additional params pass to datagridref_popup view

  • Property svn:eol-style set to native
File size: 5.0 KB
Line 
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        tal:define="helper nocall:here/refbrowserhelper;
11                    overlay_id string:atrb_${fieldName}">
12   
13         <tal:manipulator-cells>
14               
15                <tal:comment replace="nothing">
16                     IE doesn't seem to respect em unit paddings here so we
17                     use absolute pixel paddings.
18                </tal:comment>
19
20                <tal:comment replace="nothing">
21                        <!-- Add reference -->
22                </tal:comment>
23
24                <td class="datagridwidget-manipulator"
25                    tal:define="multiValued python:0;">
26
27                  <div style="clear: both"
28                      tal:define="
29                          global at_url at_url|python:'/'.join(here.getPhysicalPath());
30                          startup_directory python:helper.getStartupDirectory(field);
31                          field_id string:uid_${fieldId};
32                          field_link_id string:link_${fieldId};
33                          field_title_id string:title_${fieldId};
34                          ">
35                    <input type="button" class="searchButton addreference" value="Add..."
36                           i18n:attributes="value label_add;"
37                           tal:define="popup_width widget/popup_width|string:500;
38                                       popup_height widget/popup_height|string:550;"
39                           tal:attributes="src string:${startup_directory}/refdatagridbrowser_popup?fieldName=${field_id}&fieldRealName=${field/getName}&at_url=${at_url}&fieldTitleName=${field_title_id}&fieldLinkName=${field_link_id};
40                                       rel string:#${overlay_id}" />
41                       </div><div id="atrb" tal:attributes="id overlay_id" class="overlay overlay-ajax">
42                       <div class="pb-ajax">
43                         <!-- <a href="" i18n:translate="referencebrowser_back" class="refbrowser_back">Back</a> -->
44                         <div class="overlaycontent" style="font-size: 125%"></div>
45                         <!-- <a href="" i18n:translate="referencebrowser_back" class="refbrowser_back">Back</a> -->
46                       </div>
47                       </div>
48
49                </td>
50
51                <tal:comment replace="nothing">
52                        <!-- Insert -->         
53                </tal:comment>
54
55                 <td class="datagridwidget-manipulator"
56                        tal:condition="python: widget.isInsertEnabled(context, field)">
57                     <img tal:attributes="
58                                src string:${portal_url}/add_row_icon.gif;
59                                "
60                          alt="Add row" 
61                          onclick="dataGridFieldFunctions.addRowAfter(this); return false"/>
62                 </td>                 
63
64                <tal:comment replace="nothing">
65                        <!-- Delete -->         
66                </tal:comment>   
67                 <td  class="datagridwidget-manipulator"
68                        tal:condition="python: widget.isDeleteEnabled(context, field)">
69                     <img tal:attributes="
70                                src string:${portal_url}/delete_row_icon.gif;
71                                "
72                          alt="Delete row" 
73                          onclick="dataGridFieldFunctions.removeFieldRow(this);return false"/>
74                 </td>
75                   
76                <tal:comment replace="nothing">
77                        <!-- Move up -->               
78                </tal:comment>             
79                    <td class="datagridwidget-manipulator">
80       
81                       <img tal:attributes="
82                                src string:${portal_url}/move_row_up_icon.gif;
83                                "
84                             alt="Move row up" 
85                             tal:condition="python: widget.isReorderEnabled(context, field)"
86                             onclick="dataGridFieldFunctions.moveRowUp(this);return false"/>
87                                                                   
88                    </td>
89                   
90                <tal:comment replace="nothing">
91                        <!-- Move down -->             
92                </tal:comment>                             
93                    <td class="datagridwidget-manipulator">
94                   
95                        <img tal:attributes="
96                                src string:${portal_url}/move_row_down_icon.gif;
97                                "
98                             alt="Move row down" 
99                             tal:condition="python: widget.isReorderEnabled(context, field)"
100                             onclick="dataGridFieldFunctions.moveRowDown(this);return false"/>
101                             
102                    </td>
103                   
104
105                <tal:comment replace="nothing">
106                        <!-- The index field of this row -->           
107                </tal:comment>                             
108                    <td class="datagridwidget-hidden-data">
109
110                           <tal:ordering-field tal:condition="newRow">
111                       <input type="hidden"
112                               value="template_row_marker"
113                               tal:attributes="name string:${fieldName}.orderindex_:records;
114                                               id string:orderindex__${fieldId};" />
115                                </tal:ordering-field>                       
116                               
117                           <tal:ordering-field tal:condition="not: newRow">
118                               <input type="hidden"
119                                       tal:attributes="name string:${fieldName}.orderindex_:records;
120                                                       id string:orderindex__${fieldId};
121                                                       value repeat/rows/number;" />   
122                           </tal:ordering-field>                                                                                           
123                    </td>
124                       
125                </tal:manipulator-cells>
126    </metal:define>
127</body>
128
129</html>   
Note: See TracBrowser for help on using the repository browser.