main.html 2.15 KB
Newer Older
Dudás Ádám committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
<!DOCTYPE html>
{% load i18n %}
{% get_current_language as lang %}
<html lang="{{lang}}">
<head>
    <title>{% block title %}Superman{% endblock %}</title>
    <link rel="icon" type="image/png" href="/static/favicon.png" />

    <link rel="stylesheet" href="/static/style.css" />
    {{ form.media }}
    {% block js %}{% endblock %}
</head>

<body>
    <div id="header">
        {% block login %}
            <div id="loginblock"><p>
               {% if user.is_authenticated %}
                   {% blocktrans with user.get_profile.name|default:user.username as name %}
                   Logged in: <a href="/me/">{{ name }}</a>.
                   {% endblocktrans %}
                   <a href="/logout/">{% trans "Log out" %}</a>.
                   <a href="{% url project_own %}">{% trans "My projects" %}</a>.
                   {% if user.is_staff %}
                   <a href="/admin/">Admin</a>.
                   {% endif %}
               {% else %}
                   <a href="/secure/login/">{% trans "EduID login" %}</a>.
               {% endif %}
               {% if lang == 'hu' %}
               <a href="/language/en-US/">In English</a>.
               {% else %}
               <a href="/language/hu/">Magyarul</a>.
                   {% if autolang %}
                   <p style="position: absolute; top: 40px; right: 1em;" class="triangle-border top">Böngészője kifejezetten angol tartalmat kért.<br/>A <a href="/language/hu/">magyar változat</a> részletesebb és frissebb!</p>
                   {% endif %}
               {% endif %}
               </p>
           </div>
        {% endblock %}
        {% block header %}
            {% block header_title %}
            <h1><a href="/">{% trans "BME HPC Cluster" %}</a></h1>
            {% endblock %}
        {% endblock %}
    </div>

    {% block messages %}
        {% if messages %}
        <ul class="messagelist">{% for message in messages %}
          <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
        {% endfor %}</ul>
        {% endif %}
    {% endblock messages %}

    <div id="content">
        {% block content %}{% endblock %}
    </div>
</body>
</html>