{% import 'languages/'+lang|default('en')+'.html' as lang %}
{% from 'languages/languages.html' import languages %}
{% from 'include/input_macros.html' import select, checkbox %}
<html lang="en">
	<head>
		<title>{% block title %}{% endblock %}</title>
		<meta charset="UTF-8">
		<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
		<meta http-equiv="Pragma" content="no-cache" />
		<meta http-equiv="Expires" content="0" />
		<meta id="translate" style="display: none;" data-delete="{{lang.words.delete|title()}}" data-cancel="{{lang.words.cancel|title()}}" data-add="{{lang.words.add|title()}}"
			  data-superAdmin_pass="{{lang.phrases.superAdmin_pass}}" data-superAdmin_services="{{lang.phrases.superAdmin_services}}" data-change="{{lang.words.change|title()}}"
			  data-change2="{{lang.words.change2|title()}}" data-password="{{lang.words.password}}" data-groups="{{lang.words.groups}}" data-save="{{lang.words.save|title()}}"
			  data-manage="{{lang.words.manage|title()}}" data-services3="{{lang.words.services3}}" data-service="{{lang.words.service}}" data-logout="{{lang.words.logout|title()}}"
			  data-something_wrong="{{lang.words.something_wrong}}" data-check_logs="{{lang.words.check_logs}}" data-wait_mess="{{lang.phrases.wait_mess}}"
			  data-just_save="{{lang.words.just|title()}} {{lang.words.save}}" data-group2="{{lang.words.group2}}" data-upload_and_restart="{{lang.phrases.upload_and_restart|title()}}"
			  data-are_you_sure="{{lang.phrases.are_you_sure}}" data-upload_and_reload="{{lang.phrases.upload_and_reload|title()}}" data-select_server="{{lang.errors.select_server}}"
			  data-empty_name="{{lang.errors.empty_name}}" data-edit="{{lang.words.edit|title()}}" data-close="{{lang.words.close|title()}}" data-server_info="{{lang.phrases.server_info}}"
			  data-generated_config="{{lang.words.generated|title()}} {{lang.words.config}}" data-restart="{{lang.words.restart|title()}}" data-start="{{lang.words.start|title()}}"
			  data-stop="{{lang.words.stop|title()}}" data-reload="{{lang.words.reload|title()}}" data-user_groups="{{lang.phrases.user_groups}}" data-settings="{{lang.words.settings|title()}}"
			  data-for="{{lang.words.for}}" data-show="{{lang.words.show|title()}}" data-hide="{{lang.words.hide|title()}}" data-logs="{{lang.words.logs}}" data-name="{{lang.words.name}}"
			  data-value="{{lang.words.value}}" data-if-title="{{lang.words.if|title()}}" data-then="{{lang.words.then}}" data-autorefresh="{{lang.words.auto|title()}}-{{lang.words.refresh}}"
			  data-raw="{{lang.words.raw|title()}}" data-resp_time="{{lang.smon_page.desc.resp_time}}" />
		{% if title == 'Login page' %}
		<meta name="viewport" content="width=device-width, user-scalable=1">
		{% endif %}
		<link rel="icon" type="image/png" href="{{ url_for('static', filename='images/favicon/favicon.ico') }}" />
		<link rel="apple-touch-icon" sizes="57x57" href="{{ url_for('static', filename='images/favicon/apple-icon-57x57.png') }}">
		<link rel="apple-touch-icon" sizes="60x60" href="{{ url_for('static', filename='images/favicon/apple-icon-60x60.png') }}">
		<link rel="apple-touch-icon" sizes="72x72" href="{{ url_for('static', filename='images/favicon/apple-icon-72x72.png') }}">
		<link rel="apple-touch-icon" sizes="76x76" href="{{ url_for('static', filename='images/favicon/apple-icon-76x76.png') }}">
		<link rel="apple-touch-icon" sizes="114x114" href="{{ url_for('static', filename='images/favicon/apple-icon-114x114.png') }}">
		<link rel="apple-touch-icon" sizes="120x120" href="{{ url_for('static', filename='images/favicon/apple-icon-120x120.png') }}">
		<link rel="apple-touch-icon" sizes="144x144" href="{{ url_for('static', filename='images/favicon/apple-icon-144x144.png') }}">
		<link rel="apple-touch-icon" sizes="152x152" href="{{ url_for('static', filename='images/favicon/apple-icon-152x152.png') }}">
		<link rel="apple-touch-icon" sizes="180x180" href="{{ url_for('static', filename='images/favicon/apple-icon-180x180.png') }}">
		<link rel="icon" type="image/png" sizes="192x192"  href="{{ url_for('static', filename='images/favicon/android-icon-192x192.png') }}">
		<link rel="icon" type="image/png" sizes="32x32" href="{{ url_for('static', filename='images/favicon/favicon-32x32.png') }}">
		<link rel="icon" type="image/png" sizes="96x96" href="{{ url_for('static', filename='images/favicon/favicon-96x96.png') }}">
		<link rel="icon" type="image/png" sizes="16x16" href="{{ url_for('static', filename='images/favicon/favicon-16x16.png') }}">
		<meta name="msapplication-TileColor" content="#ffffff">
		<meta name="msapplication-TileImage" content="{{ url_for('static', filename='images/favicon/ms-icon-144x144.png') }}">
		<meta name="theme-color" content="#ffffff">
		<script defer src="/inc/fa-solid.min.js"></script>
		<script defer src="/inc/fontawesome.min.js"></script>
		<script src="https://use.fontawesome.com/releases/v5.15.4/js/all.js" data-auto-replace-svg="nest"></script>
		<script>FontAwesomeConfig = { searchPseudoElements: true, observeMutations: false };</script>
		<script defer src="/inc/ion.sound.min.js"></script>
		<script defer src="/inc/intro/introjs.min.js"></script>
		<link href="/inc/intro/introjs.min.css" rel="stylesheet">
		<link href="/inc/intro/introjs-modern.css" rel="stylesheet">
		<link href="/inc/css/awesome-6.3.9.css" rel="stylesheet">
		<link href="/inc/css/style-6.3.9.css" rel="stylesheet">
		<link href="/inc/css/nprogress.css" rel="stylesheet">
		<link href="/inc/css/jquery-ui.min.css" rel="stylesheet">
		<link href="/inc/css/jquery-ui.structure.min.css" rel="stylesheet">
		<script src="/inc/jquery-3.6.0.min.js"></script>
		<script src="/inc/jquery-ui.min.js"></script>
		<script src="/inc/js.cookie.min.js"></script>
		<script src="/inc/reconnecting-websocket.js"></script>
		<script src="/inc/hotkeys.js"></script>
		<link href="/inc/css/select2.css" rel="stylesheet" />
		<script src="/inc/select2.js"></script>
		<script src="/inc/script.js"></script>
		<script src="/inc/nprogress.js"></script>
		<link href="/inc/css/toastr-6.3.9.css" rel="stylesheet"/>
		<script src="/inc/toastr.js"></script>
	</head>
	<body>
		{% if user %}
		<input type="hidden" id="token" value="{{ token }}">
		<script>show_version();</script>
		{% include 'include/main_menu.html' %}
		<div class="container">
			<h2>
				{% block h2 %}{% endblock %}
				{% include 'include/login.html' %}
				{% if autorefresh %}
				<span class="auto-refresh">
					<a onclick="pauseAutoRefresh()" class="auto-refresh-pause" style="display: none; margin-top: 3px; position: absolute;"></a>
					<a onclick="pauseAutoResume()" class="auto-refresh-resume" style="display: none; margin-top: 4px; position: absolute;"></a>
					<span id="0" class="auto-refresh-span">
						<span class="auto-refresh-reload auto-refresh-reload-icon"></span>
						{{lang.words.auto|title()}}-{{lang.words.refresh}}
					</span>
					<span id="1" style="display: none;" class="auto-refresh-span">
						<span class="auto-refresh-reload auto-refresh-reload-icon"></span>
						{{lang.words.auto|title()}}-{{lang.words.refresh}}
					</span>
				</span>
				{% endif %}
			</h2>
			{% if autorefresh %}
				{% include 'include/autorefresh_submenu.html' %}
			{% endif %}
			<ul id='browse_history'></ul>
			{% if role %}
				{% if role <= 2 %}
					<div id="apply" style="display: none;">
						<div class="alert alert-warning" id="apply_div"></div>
					</div>
				{% endif %}
			{% endif %}
		{% endif %}
			{% block content %}{% endblock %}
			<div id="ajax-compare"></div>
			<div id="ajax"></div>			
		</div>	
		<div id="show-updates" style="display: none;">	
			<div>
				{{lang.phrases.new_version}} <a href="{{ url_for('admin.admin') }}#updatehapwi" class="link">{{lang.words.w_update|title()}}</a>
			</div>
		</div>	
		<div class="footer">
			<a href="#" id="hide_menu" title="{{lang.words.hide|title()}} {{lang.words.menu}}" style="float: left;">
				<span class="ui-state-default ui-corner-all">
					<span class="ui-icon ui-icon-arrowthick-1-w" id="arrow"></span>
				</span>
			</a>
			<div class="show_menu" style="display: none; float: left;">
				<a href="#" id="show_menu" title="{{lang.words.show|title()}} {{lang.words.menu}}">
					<span class="ui-state-default ui-corner-all">
						<span class="ui-icon ui-icon-arrowthick-1-e" id="arrow"></span>
					</span>
				</a>
			</div>
			<div id="version"></div>
			<div id="logo_footer">
				<a href="https://roxy-wi.org" title="Roxy-WI official site" target="_blank">
					<img src="{{ url_for('static', filename='images/logo_footer.png')}}" alt="logo" id="logo_footer_img" />
				</a>
			</div>
			<div class="footer-div">
				<div id="useful-links">
					<a href="https://roxy-wi.org" class="footer-link" target="_blank" title="{{lang.words.about|title()}} Roxy-WI">{{lang.words.about|title()}}</a>
					<a href="https://github.com/hap-wi/roxy-wi/issues" class="footer-link" target="_blank" title="Community help">{{lang.words.help|title()}}</a>
					<a href="https://sd.roxy-wi.org" class="footer-link" target="_blank" title="Service Desk">SD</a>
					<a href="https://roxy-wi.org/contacts" class="footer-link" target="_blank">{{lang.words.contacts|title()}}</a>
					<a href="https://roxy-wi.org/cabinet" class="footer-link" target="_blank" title="Private cabinet">{{lang.words.cabinet|title()}}</a>
					<a href="https://roxy-wi.org/legal" class="footer-link" target="_blank" title="Legal Note">{{lang.words.legal|title()}}</a>
				</div>
			</div>
		</div>
		<div id="show-user-settings">
			<table class="overview" id="show-user-settings-table" title="{{lang.words.user3|title()}} {{lang.words.settings}}">
				<tr>
					<td class="padding20" style="width: 70%">{{lang.words.alerts|title()}}</td>
					<td>
						{{ checkbox('disable_alerting') }}
					</td>
				</tr>
				<tr class="padding20">
					<td class="padding20">{{lang.words.language|title()}}</td>
					<td>
						{{ select('lang_select', values=languages, selected=lang.lang_short) }}
					</td>
				</tr>
				<tr id="show-user-settings-group"></tr>
			</table>
		</div>
		<div id="statistic" style="display: none;">
			<div style="font-size: 1em;font-weight: bold;padding-top: 10px;" id="statistic-body"></div>
		</div>
		{% include 'include/change_pass_form.html' %}
	</body>
</html>
