<!DOCTYPE html>
<html lang="fr"
	  tal:define="config context/myams:configuration; static context/myams:static_configuration;">
<head>
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta charset="utf-8">

	<title tal:content="config/title"></title>
	<meta name="description" tal:attributes="content config/description">
	<meta name="author" tal:attributes="content config/author">

	<meta name="HandheldFriendly" content="True">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

	<tal:if define="icon config/icon" condition="icon">
		<!-- Favorite icon -->
		<link rel="shortcut icon" tal:attributes="href icon/@@absolute_url" type="image/x-icon">
		<link rel="icon" tal:attributes="href icon/@@absolute_url" type="image/x-icon">
	</tal:if>

	<tal:var replace="context/myams:resources" />

</head>
<body tal:attributes="class static/body_css_class" i18n:domain="ztfy.myams">

	<!-- Page header -->
	<header id="header">

		<!-- Logo -->
		<div id="logo-group">
			<span id="logo" tal:condition="config/logo">
				<a tal:attributes="href string:${context/@@absolute_url}/@@index.html">
					<img tal:attributes="src string:${config/logo/@@absolute_url}/++display++w200.png;
										 alt config/logo_title;" />
				</a>
			</span>
		</div>
		<!-- end logo -->

		<!-- projects drop-downs -->
		<div id="top-links" tal:condition="static/include_top_links">
			<tal:div replace="structure provider:myams.toplinks" />
		</div>
		<!-- end projects drop-downs -->

		<!-- pulled right: nav area -->
		<div class="pull-right">

			<!-- multiple langs dropdown -->
			<ul class="header-dropdown-list hidden-xs" tal:condition="static/include_flags">
				<li tal:content="structure provider:myams.flags"></li>
			</ul>
			<!-- end multiple langs -->

			<!-- collapse menu button -->
			<div id="hide-menu" class="btn-header pull-right" tal:condition="static/include_menus">
				<span>
					<a href="javascript:void(0);" title="Hide menu" class="hint" i18n:attributes="title"
					   data-ams-hint-gravity="ne"><i class="fa fa-bars"></i></a>
				</span>
			</div>
			<!-- end collapse menu -->

			<!-- logout button -->
			<div id="logout" class="btn-header pull-right">
				<span>
					<a href="logout.html" title="Logout" class="hint" i18n:attributes="title"
					   data-ams-hint-gravity="ne"><i class="fa fa-sign-out"></i></a>
				</span>
			</div>
			<!-- end logout button -->

			<!-- User info -->
			<div id="login-info" class="login-info">

				<!-- User login name and status -->
				<span>
					<span id="activity" class="activity-dropdown">
						<i class="fa fa-user"></i>
					</span>

					<!-- AJAX-dropdown -->
					<div class="ajax-dropdown"
						 tal:condition="static/include_user_activity"
						 tal:content="structure provider:myams.activity">
					</div>
					<!-- END AJAX-DROPDOWN -->

					<tal:var define="shortcuts provider:myams.shortcuts;
									 display_shortcuts python:shortcuts and static.include_user_shortcuts">
						<a href="#" id="show-shortcut" tal:omit-tag="not:display_shortcuts">
							<span class="login-name" tal:content="request/principal/title">FLORAC Thierry</span>
							<i class="fa fa-angle-down" tal:condition="display_shortcuts"></i>
						</a>
						<div id="shortcut" tal:condition="display_shortcuts">
							<tal:var content="structure shortcuts" />
							<div tal:condition="python:static.version_location == 'shortcuts'" class="version">
								<tal:var content="static/application_name" /> - version <tal:var content="static/version" />
							</div>
						</div>
					</tal:var>
				</span>

			</div>
			<!-- end user info -->

			<!-- search mobile button (this is hidden till mobile view port) -->
			<tal:if condition="static/include_mobile_search">
				<tal:var content="structure provider:myams.mobile_search" />
			</tal:if>
			<!-- end search mobile button -->

			<!-- site search field -->
			<tal:if condition="static/include_site_search">
				<tal:var content="structure provider:myams.site_search" />
			</tal:if>
			<!-- end site search field -->

		</div>
		<!-- end nav area -->

	</header>
	<!-- end page header -->

	<!-- Menus panel -->
	<aside id="left-panel">

		<!-- Navigation menus -->
		<tal:if condition="static/include_menus">
			<nav tal:content="structure provider:myams.menus"></nav>
			<span class="minifyme" style=""> <i class="fa fa-arrow-circle-left hit"></i> </span>
		</tal:if>

		<!-- Application version -->
		<div tal:condition="python:static.version_location == 'menus'" class="version">
			<tal:var content="static/application_name" /> - version <tal:var content="static/version" />
		</div>
	</aside>
	<!-- end menus panel -->

	<!-- Main panel -->
	<div id="main" role="main">

		<!-- Ribbon -->
		<div id="ribbon">
			<span class="ribbon-button-alignment">
				<span id="refresh" class="btn btn-ribbon hint" data-ams-hint-gravity="w" data-ams-hint-html="true"
					  title="&lt;span&gt;&lt;i class=&#39;text-warning fa fa-warning&#39;&gt;&lt;/i&gt; WARNING: this will reset all your widgets status!&lt;/span&gt;"
					  tal:condition="static/include_reload_button" i18n:attributes="title">
					<i class="fa fa-refresh"></i>
				</span>
			</span>
			<!-- breadcrumb -->
			<ol class="breadcrumb">
				<li>Home</li>
			</ol>
		</div>
		<!-- end ribbon -->

		<!-- Content -->
		<div id="content" style="opacity: 1;">
			<!--[if lt IE 9]>
			<h1>Votre navigateur est trop ancien. Veuillez installer une version 9 ou sup&eacute;rieure d'Internet Explorer.</h1>
			<![endif]-->
			<tal:var content="structure provider:pagelet" />
		</div>
		<!-- end content -->

	</div>
	<!-- end main panel -->

	<tal:if condition="config/google_analytics_key">
		<!-- Google Analytics -->
		<script type="text/javascript" tal:content="python:'''

		  var _gaq = _gaq || [];
		  _gaq.push(['_setAccount', '%(key)s']);
		  _gaq.push(['_trackPageview']);

		  (function() {
			var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
			ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
			var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
		  })();

		''' % {'key': config.google_analytics_key}"></script>
		<!-- end Google Analytics -->
	</tal:if>

	<tal:if condition="config/uservoice_api_key">
		<!-- UserVoice -->
		<script type="text/javascript" tal:content="python:'''

			UserVoice = window.UserVoice || [];
			(function() {
				var uv=document.createElement('script');
				uv.type='text/javascript';
				uv.async=true;
				uv.src='//widget.uservoice.com/%(key)s.js';
				var s=document.getElementsByTagName('script')[0];
				s.parentNode.insertBefore(uv,s);
			})();

			UserVoice.push(['set', {
				accent_color: '#448dd6',
				trigger_color: 'white',
				trigger_background_color: '#e23a39'
			}]);

			UserVoice.push(['identify', {
				email: '%(mail)s',
				name:  '%(name)s'
			}]);

			UserVoice.push(['addTrigger', { mode: 'contact', trigger_position: 'top-left' }]);

			UserVoice.push(['autoprompt', {}]);
		''' % {'key': config.uservoice_api_key,
			   'name': request.principal.title,
			   'mail': config.getUserEmail()}"></script>
		<!-- end UserVoice -->
	</tal:if>

</body>
</html>
