Files
webgui/emhttp/plugins/dynamix.vm.manager/VMTemplates.page

39 lines
1.3 KiB
Plaintext

Title="Add VM"
Tag="clipboard"
Cond="(pgrep('libvirtd')!==false)"
Markdown="false"
---
<?PHP
/* Copyright 2005-2023, Lime Technology
* Copyright 2012-2023, Bergware International.
* Copyright 2015-2021, 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.
*/
?>
<?
$docroot ??= ($_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp');
require_once "$docroot/plugins/dynamix.vm.manager/include/libvirt_helpers.php";
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=<?=htmlspecialchars(urlencode($strName))?>">
<img src="/plugins/dynamix.vm.manager/templates/images/<?=htmlspecialchars($arrTemplate['icon'])?>" title="<?=htmlspecialchars($strName)?>">
<p><?=htmlspecialchars($strName)?></p>
</a>
</div>
<? endforeach; ?>
<br>
<center><button type='button' onclick='done()'>_(Cancel)_</button></center>
<br>