comparison zpt/project/infoblock/edit_items.zpt @ 81:975a8d88e315

new editable info blocks for projects. removed RelatedDigitalSources. updateAllProjects converts to info block.
author casties
date Fri, 10 May 2013 17:32:53 +0200
parents
children
comparison
equal deleted inserted replaced
80:b1893c4c9d2c 81:975a8d88e315
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html metal:use-macro="here/edit_template/macros/page">
4 <head>
5 </head>
6 <body>
7 <tal:block metal:fill-slot="navsel" tal:define="global menusel string:infoblocks" />
8 <tal:block metal:fill-slot="body" tal:define="blockid here/getId; items here/getItems">
9 <h2>Edit info block</h2>
10 <form action="editItems" method="post">
11 <h3>
12 Title: <input size="20" name="block_title" tal:attributes="value here/getTitle" />
13 </h3>
14
15 <table>
16 <tal:block tal:repeat="idx python:range(len(items))">
17 <tr tal:define="item python:items[idx];">
18 <td><a tal:attributes="href string:$root/$blockid/moveItem?idx=$idx&op=up">up</a><br> <a
19 tal:attributes="href string:$root/$blockid/moveItem?idx=$idx&op=down">down</a></td>
20 <td tal:content="string:[${idx}]" />
21 <td>
22 <p>
23 <b>text:</b> <input tal:attributes="name string:text_$idx; value item/text" size="60" />
24 </p>
25 <p>
26 <b>link:</b> <input tal:attributes="name string:link_$idx; value item/link" size="20" /> (optional)
27 </p>
28 </td>
29 <td><a tal:attributes="href string:$root/$blockid/deleteItem?idx=$idx">Delete</a></td>
30 </tr>
31 </tal:block>
32 </table>
33 <p>
34 <input type="submit" value="Change" />
35 </p>
36 </form>
37
38 <h3>Add an item</h3>
39 <form tal:attributes="action string:$root/$blockid/addItem" method="post">
40 <p>
41 <b>text:</b> <input name="text" size="60" />
42 </p>
43 <p>
44 <b>link:</b> <input name="link" size="20" /> (optional)
45 </p>
46 <p>
47 <input type="submit" value="Add" />
48 </p>
49 </form>
50
51 <h3>
52 <a tal:attributes="href string:$root/manageInfoBlocks">Back to info block list</a>
53 </h3>
54 </tal:block>
55 </body>
56 </html>