<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:py="http://genshi.edgewall.org/">
  <xi:include href="discussion-macros.html"/>
  <xi:include href="layout.html"/>
  <head>
    <title>Message List</title>
    <script type="text/javascript">
      $(document).ready(function() {
        $("#content").find("h1,h2,h3,h4,h5,h6").addAnchor("Link to this section");
      });
    </script>
  </head>

  <body>
    <xi:include href="discussion-header.html"/>

    <div id="content" class="discussion searchable">
      <div id="${discussion.mode}" class="${discussion.mode}">

        <h1>${discussion.forum.name} (#${discussion.forum.id}) - ${discussion.topic.subject} (#${discussion.topic.id}) - Message List</h1>

        ${display_discussion(discussion, href.discussion(discussion.forum.id, discussion.topic.id))}

        <div py:if="'DISCUSSION_MODERATE' in perm and discussion.is_moderator" class="buttons">
          <form method="post" action="${href.discussion(discussion.forum.id, discussion.topic.id)}">
            <div>
              <input type="submit" name="deletetopic" value="Delete Topic" onclick="return confirm('Do you realy want to delete this topic?')"/>
              <input type="hidden" name="discussion_action" value="delete"/>
            </div>
          </form>
          <form method="post" action="${href.discussion(discussion.forum.id, discussion.topic.id)}">
            <div >
              <input type="submit" name="movetopic" value="Move Topic"/>
              <input type="hidden" name="discussion_action" value="move"/>
            </div>
          </form>
        </div>

      </div>
    </div>

  </body>
</html>
