9b1fcc17c517874496921b247c37f9dfb1d399d7
[MosaicDocument.git] / default_blocks / block_utils.pt
1 <html>
2
3 <head>
4 <meta http-equiv="content-type" content="text/html;charset=UTF-8">
5 <title>block_utils</title>
6 <link href="../../CriSIT/default_skins/main_stylesheet.css.css" rel="stylesheet" media="screen">
7 </head>
8
9 <body bgcolor="#ffffff" i18n:domain="plinn">
10 <br/>
11 <pre>block_form</pre>
12 <br/>
13 <hr/>
14 <form metal:define-macro="block_form" class="block_form" action="."
15 method="post" enctype="multipart/form-data"
16 tal:attributes="action block/absolute_url;
17 class python:exists('block_form_class') and block_form_class or 'block_form' ">
18 <div metal:define-slot="html_block_content">Rendu HTML du block</div>
19 <input type="submit" value="Valider"
20 name="saveBlock:method"
21 tal:attributes="value python:exists('submit_action') and submit_action or 'Validate'"
22 i18n:attributes="value" />
23 <input type="hidden" name="noAjax" value="1" tal:condition="request/SESSION/editBoxes|nothing" />
24 </form>
25 <br/>
26 <pre>add_block_form</pre>
27 <br/>
28 <hr/>
29 <div metal:define-macro="add_block_form" tal:define="allowedBlocks baseBlock/getAllowedBlocks" tal:omit-tag="">
30 <form action="." method="get"
31 tal:attributes="action baseBlock/absolute_url">
32 <span metal:define-slot="additional_fields">
33 <input type="hidden" name="xpos:int" value="0" />
34 </span>
35 <span i18n:translate="">Insert new block:
36 </span>
37 <select name="blockType" class="mosaic_input">
38 <option tal:repeat="bt allowedBlocks" tal:attributes="value bt/id" tal:content="bt/title" i18n:translate="">BlokcType</option>
39 </select>
40 <input type="submit" name="addBlock:method" value="Add" i18n:attributes="value" />
41 <input type="hidden" name="noAjax" value="1" tal:condition="request/SESSION/editBoxes|nothing" />
42 </form>
43 </div>
44
45 <br/>
46 <pre>move_table</pre>
47 <br/>
48 <table cellspacing="2" cellpadding="0" metal:define-macro="move_table" class="move_table">
49 <tr>
50 <td tal:condition="blockInfo/moves/left"><a href="." tal:attributes="href string:${baseBlock/absolute_url}/moveLeft?blockId=${block/getId}" title="Move right" i18n:attributes="title"><img src="../skins/img_box_moveleft.png" alt="Move left" name="moveLeft:method" height="12" width="12" border="0" tal:attributes="src string:img_box_moveleft.png" i18n:attributes="alt"/></a></td>
51 <td tal:condition="blockInfo/moves/up"><a href="." tal:attributes="href string:${baseBlock/absolute_url}/moveUp?blockId=${block/getId}" title="Move up" i18n:attributes="title"><img src="../skins/img_box_moveup.png" alt="Move up" name="moveUp:method" height="12" width="12" border="0" tal:attributes="src string:img_box_moveup.png" i18n:attributes="alt"/></a></td>
52 <td tal:condition="blockInfo/moves/down"><a href="." tal:attributes="href string:${baseBlock/absolute_url}/moveDown?blockId=${block/getId}" title="Move down" i18n:attributes="title"><img src="../skins/img_box_movedown.png" alt="Move down" name="moveDown:method" height="12" width="12" border="0" tal:attributes="src string:img_box_movedown.png" i18n:attributes="alt"/></a></td>
53 <td tal:condition="blockInfo/moves/right"><a href="." tal:attributes="href string:${baseBlock/absolute_url}/moveRight?blockId=${block/getId}" title="Move right" i18n:attributes="title"><img src="../skins/img_box_moveright.png" alt="Move right" name="moveRight:method" height="12" width="12" border="0" tal:attributes="src string:img_box_moveright.png" i18n:attributes="alt"/></a></td>
54 <td width="20px"> </td>
55 <td><a href="." tal:attributes="href string:${baseBlock/absolute_url}/pushCp?blockId=${block/getId}" title="Copy" i18n:attributes="title"><img src="../skins/copy.png" alt="Copy" height="13" width="15" border="0" tal:attributes="src string:copy.png" i18n:attributes="alt"/></a></td>
56 <td tal:condition="python:here.cb_dataValid() and block.haveRules()"><a href="." tal:attributes="href string:${block/absolute_url}/pasteBlocks" title="Paste" i18n:attributes="title"><img src="../skins/paste.png" alt="Paste" height="14" width="16" border="0" tal:attributes="src string:paste.png" i18n:attributes="alt"/></a></td>
57 <td width="67" tal:condition="python:'d' in blockInfo['mode']"> </td>
58 <td tal:condition="python:'d' in blockInfo['mode']"><a href="." tal:attributes="href string:${baseBlock/absolute_url}/deleteBlock?blockId=${block/getId}" title="Delete" i18n:attributes="title"><img src="../skins/img_box_delete.png" alt="" height="12" width="12" border="0" tal:attributes="src string:img_box_delete.png"/></a></td>
59 </tr>
60 </table>
61 </body>
62
63 </html>