source: WAeUP_SRP/trunk/skins/waeup_pins/pins_view.pt @ 15505

Last change on this file since 15505 was 5199, checked in by Henrik Bettermann, 15 years ago

show creation date of pin batches

  • Property svn:keywords set to Id
File size: 5.1 KB
Line 
1<metal:html tal:define="info options/info;
2                        rendered options/rendered;
3                        mtool here/portal_membership;
4                        member mtool/getAuthenticatedMember;
5                        archive_allowed python: str(member) in ('admin','joachim',);
6                        ">
7  <metal:body use-macro="here/main_template/macros/master">
8    <metal:main fill-slot="main">
9      <span tal:condition="isAnon">
10      </span> 
11      <h3>Search PIN Section</h3>
12      <br />     
13      <span tal:condition="not:isAnon">
14        <span tal:replace="structure rendered" />
15      <form action="." method="post">
16        <table>
17          <tr tal:repeat="pin info/used">
18            <td>
19              <input type="checkbox" name="ids:list" value="" id="" class="noborder"
20                     tal:define="id string:${pin/serial}_${pin/prefix}"
21                     tal:attributes="value id;
22                     id python:'cb_' + id;"
23                     />
24            </td>
25            <td width="50px"> <span tal:content="pin/serial" />: </td>
26            <td tal:content="pin/pin" />
27            <td tal:content="pin/student_id" />
28            <td>
29              <a tal:condition="pin/student_url" href="" tal:content="pin/student"
30                 tal:attributes="href pin/student_url"></a>
31              <span tal:condition="python: not pin['student_url'] and not pin['student'].startswith('disabled')" tal:content="pin/student" />
32            </td>
33          </tr>
34        </table>
35
36        <span tal:condition="info/used">
37        <br />
38        <input type="submit" name="disable_pins:method"
39               value="disable pins"
40               class="destructive"
41               tal:attributes="onclick python:'return window.confirm(\'%s\')' %
42               (cpsmcat('really disable ?'), )"
43               />
44 
45        &nbsp;
46       
47        <input type="submit" name="enable_pins:method"
48               value="enable pins"
49               class="destructive"
50               tal:attributes="onclick python:'return window.confirm(\'%s\')' %
51               (cpsmcat('really enable ?'), )"
52               />
53         <br />     
54         </span>
55
56      </form>
57      <br />
58      <h3>PIN Batches</h3>
59      <form action="." method="post" class="group"
60            tal:define="rows info/batches;
61            choosen_ids info/choosen_ids|python:[]"
62            >
63        <table class="contentListing" width="100%">     
64          <tr tal:repeat="line rows"
65            tal:attributes="class python:test(repeat['line'].even(), 'even ajaxtd', 'odd ajaxtd')">
66            <span tal:repeat="row line">
67              <td align="left" valign="middle" style="width: 5px;" tal:define="id python:row['id']">
68                <input type="checkbox" name="ids:list" value="" id="" class="noborder"
69                       
70                       tal:condition="archive_allowed"                       
71                       tal:attributes="value id;
72                       id python:'cb_' + id;
73                       checked python:id in choosen_ids;"
74                       />
75              </td>
76              <td width="8pt"><span tal:content="python:row['date_str']" /></td> 
77              <td><a href="view" tal:attributes="href python:row['url']">
78                  <strong tal:content="python:row['id']" /></a>
79              </td>
80            </span>
81          </tr>
82        </table>
83        <table width="100%" cellspacing="0" cellpadding="2"
84               class="folderButtons"
85               tal:condition="archive_allowed">
86          <tr>
87            <td align="left" valign="top" rowspan="3"></td>
88            <td align="left" valign="top">
89                <input tal:condition="nothing" type="button" value="button_select_all" class="context"
90                       onclick="someJavaScriptFunctionThatWillBeReplaced"
91                       i18n:attributes="value"
92                       tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
93                       % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
94                       />
95                <input type="submit" name="archive:method" value="Archive"
96                       class="destructive" i18n:attributes="value"
97                       />
98                <input type="submit" name="archive_delete:method" value="Archive & Delete"
99                       class="destructive" i18n:attributes="value"
100                       tal:attributes="onclick python:'return window.confirm(\'%s\')' %
101                       ('Do you really want to delete the pin batch?', )"
102                       />
103            </td>
104          </tr>
105        </table>
106      </form>
107      <form action="." method="get" tal:condition="nothing">
108        <select class="form-element" name=":action"
109                tal:attributes="onChange string:location.href='${context/absolute_url}/'+this.options[this.selectedIndex].value"
110                >
111          <option value="--">Goto Batch ...</option>
112          <option tal:repeat="batch info/batches"
113                  tal:attributes="value batch"
114                  tal:content="batch">
115          </option>
116        </select>
117      </form>
118      </span>
119    </metal:main>
120  </metal:body>
121</metal:html>
Note: See TracBrowser for help on using the repository browser.