Sith/core/templates/core/base.jinja

171 lines
7.3 KiB
Plaintext
Raw Normal View History

2016-02-01 16:35:55 +00:00
<!DOCTYPE html>
<html lang="fr">
2016-07-19 17:03:16 +00:00
<head>
{% block head %}
<title>{% block title %}{% trans %}Welcome!{% endtrans %}{% endblock %}</title>
<link rel="stylesheet" href="{{ static('core/base.css') }}">
2016-08-10 03:48:06 +00:00
<link rel="stylesheet" href="{{ static('core/multiple-select.css') }}">
2016-09-08 01:29:49 +00:00
<link rel="stylesheet" href="{{ static('core/jquery.datetimepicker.min.css') }}">
2016-08-10 03:48:06 +00:00
<link rel="stylesheet" href="{{ static('core/js/ui/jquery-ui.min.css') }}">
<link rel="stylesheet" href="{{ static('ajax_select/css/ajax_select.css') }}">
2016-08-15 19:04:06 +00:00
<link rel="stylesheet" href="{{ static('core/style.css') }}">
2016-07-19 17:03:16 +00:00
{% endblock %}
</head>
2016-02-01 16:35:55 +00:00
2016-07-19 17:03:16 +00:00
<body>
2016-08-10 03:48:06 +00:00
{% block header %}
2016-08-10 12:48:18 +00:00
{% if not popup %}
<div id="logo"><a href="{{ url('core:index') }}"><img src="{{ static('core/img/logo.png') }}"
alt="{% trans %}Logo{% endtrans %}" /></a></div>
2016-07-19 17:03:16 +00:00
<header>
{% if not user.is_authenticated() %}
2016-09-20 11:19:44 +00:00
<a href="{{ url('core:login') }}">{% trans %}Login{% endtrans %}</a>
2016-07-19 17:03:16 +00:00
<a href="{{ url('core:register') }}">{% trans %}Register{% endtrans %}</a>
{% else %}
2016-09-04 12:17:49 +00:00
<ul>
{% for bar in Counter.objects.filter(type="BAR").all() %}
<li>
2016-09-12 15:34:33 +00:00
<a href="{{ url('counter:activity', counter_id=bar.id) }}" style="padding: 0px">
2016-10-16 16:52:04 +00:00
{% if bar.is_inactive(): %}
<span style="color: orange">&#x3f;</span>
{% elif bar.is_open(): %}
2016-09-04 12:17:49 +00:00
<span style="color: green">&#x2713;</span>
{% else %}
<span style="color: red">&#10007;</span>
{% endif %}
{{ bar }}
2016-09-12 15:34:33 +00:00
</a>
2016-09-04 12:17:49 +00:00
</li>
{% endfor %}
</ul>
2016-09-20 11:19:44 +00:00
<a href="{{ url('core:user_profile', user_id=user.id) }}">{{ user.get_display_name() }}</a>
<a href="{{ url('core:user_tools') }}">{% trans %}Tools{% endtrans %}</a>
2016-07-19 17:03:16 +00:00
<a href="{{ url('core:logout') }}">{% trans %}Logout{% endtrans %}</a>
2016-08-19 00:53:44 +00:00
<form action="{{ url('core:search') }}" method="GET">
<input type="text" placeholder="{% trans %}Search{% endtrans %}" name="query" id="search" />
2016-08-19 00:53:44 +00:00
<input type="submit" value="{% trans %}Search{% endtrans %}" style="display: none;" />
</form>
2016-07-19 17:03:16 +00:00
{% endif %}
</header>
2016-08-10 12:48:18 +00:00
{% else %}
<div id="popupheader">{{ user.get_display_name() }}</div>
{% endif %}
2016-07-19 17:03:16 +00:00
{% endblock %}
2016-08-24 17:11:09 +00:00
<div id="language_chooser">
{% for language in LANGUAGES %}
<form action="{{ url('set_language') }}" method="post">{% csrf_token %}
2016-08-24 19:49:46 +00:00
<input name="next" value="{{ request.path }}" type="hidden" />
2016-08-24 17:11:09 +00:00
<input name="language" value="{{ language[0] }}" type="hidden" />
2016-09-04 12:17:49 +00:00
<input type="submit" value="{{ language[0]|upper }}" />
2016-08-24 17:11:09 +00:00
</form>
{% endfor %}
</div>
2016-08-10 03:48:06 +00:00
{% block nav %}
2016-08-10 12:48:18 +00:00
{% if not popup %}
2016-07-19 17:03:16 +00:00
<nav>
2016-08-29 01:14:53 +00:00
<a href="https://ae.utbm.fr/">{% trans %}Main{% endtrans %}</a>
<a href="https://ae.utbm.fr/matmatronch/">{% trans %}Matmatronch{% endtrans %}</a>
2016-07-22 00:05:29 +00:00
<a href="{{ url('core:page', page_name="Index") }}">{% trans %}Wiki{% endtrans %}</a>
2016-10-26 17:21:19 +00:00
<a href="{{ url('sas:main') }}">{% trans %}SAS{% endtrans %}</a>
2016-08-29 01:14:53 +00:00
<a href="https://ae.utbm.fr/forum2/">{% trans %}Forum{% endtrans %}</a>
2016-08-13 03:33:09 +00:00
<a href="{{ url('core:page', "services") }}">{% trans %}Services{% endtrans %}</a>
2016-08-29 01:14:53 +00:00
<a href="{{ url('core:file_list') }}">{% trans %}Files{% endtrans %}</a>
<a href="https://ae.utbm.fr/article.php?name=liens">{% trans %}Sponsors{% endtrans %}</a>
<a href="https://ae.utbm.fr/article.php?name=docs:index">{% trans %}Help{% endtrans %}</a>
2016-07-19 17:03:16 +00:00
</nav>
2016-08-10 12:48:18 +00:00
{% endif %}
2016-08-10 03:48:06 +00:00
{% endblock %}
2016-02-01 16:35:55 +00:00
2016-07-19 17:03:16 +00:00
<div id="content">
{% if list_of_tabs %}
<div class="tool-bar">
<div>{{ tabs_title }}</div>
<div class="tools">
{% for t in list_of_tabs %}
<a href="{{ t.url }}"
2016-11-30 11:58:52 +00:00
{%- if current_tab == t.slug %}
class="selected_tab"
{%- endif -%}
>{{ t.name }}</a>
{% endfor %}
</div>
<hr>
</div>
{% endif %}
2016-07-19 17:03:16 +00:00
{% if error %}
2016-02-01 16:35:55 +00:00
{{ error }}
2016-07-19 17:03:16 +00:00
{% endif %}
{% block content %}
{% endblock %}
</div>
2016-02-01 16:35:55 +00:00
2016-08-15 19:04:06 +00:00
{% if not popup %}
2016-07-19 17:03:16 +00:00
<footer>
{% block footer %}
2016-11-29 10:26:18 +00:00
<div>
<a href="https://ae.utbm.fr/article.php?name=contacts">{% trans %}Contacts{% endtrans %}</a>
<a href="https://ae.utbm.fr/article.php?name=legals">{% trans %}Legal notices{% endtrans %}</a>
<a href="https://ae.utbm.fr/copyright_agent.php">{% trans %}Intellectual property{% endtrans %}</a>
<a href="https://ae.utbm.fr/article.php?name=docs:index">{% trans %}Help & Documentation{% endtrans %}</a>
<a href="https://ae.utbm.fr/article.php?name=rd">{% trans %}R&D{% endtrans %}</a>
</div>
2016-07-19 17:03:16 +00:00
{% trans %}Site made by good people{% endtrans %}
{% endblock %}
</footer>
2016-08-15 19:04:06 +00:00
{% endif %}
2016-07-19 17:03:16 +00:00
<!--
{% block tests %}
{{ tests }}
{% endblock %}
-->
{% block script %}
2016-08-10 03:48:06 +00:00
<script src="{{ static('core/js/jquery-3.1.0.min.js') }}"></script>
<script src="{{ static('core/js/ui/jquery-ui.min.js') }}"></script>
<script src="{{ static('core/js/ui/i18n/datepicker-fr.js') }}"></script>
2016-09-08 01:29:49 +00:00
<script src="{{ static('core/js/jquery.datetimepicker.full.min.js') }}"></script>
2016-08-10 03:48:06 +00:00
<script src="{{ static('core/js/multiple-select.js') }}"></script>
<script src="{{ static('ajax_select/js/ajax_select.js') }}"></script>
2016-09-08 01:29:49 +00:00
<script src="{{ url('javascript-catalog') }}"></script>
2016-08-10 03:48:06 +00:00
<script src="{{ static('core/js/script.js') }}"></script>
<script>
$('.select_single').multipleSelect({
single: true,
{% if not popup %}
position: 'top',
{% endif %}
});
$('.select_multiple').multipleSelect({
filter: true,
{% if not popup %}
position: 'top',
{% endif %}
});
$('.select_date').datepicker({
changeMonth: true,
changeYear: true,
dayNamesShort: $.datepicker.regional[ "{{ request.LANGUAGE_CODE }}" ].dayNamesShort,
dayNames: $.datepicker.regional[ "{{ request.LANGUAGE_CODE }}" ].dayNames,
monthNamesShort: $.datepicker.regional[ "{{ request.LANGUAGE_CODE }}" ].monthNamesShort,
monthNames: $.datepicker.regional[ "{{ request.LANGUAGE_CODE }}" ].monthNames,
}).datepicker( $.datepicker.regional[ "{{ request.LANGUAGE_CODE }}"] );
$(document).keydown(function (e) {
if ($(e.target).is('input')) { return }
if ($(e.target).is('textarea')) { return }
2016-08-28 23:31:58 +00:00
if ($(e.target).is('select')) { return }
if (e.keyCode == 83) {
$("#search").focus();
return false;
}
});
2016-09-08 01:29:49 +00:00
jQuery.datetimepicker.setLocale('{{ request.LANGUAGE_CODE|lower }}');
$('.select_datetime').datetimepicker({
format: 'Y-m-d H:i:s',
});
2016-08-10 03:48:06 +00:00
</script>
{% endblock %}
2016-07-19 17:03:16 +00:00
</body>
2016-02-01 16:35:55 +00:00
</html>