e2aafde33c77d5cb96a8ed720b26a953eefdcbd1
[zzz-spline-forum.git] / splinext / forum / templates / forum / lib.mako
1 <%namespace name="lib" file="/lib.mako" />
2
3 <%def name="write_thread_form(forum)">
4 % if c.user.can('create_forum_thread'):
5 <h1>Create new thread</h1>
6 ${h.form(url(controller='forum', action='write_thread', forum_id=forum.id))}
7 <dl class="standard-form">
8     ${lib.field('subject', form=c.write_thread_form)}
9     ${lib.field('content', form=c.write_thread_form, rows=12, cols=80)}
10
11     <dd><button type="submit">Post!</button></dd>
12 </dl>
13 ${h.end_form()}
14 % endif  ## can create post
15 </%def>
16
17 <%def name="write_post_form(thread)">
18 % if c.user.can('create_forum_post'):
19 <h1>Reply</h1>
20 ${h.form(url(controller='forum', action='write', forum_id=thread.forum.id, thread_id=thread.id))}
21 <dl class="standard-form">
22     ${lib.field('content', form=c.write_post_form, rows=12, cols=80)}
23
24     <dd><button type="submit">Post!</button></dd>
25 </dl>
26 ${h.end_form()}
27 % endif  ## can create post
28 </%def>