Preview dans ckeditor : y'a une couille avec la locasization. On met ça en stand-by…
[Plinn.git] / skins / custom_generic / talkback_tree.pt
1 <html>
2 <head>
3 <meta http-equiv="content-type" content="text/html;charset=UTF-8"/>
4 </head>
5 <body>
6 <div metal:define-macro="tree" tal:omit-tag="">
7 <table cellspacing="0"
8 tal:define="expand python:rfo_depth and (rfo.talkback.hasReplies(rfo) and rfo.talkback.getReplies()[-1].id or rfo.id) or nothing;
9 t python:here.setup_talkback_tree(here, force_expand=expand);
10 rows t/rows;
11 insert_form_position python:here.getReplyFormPosition(rows, expand);
12 height t/root/height;">
13 <tbody tal:repeat="row rows" tal:omit-tag="">
14 <tal:define tal:define="obj nocall:row/object">
15 <tr i18n:domain="plinn">
16 <td tal:define="indent python: row.depth - 1" tal:condition="indent" tal:attributes="colspan indent" ></td>
17 <td tal:define="state row/state ; rlink row/branch ; msg python:state > 0 and 'collapse' or 'expand'" width="16">
18 <a href="#" tal:condition="state" tal:omit-tag="python:abs(state) == 2" tal:attributes="name row/id ; href python:request['URL0']+rlink['link'] ; title msg" i18n:attributes="title">
19 <img src="/p_/pl" alt="" tal:attributes="src python:state > 0 and (abs(state)==1 and '/p_/mi' or 'mi_dis.gif') or (abs(state)==1 and '/p_/pl' or 'pl_dis.gif') ; alt msg" i18n:attributes="alt" border="0" />
20 </a><br/>
21 </td>
22 <td colspan="1" tal:attributes="colspan python: height - row.depth" tal:define="url obj/absolute_url">
23 <span tal:attributes="class python:obj.id == rfo_id and 'outline_in_reply_to' or nothing">
24 <a tal:attributes="name obj/id"></a>
25 <img border="0" src="." tal:attributes="src string:${obj/portal_url}/${obj/getIcon}" />
26 <span tal:content="obj/Title" class="reply_title">Title</span>,
27 <span i18n:translate="" tal:omit-tag="">by</span> <tal:case tal:condition="obj/listCreators"
28 ><tal:loop tal:repeat="creator obj/listCreators"
29 ><tal:case tal:condition="not: repeat/creator/start"
30 ><tal:case tal:condition="not: repeat/creator/end">, </tal:case
31 ><tal:case tal:condition="repeat/creator/end"
32 > <span tal:omit-tag="" i18n:translate="">and</span> </tal:case
33 ></tal:case
34 ><tal:span tal:content="python:mtool.getMemberFullNameById(creator, nameBefore=False)">creator</tal:span></tal:loop></tal:case
35 ><tal:case tal:condition="not: obj/listCreators"
36 ><span tal:omit-tag="" i18n:translate="">unknown</span></tal:case>
37 <span i18n:translate="at_(date)" tal:omit-tag="">at</span> <span tal:replace="python: obj.created().strftime(locale_date_fmt)">Today</span>
38 <span tal:define="discussionActions python:atool.listFilteredActionsFor( obj ).get('discussion', [])" tal:omit-tag="" tal:condition="discussionActions">
39 [ <tal:loop tal:repeat="a discussionActions"><a tal:attributes="href a/url" tal:content="a/title" i18n:translate="">action</a><tal:case tal:condition="not:repeat/a/end"> | </tal:case></tal:loop> ]
40 </span></span>
41 <div tal:content="structure obj/CookedBody" class="reply_body">Body</div>
42 </td>
43 </tr>
44 <tr tal:condition="python:insert_form_position == obj.id">
45 <td tal:attributes="colspan rfo_depth" colspan="2"></td>
46 <td tal:attributes="colspan python: height - rfo_depth">
47 <div metal:use-macro="here/talkback_tree/macros/add_reply_form">add reply form</div>
48 </td>
49 </tr>
50 </tal:define>
51 </tbody>
52 </table>
53 <tal:include tal:define="new_reply_id request/new_reply_id|nothing"
54 tal:condition="new_reply_id"
55 tal:replace="structure python:here.jumpToReply(reply_id=new_reply_id)" />
56 </div>
57
58 <form method="post" action="."
59 tal:attributes="action string:${rfo/absolute_url}/discussion_reply_form"
60 metal:define-macro="add_reply_form">
61 <a name="add_reply_form"></a>
62 <div class="DesktopStatusBar" tal:condition="request/portal_status_message|nothing">
63 <img src="info.gif" alt="Information" tal:attributes="src here/info.gif/absolute_url" i18n:attributes="alt" />
64 <span tal:content="request/portal_status_message" i18n:translate="">Status message.</span>
65 </div>
66 <table class="FormLayout" i18n:domain="plinn" cellspacing="0">
67 <tr>
68 <th i18n:translate="" class="outline_new_reply">Title</th>
69 <td colspan="2">
70 <input name="title" tal:attributes="value python:request.form.get('title', 'Re: %s' % options['inReplyTo'].Title())"/>
71 </td>
72 </tr>
73 <tr>
74 <th i18n:translate="" class="outline_new_reply">Body</th>
75 <td colspan="2">
76 <textarea name="text" cols="70" rows="10" style="width: 100%" tal:content="request/form/text|nothing"></textarea>
77 </td>
78 </tr>
79 <tr>
80 <td><br /></td>
81 <td>
82 <input type="submit" name="add_reply" value="Validate" i18n:attributes="value" />
83 </td>
84 <th>
85 <input type="submit" value="Cancel" name="cancel_reply" i18n:attributes="value" />
86 </th>
87 </tr>
88 </table>
89 <tal:include tal:replace="structure python:here.jumpToReply(reply_id=rfo_id)" />
90 </form>
91 </body>
92 </html>