Commit 711c6787 authored by Dietmar Maurer's avatar Dietmar Maurer

mobile: add missing file

parent 7e365988
package PVE::TouchIndex;
use strict;
use warnings;
sub get_index {
my ($lang, $username, $csrftoken, $console) = @_;
my $page = <<_EOD;
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Proxmox Virtual Environment</title>
<link rel="stylesheet" type="text/css" href="/pve2/touch/resources/css/sencha-touch.css" />
<link rel="stylesheet" type="text/css" href="/pve2/touch/resources/css/pve.css" />
_EOD
my $langfile = "/usr/share/pve-manager/locale/pve-lang-${lang}.js";
if (-f $langfile) {
$page .= "<script type='text/javascript' src='/pve2/locale/pve-lang-${lang}.js'></script>";
} else {
$page .= '<script type="text/javascript">function gettext(buf) { return buf; }</script>';
}
$page .= <<_EOD;
<script type="text/javascript" src="/pve2/touch/sencha-touch-all-debug.js"></script>
<script type="text/javascript" src="/pve2/touch/pvemanager-mobile.js"></script>
<script type="text/javascript">
if (typeof(PVE) === 'undefined') PVE = {};
PVE.UserName = '$username'
PVE.CSRFPreventionToken = '$csrftoken';
</script>
</head>
<body>
</body>
</html>
_EOD
return $page;
}
1;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment