<div xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude"
      py:attrs="attrs" class="discussion_subscription_form">
  <?python from allura.lib.security import has_artifact_access?>
  <a href="" style="float: right" class="btn ico-l new_topic"><b class="ui-icon ui-icon-plus"></b> <span>New Topic</span></a>
  ${Markup(g.markdown.convert(value.description))}
  <div py:if="show_actions" class="actions">
    <a href="${value.url()}moderate/" class="btn ico-l"
       py:if="has_artifact_access('moderate', value)()"><b class="ui-icon ui-icon-pencil"></b> <span>Edit</span></a>
    <a href="${value.email_link(subject=None)}" class="btn ico"
       py:if="show_discussion_email"><b class="ui-icon ui-icon-mail-closed"></b> <span>Email</span></a>
    <a href="" class="btn ico follow"><b class="ui-icon ui-icon-signal-diag"></b> <span>Follow</span></a>
  </div>
  <div class="clear new_topic_form" style="display: none" py:if="allow_create_thread and has_artifact_access('post', value)()">
    <!-- <py:with var="context=c.widget.context_for('new_topic')">
      <py:with var="context['action']=value.url() + 'post'"> -->
        ${fields['new_topic'].display(action=value.url() + 'post',show_subject=show_subject)}
      <!-- </py:with>  
    </py:with> -->
  </div>
  <div class="clear"/>
  ${fields['page_list'].display(limit=limit, page=page, count=count)}
  <form method="$method" action="$action" enctype="$enctype" class="follow_form">
    ${fields['threads'].display(value=threads)}
  </form>
  ${fields['page_list'].display(limit=limit, page=page, count=count)}
  ${fields['page_size'].display(limit=limit)}
</div>
