1 <%namespace name="lib" file="/lib.mako" />
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)}
11 <dd><button type="submit">Post!</button></dd>
14 % endif ## can create post
17 <%def name="write_post_form(thread)">
18 % if c.user.can('create_forum_post'):
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)}
24 <dd><button type="submit">Post!</button></dd>
27 % endif ## can create post