diff zpt/project/edit_infoblocks.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 a6054bc6ad71
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/zpt/project/edit_infoblocks.zpt	Fri May 10 17:32:53 2013 +0200
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html metal:use-macro="here/edit_template/macros/page">
+<head>
+</head>
+<body>
+<tal:block metal:fill-slot="navsel" tal:define="global menusel string:infoblocks" />
+<tal:block metal:fill-slot="body">
+  <h2>Additional info blocks</h2>
+  <table>
+    <tal:block tal:repeat="block here/getInfoBlockList">
+      <tr tal:define="blockid block/getId">
+        <td>
+          <a tal:attributes="href string:$root/manageInfoBlocks?name=$blockid&op=up">up</a><br>
+          <a tal:attributes="href string:$root/manageInfoBlocks?name=$blockid&op=down">down</a>
+        </td>
+        <td tal:content="string:[${block/place}]"/>
+        <td>
+          <div><b tal:content="block/getTitle" /></div>
+          <div tal:repeat="item block/getItems">
+            <a tal:attributes="href item/link" tal:omit-tag="not:item/link"
+              tal:content="structure item/text"/>
+          </div> 
+        <td>
+          <a tal:attributes="href string:$root/$blockid/edit">Edit</a><br/> 
+          <a tal:attributes="href string:$root/deleteInfoBlock?id=$blockid">Delete</a>
+        </td>
+      </tr>
+    </tal:block>
+  </table>
+
+  <h3>Add an info block</h3>
+  <form tal:attributes="action string:$root/addInfoBlock" method="post">
+    <p><b>Info block title:</b><br/>
+      <input name="block_title" size="20"/>
+    </p>
+    <p><b>First item text:</b> <input name="item_text" size="60"/></p>
+    <p><b>First item link:</b> <input name="item_link" size="20"/> (optional)</p>
+    <p><input type="submit" value="submit"/></p>
+    <p>You can add more items to an info block after it's been created through the edit link above.</p>
+  </form>
+
+</tal:block>
+</body>
+</html>