source: WAeUP_SRP/trunk/skins/waeup_academics/academics_contents.pt @ 616

Last change on this file since 616 was 502, checked in by joachim, 18 years ago

Scratchcard Pin Generation
basic login in apply_admission

  • Property svn:keywords set to Id
File size: 12.4 KB
Line 
1<metal:html tal:define="display_change request/change_display|nothing;
2                        params here/academicsDisplayParams;
3                        sort_by params/sort_by;
4                        direction params/direction;
5                        format string:detail_tab;
6                        displayed python:request.get('displayed', None);
7                        display_buttons context/academics_contents_display_buttons;
8                       ">
9
10<metal:body use-macro="here/content_lib_master/macros/master">
11
12<metal:header metal:fill-slot="header">
13
14  <a href="" tal:attributes="href string:${here/academicsParent}">
15      <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
16      Up one level
17  </a>
18
19  <h3 tal:content="here/LongTitle|here/Title|here/title_or_id">
20    Page Title
21  </h3>
22</metal:header>
23
24<metal:main fill-slot="javascript_head_slot">
25  <tal:block tal:replace="nothing">
26    XXX Deactivated for CPS 3.4.0, will be re-enabled for 3.4.1
27    <script type="text/javascript" src="prototype.js"
28      tal:attributes="src string:${base_url}prototype.js"></script>
29    <script type="text/javascript" src="effects.js"
30      tal:attributes="src string:${base_url}effects.js"></script>
31    <script type="text/javascript" src="dragdrop.js"
32      tal:attributes="src string:${base_url}dragdrop.js"></script>
33    <script type="text/javascript" src="cpsdefault.js"
34      tal:attributes="src string:${base_url}cpsdefault.js"></script>
35  </tal:block>
36</metal:main>
37
38<metal:main fill-slot="main"
39  tal:define="list_here python:checkPerm('List folder contents', here);">
40  <div tal:condition="not: list_here"
41    tal:define="response request/RESPONSE;url here_url;">
42    <span tal:define="redirect python: response.redirect(url)"></span>
43  </div>
44    <span tal:omit-tag="" tal:condition="python:display_buttons or context.display_content()"
45          tal:content="structure python: doc.render(proxy=here,layout_mode='view')" />
46
47  <form action="" method="post" class="group"
48        tal:attributes="action here_url"
49        tal:define="no_form python:not checkPerm('Modify portal content', here);
50
51                    nav_action string:folder_contents;
52                    items python:here.getFolderContents(displayed=displayed);">
53
54<!-- a content_lib macro -->
55<!-- $Id: academics_contents.pt 502 2006-09-11 10:39:59Z joachim $ -->
56
57<!-- List contents in 'items' in the specified number of columns
58  with the given format -->
59
60<tal:block
61  define="tmp_format format|nothing;
62          tmp_sort_by sort_by|nothing;
63          tmp_direction direction|nothing;
64          tmp_columns columns|nothing;
65          tmp_items_per_page items_per_page|nothing;
66          tmp_nav_action nav_action|nothing;
67          tmp_filter filter|nothing;
68          tmp_detail_tab_columns detail_tab_columns|nothing;
69          params python:here.getDisplayParams(format=tmp_format,
70                          sort_by=tmp_sort_by,
71                          direction=tmp_direction,
72                          columns=tmp_columns,
73                          items_per_page=tmp_items_per_page,
74                          nav_action=tmp_nav_action,
75                          nb_items=len(items),
76                          filter=tmp_filter,
77                          detail_tab_columns=tmp_detail_tab_columns);
78          format params/format;
79          sort_by params/sort_by;
80          direction params/direction;
81          columns params/columns;
82          items_per_page params/items_per_page;
83          nav_action params/nav_action;
84          filter params/filter;
85          detail_tab_columns params/detail_tab_columns;
86          mq nocall:modules/ZTUtils/make_query;
87          form request/form;
88          zoom zoom|python:0;
89          batches_all python:here.getBatchList(items, columns, items_per_page,
90                                               zoom);
91          batches python:batches_all[0];
92          batch_info python:batches_all[1];
93          zoomed python:batches_all[2];
94     ">
95     <span tal:condition="python:0">
96        <span tal:content="params" /><br />
97        <span tal:content="batches_all" /><br />
98      </span>       
99 <tal:block tal:condition="python: batch_info and batch_info['nb_pages'] > 1">
100    <div class="batchLayout">
101        <span i18n:translate="">
102          Objects:
103          <strong>
104            <tal:block replace="batch_info/start"
105            i18n:name="batch_start" /> - <tal:block replace="batch_info/limit"
106            i18n:name="batch_limit" />
107          </strong>
108          of <tal:block replace="batch_info/length"
109            i18n:name="batch_length" />
110         </span>
111    </div>
112  <br />
113 </tal:block>
114  <table width="100%" cellspacing="0" cellpadding="0"
115    summary="zoomed layout"
116    tal:condition="zoomed">
117    <tr tal:repeat="item zoomed">
118      <td align="left" valign="top">
119       <tal:block define="no_form not:nothing;
120         info python:here.getContentInfo(item, level=1, cpsmcat=cpsmcat);">
121         <metal:block use-macro="here/content_lib_info_summary/macros/info_summary" />
122         <br /><br />
123       </tal:block>
124      </td>
125    </tr>
126  </table>
127  <table width="100%" cellspacing="0" cellpadding="0"
128    summary="content layout column"
129    tal:condition="batches">
130    <tr>
131      <td align="left" valign="top"
132          tal:repeat="batch_items batches">
133        <tal:block condition="batch_items">
134<!-- a content_lib macro -->
135<!-- $Id: academics_contents.pt 502 2006-09-11 10:39:59Z joachim $ -->
136
137<!-- Final display of items in a column using the given format -->
138  <tal:block define="no_form no_form|nothing;
139                     site_wide site_wide|nothing;
140                     format python:format or 'detail';
141                     choosen_ids python:request.SESSION.get('choosen_ids', []);
142                     dummy python:request.SESSION.update({'choosen_ids': []});
143                     no_table python:format == 'detail_tab';
144                     use_radio use_radio|nothing;
145                     input_type python: test(use_radio, 'radio', 'checkbox');
146                     input_name python: test(use_radio, 'ids', 'ids:list');
147                     member here/portal_membership/getAuthenticatedMember;
148                     member_id member/id;
149                     is_local_manager python:member.has_role(
150                                     ('Manager', 'WorkspaceManager'), here);
151">
152  <div id="ajax_psm" style="display:none" tal:condition="python:not no_form">
153      ajax feedback
154  </div>
155  <tal:block condition="no_table">
156    <tal:block repeat="item batch_items">
157    <tal:block define="info python:here.getContentInfo(item, level=1, cpsmcat=cpsmcat);
158                        review_state python:info['review_state'];
159                        start repeat/item/start|nothing;
160                        end repeat/item/end|nothing">
161      <tal:block tal:condition="python:review_state!='draft' or (review_state=='draft' and proxy_creator == member_id) or is_local_manager">
162      <metal:block use-macro="here/academics_content_lib_info_detail_tab/macros/info_detail_tab" />
163      </tal:block>
164    </tal:block>
165    </tal:block>
166  <br />
167  </tal:block>
168  </tal:block>
169  <tal:block tal:replace="nothing">
170  XXX Deactivated for CPS 3.4.0, will be re-enabled for 3.4.1
171
172  <tal:block tal:condition="python:not no_form and sort_by is None"
173               tal:define="ajax_working_msg python:cpsmcat('ajax_working');
174                           ajax_working_msg python:ajax_working_msg.replace('\'', '\\\'');
175                           ajax_failing_msg python:cpsmcat('ajax_failing');
176                           ajax_failing_msg python:ajax_failing_msg.replace('\'', '\\\'')">
177
178        <script type="text/javascript" tal:content="structure string:
179                var editor = new CPSContainerEditor('draggable', 'droppable',
180                                                    'droppable-in', '${format}',
181                                                    '${ajax_working_msg}',
182                                                    'folder_content', 'ajax_psm',
183                                                    '${ajax_failing_msg}');
184               // hooking observers
185               if (treeview_editor) {
186                 loadScript('portletrefresher', '++resource++portletrefresher.js');
187
188                 function refresh(event_id, trigger_id) {
189
190                   portlet_refresher.refreshPortlet(trigger_id);
191                   editor.reload();
192                 }
193
194                if ($$('portlet_navigation_sections'))
195                    container_events.observeEvent('element_dropped', 'portlet_navigation_sections',
196                                                refresh);
197
198                if ($$('portlet_navigation_workspaces'))
199                    container_events.observeEvent('element_dropped', 'portlet_navigation_workspaces',
200                                                refresh);
201
202               }
203
204               ">
205        </script>
206
207  </tal:block>
208  </tal:block>
209  </tal:block>
210     
211    </td>
212    </tr>
213  </table>
214  <tal:block condition="python:batch_info and batch_info['nb_pages'] > 1">
215      <div class="pageNavigationLayout">
216          <a tal:define="previous batch_info/previous"
217             tal:condition="python:previous is not None"
218             tal:attributes="href python:'%s?%s'%(request['URL'],
219                                            mq(request.form, b_start=0))">
220              (&lt;&lt;)</a>
221          <a tal:define="previous batch_info/previous"
222             tal:condition="python:previous is not None"
223             tal:attributes="href python:'%s?%s'%(request['URL'],
224                                            mq(request.form, b_start=previous))"
225             i18n:translate="batch_previous">Previous</a>
226          <tal:block repeat="page batch_info/pages">
227            <tal:block condition="python:page != batch_info['start'] - 1">
228              <a tal:attributes="href python:'%s?%s'%(request['URL'],
229                mq(request.form, b_start=page))"
230                tal:content="repeat/page/number">1</a>&nbsp;
231            </tal:block>
232            <tal:block condition="python:page == batch_info['start'] - 1">
233              <span tal:content="string:${repeat/page/number}" />&nbsp;
234            </tal:block>
235          </tal:block>
236          <a tal:define="next batch_info/next"
237             tal:condition="python:next is not None"
238             tal:attributes="href python:'%s?%s'%(request['URL'],
239                                                mq(request.form, b_start=next))"
240             i18n:translate="batch_next">Next</a>
241          <a tal:define="next batch_info/next;
242             last_page python:batch_info['pages'][-1]"
243             tal:condition="python:next is not None"
244             tal:attributes="href python:'%s?%s'%(request['URL'],
245                                            mq(request.form, b_start=last_page))">
246              (&gt;&gt;)</a>
247      </div>
248  </tal:block>
249</tal:block>
250
251    <table width="100%" cellspacing="0" cellpadding="2"
252      summary="contents of the folder"
253      class="folderButtons"
254      tal:define="can_add python:checkPerm('Add portal content', here);
255                  can_del python:checkPerm('Delete objects', here);
256                  ">
257      <tr>
258        <td align="left" valign="top" rowspan="3"></td>
259        <td align="left" valign="top">
260          <span tal:condition="display_buttons">
261          <span tal:condition="can_del">
262            <input type="button" value="button_select_all" class="context"
263                   onclick="someJavaScriptFunctionThatWillBeReplaced"
264                   i18n:attributes="value"
265                   tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
266                                   % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))" />
267            <span tal:omit-tag="" tal:condition="python: context.portal_type != 'Certificate'">
268              <input type="submit" name="approve_checked:method"
269              class="context" value="Approve" />
270            <input type="submit" name="retract_checked:method"
271              class="context" value="Retract" />
272            </span>
273              <input type="submit" name="folder_delete:method" value="button_delete"
274              class="destructive" i18n:attributes="value"
275              tal:attributes="onclick python:'return window.confirm(\'%s\')' %
276              (cpsmcat('description_confirm_delete'), )" />
277            <input tal:condition="python: context.portal_type not in ('Semester','Certificate')"
278                   type="submit" name="id_rename_form:method"
279              class="context" value="Change Object ID" i18n:attributes="value" />
280          </span>
281          </span>
282        </td>
283      </tr>
284    </table>
285  </form>
286</metal:main>
287
288<metal:sub fill-slot="sub"/>
289
290</metal:body>
291</metal:html>
Note: See TracBrowser for help on using the repository browser.