Files
webgui/plugins/dynamix.vm.manager/VMTemplates.page
bergware e7032eaff3 Update copyright [6]
2005 it is....
2016-06-14 13:31:56 +02:00

56 lines
1.3 KiB
Plaintext

Menu="VMs:2"
Title="Templates"
Cond="(pgrep('libvirtd')!==false)"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Derek Macias, Eric Schultz, Jon Panozzo.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*/
?>
<style type="text/css">
.vmheader {
padding: 10px;
font-size: 16px;
text-align: left;
color: #888;
}
.vmtemplate {
display: inline-block;
width: 80px;
height: 90px;
margin-bottom: 15px;
margin-left: 10px;
text-align: center;
vertical-align: top;
}
.vmtemplate img {
width: 48px;
height: 48px;
}
.vmtemplate p {
text-align: center;
margin-top: 8px;
line-height: 12px;
}
</style>
<? foreach($arrAllTemplates as $strName => $arrTemplate):
if (empty($arrTemplate)) {
// render header
echo '<div class="vmheader">'.$strName.'</div>';
continue;
}
?>
<div class="vmtemplate">
<a href="/VMs/AddVM?template=<?=htmlentities(urlencode($strName))?>">
<img src="/plugins/dynamix.vm.manager/templates/images/<?=$arrTemplate['icon']?>" title="<?=$strName?>">
<p><?=$strName?></p>
</a>
</div>
<? endforeach; ?>