Feature: Vhost templates

Reworked the initial implementation by hpmewes (https://github.com/Froxlor/Froxlor/pull/233) with
- bugfixes all over
- added support for apache and lighttpd also
- added an update sequence (instead of only modifying froxlor.sql)
- added english language variables
- added missing parts in admin_vhostsettings.php
- added parameter replacements as available since PR 244
This commit is contained in:
Johannes Feichtner
2016-02-11 23:21:43 +01:00
parent 0559f3c4d6
commit abe253bc31
21 changed files with 761 additions and 38 deletions

View File

@@ -0,0 +1,40 @@
$header
<article>
<header>
<h2>
<img src="templates/{$theme}/assets/img/icons/phpsettings_big.png" alt="" />&nbsp;
{$lng['menue']['vhostsettings']['maintitle']}
</h2>
</header>
<section>
<div class="overviewadd">
<img src="templates/{$theme}/assets/img/icons/add.png" alt="" />&nbsp;
<a href="{$linker->getLink(array('section' => 'vhostsettings', 'page' => $page, 'action' => 'add'))}">{$lng['admin']['vhostsettings']['addnew']}</a>
</div>
<table class="full hl">
<thead>
<tr>
<th>{$lng['admin']['phpsettings']['description']}</th>
<th>{$lng['admin']['phpsettings']['activedomains']}</th>
<th>{$lng['panel']['options']}</th>
</tr>
</thead>
<tbody>
$tablecontent
</tbody>
</table>
<if 15 < $count>
<div class="overviewadd">
<img src="templates/{$theme}/assets/img/icons/add.png" alt="" />&nbsp;
<a href="{$linker->getLink(array('section' => 'vhostsettings', 'page' => $page, 'action' => 'add'))}">{$lng['admin']['vhostsettings']['addnew']}</a>
</div>
</if>
</section>
</article>
$footer

View File

@@ -0,0 +1,76 @@
$header
<article>
<header>
<h2>
<img src="templates/{$theme}/assets/img/icons/phpsettings_add_big.png" alt="{$title}" />&nbsp;
{$title}
</h2>
</header>
<section>
<form action="{$linker->getLink(array('section' => 'vhostsettings'))}" method="post" enctype="application/x-www-form-urlencoded">
<input type="hidden" name="s" value="$s" />
<input type="hidden" name="page" value="$page" />
<input type="hidden" name="action" value="$action" />
<input type="hidden" name="send" value="send" />
<table class="full">
{$vhostconfig_add_form}
</table>
</form>
</section>
</article>
<br />
<article>
<header>
<h3>
{$lng['admin']['templates']['template_replace_vars']}
</h3>
</header>
<section>
<table class="full">
<thead>
<tr>
<th>{$lng['panel']['variable']}</th>
<th>{$lng['panel']['description']}</th>
</tr>
</thead>
<tbody>
<tr>
<td><em>{CUSTOMER}</em></td>
<td>{$lng['admin']['phpconfig']['customer']}</td>
</tr>
<tr>
<td><em>{DOCROOT}</em></td>
<td>{$lng['admin']['vhostconfig']['docroot']}</td>
</tr>
<tr>
<td><em>{DOMAIN}</em></td>
<td>{$lng['admin']['phpconfig']['domain']}</td>
</tr>
<tr>
<td><em>{IP}</em></td>
<td>{$lng['admin']['vhostconfig']['ip']}</td>
</tr>
<tr>
<td><em>{PORT}</em></td>
<td>{$lng['admin']['vhostconfig']['port']}</td>
</tr>
<tr>
<td><em>{SCHEME}</em></td>
<td>{$lng['admin']['vhostconfig']['scheme']}</td>
</tr>
<tr>
<td><em>{SOCKET}</em></td>
<td>{$lng['admin']['vhostconfig']['socket_dir']}</td>
</tr>
</tbody>
</table>
</section>
</article>
$footer

View File

@@ -0,0 +1,77 @@
$header
<article>
<header>
<h2>
<img src="templates/{$theme}/assets/img/icons/phpsettings_edit_big.png" alt="{$title}" />&nbsp;
{$title}
</h2>
</header>
<section>
<form action="{$linker->getLink(array('section' => 'vhostsettings'))}" method="post" enctype="application/x-www-form-urlencoded">
<input type="hidden" name="s" value="$s"/>
<input type="hidden" name="page" value="$page"/>
<input type="hidden" name="action" value="edit"/>
<input type="hidden" name="id" value="$id"/>
<input type="hidden" name="send" value="send" />
<table class="full">
{$vhostconfig_edit_form}
</table>
</form>
</section>
</article>
<br />
<article>
<header>
<h3>
{$lng['admin']['templates']['template_replace_vars']}
</h3>
</header>
<section>
<table class="full">
<thead>
<tr>
<th>{$lng['panel']['variable']}</th>
<th>{$lng['panel']['description']}</th>
</tr>
</thead>
<tbody>
<tr>
<td><em>{CUSTOMER}</em></td>
<td>{$lng['admin']['phpconfig']['customer']}</td>
</tr>
<tr>
<td><em>{DOCROOT}</em></td>
<td>{$lng['admin']['vhostconfig']['docroot']}</td>
</tr>
<tr>
<td><em>{DOMAIN}</em></td>
<td>{$lng['admin']['phpconfig']['domain']}</td>
</tr>
<tr>
<td><em>{IP}</em></td>
<td>{$lng['admin']['vhostconfig']['ip']}</td>
</tr>
<tr>
<td><em>{PORT}</em></td>
<td>{$lng['admin']['vhostconfig']['port']}</td>
</tr>
<tr>
<td><em>{SCHEME}</em></td>
<td>{$lng['admin']['vhostconfig']['scheme']}</td>
</tr>
<tr>
<td><em>{SOCKET}</em></td>
<td>{$lng['admin']['vhostconfig']['socket_dir']}</td>
</tr>
</tbody>
</table>
</section>
</article>
$footer

View File

@@ -0,0 +1,12 @@
<tr class="top">
<td><strong>{$row['description']}</strong></td>
<td>{$domains}</td>
<td>
<a href="{$linker->getLink(array('section' => 'vhostsettings', 'page' => $page, 'action' => 'edit', 'id' => $row['id']))}">
<img src="templates/{$theme}/assets/img/icons/edit.png" alt="{$lng['panel']['edit']}" title="{$lng['panel']['edit']}" />
</a>
&nbsp;<a href="{$linker->getLink(array('section' => 'vhostsettings', 'page' => $page, 'action' => 'delete', 'id' => $row['id']))}">
<img src="templates/{$theme}/assets/img/icons/delete.png" alt="{$lng['panel']['delete']}" title="{$lng['panel']['delete']}" />
</a>
</td>
</tr>