{% load i18n %}
{% load wiki %}
{% load compress %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title>{{ site_name }} - {{ title }}</title>

    <link rel="icon" type="image/png" href="{% url twistranet_home %}static/images/favicon.png" />
    <meta name="generator" content="twistranet" />
    {% compress css %}
      <link rel="stylesheet" href="/static/css/reset.css" type="text/css" charset="utf-8" />
      <link rel="stylesheet" href="/static/css/typography.css" type="text/css" charset="utf-8" />
      <link rel="stylesheet" href="/static/css/template.css" type="text/css" charset="utf-8" />
      <link rel="stylesheet" href="/static/css/menu.css" type="text/css" charset="utf-8" />
      <link rel="stylesheet" href="/static/css/style.css" type="text/css" charset="utf-8" />
      <link rel="stylesheet" href="/static/css/login.css" type="text/css" charset="utf-8" />
      <link rel="stylesheet" href="/static/css/forms.css" type="text/css" charset="utf-8" />
      <link rel="stylesheet" href="/static/css/content.css" type="text/css" charset="utf-8" />
      <style type="text/css" media="screen"><!-- @import url(/static/css/jquery-ui-1.8.5.custom.css); --></style>
      <style type="text/css" media="screen"><!-- @import url(/static/css/jquery-dd.css); --></style>
      <style type="text/css" media="screen"><!-- @import url(/static/css/fileuploader.css); --></style>
    {% endcompress %}
    {% block local_css %}{% endblock %}
    <!--[if lte IE 7]><style type="text/css" media="all">@import url({% url twistranet_home %}static/css/ie7.css);</style><![endif]-->
    <!--[if lte IE 9]><style type="text/css" media="all">@import url({% url twistranet_home %}static/css/ie.css);</style><![endif]-->
    <script type="text/javascript" src="{% url twistranet_home %}static/js/jquery.js" charset="utf-8"></script>
    <script type="text/javascript" src="{% url twistranet_js_vars %}" charset="utf-8"></script>
    <script type="text/javascript" src="{% url twistranet_home %}static/js/jquery-ui-1.8.10.custom.min.js" charset="utf-8"></script>
    <script type="text/javascript" src="{% url twistranet_home %}static/js/jquery.dd.js" charset="utf-8"></script>
    {% compress js %}
      <script src="/static/js/includes/lib/include.js" type="text/javascript"></script>
      <script src="/static/js/includes/lib/scrollTo.js" type="text/javascript"></script>
      <script src="/static/js/includes/lib/browserdetect.js" type="text/javascript"></script>
      <script src="/static/js/includes/lib/hoverIntent.js" type="text/javascript"></script>
      <script src="/static/js/includes/lib/superfish.js" type="text/javascript"></script>
      <script src="/static/js/includes/mad.jquery.js" type="text/javascript"></script>
      <script src="/static/js/jquery.livesearch.js" type="text/javascript"></script>
      <script src="/static/js/fileuploader.js" type="text/javascript"></script>
      <script src="/static/js/tn_quickupload_helpers.js" type="text/javascript"></script>
      <script src="/static/js/comments.js" type="text/javascript"></script>
      <script src="/static/js/sharing.js" type="text/javascript"></script>
      <script src="/static/js/tn.js" type="text/javascript"></script>
    {% endcompress %}
    {% block local_js %}{% endblock %}
    {% if form %}{{ form.media }}{% endif %}
    {% block local_headers %}{% endblock %}
</head>
<body{% if body_class %} class="{{ body_class }}"{% endif %}>
    <div id="page">
        <div id="wrapper">
            <div id="header">
                <div id="head">
                    {% block topbar %}
                    <div id="usermenu">
                        <div class="caption">
                            <ul>
                                {% if user.is_authenticated %}
                                <li>
                                    <a href="{% url twistranet_home %}">{{ current_account.title }}</a>
                                </li>
                                {% endif %}
                                {% block useractions %}
                                {% endblock %}
                                {% if user.is_authenticated %}
                                <li class="last">
                                    <a href="{% url logout %}">{% blocktrans %}Log out{% endblocktrans %}</a>
                                </li>
                                {% else %}
                                <li class="last"><a href="/login">{% blocktrans %}Log in{% endblocktrans %}</a></li>
                                {% endif %}
                            </ul>
                        </div>
                    </div>
                    {% endblock %}
                    <a class="logotext"
                       href="{% url twistranet_home %}">
                        <div class="logo-title">{{ site_name|safe }}</div>
                        <div class="logo-slogan">{{ baseline|safe }}</div>
                    </a>
                    <div id="menubar">
                        <div id="mainmenu">
                            <ul class="sf-menu">
                                {% block menu_items %}
                                    {% include "navigation/menu_items.part.html" %}
                                {% endblock %}
                            </ul>
                        </div>
                    </div>
                </div>

                {% block searchform %}
                    <div id="searchform">
                        {% include "searchfield.part.html" %}
                    </div>
                {% endblock %}
                
                <div id="breadcrumb">
                    {% block breadcrumb %}
                        {% include "navigation/breadcrumb.part.html" %}
                    {% endblock %}
                </div>
            
            </div><!-- End header --> 

            <div id="wrap">
                {% block globalbar %}
                <div id="globalbar" class="sidebar">
                    <ul class="tn-box-container">
                        {% for box in global_boxes %}
                            {% include box %}
                        {% endfor %}
                    </ul>
                </div>
                {% endblock %}
                
                <div id="container">
                    {% block contextbar %}
                    <div id="contextbar" class="sidebar">
                      <ul class="tn-box-container">
                          {% for box in context_boxes %}
                              {% include box %}
                          {% endfor %}
                       </ul>
                    </div>
                    {% endblock %}
                    
                
                    <div id="content">

                        {% if messages %}
                        <div id="tn-message">
                          <ul class="messages">
                              {% for message in messages %}
                              <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message|wiki }}</li>
                              {% endfor %}
                          </ul>
                        </div>
                        {% endif %}
                        
                        <h1>
                            {% block title %}
                                {{ title|safe }}
                            {% endblock %}
                        </h1>
                        
                        {% include "actions/main.part.html" %}                        
                        {% block content %}
                        {% endblock %}
                    </div>
                    <div class="clearfix"><!-- --></div>                    
                </div><!-- end #container -->  
                <div class="clearfix"><!-- --></div>
            </div><!-- end #wrap -->

            <div id="bottom">
                <div id="footer">{% blocktrans %}Powered by <a href="http://www.twistranet.com">twistranet</a> from <a href="http://www.numericube.com">numeriCube</a>{% endblocktrans %}</div>
            </div>

        </div><!-- end #wrapper -->
    </div><!-- end #page -->
    <!-- translated things used by javascript -->
    <!-- Confirmation Box -->
    <div id="tn-dialog" title="{% trans 'Confirmation Required' %}">
      <p id="tn-dialog-blockmessage">
        <span class="ui-icon ui-icon-alert"></span>
        <span id="tn-dialog-message">{% blocktrans %}Are you sure about this?{% endblocktrans %}</span>
      </p>            
        <span id="tn-dialog-button-cancel">{% blocktrans %}Cancel{% endblocktrans %}</span>
        <span id="tn-dialog-button-ok">{% blocktrans %}OK{% endblocktrans %}</span>
    </div>
    <!-- form protect against unload message -->
    <div id="form-protect-unload-message">{% blocktrans %}Changes have been made on this form, do you really want to quit without saving ?{% endblocktrans %}</div>
    <!-- write a comment message -->
    <div id="commentmessage">{% blocktrans %}Write a comment...{% endblocktrans %}</div>
</body>
</html>
