<!DOCTYPE html>
{% load i18n %}
{% load browserid %}
{% load url from future %}
{% load staticfiles %}
<html lang="{{language.short_name}}">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta charset="utf-8">
    <meta name="author" content="Roland Geider">

    <!--
    This file is part of Workout Manager

    Workout Manager is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Workout Manager is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with Workout Manager. If not, see <http://www.gnu.org/licenses/>.
    -->

    <link rel="stylesheet" type="text/css" href="{% static 'css/yaml401/demos/css/flexible-grids.css' %} "> <!-- CSS framework for the layout -->
    <link rel="stylesheet" type="text/css" href="{% static 'css/yaml401/custom-yaml.css' %}">               <!-- Customisations for yaml      -->
    <link rel="stylesheet" type="text/css" href="{% static 'css/workout-manager.css' %}">                <!-- Own CSS classes and styles   -->
    <link rel="stylesheet" type="text/css" href="{% static 'css/jquery-ui.css' %}">                      <!-- CSS for JQuery UI elements   -->
    <link rel="stylesheet" type="text/css" href="{% static 'css/jquery-ui-custom.css' %}">               <!-- Customization for JQuery CSS -->
    <link rel="stylesheet" type="text/css" href="{% static 'css/bootstrap.min.css' %}">                  <!-- Twitter Bootstrap menu       -->
    <link rel="stylesheet" type="text/css" href="{% static 'css/bootstrap-custom.css' %}">               <!-- Customization for Twitter Bootstrap  -->

    <link rel="icon" href="{% static 'images/favicon.png' %}" type="image/png">

    <script src="{% static 'js/jquery.js' %}"          type="text/javascript"></script>
    <script src="{% static 'js/jquery-ui.js' %}"       type="text/javascript"></script>
    <script src="{% static 'js/workout-manager.js' %}" type="text/javascript"></script>
    {% if language.short_name == 'de' %}
    <script src="{% static 'js/jquery.ui.datepicker-de.js' %}"></script>
    {% endif %}
    {% block header %}{% endblock %}

    <script>
    $(document).ready(function() {

        if (typeof custom_page_init != "undefined")
        {
            custom_page_init();
        }


        // Init the modal dialog for editing forms
        form_modal_dialog();

        // Initialise the hook to reload the main-content
        load_maincontent();

        // Toggle weight chart tables
        toggle_weight_log_table();
     });
    </script>


    <title>{% block title %}{% endblock %}</title>
</head>
<body>
{% browserid_info %}
<header>
    <div class="float-right" style="margin-right:1em;margin-top:0em;">

        {% if user.is_authenticated and not user.get_profile.is_temporary %}
            <a href="{% url 'wger.manager.views.user.preferences' %}">
            {% if user.email %}
                {{user.email}}
            {% else %}
                {{user.username}}
            {% endif %}
            </a>
            |

            <a href="{% url 'logout' %}">
            {% trans "Logout" %}
            </a>
        {% else %}
            <a href="{% url 'login' %}">{% trans "Login" %}</a>
	    |
            <a href="{% url 'wger.manager.views.user.registration' %}">{% trans "Register" %}</a>
        {% endif %}
        |
        <a href="{% url 'contact' %}">{% trans "Get in touch" %}</a>
        |
        <a href="{{i18n_path.de}}">
        <img src="{% static 'images/icons/flag-de.svg' %}"
                 width="18"
                 height="18"
                 alt="{% trans 'German' %}"
                 title="{% trans 'German' %}">
        {% trans "German" %}</a>
        |
        <a href="{{i18n_path.en}}">
        <img src="{% static 'images/icons/flag-en.svg' %}"
                 width="18"
                 height="18"
                 alt="{% trans 'English' %}"
                 title="{% trans 'English' %}">
        {% trans "English" %}</a>
    </div>

    <div class="ym-wrapper">
        <div class="ym-wbox">
            <span class="name">wger</span>
            <span class="regular">| Workout Manager</span>
            
            
        </div>
    </div>
</header>
{% include 'navigation.html' %}
<div id="main">
    <div class="ym-wrapper">
        <section >
            <div class="ym-grid linearize-level-1">
                <article class="ym-g80 ym-gl">
                    <div class="ym-gbox-left box invisible" id="ajax-info">

                    </div>
                </article>
            </div>
        </section>
        <div class="ym-wbox" id="content-wrapper">
            <section class="ym-grid linearize-level-1">
                <div id="current-url" data-current-url="{{request_full_path}}"></div>
                <div id="current-language" data-current-language="{{language.short_name}}"></div>

                {% if not user.is_authenticated or user.get_profile.is_temporary %}
                    <div class="abox ainfo" style="padding:0.6em; margin: 0em 0em 1em 0em;text-align:center;font-size:95%;">
                    {% trans "You are using a guest account, data entered will be deleted after a week."%}
                    {% if not has_demo_data %}
                    <a href="{% url 'demo-entries' %}" rel="nofollow" class="btn btn-success btn-small">{% trans "Create some demo entries" %} »</a>
                    {% endif %}
                    </div>
                {% endif %}
                {% block template %}{% endblock %}
            </section>
        </div>
    </div>
</div>



<footer>
    <div class="ym-wrapper">
    <div class="ym-wbox">
        <div class="ym-grid linearize-level-1">
            <div class="ym-g10 ym-gl">
                <a href="https://github.com/rolandgeider/wger" class="no-hover">
                    <img src="{% static 'images/agpl-v3.svg' %}"
                         width="88"
                         height="31"
                         alt="{% trans 'Released under the Affero GPL' %}"
                         title="{% trans 'Released under the Affero GPL' %}">
                </a>
            </div>
            <div class="ym-g80 ym-gl">
                <div class="ym-gbox-left">
                © <a href="mailto:{{contact_email}}">Roland Geider</a>
                <!--
                – {% trans "Layout based on <a href='http://www.yaml.de'>YAML</a>" %}
                -->
                | <a href="{% url 'about' %}">{% trans "About" %}</a>
                | <a href="{% url 'software:contribute' %}">{% trans "Contribute!" %}</a>
                | <a href="{% url 'contact' %}">{% trans "Get in touch" %}</a>
                </div>
            </div>
            <div class="ym-g10 ym-gr align-right">
                <div class="ym-gbox-right">
                    <em class="dimmed" style="font-size: 80%;">{{version}}</em>
                </div>
            </div>
        </div>
    </div>
    </div>
</footer>
<script src="https://login.persona.org/include.js" type="text/javascript"></script>
<script src="{% static 'js/browserid.js' %}"       type="text/javascript"></script>
<script src="{% static 'js/ubuntu-unity.js' %}"    type="text/javascript"></script>
<script src="{% static 'js/bootstrap.js' %}"       type="text/javascript"></script>
</body>
</html>
