Add some basic UI for template management
parent
7cab0bd19c
commit
40794c7220
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/*
|
||||
* CVM is more free software. It is licensed under the WTFPL, which
|
||||
* allows you to do pretty much anything with it, without having to
|
||||
* ask permission. Commercial use is allowed, and no attribution is
|
||||
* required. We do politely request that you share your modifications
|
||||
* to benefit other developers, but you are under no enforced
|
||||
* obligation to do so :)
|
||||
*
|
||||
* Please read the accompanying LICENSE document for the full WTFPL
|
||||
* licensing text.
|
||||
*/
|
||||
|
||||
if(!isset($_APP)) { die("Unauthorized."); }
|
||||
|
||||
$sPageContents = NewTemplater::Render("{$sTheme}/admin/template/add", $locale->strings, array(
|
||||
"templates" => array("ubuntu.tar.gz", "fedora.tar.gz", "debian7.tar.gz", "opensuse.tar.gz")
|
||||
));
|
@ -0,0 +1,26 @@
|
||||
<h2>Add templates</h2>
|
||||
|
||||
{%if isempty|templates == true}
|
||||
<p>
|
||||
To add new templates, add the corresponding tar.gz files to /etc/cvm/templates on the master node, and reload this page.
|
||||
New files will be automatically detected, and you will be able to add them as templates from this page.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
All templates will be automatically synchronized to slave nodes.
|
||||
</p>
|
||||
{%else}
|
||||
<form method="post" action="/admin/template/add">
|
||||
{%foreach template in templates}
|
||||
<div class="darkform">
|
||||
<h3>{%?template}</h3>
|
||||
|
||||
<div class="field">
|
||||
<label>Name</label>
|
||||
{%input type="text" group="addtemplate" name="name[]"}
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
{%/foreach}
|
||||
</form>
|
||||
{%/if}
|
Loading…
Reference in New Issue