## -*- coding: utf-8 -*-
<%!
    from pylons.i18n.translation import set_lang, get_lang
    from baruwa import __version__ as baruwaversion, __copyright__ as baruwacopyr
%>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
	<meta http-equiv='Pragma' content='no-cache'>
	<meta http-equiv='Cache-Control' content='no-cache'>
    <title>${config.get('baruwa.custom.name', 'Baruwa')} :: ${_('Error Occured: %s') % c.code}</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="Baruwa Enterprise Edition Leading Spam protection, Virus protection Email Security software">
    <meta name="author" content="Andrew Colin Kissa">
    % if 'lang' in session and session['lang'] and session['lang'] in ['ar', 'he', 'ur', 'fa']:
	<link href="${h.media_url()}css/vendor/bs-rl.min.css" rel="stylesheet">
    <link href="${h.media_url()}css/vendor/bsr-rl.min.css" rel="stylesheet">
    <link href="${h.media_url()}css/vendor/fa-rl.min.css" rel="stylesheet">
    <link href="${h.media_url()}css/vendor/m-styles-rl.min.css" rel="stylesheet">
    <link href="${h.media_url()}css/baruwa.login-rl.css" rel="stylesheet">
    <style>body {direction: rtl;} </style>
    % else:
	<link href="${h.media_url()}css/vendor/bs.min.css" rel="stylesheet">
    <link href="${h.media_url()}css/vendor/bsr.min.css" rel="stylesheet">
    <link href="${h.media_url()}css/vendor/fa.min.css" rel="stylesheet">
    <link href="${h.media_url()}css/vendor/m-styles.min.css" rel="stylesheet">
    <link href="${h.media_url()}css/baruwa.login.min.css" rel="stylesheet">
    % endif
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="${h.media_url()}imgs/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="${h.media_url()}imgs/apple-touch-icon-114-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="${h.media_url()}imgs/apple-touch-icon-72-precomposed.png">
    <link rel="apple-touch-icon-precomposed" href="${h.media_url()}img/apple-touch-icon-57-precomposed.png">
    <link rel="shortcut icon" href="${h.media_url()}imgs/favicon.ico">
    % if 'lang' in session and session['lang']:
    % if session['lang'] in ['ar', 'he', 'ur', 'fa']:
    <style>body {direction: rtl;} </style>
    % endif
    % endif
	<script type="text/javascript">
	var media_url = "${h.media_url()}";
	</script>
	${h.javascript_link(h.media_url() + 'js/vendor/jquery.min.js',
	h.media_url() + 'js/vendor/jquery.mustache.min.js',
	url('jsi18n'),
	h.media_url() + 'js/baruwa/common.min.js')}
  </head>
  <body class="login">
    <div class="container-fluid">
		<div class="row-fluid">
			<div class="span4 hidden-phone"></div>
			<div class="span4">
				<div class="row-fluid">
					<div class="span12" id="logo">
						<img src="${h.media_url()}imgs/logo.png" alt="${config.get('baruwa.custom.name', 'Baruwa')}">
					</div>
				</div>
			</div>
			<div class="span4 hidden-phone"></div>
		</div>
		<div class="row-fluid">
			<div class="span4"></div>
			<div class="span4">
				<div class="row-fluid">
					<div class="span12" id="login">
						<h2 class="form-signin-heading">${h.literal('<i class="icon-key"></i>') if c.code == '403' else h.literal('<i class="icon-random"></i>')} ${_('ERROR: %s' % c.code)}</h2>
						<p>
							% if c.code == '403':
							${_('You do not have sufficient permissions to access this page. Please sign in using an account with sufficient permissions')}
							% elif c.code == '404':
							${_('The resource you requested could not be found.')}
							% else:
							${_('The system was unable to complete your request, the support team has been notified')}
							% endif
							<hr/>
							${h.link_to(_('Return to the home page'), url('home'))}.
						</p>
						<div class="row-fluid">
							<div class="span12">
								&nbsp;
							</div>
						</div>
						<div class="row-fluid">
							<div class="span12">
								<p>
									<small><a href="${config.get('baruwa.custom.url', 'http://www.baruwa.org')}">${config.get('baruwa.custom.name', 'Baruwa')}</a>
									Powered by Baruwa [${baruwaversion}] ${baruwacopyr}</small>
								</p>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="span4"></div>
		</div>
    </div>
  </body>
</html>
