{% extends g.theme.master %}
{% do g.register_app_css('css/wiki.css', compress=False) %}

{% block edit_box %}
  {% if show_meta %}{% block wiki_meta %}{% endblock %}{% endif %}
{% endblock %}

{% block content %}
  {% block wiki_content %}content here{% endblock %}
  <div id="create_wiki_page_holder" title="Create New Page" style="display:none">
    <form>
        <label class="grid-2">Name</label>
        <div class="grid-7"><input type="text" name="name"/></div>
    </form>
  </div>
{% endblock %}

{% block extra_js %}
  {{c.create_page_lightbox.display(content='''
    <h1>Add a Wiki Page</h1>
    <form class="grid-10">
        <label class="grid-2">Name</label>
        <div class="grid-7"><input type="text" name="name"></div>
        <label class="grid-2">&nbsp;</label>
        <div class="grid-7"><input type="submit" value="Create page"></div>
    </form>
  ''')}}
<script type="text/javascript">
  /*<![CDATA[*/
  $('.post-link')
    .click(function(evt) {
        var cval = $.cookie('_session_id');
        evt.preventDefault();
        $.post(this.href, {_session_id:cval}, function(val)
            { window.location = val.location; },
            'json');
      });
  /*]]>*/
</script>
  {% block wiki_extra_js %}{% endblock %}
{% endblock %}
